Changeset 116644 in webkit
- Timestamp:
- May 10, 2012 7:43:27 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116642 r116644 1 2012-05-10 MORITA Hajime <morrita@google.com> 2 3 Node::InDetachFlag could be removed. 4 https://bugs.webkit.org/show_bug.cgi?id=85963 5 6 Reviewed by Antti Koivisto. 7 8 Removed Node::inDetach() since it can never true 9 on the only call site setFocusedNode(). 10 11 No new test. Covered by existing tests. 12 13 * dom/Document.cpp: 14 (WebCore::Document::setFocusedNode): 15 * dom/Node.cpp: 16 (WebCore::Node::detach): 17 * dom/Node.h: 18 (WebCore): 19 (Node): 20 1 21 2012-05-10 Keishi Hattori <keishi@webkit.org> 2 22 -
trunk/Source/WebCore/dom/Document.cpp
r116629 r116644 3647 3647 3648 3648 // Remove focus from the existing focus node (if any) 3649 if (oldFocusedNode && !oldFocusedNode->inDetach()) {3649 if (oldFocusedNode) { 3650 3650 if (oldFocusedNode->active()) 3651 3651 oldFocusedNode->setActive(false); -
trunk/Source/WebCore/dom/Node.cpp
r116629 r116644 1345 1345 void Node::detach() 1346 1346 { 1347 setFlag(InDetachFlag);1348 1349 1347 if (renderer()) 1350 1348 renderer()->destroyAndCleanupAnonymousWrappers(); … … 1361 1359 clearFlag(InActiveChainFlag); 1362 1360 clearFlag(IsAttachedFlag); 1363 1364 clearFlag(InDetachFlag);1365 1361 } 1366 1362 -
trunk/Source/WebCore/dom/Node.h
r116629 r116644 92 92 typedef int ExceptionCode; 93 93 94 const int nodeStyleChangeShift = 2 1;94 const int nodeStyleChangeShift = 20; 95 95 96 96 // SyntheticStyleChange means that we need to go through the entire style change logic even though … … 299 299 bool hasID() const; 300 300 bool hasClass() const; 301 301 302 302 bool active() const { return getFlag(IsActiveFlag); } 303 303 bool inActiveChain() const { return getFlag(InActiveChainFlag); } 304 bool inDetach() const { return getFlag(InDetachFlag); }305 304 bool hovered() const { return getFlag(IsHoveredFlag); } 306 305 bool focused() const { return hasRareData() ? rareDataFocused() : false; } … … 665 664 IsHoveredFlag = 1 << 11, 666 665 InActiveChainFlag = 1 << 12, 667 InDetachFlag = 1 << 13, 668 HasRareDataFlag = 1 << 14, 669 IsShadowRootFlag = 1 << 15, 666 HasRareDataFlag = 1 << 13, 667 IsShadowRootFlag = 1 << 14, 670 668 671 669 // These bits are used by derived classes, pulled up here so they can 672 670 // be stored in the same memory word as the Node bits above. 673 IsParsingChildrenFinishedFlag = 1 << 1 6, // Element674 IsStyleAttributeValidFlag = 1 << 1 7, // StyledElement671 IsParsingChildrenFinishedFlag = 1 << 15, // Element 672 IsStyleAttributeValidFlag = 1 << 16, // StyledElement 675 673 #if ENABLE(SVG) 676 AreSVGAttributesValidFlag = 1 << 1 8, // Element677 IsSynchronizingSVGAttributesFlag = 1 << 1 9, // SVGElement678 HasSVGRareDataFlag = 1 << 20, // SVGElement674 AreSVGAttributesValidFlag = 1 << 17, // Element 675 IsSynchronizingSVGAttributesFlag = 1 << 18, // SVGElement 676 HasSVGRareDataFlag = 1 << 19, // SVGElement 679 677 #endif 680 678 681 679 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), 682 680 683 SelfOrAncestorHasDirAutoFlag = 1 << 2 3,684 HasCustomWillOrDidRecalcStyleFlag = 1 << 2 4,685 HasCustomStyleForRendererFlag = 1 << 2 5,686 687 HasNameFlag = 1 << 2 6,688 689 AttributeStyleDirtyFlag = 1 << 2 7,681 SelfOrAncestorHasDirAutoFlag = 1 << 22, 682 HasCustomWillOrDidRecalcStyleFlag = 1 << 23, 683 HasCustomStyleForRendererFlag = 1 << 24, 684 685 HasNameFlag = 1 << 25, 686 687 AttributeStyleDirtyFlag = 1 << 26, 690 688 691 689 #if ENABLE(SVG) … … 694 692 DefaultNodeFlags = IsParsingChildrenFinishedFlag | IsStyleAttributeValidFlag, 695 693 #endif 696 InNamedFlowFlag = 1 << 2 9,697 HasAttrListFlag = 1 << 30,698 IsFrameOwnerElementFlag = 1 << 3 1694 InNamedFlowFlag = 1 << 28, 695 HasAttrListFlag = 1 << 29, 696 IsFrameOwnerElementFlag = 1 << 30 699 697 }; 700 698 701 // 1bits remaining699 // 2 bits remaining 702 700 703 701 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
Note: See TracChangeset
for help on using the changeset viewer.