Changeset 208001 in webkit
- Timestamp:
- Oct 27, 2016, 1:23:06 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 25 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r207937 r208001 446 446 dom/SecurityPolicyViolationEvent.idl 447 447 dom/ShadowRoot.idl 448 dom/ShadowRootMode.idl 448 449 dom/Slotable.idl 449 450 dom/StaticRange.idl -
trunk/Source/WebCore/ChangeLog
r208000 r208001 1 2016-10-27 Chris Dumez <cdumez@apple.com> 2 3 Merge Element::ShadowRootMode and ShadowRoot::Mode enumerations 4 https://bugs.webkit.org/show_bug.cgi?id=164063 5 6 Reviewed by Sam Weinig. 7 8 Merge Element::ShadowRootMode and ShadowRoot::Mode enumerations now 9 that we support having IDL string enumerations in their own IDL file. 10 11 No new tests, no Web-exposed behavior change. 12 13 * CMakeLists.txt: 14 * DerivedSources.cpp: 15 * DerivedSources.make: 16 * WebCore.xcodeproj/project.pbxproj: 17 * css/ElementRuleCollector.cpp: 18 (WebCore::ElementRuleCollector::collectMatchingRules): 19 (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules): 20 (WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules): 21 * css/SelectorChecker.cpp: 22 (WebCore::SelectorChecker::matchRecursively): 23 * dom/CustomElementRegistry.cpp: 24 (WebCore::enqueueUpgradeInShadowIncludingTreeOrder): 25 * dom/Element.cpp: 26 (WebCore::Element::bindingsOffsetParent): 27 (WebCore::Element::addShadowRoot): 28 (WebCore::Element::attachShadow): 29 (WebCore::Element::shadowRootForBindings): 30 (WebCore::Element::userAgentShadowRoot): 31 (WebCore::Element::ensureUserAgentShadowRoot): 32 * dom/Element.h: 33 * dom/Element.idl: 34 * dom/InlineStyleSheetOwner.cpp: 35 (WebCore::parserContextForElement): 36 * dom/Node.cpp: 37 (WebCore::Node::isUnclosedNode): 38 (WebCore::Node::assignedSlotForBindings): 39 (WebCore::Node::isInUserAgentShadowTree): 40 * dom/ShadowRoot.cpp: 41 (WebCore::ShadowRoot::ShadowRoot): 42 * dom/ShadowRoot.h: 43 * dom/ShadowRoot.idl: 44 * dom/ShadowRootMode.h: Added. 45 * dom/ShadowRootMode.idl: Copied from Source/WebCore/dom/ShadowRoot.idl. 46 * dom/SlotAssignment.cpp: 47 (WebCore::SlotAssignment::didChangeSlot): 48 * html/HTMLSummaryElement.cpp: 49 (WebCore::HTMLSummaryElement::create): 50 * inspector/InspectorDOMAgent.cpp: 51 (WebCore::shadowRootType): 52 * rendering/HitTestResult.cpp: 53 (WebCore::moveOutOfUserAgentShadowTree): 54 * rendering/RenderElement.cpp: 55 (WebCore::RenderElement::selectionPseudoStyle): 56 * rendering/RenderLayer.cpp: 57 (WebCore::rendererForScrollbar): 58 * style/StyleScope.cpp: 59 (WebCore::Style::Scope::shouldUseSharedUserAgentShadowTreeStyleResolver): 60 (WebCore::Style::Scope::didChangeStyleSheetEnvironment): 61 * svg/SVGElement.cpp: 62 (WebCore::SVGElement::correspondingUseElement): 63 * testing/Internals.cpp: 64 (WebCore::Internals::shadowRootType): 65 1 66 2016-10-27 Chris Dumez <cdumez@apple.com> 2 67 -
trunk/Source/WebCore/DerivedSources.cpp
r207937 r208001 582 582 #include "JSSVGZoomEvent.cpp" 583 583 #include "JSShadowRoot.cpp" 584 #include "JSShadowRootMode.cpp" 584 585 #include "JSStorage.cpp" 585 586 #if ENABLE(QUOTA) -
trunk/Source/WebCore/DerivedSources.make
r207937 r208001 357 357 $(WebCore)/dom/SecurityPolicyViolationEvent.idl \ 358 358 $(WebCore)/dom/ShadowRoot.idl \ 359 $(WebCore)/dom/ShadowRootMode.idl \ 359 360 $(WebCore)/dom/Slotable.idl \ 360 361 $(WebCore)/dom/StaticRange.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r207937 r208001 1766 1766 46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; }; 1767 1767 46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; }; 1768 46DFF4981DC2603100B80B48 /* ShadowRootMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DFF4961DC2601300B80B48 /* ShadowRootMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1769 46DFF49B1DC2620B00B80B48 /* JSShadowRootMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DFF4991DC261F900B80B48 /* JSShadowRootMode.cpp */; }; 1770 46DFF49C1DC2620B00B80B48 /* JSShadowRootMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DFF49A1DC261F900B80B48 /* JSShadowRootMode.h */; }; 1768 1771 46EBEA021B7D4D6500BE4941 /* CollectionTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1769 1772 46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */; }; … … 8836 8839 46DB7D591B20FE58005651B2 /* VNodeTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VNodeTracker.h; sourceTree = "<group>"; }; 8837 8840 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; }; 8841 46DFF4961DC2601300B80B48 /* ShadowRootMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowRootMode.h; sourceTree = "<group>"; }; 8842 46DFF4971DC2601300B80B48 /* ShadowRootMode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ShadowRootMode.idl; sourceTree = "<group>"; }; 8843 46DFF4991DC261F900B80B48 /* JSShadowRootMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSShadowRootMode.cpp; sourceTree = "<group>"; }; 8844 46DFF49A1DC261F900B80B48 /* JSShadowRootMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSShadowRootMode.h; sourceTree = "<group>"; }; 8838 8845 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionTraversal.h; sourceTree = "<group>"; }; 8839 8846 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMNamedFlowCollectionCustom.cpp; sourceTree = "<group>"; }; … … 20116 20123 9B6BC9601B975966005AE1F0 /* JSShadowRoot.cpp */, 20117 20124 9B6BC9611B975966005AE1F0 /* JSShadowRoot.h */, 20125 46DFF4991DC261F900B80B48 /* JSShadowRootMode.cpp */, 20126 46DFF49A1DC261F900B80B48 /* JSShadowRootMode.h */, 20118 20127 65DF31EF09D1CC60000BE325 /* JSText.cpp */, 20119 20128 65DF31F009D1CC60000BE325 /* JSText.h */, … … 23801 23810 A6D169631346B4C1000EB770 /* ShadowRoot.h */, 23802 23811 9B19B67E1B964E5200348745 /* ShadowRoot.idl */, 23812 46DFF4961DC2601300B80B48 /* ShadowRootMode.h */, 23813 46DFF4971DC2601300B80B48 /* ShadowRootMode.idl */, 23803 23814 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */, 23804 23815 572A7F201C6E5719009C6149 /* SimulatedClick.h */, … … 24743 24754 9393E600151A99F200066F06 /* CSSImageSetValue.h in Headers */, 24744 24755 A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */, 24756 46DFF4981DC2603100B80B48 /* ShadowRootMode.h in Headers */, 24745 24757 A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */, 24746 24758 A80E6D010A1989CA007FB8C5 /* CSSInheritedValue.h in Headers */, … … 25959 25971 B2FA3D970AB75A6F000E5AC4 /* JSSVGFilterElement.h in Headers */, 25960 25972 B27B28260CEF0C0700D39D54 /* JSSVGFontElement.h in Headers */, 25973 46DFF49C1DC2620B00B80B48 /* JSShadowRootMode.h in Headers */, 25961 25974 A83B79050CCAFF15000B0825 /* JSSVGFontFaceElement.h in Headers */, 25962 25975 A83B79000CCAFF15000B0825 /* JSSVGFontFaceFormatElement.h in Headers */, … … 30617 30630 C5A1EA7C152BCF04004D00B6 /* SimplifyMarkupCommand.cpp in Sources */, 30618 30631 572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */, 30632 46DFF49B1DC2620B00B80B48 /* JSShadowRootMode.cpp in Sources */, 30619 30633 FD00D7A414A3F61900734011 /* SincResampler.cpp in Sources */, 30620 30634 51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */, -
trunk/Source/WebCore/css/ElementRuleCollector.cpp
r207280 r208001 145 145 146 146 auto* shadowRoot = m_element.containingShadowRoot(); 147 if (shadowRoot && shadowRoot->mode() == ShadowRoot ::Mode::UserAgent)147 if (shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent) 148 148 collectMatchingShadowPseudoElementRules(matchRequest, ruleRange); 149 149 … … 229 229 ASSERT(m_element.isInShadowTree()); 230 230 auto& shadowRoot = *m_element.containingShadowRoot(); 231 if (shadowRoot.mode() != ShadowRoot ::Mode::UserAgent)231 if (shadowRoot.mode() != ShadowRootMode::UserAgent) 232 232 return; 233 233 // Look up shadow pseudo elements also from the host scope author style as they are web-exposed. … … 295 295 { 296 296 ASSERT(matchRequest.ruleSet); 297 ASSERT(m_element.containingShadowRoot()->mode() == ShadowRoot ::Mode::UserAgent);297 ASSERT(m_element.containingShadowRoot()->mode() == ShadowRootMode::UserAgent); 298 298 299 299 auto& rules = *matchRequest.ruleSet; -
trunk/Source/WebCore/css/SelectorChecker.cpp
r207536 r208001 293 293 return MatchResult::fails(Match::SelectorFailsLocally); 294 294 295 if (context.selector->isWebKitCustomPseudoElement() && root->mode() != ShadowRoot ::Mode::UserAgent)295 if (context.selector->isWebKitCustomPseudoElement() && root->mode() != ShadowRootMode::UserAgent) 296 296 return MatchResult::fails(Match::SelectorFailsLocally); 297 297 } else -
trunk/Source/WebCore/dom/CustomElementRegistry.cpp
r207810 r208001 63 63 element->enqueueToUpgrade(elementInterface); 64 64 if (auto* shadowRoot = element->shadowRoot()) { 65 if (shadowRoot->mode() != ShadowRoot ::Mode::UserAgent)65 if (shadowRoot->mode() != ShadowRootMode::UserAgent) 66 66 enqueueUpgradeInShadowIncludingTreeOrder(*shadowRoot, elementInterface); 67 67 } -
trunk/Source/WebCore/dom/Element.cpp
r207810 r208001 853 853 if (!element || !element->isInShadowTree()) 854 854 return element; 855 return element->containingShadowRoot()->mode() == ShadowRoot ::Mode::UserAgent ? nullptr : element;855 return element->containingShadowRoot()->mode() == ShadowRootMode::UserAgent ? nullptr : element; 856 856 } 857 857 … … 1779 1779 InspectorInstrumentation::didPushShadowRoot(*this, shadowRoot); 1780 1780 1781 if (shadowRoot.mode() == ShadowRoot ::Mode::UserAgent)1781 if (shadowRoot.mode() == ShadowRootMode::UserAgent) 1782 1782 didAddUserAgentShadowRoot(&shadowRoot); 1783 1783 } … … 1858 1858 } 1859 1859 1860 auto shadow = ShadowRoot::create(document(), init.mode == ShadowRootMode::Open ? ShadowRoot::Mode::Open : ShadowRoot::Mode::Closed); 1860 if (init.mode == ShadowRootMode::UserAgent) { 1861 ec = TypeError; 1862 return nullptr; 1863 } 1864 1865 auto shadow = ShadowRoot::create(document(), init.mode); 1861 1866 addShadowRoot(shadow.copyRef()); 1862 1867 return WTFMove(shadow); … … 1869 1874 return nullptr; 1870 1875 1871 if (root->mode() != ShadowRoot ::Mode::Open) {1876 if (root->mode() != ShadowRootMode::Open) { 1872 1877 if (!JSC::jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->world().shadowRootIsAlwaysOpen()) 1873 1878 return nullptr; … … 1880 1885 { 1881 1886 if (ShadowRoot* shadowRoot = this->shadowRoot()) { 1882 ASSERT(shadowRoot->mode() == ShadowRoot ::Mode::UserAgent);1887 ASSERT(shadowRoot->mode() == ShadowRootMode::UserAgent); 1883 1888 return shadowRoot; 1884 1889 } … … 1890 1895 ShadowRoot* shadowRoot = userAgentShadowRoot(); 1891 1896 if (!shadowRoot) { 1892 addShadowRoot(ShadowRoot::create(document(), ShadowRoot ::Mode::UserAgent));1897 addShadowRoot(ShadowRoot::create(document(), ShadowRootMode::UserAgent)); 1893 1898 shadowRoot = userAgentShadowRoot(); 1894 1899 } -
trunk/Source/WebCore/dom/Element.h
r207810 r208001 33 33 #include "ScrollToOptions.h" 34 34 #include "ScrollTypes.h" 35 #include "ShadowRootMode.h" 35 36 #include "SimulatedClickOptions.h" 36 37 #include "StyleChange.h" … … 271 272 WEBCORE_EXPORT ShadowRoot* createShadowRoot(ExceptionCode&); 272 273 273 enum class ShadowRootMode { Open, Closed };274 274 struct ShadowRootInit { 275 275 ShadowRootMode mode; -
trunk/Source/WebCore/dom/Element.idl
r207571 r208001 181 181 }; 182 182 183 enum ShadowRootMode { "open", "closed" };184 185 183 dictionary ShadowRootInit { 186 184 required ShadowRootMode mode; -
trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp
r207695 r208001 49 49 auto* shadowRoot = element.containingShadowRoot(); 50 50 // User agent shadow trees can't contain document-relative URLs. Use blank URL as base allowing cross-document sharing. 51 auto& baseURL = shadowRoot && shadowRoot->mode() == ShadowRoot ::Mode::UserAgent ? blankURL() : element.document().baseURL();51 auto& baseURL = shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent ? blankURL() : element.document().baseURL(); 52 52 53 53 CSSParserContext result = CSSParserContext { element.document(), baseURL, element.document().encoding() }; 54 if (shadowRoot && shadowRoot->mode() == ShadowRoot ::Mode::UserAgent)54 if (shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent) 55 55 result.mode = UASheetMode; 56 56 return result; -
trunk/Source/WebCore/dom/Node.cpp
r207864 r208001 1087 1087 } 1088 1088 auto& root = treeScopeThatCanAccessOtherNode->rootNode(); 1089 if (is<ShadowRoot>(root) && downcast<ShadowRoot>(root).mode() != ShadowRoot ::Mode::Open)1089 if (is<ShadowRoot>(root) && downcast<ShadowRoot>(root).mode() != ShadowRootMode::Open) 1090 1090 break; 1091 1091 } … … 1111 1111 { 1112 1112 auto* shadowRoot = parentShadowRoot(*this); 1113 if (shadowRoot && shadowRoot->mode() == ShadowRoot ::Mode::Open)1113 if (shadowRoot && shadowRoot->mode() == ShadowRootMode::Open) 1114 1114 return shadowRoot->findAssignedSlot(*this); 1115 1115 return nullptr; … … 1129 1129 { 1130 1130 auto* shadowRoot = containingShadowRoot(); 1131 return shadowRoot && shadowRoot->mode() == ShadowRoot ::Mode::UserAgent;1131 return shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent; 1132 1132 } 1133 1133 -
trunk/Source/WebCore/dom/ShadowRoot.cpp
r207669 r208001 49 49 COMPILE_ASSERT(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), shadowroot_should_stay_small); 50 50 51 ShadowRoot::ShadowRoot(Document& document, Mode type)51 ShadowRoot::ShadowRoot(Document& document, ShadowRootMode type) 52 52 : DocumentFragment(document, CreateShadowRoot) 53 53 , TreeScope(*this, document) … … 61 61 : DocumentFragment(document, CreateShadowRoot) 62 62 , TreeScope(*this, document) 63 , m_type( Mode::UserAgent)63 , m_type(ShadowRootMode::UserAgent) 64 64 , m_styleScope(std::make_unique<Style::Scope>(*this)) 65 65 , m_slotAssignment(WTFMove(slotAssignment)) -
trunk/Source/WebCore/dom/ShadowRoot.h
r207669 r208001 33 33 #include "Element.h" 34 34 #include "ExceptionCode.h" 35 #include "ShadowRootMode.h" 35 36 #include "TreeScope.h" 36 37 … … 42 43 class ShadowRoot final : public DocumentFragment, public TreeScope { 43 44 public: 44 enum class Mode : uint8_t { 45 UserAgent = 0, 46 Closed, 47 Open, 48 }; 49 50 static Ref<ShadowRoot> create(Document& document, Mode type) 45 static Ref<ShadowRoot> create(Document& document, ShadowRootMode type) 51 46 { 52 47 return adoptRef(*new ShadowRoot(document, type)); … … 75 70 Element* activeElement() const; 76 71 77 Mode mode() const { return m_type; }72 ShadowRootMode mode() const { return m_type; } 78 73 79 74 void removeAllEventListeners() override; … … 93 88 94 89 protected: 95 ShadowRoot(Document&, Mode);90 ShadowRoot(Document&, ShadowRootMode); 96 91 97 92 ShadowRoot(Document&, std::unique_ptr<SlotAssignment>&&); … … 109 104 110 105 bool m_resetStyleInheritance { false }; 111 Mode m_type {Mode::UserAgent };106 ShadowRootMode m_type { ShadowRootMode::UserAgent }; 112 107 113 108 Element* m_host { nullptr }; -
trunk/Source/WebCore/dom/ShadowRoot.idl
r206795 r208001 34 34 }; 35 35 36 // "user-agent" is a WebKit extension that is not exposed to the Web.37 enum ShadowRootMode { "user-agent", "closed", "open" };38 39 36 ShadowRoot implements DocumentOrShadowRoot; -
trunk/Source/WebCore/dom/ShadowRootMode.idl
r208000 r208001 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 [ 27 EnabledAtRuntime=ShadowDOM, 28 JSGenerateToJSObject 29 ] interface ShadowRoot : DocumentFragment { 30 readonly attribute ShadowRootMode mode; 31 readonly attribute Element host; 32 33 [TreatNullAs=EmptyString, SetterMayThrowLegacyException] attribute DOMString innerHTML; 26 // "user-agent" is a WebKit extension that is not exposed to the Web. 27 enum ShadowRootMode { 28 "user-agent", 29 "closed", 30 "open" 34 31 }; 35 36 // "user-agent" is a WebKit extension that is not exposed to the Web.37 enum ShadowRootMode { "user-agent", "closed", "open" };38 39 ShadowRoot implements DocumentOrShadowRoot; -
trunk/Source/WebCore/dom/SlotAssignment.cpp
r207458 r208001 159 159 } 160 160 161 if (shadowRoot.mode() == ShadowRoot ::Mode::UserAgent)161 if (shadowRoot.mode() == ShadowRootMode::UserAgent) 162 162 return; 163 163 -
trunk/Source/WebCore/html/HTMLSummaryElement.cpp
r205249 r208001 41 41 { 42 42 Ref<HTMLSummaryElement> summary = adoptRef(*new HTMLSummaryElement(tagName, document)); 43 summary->addShadowRoot(ShadowRoot::create(document, ShadowRoot ::Mode::UserAgent));43 summary->addShadowRoot(ShadowRoot::create(document, ShadowRootMode::UserAgent)); 44 44 return summary; 45 45 } -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r207553 r208001 1290 1290 } 1291 1291 1292 static Inspector::Protocol::DOM::ShadowRootType shadowRootType(ShadowRoot ::Mode mode)1292 static Inspector::Protocol::DOM::ShadowRootType shadowRootType(ShadowRootMode mode) 1293 1293 { 1294 1294 switch (mode) { 1295 case ShadowRoot ::Mode::UserAgent:1295 case ShadowRootMode::UserAgent: 1296 1296 return Inspector::Protocol::DOM::ShadowRootType::UserAgent; 1297 case ShadowRoot ::Mode::Closed:1297 case ShadowRootMode::Closed: 1298 1298 return Inspector::Protocol::DOM::ShadowRootType::Closed; 1299 case ShadowRoot ::Mode::Open:1299 case ShadowRootMode::Open: 1300 1300 return Inspector::Protocol::DOM::ShadowRootType::Open; 1301 1301 } -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r207648 r208001 128 128 if (node.isInShadowTree()) { 129 129 if (ShadowRoot* root = node.containingShadowRoot()) { 130 if (root->mode() == ShadowRoot ::Mode::UserAgent)130 if (root->mode() == ShadowRootMode::UserAgent) 131 131 return root->host(); 132 132 } -
trunk/Source/WebCore/rendering/RenderElement.cpp
r207499 r208001 1620 1620 1621 1621 if (ShadowRoot* root = element()->containingShadowRoot()) { 1622 if (root->mode() == ShadowRoot ::Mode::UserAgent) {1622 if (root->mode() == ShadowRootMode::UserAgent) { 1623 1623 if (Element* shadowHost = element()->shadowHost()) 1624 1624 return shadowHost->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r207814 r208001 3098 3098 if (Element* element = renderer.element()) { 3099 3099 if (ShadowRoot* shadowRoot = element->containingShadowRoot()) { 3100 if (shadowRoot->mode() == ShadowRoot ::Mode::UserAgent)3100 if (shadowRoot->mode() == ShadowRootMode::UserAgent) 3101 3101 return shadowRoot->host()->renderer(); 3102 3102 } -
trunk/Source/WebCore/style/StyleScope.cpp
r207717 r208001 80 80 if (!m_shadowRoot) 81 81 return false; 82 if (m_shadowRoot->mode() != ShadowRoot ::Mode::UserAgent)82 if (m_shadowRoot->mode() != ShadowRootMode::UserAgent) 83 83 return false; 84 84 // If we have stylesheets in the user agent shadow tree use per-scope resolver. … … 521 521 for (auto* descendantShadowRoot : m_document.inDocumentShadowRoots()) { 522 522 // Stylesheets is author shadow roots are are potentially affected. 523 if (descendantShadowRoot->mode() != ShadowRoot ::Mode::UserAgent)523 if (descendantShadowRoot->mode() != ShadowRootMode::UserAgent) 524 524 descendantShadowRoot->styleScope().scheduleUpdate(UpdateType::ContentsOrInterpretation); 525 525 } -
trunk/Source/WebCore/svg/SVGElement.cpp
r207458 r208001 433 433 if (!root) 434 434 return nullptr; 435 if (root->mode() != ShadowRoot ::Mode::UserAgent)435 if (root->mode() != ShadowRootMode::UserAgent) 436 436 return nullptr; 437 437 auto* host = root->host(); -
trunk/Source/WebCore/testing/Internals.cpp
r207928 r208001 818 818 819 819 switch (downcast<ShadowRoot>(root).mode()) { 820 case ShadowRoot ::Mode::UserAgent:820 case ShadowRootMode::UserAgent: 821 821 return String("UserAgentShadowRoot"); 822 case ShadowRoot ::Mode::Closed:822 case ShadowRootMode::Closed: 823 823 return String("ClosedShadowRoot"); 824 case ShadowRoot ::Mode::Open:824 case ShadowRootMode::Open: 825 825 return String("OpenShadowRoot"); 826 826 default:
Note:
See TracChangeset
for help on using the changeset viewer.