Changeset 286657 in webkit
- Timestamp:
- Dec 8, 2021, 8:55:05 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
- 4 copied
- 3 moved
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt (modified) (1 diff)
-
Source/WebCore/CMakeLists.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/DerivedSources-input.xcfilelist (modified) (2 diffs)
-
Source/WebCore/DerivedSources-output.xcfilelist (modified) (2 diffs)
-
Source/WebCore/DerivedSources.make (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (2 diffs)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (7 diffs)
-
Source/WebCore/bindings/js/JSCSSRuleCustom.cpp (modified) (3 diffs)
-
Source/WebCore/css/CSSImportRule+Layer.idl (moved) (moved from trunk/Source/WebCore/css/CSSLayerRule.idl ) (1 diff)
-
Source/WebCore/css/CSSImportRule.cpp (modified) (2 diffs)
-
Source/WebCore/css/CSSImportRule.h (modified) (1 diff)
-
Source/WebCore/css/CSSLayerBlockRule.cpp (moved) (moved from trunk/Source/WebCore/css/CSSLayerRule.cpp ) (2 diffs)
-
Source/WebCore/css/CSSLayerBlockRule.h (copied) (copied from trunk/Source/WebCore/css/CSSLayerRule.h ) (1 diff)
-
Source/WebCore/css/CSSLayerBlockRule.idl (copied) (copied from trunk/Source/WebCore/css/CSSLayerRule.idl ) (1 diff)
-
Source/WebCore/css/CSSLayerStatementRule.cpp (copied) (copied from trunk/Source/WebCore/css/CSSLayerRule.h ) (1 diff)
-
Source/WebCore/css/CSSLayerStatementRule.h (moved) (moved from trunk/Source/WebCore/css/CSSLayerRule.h ) (1 diff)
-
Source/WebCore/css/CSSLayerStatementRule.idl (copied) (copied from trunk/Source/WebCore/css/CSSLayerRule.idl ) (1 diff)
-
Source/WebCore/css/CSSRule.h (modified) (1 diff)
-
Source/WebCore/css/StyleRule.cpp (modified) (7 diffs)
-
Source/WebCore/css/StyleRule.h (modified) (2 diffs)
-
Source/WebCore/css/StyleRuleType.h (modified) (1 diff)
-
Source/WebCore/css/StyleSheetContents.cpp (modified) (3 diffs)
-
Source/WebCore/css/parser/CSSParserImpl.cpp (modified) (2 diffs)
-
Source/WebCore/inspector/InspectorStyleSheet.cpp (modified) (5 diffs)
-
Source/WebCore/style/InspectorCSSOMWrappers.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r286652 r286657 1 2021-12-08 Antti Koivisto <antti@apple.com> 2 3 [CSS Cascade Layers] Update CSSOM to the spec 4 https://bugs.webkit.org/show_bug.cgi?id=231340 5 <rdar://problem/83958697> 6 7 Reviewed by Simon Fraser. 8 9 * web-platform-tests/css/css-cascade/idlharness-expected.txt: 10 * web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt: 11 1 12 2021-12-08 Antoine Quint <graouts@webkit.org> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt
r286647 r286657 5 5 PASS Partial interface CSSImportRule: valid exposure set 6 6 PASS Partial interface CSSImportRule: member names are unique 7 FAIL CSSLayerBlockRule interface: existence and properties of interface object assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 8 FAIL CSSLayerBlockRule interface object length assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 9 FAIL CSSLayerBlockRule interface object name assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 10 FAIL CSSLayerBlockRule interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 11 FAIL CSSLayerBlockRule interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 12 FAIL CSSLayerBlockRule interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 13 FAIL CSSLayerBlockRule interface: attribute name assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 14 FAIL CSSLayerBlockRule must be primary interface of block assert_own_property: self does not have own property "CSSLayerBlockRule" expected property "CSSLayerBlockRule" missing 15 FAIL Stringification of block assert_class_string: class string of block expected "[object CSSLayerBlockRule]" but got "[object CSSRule]" 16 FAIL CSSLayerBlockRule interface: block must inherit property "name" with the proper type assert_inherits: property "name" not found in prototype chain 17 FAIL CSSLayerStatementRule interface: existence and properties of interface object assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 18 FAIL CSSLayerStatementRule interface object length assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 19 FAIL CSSLayerStatementRule interface object name assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 20 FAIL CSSLayerStatementRule interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 21 FAIL CSSLayerStatementRule interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 22 FAIL CSSLayerStatementRule interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 23 FAIL CSSLayerStatementRule interface: attribute nameList assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 24 FAIL CSSLayerStatementRule must be primary interface of statement assert_own_property: self does not have own property "CSSLayerStatementRule" expected property "CSSLayerStatementRule" missing 25 FAIL Stringification of statement assert_class_string: class string of statement expected "[object CSSLayerStatementRule]" but got "[object CSSRule]" 26 FAIL CSSLayerStatementRule interface: statement must inherit property "nameList" with the proper type assert_inherits: property "nameList" not found in prototype chain 27 FAIL CSSImportRule interface: attribute layerName assert_true: The prototype object must have a property "layerName" expected true got false28 FAIL CSSImportRule interface: layeredImport must inherit property "layerName" with the proper type assert_inherits: property "layerName" not found in prototype chain 7 PASS CSSLayerBlockRule interface: existence and properties of interface object 8 PASS CSSLayerBlockRule interface object length 9 PASS CSSLayerBlockRule interface object name 10 PASS CSSLayerBlockRule interface: existence and properties of interface prototype object 11 PASS CSSLayerBlockRule interface: existence and properties of interface prototype object's "constructor" property 12 PASS CSSLayerBlockRule interface: existence and properties of interface prototype object's @@unscopables property 13 PASS CSSLayerBlockRule interface: attribute name 14 PASS CSSLayerBlockRule must be primary interface of block 15 PASS Stringification of block 16 PASS CSSLayerBlockRule interface: block must inherit property "name" with the proper type 17 PASS CSSLayerStatementRule interface: existence and properties of interface object 18 PASS CSSLayerStatementRule interface object length 19 PASS CSSLayerStatementRule interface object name 20 PASS CSSLayerStatementRule interface: existence and properties of interface prototype object 21 PASS CSSLayerStatementRule interface: existence and properties of interface prototype object's "constructor" property 22 PASS CSSLayerStatementRule interface: existence and properties of interface prototype object's @@unscopables property 23 PASS CSSLayerStatementRule interface: attribute nameList 24 PASS CSSLayerStatementRule must be primary interface of statement 25 PASS Stringification of statement 26 PASS CSSLayerStatementRule interface: statement must inherit property "nameList" with the proper type 27 PASS CSSImportRule interface: attribute layerName 28 PASS CSSImportRule interface: layeredImport must inherit property "layerName" with the proper type 29 29 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt
r286647 r286657 1 1 2 FAIL Basic layer block name assert_implements: undefined 3 FAIL Anonymous layer block name assert_implements: undefined 4 FAIL Basic layer statement name assert_implements: undefined 5 FAIL Layer statement with multiple names assert_implements: undefined 6 FAIL Nested layer block names assert_implements: undefined 7 FAIL Nested layer statement name lists assert_implements: undefined 8 FAIL Import into anonymous layer assert_implements: undefined 9 FAIL Import into named layer assert_implements: undefined 10 FAIL Import without layer assert_implements: undefined 2 PASS Basic layer block name 3 PASS Anonymous layer block name 4 PASS Basic layer statement name 5 PASS Layer statement with multiple names 6 PASS Nested layer block names 7 PASS Nested layer statement name lists 8 PASS Import into anonymous layer 9 PASS Import into named layer 10 PASS Import without layer 11 11 -
trunk/Source/WebCore/CMakeLists.txt
r286640 r286657 751 751 css/CSSKeyframeRule.idl 752 752 css/CSSKeyframesRule.idl 753 css/CSSLayerRule.idl 753 css/CSSLayerBlockRule.idl 754 css/CSSLayerStatementRule.idl 754 755 css/CSSMediaRule.idl 755 756 css/CSSNamespaceRule.idl -
trunk/Source/WebCore/ChangeLog
r286656 r286657 1 2021-12-08 Antti Koivisto <antti@apple.com> 2 3 [CSS Cascade Layers] Update CSSOM to the spec 4 https://bugs.webkit.org/show_bug.cgi?id=231340 5 <rdar://problem/83958697> 6 7 Reviewed by Simon Fraser. 8 9 Add CSSLayerBlockRule and CSSLayerStatementRule interfaces. 10 Also add support for layerName property of CSSImportRule. 11 12 https://www.w3.org/TR/css-cascade-5/#layer-apis 13 14 * DerivedSources-input.xcfilelist: 15 * DerivedSources-output.xcfilelist: 16 * DerivedSources.make: 17 * Sources.txt: 18 * WebCore.xcodeproj/project.pbxproj: 19 * bindings/js/JSCSSRuleCustom.cpp: 20 (WebCore::toJSNewlyCreated): 21 * css/CSSImportRule+Layer.idl: Copied from Source/WebCore/css/CSSLayerRule.idl. 22 * css/CSSImportRule.cpp: 23 (WebCore::CSSImportRule::layerName const): 24 (WebCore::CSSImportRule::cascadeLayerName const): Deleted. 25 * css/CSSImportRule.h: 26 * css/CSSLayerBlockRule.cpp: Renamed from Source/WebCore/css/CSSLayerRule.cpp. 27 (WebCore::CSSLayerBlockRule::CSSLayerBlockRule): 28 (WebCore::CSSLayerBlockRule::create): 29 (WebCore::CSSLayerBlockRule::cssText const): 30 (WebCore::CSSLayerBlockRule::name const): 31 (WebCore::stringFromCascadeLayerName): 32 * css/CSSLayerBlockRule.h: Copied from Source/WebCore/css/CSSLayerRule.h. 33 * css/CSSLayerBlockRule.idl: Copied from Source/WebCore/css/CSSLayerRule.idl. 34 * css/CSSLayerStatementRule.cpp: Copied from Source/WebCore/css/CSSLayerRule.h. 35 (WebCore::CSSLayerStatementRule::CSSLayerStatementRule): 36 (WebCore::CSSLayerStatementRule::create): 37 (WebCore::CSSLayerStatementRule::cssText const): 38 (WebCore::CSSLayerStatementRule::nameList const): 39 (WebCore::CSSLayerStatementRule::reattach): 40 * css/CSSLayerStatementRule.h: Renamed from Source/WebCore/css/CSSLayerRule.h. 41 * css/CSSLayerStatementRule.idl: Renamed from Source/WebCore/css/CSSLayerRule.idl. 42 * css/CSSRule.h: 43 * css/StyleRule.cpp: 44 (WebCore::StyleRuleBase::destroy): 45 (WebCore::StyleRuleBase::copy const): 46 (WebCore::StyleRuleBase::createCSSOMWrapper const): 47 (WebCore::StyleRuleLayer::StyleRuleLayer): 48 * css/StyleRule.h: 49 (WebCore::StyleRuleBase::isGroupRule const): 50 (WebCore::StyleRuleBase::isLayerRule const): 51 * css/StyleRuleType.h: 52 * css/StyleSheetContents.cpp: 53 (WebCore::traverseRulesInVector): 54 (WebCore::StyleSheetContents::traverseSubresources const): 55 * css/parser/CSSParserImpl.cpp: 56 (WebCore::CSSParserImpl::consumeLayerRule): 57 * inspector/InspectorStyleSheet.cpp: 58 (flattenSourceData): 59 (WebCore::asCSSRuleList): 60 (WebCore::buildArrayForGroupings): 61 * style/InspectorCSSOMWrappers.cpp: 62 (WebCore::Style::InspectorCSSOMWrappers::collect): 63 1 64 2021-12-08 Youenn Fablet <youenn@apple.com> 2 65 -
trunk/Source/WebCore/DerivedSources-input.xcfilelist
r286640 r286657 879 879 $(PROJECT_DIR)/css/CSSFontPaletteValuesRule.idl 880 880 $(PROJECT_DIR)/css/CSSGroupingRule.idl 881 $(PROJECT_DIR)/css/CSSImportRule+Layer.idl 881 882 $(PROJECT_DIR)/css/CSSImportRule.idl 882 883 $(PROJECT_DIR)/css/CSSKeyframeRule.idl 883 884 $(PROJECT_DIR)/css/CSSKeyframesRule.idl 884 $(PROJECT_DIR)/css/CSSLayerRule.idl 885 $(PROJECT_DIR)/css/CSSLayerBlockRule.idl 886 $(PROJECT_DIR)/css/CSSLayerStatementRule.idl 885 887 $(PROJECT_DIR)/css/CSSMediaRule.idl 886 888 $(PROJECT_DIR)/css/CSSNamespaceRule.idl … … 1326 1328 $(PROJECT_DIR)/html/parser/create-html-entity-table 1327 1329 $(PROJECT_DIR)/html/shadow/imageOverlay.css 1330 $(PROJECT_DIR)/html/shadow/mac/imageControlsMac.css 1328 1331 $(PROJECT_DIR)/html/shadow/meterElementShadow.css 1329 $(PROJECT_DIR)/html/shadow/mac/imageControlsMac.css1330 1332 $(PROJECT_DIR)/html/track/AudioTrack.idl 1331 1333 $(PROJECT_DIR)/html/track/AudioTrackList.idl -
trunk/Source/WebCore/DerivedSources-output.xcfilelist
r286640 r286657 297 297 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSGroupingRule.cpp 298 298 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSGroupingRule.h 299 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSImportRule+Layer.cpp 300 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSImportRule+Layer.h 299 301 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSImportRule.cpp 300 302 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSImportRule.h … … 305 307 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSKeywordValue.cpp 306 308 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSKeywordValue.h 307 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerRule.cpp 308 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerRule.h 309 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerBlockRule.cpp 310 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerBlockRule.h 311 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerStatementRule.cpp 312 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSLayerStatementRule.h 309 313 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSMathInvert.cpp 310 314 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSMathInvert.h -
trunk/Source/WebCore/DerivedSources.make
r286640 r286657 759 759 $(WebCore)/css/CSSGroupingRule.idl \ 760 760 $(WebCore)/css/CSSImportRule.idl \ 761 $(WebCore)/css/CSSLayerRule.idl \ 761 $(WebCore)/css/CSSImportRule+Layer.idl \ 762 $(WebCore)/css/CSSLayerBlockRule.idl \ 763 $(WebCore)/css/CSSLayerStatementRule.idl \ 762 764 $(WebCore)/css/CSSKeyframeRule.idl \ 763 765 $(WebCore)/css/CSSKeyframesRule.idl \ -
trunk/Source/WebCore/Sources.txt
r286640 r286657 734 734 css/CSSKeyframeRule.cpp 735 735 css/CSSKeyframesRule.cpp 736 css/CSSLayerRule.cpp 736 css/CSSLayerBlockRule.cpp 737 css/CSSLayerStatementRule.cpp 737 738 css/CSSLineBoxContainValue.cpp 738 739 css/CSSMarkup.cpp … … 2926 2927 JSCSSKeyframeRule.cpp 2927 2928 JSCSSKeyframesRule.cpp 2928 JSCSSLayerRule.cpp 2929 JSCSSLayerBlockRule.cpp 2930 JSCSSLayerStatementRule.cpp 2929 2931 JSCSSMediaRule.cpp 2930 2932 JSCSSNamespaceRule.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r286650 r286657 5389 5389 E4F819C626FB4EBF0094E162 /* InlineBoxPainter.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F819C526FB4EBF0094E162 /* InlineBoxPainter.h */; }; 5390 5390 E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F9EEF1156D84C400D23E7E /* StyleSheetContents.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5391 E4FFCEBB2760AC0100A68B03 /* CSSLayerStatementRule.h in Headers */ = {isa = PBXBuildFile; fileRef = E4FFCEB82760AC0000A68B03 /* CSSLayerStatementRule.h */; }; 5392 E4FFCEBE2760AC1600A68B03 /* CSSLayerBlockRule.h in Headers */ = {isa = PBXBuildFile; fileRef = E430C1B727030941003B553F /* CSSLayerBlockRule.h */; }; 5391 5393 E50620842540919C00C43091 /* ContactsRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = E50620832540919B00C43091 /* ContactsRequestData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5392 5394 E51194BF270E7E4A0064FCBA /* ShadowPseudoIds.h in Headers */ = {isa = PBXBuildFile; fileRef = E51194BD270E7E4A0064FCBA /* ShadowPseudoIds.h */; }; … … 17226 17228 E403B7A1251B11930019E800 /* LayoutIntegrationCoverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationCoverage.h; sourceTree = "<group>"; }; 17227 17229 E406F3FB1198307D009D59D6 /* ColorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorData.cpp; path = DerivedSources/WebCore/ColorData.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 17230 E4114B252760DC36007B789B /* CSSImportRule+Layer.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "CSSImportRule+Layer.idl"; sourceTree = "<group>"; }; 17228 17231 E415EB11270C351200E8DA1B /* InlineIteratorInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineIteratorInlineBox.h; sourceTree = "<group>"; }; 17229 17232 E415EB14270C353700E8DA1B /* InlineIteratorInlineBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InlineIteratorInlineBox.cpp; sourceTree = "<group>"; }; … … 17243 17246 E42E76D91C7AF76C00E3614D /* StyleUpdate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleUpdate.cpp; sourceTree = "<group>"; }; 17244 17247 E42E76DB1C7AF77600E3614D /* StyleUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleUpdate.h; sourceTree = "<group>"; }; 17245 E430C1B727030941003B553F /* CSSLayer Rule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSLayerRule.h; sourceTree = "<group>"; };17246 E430C1B92703094E003B553F /* CSSLayer Rule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CSSLayerRule.idl; sourceTree = "<group>"; };17247 E430C1BA27030B86003B553F /* CSSLayer Rule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSLayerRule.cpp; sourceTree = "<group>"; };17248 E430C1B727030941003B553F /* CSSLayerBlockRule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSLayerBlockRule.h; sourceTree = "<group>"; }; 17249 E430C1B92703094E003B553F /* CSSLayerBlockRule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CSSLayerBlockRule.idl; sourceTree = "<group>"; }; 17250 E430C1BA27030B86003B553F /* CSSLayerBlockRule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSLayerBlockRule.cpp; sourceTree = "<group>"; }; 17248 17251 E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeTraversal.cpp; sourceTree = "<group>"; }; 17249 17252 E43105BA16750F1600DB2FB8 /* NodeTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeTraversal.h; sourceTree = "<group>"; }; … … 17462 17465 E4F9EEF1156D84C400D23E7E /* StyleSheetContents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetContents.h; sourceTree = "<group>"; }; 17463 17466 E4FB4B35239BEB10003C336A /* LayoutIntegrationInlineContent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutIntegrationInlineContent.cpp; sourceTree = "<group>"; }; 17467 E4FFCEB82760AC0000A68B03 /* CSSLayerStatementRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSLayerStatementRule.h; sourceTree = "<group>"; }; 17468 E4FFCEB92760AC0000A68B03 /* CSSLayerStatementRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSLayerStatementRule.cpp; sourceTree = "<group>"; }; 17469 E4FFCEBA2760AC0100A68B03 /* CSSLayerStatementRule.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSSLayerStatementRule.idl; sourceTree = "<group>"; }; 17464 17470 E50620832540919B00C43091 /* ContactsRequestData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContactsRequestData.h; sourceTree = "<group>"; }; 17465 17471 E51194BD270E7E4A0064FCBA /* ShadowPseudoIds.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShadowPseudoIds.h; sourceTree = "<group>"; }; … … 31391 31397 A80E6CD40A1989CA007FB8C5 /* CSSImageValue.cpp */, 31392 31398 A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */, 31399 E4114B252760DC36007B789B /* CSSImportRule+Layer.idl */, 31393 31400 A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */, 31394 31401 A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */, … … 31400 31407 31288E710E3005D6003619AE /* CSSKeyframesRule.h */, 31401 31408 316FE0920E6CCD7F00BF6088 /* CSSKeyframesRule.idl */, 31402 E430C1BA27030B86003B553F /* CSSLayerRule.cpp */, 31403 E430C1B727030941003B553F /* CSSLayerRule.h */, 31404 E430C1B92703094E003B553F /* CSSLayerRule.idl */, 31409 E430C1BA27030B86003B553F /* CSSLayerBlockRule.cpp */, 31410 E430C1B727030941003B553F /* CSSLayerBlockRule.h */, 31411 E430C1B92703094E003B553F /* CSSLayerBlockRule.idl */, 31412 E4FFCEB92760AC0000A68B03 /* CSSLayerStatementRule.cpp */, 31413 E4FFCEB82760AC0000A68B03 /* CSSLayerStatementRule.h */, 31414 E4FFCEBA2760AC0100A68B03 /* CSSLayerStatementRule.idl */, 31405 31415 BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */, 31406 31416 BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */, … … 33770 33780 31288E750E3005D6003619AE /* CSSKeyframesRule.h in Headers */, 33771 33781 2A4107A426CB66F8003BF797 /* CSSKeywordValue.h in Headers */, 33782 E4FFCEBE2760AC1600A68B03 /* CSSLayerBlockRule.h in Headers */, 33783 E4FFCEBB2760AC0100A68B03 /* CSSLayerStatementRule.h in Headers */, 33772 33784 BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */, 33773 33785 946D374A1D6D06280077084F /* CSSMarkup.h in Headers */, -
trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
r282806 r286657 33 33 #include "CSSKeyframeRule.h" 34 34 #include "CSSKeyframesRule.h" 35 #include "CSSLayerBlockRule.h" 36 #include "CSSLayerStatementRule.h" 35 37 #include "CSSMediaRule.h" 36 38 #include "CSSNamespaceRule.h" … … 44 46 #include "JSCSSKeyframeRule.h" 45 47 #include "JSCSSKeyframesRule.h" 48 #include "JSCSSLayerBlockRule.h" 49 #include "JSCSSLayerStatementRule.h" 46 50 #include "JSCSSMediaRule.h" 47 51 #include "JSCSSNamespaceRule.h" … … 89 93 case CSSRule::COUNTER_STYLE_RULE: 90 94 return createWrapper<CSSCounterStyleRule>(globalObject, WTFMove(rule)); 91 default: 95 case CSSRule::LAYER_BLOCK_RULE: 96 return createWrapper<CSSLayerBlockRule>(globalObject, WTFMove(rule)); 97 case CSSRule::LAYER_STATEMENT_RULE: 98 return createWrapper<CSSLayerStatementRule>(globalObject, WTFMove(rule)); 99 case CSSRule::UNKNOWN_RULE: 100 case CSSRule::CHARSET_RULE: 101 case CSSRule::MARGIN_RULE: 92 102 return createWrapper<CSSRule>(globalObject, WTFMove(rule)); 93 103 } -
trunk/Source/WebCore/css/CSSImportRule+Layer.idl
r286656 r286657 28 28 */ 29 29 30 typedef USVString CSSOMString; 31 30 32 [ 31 33 Exposed=Window 32 ] interface CSSLayerRule : CSSGroupingRule { 34 ] partial interface CSSImportRule { 35 readonly attribute CSSOMString? layerName; 33 36 }; -
trunk/Source/WebCore/css/CSSImportRule.cpp
r286558 r286657 23 23 #include "CSSImportRule.h" 24 24 25 #include "CSSLayerBlockRule.h" 25 26 #include "CSSStyleSheet.h" 26 27 #include "MediaList.h" … … 57 58 } 58 59 59 const std::optional<CascadeLayerName>& CSSImportRule::cascadeLayerName() const60 String CSSImportRule::layerName() const 60 61 { 61 return m_importRule.get().cascadeLayerName(); 62 auto name = m_importRule.get().cascadeLayerName(); 63 if (!name) 64 return { }; 65 66 return stringFromCascadeLayerName(*name); 62 67 } 63 68 -
trunk/Source/WebCore/css/CSSImportRule.h
r286558 r286657 39 39 WEBCORE_EXPORT MediaList& media() const; 40 40 WEBCORE_EXPORT CSSStyleSheet* styleSheet() const; 41 WEBCORE_EXPORT const std::optional<CascadeLayerName>& cascadeLayerName() const;41 String layerName() const; 42 42 43 43 private: -
trunk/Source/WebCore/css/CSSLayerBlockRule.cpp
r286656 r286657 29 29 30 30 #include "config.h" 31 #include "CSSLayer Rule.h"31 #include "CSSLayerBlockRule.h" 32 32 33 33 #include "CSSStyleSheet.h" … … 37 37 namespace WebCore { 38 38 39 CSSLayer Rule::CSSLayerRule(StyleRuleLayer& rule, CSSStyleSheet* parent)39 CSSLayerBlockRule::CSSLayerBlockRule(StyleRuleLayer& rule, CSSStyleSheet* parent) 40 40 : CSSGroupingRule(rule, parent) 41 41 { 42 ASSERT(!rule.isStatement()); 42 43 } 43 44 44 Ref<CSSLayer Rule> CSSLayerRule::create(StyleRuleLayer& rule, CSSStyleSheet* parent)45 Ref<CSSLayerBlockRule> CSSLayerBlockRule::create(StyleRuleLayer& rule, CSSStyleSheet* parent) 45 46 { 46 return adoptRef(*new CSSLayer Rule(rule, parent));47 return adoptRef(*new CSSLayerBlockRule(rule, parent)); 47 48 } 48 49 49 String CSSLayerRule::cssText() const 50 String CSSLayerBlockRule::cssText() const 51 { 52 StringBuilder result; 53 54 result.append("@layer "); 55 if (auto name = this->name(); !name.isEmpty()) 56 result.append(name, " "); 57 result.append("{\n"); 58 appendCSSTextForItems(result); 59 result.append('}'); 60 61 return result.toString(); 62 } 63 64 String CSSLayerBlockRule::name() const 50 65 { 51 66 auto& layer = downcast<StyleRuleLayer>(groupRule()); 52 67 53 StringBuilder result; 68 if (layer.name().isEmpty()) 69 return emptyString(); 54 70 55 if (layer.isStatement()) { 56 result.append("@layer "); 57 for (auto& name : layer.nameList()) { 58 result.append(stringFromCascadeLayerName(name)); 59 if (&name != &layer.nameList().last()) 60 result.append(", "); 61 } 62 result.append(';'); 63 return result.toString(); 64 } 65 66 result.append("@layer "); 67 if (auto name = layerName()) 68 result.append(*name, " "); 69 result.append("{\n"); 70 appendCSSTextForItems(result); 71 result.append('}'); 72 return result.toString(); 71 return stringFromCascadeLayerName(layer.name()); 73 72 } 74 73 75 std::optional<String> CSSLayerRule::layerName() const 76 { 77 auto& layer = downcast<StyleRuleLayer>(groupRule()); 78 79 if (!layer.isStatement() && !layer.name().isEmpty()) 80 return stringFromCascadeLayerName(layer.name()); 81 82 return std::nullopt; 83 } 84 85 String CSSLayerRule::stringFromCascadeLayerName(const CascadeLayerName& name) 74 String stringFromCascadeLayerName(const CascadeLayerName& name) 86 75 { 87 76 StringBuilder result; -
trunk/Source/WebCore/css/CSSLayerBlockRule.h
r286656 r286657 35 35 namespace WebCore { 36 36 37 class StyleRuleLayer; 38 39 class CSSLayerRule final : public CSSGroupingRule { 37 class CSSLayerBlockRule final : public CSSGroupingRule { 40 38 public: 41 static Ref<CSSLayer Rule> create(StyleRuleLayer&, CSSStyleSheet* parent);39 static Ref<CSSLayerBlockRule> create(StyleRuleLayer&, CSSStyleSheet* parent); 42 40 43 41 String cssText() const final; 44 std::optional<String> layerName() const; 45 46 static String stringFromCascadeLayerName(const CascadeLayerName&); 42 String name() const; 47 43 48 44 private: 49 CSSLayer Rule(StyleRuleLayer&, CSSStyleSheet*);50 CSSRule::Type type() const final { return LAYER_ RULE; }45 CSSLayerBlockRule(StyleRuleLayer&, CSSStyleSheet*); 46 CSSRule::Type type() const final { return LAYER_BLOCK_RULE; } 51 47 }; 48 49 String stringFromCascadeLayerName(const CascadeLayerName&); 52 50 53 51 } // namespace WebCore 54 52 55 SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSLayer Rule, CSSRule::LAYER_RULE)53 SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSLayerBlockRule, CSSRule::LAYER_BLOCK_RULE) -
trunk/Source/WebCore/css/CSSLayerBlockRule.idl
r286656 r286657 28 28 */ 29 29 30 typedef USVString CSSOMString; 31 30 32 [ 31 33 Exposed=Window 32 ] interface CSSLayerRule : CSSGroupingRule { 34 ] interface CSSLayerBlockRule : CSSGroupingRule { 35 readonly attribute CSSOMString name; 33 36 }; -
trunk/Source/WebCore/css/CSSLayerStatementRule.cpp
r286656 r286657 28 28 */ 29 29 30 #pragma once 30 #include "config.h" 31 #include "CSSLayerStatementRule.h" 31 32 32 #include "CSS GroupingRule.h"33 #include "CSSStyleSheet.h" 33 34 #include "StyleRule.h" 35 #include <wtf/text/StringBuilder.h> 34 36 35 37 namespace WebCore { 36 38 37 class StyleRuleLayer; 39 CSSLayerStatementRule::CSSLayerStatementRule(StyleRuleLayer& rule, CSSStyleSheet* parent) 40 : CSSRule(parent) 41 , m_layerRule(rule) 42 { 43 ASSERT(rule.isStatement()); 44 } 38 45 39 class CSSLayerRule final : public CSSGroupingRule { 40 public: 41 static Ref<CSSLayerRule> create(StyleRuleLayer&, CSSStyleSheet* parent); 46 Ref<CSSLayerStatementRule> CSSLayerStatementRule::create(StyleRuleLayer& rule, CSSStyleSheet* parent) 47 { 48 return adoptRef(*new CSSLayerStatementRule(rule, parent)); 49 } 42 50 43 String cssText() const final; 44 std::optional<String> layerName() const; 51 String CSSLayerStatementRule::cssText() const 52 { 53 StringBuilder result; 45 54 46 static String stringFromCascadeLayerName(const CascadeLayerName&);55 result.append("@layer "); 47 56 48 private: 49 CSSLayerRule(StyleRuleLayer&, CSSStyleSheet*); 50 CSSRule::Type type() const final { return LAYER_RULE; } 51 }; 57 auto nameList = this->nameList(); 58 for (auto& name : nameList) { 59 result.append(name); 60 if (&name != &nameList.last()) 61 result.append(", "); 62 } 63 result.append(';'); 64 65 return result.toString(); 66 } 67 68 Vector<String> CSSLayerStatementRule::nameList() const 69 { 70 Vector<String> result; 71 72 for (auto& name : m_layerRule.get().nameList()) 73 result.append(stringFromCascadeLayerName(name)); 74 75 return result; 76 } 77 78 void CSSLayerStatementRule::reattach(StyleRuleBase& rule) 79 { 80 m_layerRule = static_cast<StyleRuleLayer&>(rule); 81 } 52 82 53 83 } // namespace WebCore 54 84 55 SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSLayerRule, CSSRule::LAYER_RULE) -
trunk/Source/WebCore/css/CSSLayerStatementRule.h
r286656 r286657 35 35 namespace WebCore { 36 36 37 class StyleRuleLayer; 38 39 class CSSLayerRule final : public CSSGroupingRule { 37 class CSSLayerStatementRule final : public CSSRule { 40 38 public: 41 static Ref<CSSLayer Rule> create(StyleRuleLayer&, CSSStyleSheet* parent);39 static Ref<CSSLayerStatementRule> create(StyleRuleLayer&, CSSStyleSheet* parent); 42 40 43 41 String cssText() const final; 44 std::optional<String> layerName() const; 45 46 static String stringFromCascadeLayerName(const CascadeLayerName&); 42 Vector<String> nameList() const; 47 43 48 44 private: 49 CSSLayerRule(StyleRuleLayer&, CSSStyleSheet*); 50 CSSRule::Type type() const final { return LAYER_RULE; } 45 CSSLayerStatementRule(StyleRuleLayer&, CSSStyleSheet*); 46 CSSRule::Type type() const final { return LAYER_STATEMENT_RULE; } 47 void reattach(StyleRuleBase&) final; 48 49 Ref<StyleRuleLayer> m_layerRule; 51 50 }; 52 51 53 52 } // namespace WebCore 54 53 55 SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSLayer Rule, CSSRule::LAYER_RULE)54 SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSLayerStatementRule, CSSRule::LAYER_STATEMENT_RULE) -
trunk/Source/WebCore/css/CSSLayerStatementRule.idl
r286656 r286657 28 28 */ 29 29 30 typedef USVString CSSOMString; 31 30 32 [ 31 33 Exposed=Window 32 ] interface CSSLayerRule : CSSGroupingRule { 34 ] interface CSSLayerStatementRule : CSSRule { 35 readonly attribute FrozenArray<CSSOMString> nameList; 33 36 }; -
trunk/Source/WebCore/css/CSSRule.h
r283170 r286657 52 52 COUNTER_STYLE_RULE = 11, 53 53 SUPPORTS_RULE = 12, 54 LAYER_RULE = 16, 54 LAYER_BLOCK_RULE = 16, 55 LAYER_STATEMENT_RULE = 17, 55 56 FONT_PALETTE_VALUES_RULE = 19, 56 57 }; -
trunk/Source/WebCore/css/StyleRule.cpp
r283752 r286657 30 30 #include "CSSKeyframeRule.h" 31 31 #include "CSSKeyframesRule.h" 32 #include "CSSLayerRule.h" 32 #include "CSSLayerBlockRule.h" 33 #include "CSSLayerStatementRule.h" 33 34 #include "CSSMediaRule.h" 34 35 #include "CSSNamespaceRule.h" … … 100 101 delete downcast<StyleRuleCounterStyle>(this); 101 102 return; 102 case StyleRuleType::Layer: 103 case StyleRuleType::LayerBlock: 104 case StyleRuleType::LayerStatement: 103 105 delete downcast<StyleRuleLayer>(this); 104 106 return; … … 129 131 case StyleRuleType::CounterStyle: 130 132 return downcast<StyleRuleCounterStyle>(*this).copy(); 131 case StyleRuleType::Layer: 133 case StyleRuleType::LayerBlock: 134 case StyleRuleType::LayerStatement: 132 135 return downcast<StyleRuleLayer>(*this).copy(); 133 136 case StyleRuleType::Import: … … 178 181 rule = CSSCounterStyleRule::create(downcast<StyleRuleCounterStyle>(self), parentSheet); 179 182 break; 180 case StyleRuleType::Layer: 181 rule = CSSLayerRule::create(downcast<StyleRuleLayer>(self), parentSheet); 183 case StyleRuleType::LayerBlock: 184 rule = CSSLayerBlockRule::create(downcast<StyleRuleLayer>(self), parentSheet); 185 break; 186 case StyleRuleType::LayerStatement: 187 rule = CSSLayerStatementRule::create(downcast<StyleRuleLayer>(self), parentSheet); 182 188 break; 183 189 case StyleRuleType::Unknown: … … 480 486 481 487 StyleRuleLayer::StyleRuleLayer(Vector<CascadeLayerName>&& nameList) 482 : StyleRuleGroup(StyleRuleType::Layer , Vector<RefPtr<StyleRuleBase>> { })488 : StyleRuleGroup(StyleRuleType::LayerStatement, Vector<RefPtr<StyleRuleBase>> { }) 483 489 , m_nameVariant(WTFMove(nameList)) 484 490 { … … 486 492 487 493 StyleRuleLayer::StyleRuleLayer(CascadeLayerName&& name, Vector<RefPtr<StyleRuleBase>>&& rules) 488 : StyleRuleGroup(StyleRuleType::Layer , WTFMove(rules))494 : StyleRuleGroup(StyleRuleType::LayerBlock, WTFMove(rules)) 489 495 , m_nameVariant(WTFMove(name)) 490 496 { … … 492 498 493 499 StyleRuleLayer::StyleRuleLayer(CascadeLayerName&& name, std::unique_ptr<DeferredStyleGroupRuleList>&& rules) 494 : StyleRuleGroup(StyleRuleType::Layer , WTFMove(rules))500 : StyleRuleGroup(StyleRuleType::LayerBlock, WTFMove(rules)) 495 501 , m_nameVariant(WTFMove(name)) 496 502 { -
trunk/Source/WebCore/css/StyleRule.h
r284213 r286657 61 61 bool isPageRule() const { return type() == StyleRuleType::Page; } 62 62 bool isStyleRule() const { return type() == StyleRuleType::Style; } 63 bool isGroupRule() const { return type() == StyleRuleType::Media || type() == StyleRuleType::Supports || type() == StyleRuleType::Layer ; }63 bool isGroupRule() const { return type() == StyleRuleType::Media || type() == StyleRuleType::Supports || type() == StyleRuleType::LayerBlock; } 64 64 bool isSupportsRule() const { return type() == StyleRuleType::Supports; } 65 65 bool isImportRule() const { return type() == StyleRuleType::Import; } 66 bool isLayerRule() const { return type() == StyleRuleType::Layer ; }66 bool isLayerRule() const { return type() == StyleRuleType::LayerBlock || type() == StyleRuleType::LayerStatement; } 67 67 68 68 Ref<StyleRuleBase> copy() const; … … 299 299 Ref<StyleRuleLayer> copy() const { return adoptRef(*new StyleRuleLayer(*this)); } 300 300 301 bool isStatement() const { return std::holds_alternative<Vector<CascadeLayerName>>(m_nameVariant); }301 bool isStatement() const { return type() == StyleRuleType::LayerStatement; } 302 302 303 303 auto& name() const { return std::get<CascadeLayerName>(m_nameVariant); } -
trunk/Source/WebCore/css/StyleRuleType.h
r283170 r286657 41 41 CounterStyle = 11, 42 42 Supports = 12, 43 Layer = 16, 43 LayerBlock = 16, 44 LayerStatement = 17, 44 45 FontPaletteValues = 19, 45 46 }; -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r285980 r286657 459 459 case StyleRuleType::Media: 460 460 case StyleRuleType::Supports: 461 case StyleRuleType::Layer : {461 case StyleRuleType::LayerBlock: { 462 462 auto* childRules = downcast<StyleRuleGroup>(*rule).childRulesWithoutDeferredParsing(); 463 463 if (childRules && traverseRulesInVector(*childRules, handler)) … … 478 478 case StyleRuleType::CounterStyle: 479 479 case StyleRuleType::Keyframe: 480 case StyleRuleType::LayerStatement: 480 481 break; 481 482 } … … 520 521 case StyleRuleType::Keyframe: 521 522 case StyleRuleType::Supports: 522 case StyleRuleType::Layer: 523 case StyleRuleType::LayerBlock: 524 case StyleRuleType::LayerStatement: 523 525 case StyleRuleType::FontPaletteValues: 524 526 return false; -
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
r286064 r286657 812 812 if (m_observerWrapper) { 813 813 unsigned endOffset = m_observerWrapper->endOffset(preludeCopy); 814 m_observerWrapper->observer().startRuleHeader(StyleRuleType::Layer , m_observerWrapper->startOffset(preludeCopy));814 m_observerWrapper->observer().startRuleHeader(StyleRuleType::LayerStatement, m_observerWrapper->startOffset(preludeCopy)); 815 815 m_observerWrapper->observer().endRuleHeader(endOffset); 816 816 m_observerWrapper->observer().startRuleBody(endOffset); … … 833 833 834 834 if (m_observerWrapper) { 835 m_observerWrapper->observer().startRuleHeader(StyleRuleType::Layer , m_observerWrapper->startOffset(preludeCopy));835 m_observerWrapper->observer().startRuleHeader(StyleRuleType::LayerBlock, m_observerWrapper->startOffset(preludeCopy)); 836 836 m_observerWrapper->observer().endRuleHeader(m_observerWrapper->endOffset(preludeCopy)); 837 837 m_observerWrapper->observer().startRuleBody(m_observerWrapper->previousTokenStartOffset(*block)); -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r286558 r286657 29 29 #include "CSSImportRule.h" 30 30 #include "CSSKeyframesRule.h" 31 #include "CSSLayerRule.h" 31 #include "CSSLayerBlockRule.h" 32 #include "CSSLayerStatementRule.h" 32 33 #include "CSSMediaRule.h" 33 34 #include "CSSParser.h" … … 108 109 if (data->type == WebCore::StyleRuleType::Style) 109 110 target.append(data.copyRef()); 110 else if (data->type == WebCore::StyleRuleType::Media || data->type == WebCore::StyleRuleType::Supports || data->type == WebCore::StyleRuleType::Layer )111 else if (data->type == WebCore::StyleRuleType::Media || data->type == WebCore::StyleRuleType::Supports || data->type == WebCore::StyleRuleType::LayerBlock) 111 112 flattenSourceData(data->childRules, target); 112 113 } … … 427 428 return &downcast<CSSSupportsRule>(*rule).cssRules(); 428 429 429 if (is<CSSLayer Rule>(*rule))430 return &downcast<CSSLayer Rule>(*rule).cssRules();430 if (is<CSSLayerBlockRule>(*rule)) 431 return &downcast<CSSLayerBlockRule>(*rule).cssRules(); 431 432 432 433 return nullptr; … … 451 452 } 452 453 } else if (is<CSSImportRule>(parentRule)) { 453 if (auto& layerName = downcast<CSSImportRule>(parentRule)->cascadeLayerName()) { 454 auto layerName = downcast<CSSImportRule>(parentRule)->layerName(); 455 if (!layerName.isNull()) { 454 456 auto layerRulePayload = Protocol::CSS::Grouping::create() 455 457 .setType(Protocol::CSS::Grouping::Type::LayerImportRule) 456 458 .release(); 457 layerRulePayload->setText( CSSLayerRule::stringFromCascadeLayerName(*layerName));459 layerRulePayload->setText(layerName); 458 460 ruleGroupingPayloads.append(WTFMove(layerRulePayload)); 459 461 } … … 473 475 supportsRulePayload->setText(downcast<CSSSupportsRule>(parentRule)->conditionText()); 474 476 ruleGroupingPayloads.append(WTFMove(supportsRulePayload)); 475 } else if (is<CSSLayer Rule>(parentRule)) {477 } else if (is<CSSLayerBlockRule>(parentRule)) { 476 478 auto layerRulePayload = Protocol::CSS::Grouping::create() 477 479 .setType(Protocol::CSS::Grouping::Type::LayerRule) 478 480 .release(); 479 if (auto layerName = downcast<CSSLayerRule>(parentRule)->layerName()) 480 layerRulePayload->setText(*layerName); 481 layerRulePayload->setText(downcast<CSSLayerBlockRule>(parentRule)->name()); 481 482 ruleGroupingPayloads.append(WTFMove(layerRulePayload)); 482 483 } -
trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp
r286558 r286657 31 31 32 32 #include "CSSImportRule.h" 33 #include "CSSLayerRule.h" 33 #include "CSSLayerBlockRule.h" 34 #include "CSSLayerStatementRule.h" 34 35 #include "CSSMediaRule.h" 35 36 #include "CSSRule.h" … … 63 64 collect(downcast<CSSImportRule>(*cssRule).styleSheet()); 64 65 break; 65 case CSSRule::LAYER_ RULE:66 collect(downcast<CSSLayer Rule>(cssRule));66 case CSSRule::LAYER_BLOCK_RULE: 67 collect(downcast<CSSLayerBlockRule>(cssRule)); 67 68 break; 68 69 case CSSRule::MEDIA_RULE:
Note:
See TracChangeset
for help on using the changeset viewer.