WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for landing
bug-83251-20120405191209.patch (text/plain), 6.66 KB, created by
Hajime Morrita
on 2012-04-05 03:12:10 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Hajime Morrita
Created:
2012-04-05 03:12:10 PDT
Size:
6.66 KB
patch
obsolete
>Subversion Revision: 113298 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4e219e259315c621923b387bc660e4e838def3c9..16f1f76b1a157d3a3244bf98ba43c8b6566735fb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2012-04-04 MORITA Hajime <morrita@google.com> >+ >+ IsCommentNode flags is a waste. >+ https://bugs.webkit.org/show_bug.cgi?id=83251 >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Effectively nobody uses it. To save a precious NodeFlags bit, this >+ change removes NodeFlags::IsCommentFlag and its companion mehtod >+ Node::isCommentNode(). >+ >+ No new tests. No behaviour change. >+ >+ * dom/CharacterData.h: >+ (WebCore::CharacterData::CharacterData): >+ * dom/Comment.cpp: >+ (WebCore::Comment::Comment): >+ * dom/Node.h: >+ * rendering/RenderTreeAsText.cpp: >+ (WebCore::getTagName): >+ This was the only client of Node::isCommentNode(). Replaced it with nodeType() call. >+ > 2012-04-04 Kent Tamura <tkent@chromium.org> > > Add JavaScript and CSS code for the calendar picker implementation >diff --git a/Source/WebCore/dom/CharacterData.h b/Source/WebCore/dom/CharacterData.h >index f2aaf815349d4ecf1da6dabd29b3e7db5ec89f04..5eaedf3ce4b6d7ccbfa3c41e3cb3a87d0259f957 100644 >--- a/Source/WebCore/dom/CharacterData.h >+++ b/Source/WebCore/dom/CharacterData.h >@@ -52,7 +52,7 @@ protected: > : Node(document, type) > , m_data(!text.isNull() ? text : emptyString()) > { >- ASSERT(type == CreateComment || type == CreateText); >+ ASSERT(type == CreateOther || type == CreateText); > } > > virtual bool rendererIsNeeded(const NodeRenderingContext&); >diff --git a/Source/WebCore/dom/Comment.cpp b/Source/WebCore/dom/Comment.cpp >index 92cffed7adfc8066ecc7f0724b081fd4b9db015e..c2f0582ecef06dc453f459a95d5693c4e9c0a10a 100644 >--- a/Source/WebCore/dom/Comment.cpp >+++ b/Source/WebCore/dom/Comment.cpp >@@ -27,7 +27,7 @@ > namespace WebCore { > > inline Comment::Comment(Document* document, const String& text) >- : CharacterData(document, text, CreateComment) >+ : CharacterData(document, text, CreateOther) > { > } > >diff --git a/Source/WebCore/dom/Node.h b/Source/WebCore/dom/Node.h >index 6635b4c41c63216c17463486569df93e3fafe764..d8ce2beaecd811d4770e858ff1c1863575f4fbf4 100644 >--- a/Source/WebCore/dom/Node.h >+++ b/Source/WebCore/dom/Node.h >@@ -90,7 +90,7 @@ class HTMLPropertiesCollection; > > typedef int ExceptionCode; > >-const int nodeStyleChangeShift = 22; >+const int nodeStyleChangeShift = 21; > > // SyntheticStyleChange means that we need to go through the entire style change logic even though > // no style property has actually changed. It is used to restructure the tree when, for instance, >@@ -212,7 +212,6 @@ public: > bool isStyledElement() const { return getFlag(IsStyledElementFlag); } > virtual bool isFrameOwnerElement() const { return false; } > virtual bool isAttributeNode() const { return false; } >- bool isCommentNode() const { return getFlag(IsCommentFlag); } > virtual bool isCharacterDataNode() const { return false; } > bool isDocumentNode() const; > bool isShadowRoot() const { return getFlag(IsShadowRootFlag); } >@@ -629,42 +628,41 @@ public: > private: > enum NodeFlags { > IsTextFlag = 1, >- IsCommentFlag = 1 << 1, >- IsContainerFlag = 1 << 2, >- IsElementFlag = 1 << 3, >- IsStyledElementFlag = 1 << 4, >- IsHTMLFlag = 1 << 5, >- IsSVGFlag = 1 << 6, >- IsAttachedFlag = 1 << 7, >- ChildNeedsStyleRecalcFlag = 1 << 8, >- InDocumentFlag = 1 << 9, >- IsLinkFlag = 1 << 10, >- IsActiveFlag = 1 << 11, >- IsHoveredFlag = 1 << 12, >- InActiveChainFlag = 1 << 13, >- InDetachFlag = 1 << 14, >- HasRareDataFlag = 1 << 15, >- IsShadowRootFlag = 1 << 16, >+ IsContainerFlag = 1 << 1, >+ IsElementFlag = 1 << 2, >+ IsStyledElementFlag = 1 << 3, >+ IsHTMLFlag = 1 << 4, >+ IsSVGFlag = 1 << 5, >+ IsAttachedFlag = 1 << 6, >+ ChildNeedsStyleRecalcFlag = 1 << 7, >+ InDocumentFlag = 1 << 8, >+ IsLinkFlag = 1 << 9, >+ IsActiveFlag = 1 << 10, >+ IsHoveredFlag = 1 << 11, >+ InActiveChainFlag = 1 << 12, >+ InDetachFlag = 1 << 13, >+ HasRareDataFlag = 1 << 14, >+ IsShadowRootFlag = 1 << 15, > > // These bits are used by derived classes, pulled up here so they can > // be stored in the same memory word as the Node bits above. >- IsParsingChildrenFinishedFlag = 1 << 17, // Element >- IsStyleAttributeValidFlag = 1 << 18, // StyledElement >+ IsParsingChildrenFinishedFlag = 1 << 16, // Element >+ IsStyleAttributeValidFlag = 1 << 17, // StyledElement > #if ENABLE(SVG) >- AreSVGAttributesValidFlag = 1 << 19, // Element >- IsSynchronizingSVGAttributesFlag = 1 << 20, // SVGElement >- HasSVGRareDataFlag = 1 << 21, // SVGElement >+ AreSVGAttributesValidFlag = 1 << 18, // Element >+ IsSynchronizingSVGAttributesFlag = 1 << 19, // SVGElement >+ HasSVGRareDataFlag = 1 << 20, // SVGElement > #endif > > StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), > >- SelfOrAncestorHasDirAutoFlag = 1 << 24, >- HasCustomWillOrDidRecalcStyleFlag = 1 << 25, >- HasCustomStyleForRendererFlag = 1 << 26, >+ SelfOrAncestorHasDirAutoFlag = 1 << 23, >+ HasCustomWillOrDidRecalcStyleFlag = 1 << 24, >+ HasCustomStyleForRendererFlag = 1 << 25, > >- HasNameFlag = 1 << 27, >+ HasNameFlag = 1 << 26, > >- AttributeStyleDirtyFlag = 1 << 28, >+ AttributeStyleDirtyFlag = 1 << 27, > > #if ENABLE(SVG) > DefaultNodeFlags = IsParsingChildrenFinishedFlag | IsStyleAttributeValidFlag | AreSVGAttributesValidFlag >@@ -684,7 +682,6 @@ protected: > enum ConstructionType { > CreateOther = DefaultNodeFlags, > CreateText = DefaultNodeFlags | IsTextFlag, >- CreateComment = DefaultNodeFlags | IsCommentFlag, > CreateContainer = DefaultNodeFlags | IsContainerFlag, > CreateElement = CreateContainer | IsElementFlag, > CreateShadowRoot = CreateContainer | IsShadowRootFlag, >diff --git a/Source/WebCore/rendering/RenderTreeAsText.cpp b/Source/WebCore/rendering/RenderTreeAsText.cpp >index e0315eda89ef5b3e95b3bf5854cb492109d17651..eff2d1acd70638c168e8add38028d8daecc9a082 100644 >--- a/Source/WebCore/rendering/RenderTreeAsText.cpp >+++ b/Source/WebCore/rendering/RenderTreeAsText.cpp >@@ -166,7 +166,7 @@ static String getTagName(Node* n) > { > if (n->isDocumentNode()) > return ""; >- if (n->isCommentNode()) >+ if (n->nodeType() == Node::COMMENT_NODE) > return "COMMENT"; > return n->nodeName(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 83251
:
135763
|
135773
|
135785
| 135794