Changeset 154809 in webkit
- Timestamp:
- Aug 29, 2013, 7:02:22 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r154778 r154809 1199 1199 dom/NodeIterator.cpp 1200 1200 dom/NodeRareData.cpp 1201 dom/NodeRenderingContext.cpp1202 1201 dom/NodeRenderingTraversal.cpp 1203 1202 dom/NodeTraversal.cpp -
trunk/Source/WebCore/ChangeLog
r154806 r154809 1 2013-08-29 Antti Koivisto <antti@apple.com> 2 3 Remove NodeRenderingContext 4 https://bugs.webkit.org/show_bug.cgi?id=120466 5 6 Reviewed by Andreas Kling. 7 8 Switch the few remaining clients of this class to call the underlying code directly. 9 10 * CMakeLists.txt: 11 * GNUmakefile.list.am: 12 * Target.pri: 13 * WebCore.exp.in: 14 * WebCore.vcxproj/WebCore.vcxproj: 15 * WebCore.xcodeproj/project.pbxproj: 16 * css/StyleResolver.cpp: 17 (WebCore::StyleResolver::State::initForStyleResolve): 18 * dom/DOMAllInOne.cpp: 19 * dom/Node.cpp: 20 * dom/Node.h: 21 22 Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly. 23 24 * dom/NodeRenderingContext.cpp: Removed. 25 * dom/NodeRenderingContext.h: Removed. 26 * dom/ShadowRoot.h: 27 * dom/Text.cpp: 28 * dom/Text.h: 29 * dom/TreeScope.cpp: 30 * dom/TreeScope.h: 31 32 Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed. 33 34 * html/HTMLSummaryElement.cpp: 35 (WebCore::HTMLSummaryElement::detailsElement): 36 * style/StyleResolveTree.cpp: 37 (WebCore::Style::createTextRendererIfNeeded): 38 39 For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation. 40 This difference is probably not testable in current trunk. 41 42 (WebCore::Style::resolveTree): 43 1 44 2013-08-29 Antti Koivisto <antti@apple.com> 2 45 -
trunk/Source/WebCore/GNUmakefile.list.am
r154778 r154809 2969 2969 Source/WebCore/dom/NodeFilter.h \ 2970 2970 Source/WebCore/dom/NodeRareData.cpp \ 2971 Source/WebCore/dom/NodeRenderingContext.cpp \2972 2971 Source/WebCore/dom/Node.h \ 2973 2972 Source/WebCore/dom/NodeIterator.cpp \ … … 2975 2974 Source/WebCore/dom/NodeList.h \ 2976 2975 Source/WebCore/dom/NodeRareData.h \ 2977 Source/WebCore/dom/NodeRenderingContext.h \2978 2976 Source/WebCore/dom/NodeRenderingTraversal.h \ 2979 2977 Source/WebCore/dom/NodeRenderingTraversal.cpp \ -
trunk/Source/WebCore/Target.pri
r154778 r154809 448 448 dom/NodeIterator.cpp \ 449 449 dom/NodeRareData.cpp \ 450 dom/NodeRenderingContext.cpp \451 450 dom/NodeRenderingTraversal.cpp \ 452 451 dom/NodeTraversal.cpp \ … … 1659 1658 dom/NodeIterator.h \ 1660 1659 dom/NodeRareData.h \ 1661 dom/NodeRenderingContext.h \1662 1660 dom/NodeRenderingTraversal.h \ 1663 1661 dom/NodeTraversal.h \ -
trunk/Source/WebCore/WebCore.exp.in
r154780 r154809 666 666 __ZN7WebCore20DisplaySleepDisablerC1EPKc 667 667 __ZN7WebCore20DisplaySleepDisablerD1Ev 668 __ZN7WebCore20NodeRenderingContextC1EPNS_4NodeE669 __ZN7WebCore20NodeRenderingContextD1Ev670 668 __ZN7WebCore20RenderEmbeddedObject29setPluginUnavailabilityReasonENS0_26PluginUnavailabilityReasonE 671 669 __ZN7WebCore20RenderEmbeddedObject37setUnavailablePluginIndicatorIsHiddenEb -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r154783 r154809 12982 12982 </ClCompile> 12983 12983 <ClCompile Include="..\dom\NodeRareData.cpp" /> 12984 <ClCompile Include="..\dom\NodeRenderingContext.cpp">12985 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>12986 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>12987 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>12988 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>12989 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>12990 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>12991 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>12992 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>12993 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>12994 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>12995 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>12996 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>12997 </ClCompile>12998 12984 <ClCompile Include="..\dom\NodeTraversal.cpp" /> 12999 12985 <ClCompile Include="..\dom\Notation.cpp"> … … 20324 20310 <ClInclude Include="..\dom\NodeFilterCondition.h" /> 20325 20311 <ClInclude Include="..\dom\NodeIterator.h" /> 20326 <ClInclude Include="..\dom\NodeRenderingContext.h" />20327 20312 <ClInclude Include="..\dom\NodeTraversal.h" /> 20328 20313 <ClInclude Include="..\dom\Notation.h" /> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r154778 r154809 3450 3450 A7DBF8DD1276919C006B6008 /* TextCheckingHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7DBF8DB1276919C006B6008 /* TextCheckingHelper.cpp */; }; 3451 3451 A7DBF8DE1276919C006B6008 /* TextCheckingHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DBF8DC1276919C006B6008 /* TextCheckingHelper.h */; }; 3452 A7F5D94F1384F02D00A29A87 /* NodeRenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */; };3453 A7F5D9501384F02D00A29A87 /* NodeRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */; };3454 3452 A80A38FE0E50CC8200A25EBC /* PatternCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */; }; 3455 3453 A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */ = {isa = PBXBuildFile; fileRef = A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */; }; … … 9905 9903 A7F1F4C017148BDB00CD4852 /* StorageUsageCallback.idl */ = {isa = PBXFileReference; lastKnownFileType = text; name = StorageUsageCallback.idl; path = Modules/quota/StorageUsageCallback.idl; sourceTree = SOURCE_ROOT; }; 9906 9904 A7F1F4C117148BDB00CD4852 /* WorkerNavigatorStorageQuota.idl */ = {isa = PBXFileReference; lastKnownFileType = text; name = WorkerNavigatorStorageQuota.idl; path = Modules/quota/WorkerNavigatorStorageQuota.idl; sourceTree = SOURCE_ROOT; }; 9907 A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeRenderingContext.cpp; sourceTree = "<group>"; };9908 A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeRenderingContext.h; sourceTree = "<group>"; };9909 9905 A7F73ED9169AD7AA00CBAA4B /* DOMShadowRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMShadowRoot.h; sourceTree = "<group>"; }; 9910 9906 A7F73EDA169AD7AA00CBAA4B /* DOMShadowRoot.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMShadowRoot.mm; sourceTree = "<group>"; }; … … 20351 20347 4FAB48661643A67E00F70C07 /* NodeRareData.cpp */, 20352 20348 63189AE20E83A33300012E41 /* NodeRareData.h */, 20353 A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */,20354 A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */,20355 20349 A7211F231678A54200957444 /* NodeRenderingTraversal.cpp */, 20356 20350 A7211F241678A54200957444 /* NodeRenderingTraversal.h */, … … 22844 22838 A818721B0977D3C0005826D9 /* NodeList.h in Headers */, 22845 22839 63189AE30E83A33300012E41 /* NodeRareData.h in Headers */, 22846 A7F5D9501384F02D00A29A87 /* NodeRenderingContext.h in Headers */,22847 22840 A74F3EF51678B24F00B05A6E /* NodeRenderingTraversal.h in Headers */, 22848 22841 63D7B32D0E78CD3F00F7617C /* NodeRenderStyle.h in Headers */, … … 26039 26032 854FE7340A2297BE0058D7AD /* NodeIterator.cpp in Sources */, 26040 26033 4FFC022B1643B710004E1638 /* NodeRareData.cpp in Sources */, 26041 A7F5D94F1384F02D00A29A87 /* NodeRenderingContext.cpp in Sources */,26042 26034 A74F3EF31678B24A00B05A6E /* NodeRenderingTraversal.cpp in Sources */, 26043 26035 E43105B816750F0C00DB2FB8 /* NodeTraversal.cpp in Sources */, -
trunk/Source/WebCore/css/StyleResolver.cpp
r154327 r154809 84 84 #include "MediaQueryEvaluator.h" 85 85 #include "NodeRenderStyle.h" 86 #include "NodeRendering Context.h"86 #include "NodeRenderingTraversal.h" 87 87 #include "Page.h" 88 88 #include "PageRuleCollector.h" … … 429 429 430 430 if (e) { 431 NodeRenderingContext context(e);432 m_parentNode = context.parentNodeForRenderingAndStyle();433 m_parentStyle = context.resetStyleInheritance()? 0 :431 m_parentNode = NodeRenderingTraversal::parent(e); 432 bool resetStyleInheritance = hasShadowRootParent(e) && toShadowRoot(e->parentNode())->resetStyleInheritance(); 433 m_parentStyle = resetStyleInheritance ? 0 : 434 434 parentStyle ? parentStyle : 435 435 m_parentNode ? m_parentNode->renderStyle() : 0; -
trunk/Source/WebCore/dom/DOMAllInOne.cpp
r154271 r154809 107 107 #include "NodeFilterCondition.cpp" 108 108 #include "NodeIterator.cpp" 109 #include "NodeRenderingContext.cpp"110 109 #include "NodeRenderingTraversal.cpp" 111 110 #include "Notation.cpp" -
trunk/Source/WebCore/dom/Node.cpp
r154769 r154809 80 80 #include "NamedNodeMap.h" 81 81 #include "NodeRareData.h" 82 #include "NodeRenderingContext.h"83 82 #include "NodeTraversal.h" 84 83 #include "Page.h" … … 943 942 } 944 943 945 ContainerNode* Node::parentNodeForRenderingAndStyle()946 {947 return NodeRenderingContext(this).parentNodeForRenderingAndStyle();948 }949 950 944 RenderStyle* Node::virtualComputedStyle(PseudoId pseudoElementSpecifier) 951 945 { -
trunk/Source/WebCore/dom/Node.h
r154414 r154809 464 464 RenderBox* renderBox() const; 465 465 RenderBoxModelObject* renderBoxModelObject() const; 466 467 ContainerNode* parentNodeForRenderingAndStyle();468 466 469 467 // Wrapper for nodes that don't have a renderer, but still cache the style (like HTMLOptionElement). -
trunk/Source/WebCore/dom/ShadowRoot.h
r154371 r154809 59 59 virtual bool applyAuthorStyles() const OVERRIDE { return m_applyAuthorStyles; } 60 60 void setApplyAuthorStyles(bool); 61 virtual bool resetStyleInheritance() const OVERRIDE{ return m_resetStyleInheritance; }61 bool resetStyleInheritance() const { return m_resetStyleInheritance; } 62 62 void setResetStyleInheritance(bool); 63 63 -
trunk/Source/WebCore/dom/Text.cpp
r154738 r154809 25 25 #include "ExceptionCode.h" 26 26 #include "ExceptionCodePlaceholder.h" 27 #include "NodeRenderingContext.h"28 27 #include "RenderCombineText.h" 29 28 #include "RenderText.h" -
trunk/Source/WebCore/dom/Text.h
r154738 r154809 29 29 namespace WebCore { 30 30 31 class NodeRenderingContext;32 31 class RenderText; 33 32 -
trunk/Source/WebCore/dom/TreeScope.cpp
r154679 r154809 362 362 } 363 363 364 bool TreeScope::resetStyleInheritance() const365 {366 return false;367 }368 369 364 void TreeScope::adoptIfNeeded(Node* node) 370 365 { -
trunk/Source/WebCore/dom/TreeScope.h
r150733 r154809 95 95 96 96 virtual bool applyAuthorStyles() const; 97 virtual bool resetStyleInheritance() const;98 97 99 98 // Used by the basic DOM mutation methods (e.g., appendChild()). -
trunk/Source/WebCore/html/HTMLSummaryElement.cpp
r154371 r154809 29 29 #include "KeyboardEvent.h" 30 30 #include "MouseEvent.h" 31 #include "NodeRenderingTraversal.h" 31 32 #include "PlatformMouseEvent.h" 32 33 #include "RenderBlock.h" … … 87 88 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const 88 89 { 89 Node* mayDetails = const_cast<HTMLSummaryElement*>(this)->parentNodeForRenderingAndStyle();90 Node* mayDetails = NodeRenderingTraversal::parent(this); 90 91 if (!mayDetails || !mayDetails->hasTagName(detailsTag)) 91 92 return 0; -
trunk/Source/WebCore/style/StyleResolveTree.cpp
r154806 r154809 33 33 #include "FlowThreadController.h" 34 34 #include "NodeRenderStyle.h" 35 #include "NodeRendering Context.h"35 #include "NodeRenderingTraversal.h" 36 36 #include "NodeTraversal.h" 37 37 #include "RenderFullScreen.h" … … 347 347 Document* document = textNode.document(); 348 348 RefPtr<RenderStyle> style; 349 bool resetStyleInheritance = renderingParentNode->isShadowRoot() && toShadowRoot(renderingParentNode)->resetStyleInheritance();349 bool resetStyleInheritance = textNode.parentNode()->isShadowRoot() && toShadowRoot(textNode.parentNode())->resetStyleInheritance(); 350 350 if (resetStyleInheritance) 351 351 style = document->ensureStyleResolver().defaultStyleForElement(); … … 693 693 } 694 694 695 bool hasParentStyle = current->parentNodeForRenderingAndStyle() && current->parentNodeForRenderingAndStyle()->renderStyle(); 695 ContainerNode* renderingParentNode = NodeRenderingTraversal::parent(current); 696 bool hasParentStyle = renderingParentNode && renderingParentNode->renderStyle(); 696 697 bool hasDirectAdjacentRules = current->childrenAffectedByDirectAdjacentRules(); 697 698 bool hasIndirectAdjacentRules = current->childrenAffectedByForwardPositionalRules();
Note:
See TracChangeset
for help on using the changeset viewer.