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-85963-20120510205916.patch (text/plain), 5.58 KB, created by
Hajime Morrita
on 2012-05-10 04:59:17 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Hajime Morrita
Created:
2012-05-10 04:59:17 PDT
Size:
5.58 KB
patch
obsolete
>Subversion Revision: 116629 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ad3b0e689efef5218394eed016d2ca5f37e28fd1..58b6426963a65a883be21c19edcfac4c39384110 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2012-05-10 MORITA Hajime <morrita@google.com> >+ >+ Node::InDetachFlag could be removed. >+ https://bugs.webkit.org/show_bug.cgi?id=85963 >+ >+ Reviewed by Antti Koivisto. >+ >+ Removed Node::inDetach() since it can never true >+ on the only call site setFocusedNode(). >+ >+ No new test. Covered by existing tests. >+ >+ * dom/Document.cpp: >+ (WebCore::Document::setFocusedNode): >+ * dom/Node.cpp: >+ (WebCore::Node::detach): >+ * dom/Node.h: >+ (WebCore): >+ (Node): >+ > 2012-05-10 MORITA Hajime <morrita@google.com> > > Remove support for Node::willRemove() >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 1a7fc0dc4e11220e2002fad275475d74c0a54819..d6e42ef7d9b52693e05fd6eec84e2357276a3307 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -3646,7 +3646,7 @@ bool Document::setFocusedNode(PassRefPtr<Node> prpNewFocusedNode) > m_focusedNode = 0; > > // Remove focus from the existing focus node (if any) >- if (oldFocusedNode && !oldFocusedNode->inDetach()) { >+ if (oldFocusedNode) { > if (oldFocusedNode->active()) > oldFocusedNode->setActive(false); > >diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp >index 70a1f26fdd5faa2c4da3f368af2eb14aee0ca9b9..0a7248764abe0af7547168629bab8feb50b55c83 100644 >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -1344,8 +1344,6 @@ void Node::attach() > > void Node::detach() > { >- setFlag(InDetachFlag); >- > if (renderer()) > renderer()->destroyAndCleanupAnonymousWrappers(); > setRenderer(0); >@@ -1360,8 +1358,6 @@ void Node::detach() > clearFlag(IsHoveredFlag); > clearFlag(InActiveChainFlag); > clearFlag(IsAttachedFlag); >- >- clearFlag(InDetachFlag); > } > > // FIXME: This code is used by editing. Seems like it could move over there and not pollute Node. >diff --git a/Source/WebCore/dom/Node.h b/Source/WebCore/dom/Node.h >index 9768ea851cff6e590a9825de7a92b6f3dae48c72..875c82afaee1aa1337840e8925ab5fbc1abc2b77 100644 >--- a/Source/WebCore/dom/Node.h >+++ b/Source/WebCore/dom/Node.h >@@ -91,7 +91,7 @@ class HTMLPropertiesCollection; > > typedef int ExceptionCode; > >-const int nodeStyleChangeShift = 21; >+const int nodeStyleChangeShift = 20; > > // 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, >@@ -298,10 +298,9 @@ public: > bool hasName() const { return getFlag(HasNameFlag); } > bool hasID() const; > bool hasClass() const; >- >+ > bool active() const { return getFlag(IsActiveFlag); } > bool inActiveChain() const { return getFlag(InActiveChainFlag); } >- bool inDetach() const { return getFlag(InDetachFlag); } > bool hovered() const { return getFlag(IsHoveredFlag); } > bool focused() const { return hasRareData() ? rareDataFocused() : false; } > bool attached() const { return getFlag(IsAttachedFlag); } >@@ -664,41 +663,40 @@ private: > IsActiveFlag = 1 << 10, > IsHoveredFlag = 1 << 11, > InActiveChainFlag = 1 << 12, >- InDetachFlag = 1 << 13, >- HasRareDataFlag = 1 << 14, >- IsShadowRootFlag = 1 << 15, >+ HasRareDataFlag = 1 << 13, >+ IsShadowRootFlag = 1 << 14, > > // 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 << 16, // Element >- IsStyleAttributeValidFlag = 1 << 17, // StyledElement >+ IsParsingChildrenFinishedFlag = 1 << 15, // Element >+ IsStyleAttributeValidFlag = 1 << 16, // StyledElement > #if ENABLE(SVG) >- AreSVGAttributesValidFlag = 1 << 18, // Element >- IsSynchronizingSVGAttributesFlag = 1 << 19, // SVGElement >- HasSVGRareDataFlag = 1 << 20, // SVGElement >+ AreSVGAttributesValidFlag = 1 << 17, // Element >+ IsSynchronizingSVGAttributesFlag = 1 << 18, // SVGElement >+ HasSVGRareDataFlag = 1 << 19, // SVGElement > #endif > > StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), > >- SelfOrAncestorHasDirAutoFlag = 1 << 23, >- HasCustomWillOrDidRecalcStyleFlag = 1 << 24, >- HasCustomStyleForRendererFlag = 1 << 25, >+ SelfOrAncestorHasDirAutoFlag = 1 << 22, >+ HasCustomWillOrDidRecalcStyleFlag = 1 << 23, >+ HasCustomStyleForRendererFlag = 1 << 24, > >- HasNameFlag = 1 << 26, >+ HasNameFlag = 1 << 25, > >- AttributeStyleDirtyFlag = 1 << 27, >+ AttributeStyleDirtyFlag = 1 << 26, > > #if ENABLE(SVG) > DefaultNodeFlags = IsParsingChildrenFinishedFlag | IsStyleAttributeValidFlag | AreSVGAttributesValidFlag, > #else > DefaultNodeFlags = IsParsingChildrenFinishedFlag | IsStyleAttributeValidFlag, > #endif >- InNamedFlowFlag = 1 << 29, >- HasAttrListFlag = 1 << 30, >- IsFrameOwnerElementFlag = 1 << 31 >+ InNamedFlowFlag = 1 << 28, >+ HasAttrListFlag = 1 << 29, >+ IsFrameOwnerElementFlag = 1 << 30 > }; > >- // 1 bits remaining >+ // 2 bits remaining > > bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } > void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
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 85963
:
140888
|
140891
| 141147