Changeset 289377 in webkit
- Timestamp:
- Feb 8, 2022 8:23:16 AM (5 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/masking/parsing-mask-expected.txt (modified) (1 diff)
-
LayoutTests/fast/masking/parsing-mask.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (3 diffs)
-
Source/WebCore/css/CSSComputedStyleDeclaration.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r289375 r289377 1 2022-02-08 Matt Woodrow <mattwoodrow@apple.com> 2 3 Return 'none' for the computed style of mask when there are no mask images 4 https://bugs.webkit.org/show_bug.cgi?id=236265 5 <rdar://88178304> 6 7 Reviewed by Dean Jackson. 8 9 * fast/masking/parsing-mask-expected.txt: 10 * fast/masking/parsing-mask.html: 11 12 Updated expected results to expect 'none' for all cases where there isn't an actual mask 13 image. 14 1 15 2022-02-08 Diego Pino Garcia <dpino@igalia.com> 2 16 -
trunk/LayoutTests/fast/masking/parsing-mask-expected.txt
r286795 r289377 90 90 PASS innerStyle("mask", "none border-box content-box left top / auto repeat-x") is "none left top / auto repeat-x border-box content-box" 91 91 PASS innerStyle("mask", "none border-box content-box right 0px center / auto repeat-x") is "none right 0px center / auto repeat-x border-box content-box" 92 PASS computedStyle("mask", "top left") is "none 0% 0% / auto repeat border-box border-box add match-source"93 PASS computedStyle("mask", "bottom right") is "none 100% 100% / auto repeat border-box border-box add match-source"94 PASS computedStyle("mask", "left bottom") is "none 0% 100% / auto repeat border-box border-box add match-source"95 PASS computedStyle("mask", "right top") is "none 100% 0% / auto repeat border-box border-box add match-source"96 PASS computedStyle("mask", "center") is "none 50% 50% / auto repeat border-box border-box add match-source"97 PASS computedStyle("mask", "none top") is "none 50% 0% / auto repeat border-box border-box add match-source"98 PASS computedStyle("mask", "none bottom") is "none 50% 100% / auto repeat border-box border-box add match-source"99 PASS computedStyle("mask", "none right") is "none 100% 50% / auto repeat border-box border-box add match-source"100 PASS computedStyle("mask", "none top right") is "none 100% 0% / auto repeat border-box border-box add match-source"101 PASS computedStyle("mask", "none bottom left") is "none 0% 100% / auto repeat border-box border-box add match-source"102 PASS computedStyle("mask", "none right") is "none 100% 50% / auto repeat border-box border-box add match-source"103 PASS computedStyle("mask", "none left") is "none 0% 50% / auto repeat border-box border-box add match-source"104 PASS computedStyle("mask", "center 50%") is "none 50% 50% / auto repeat border-box border-box add match-source"105 PASS computedStyle("mask", "50px 50%") is "none 50px 50% / auto repeat border-box border-box add match-source"106 PASS computedStyle("mask", "center left") is "none 0% 50% / auto repeat border-box border-box add match-source"107 PASS computedStyle("mask", "top center") is "none 50% 0% / auto repeat border-box border-box add match-source"108 PASS computedStyle("mask", "left 10px top 15px") is "none 10px 15px / auto repeat border-box border-box add match-source"109 PASS computedStyle("mask", "left 10% top 30%") is "none 10% 30% / auto repeat border-box border-box add match-source"110 PASS computedStyle("mask", "right top 15px") is "none 100% 15px / auto repeat border-box border-box add match-source"111 PASS computedStyle("mask", "left 10px center") is "none 10px 50% / auto repeat border-box border-box add match-source"112 PASS computedStyle("mask", "center top 20px") is "none 50% 20px / auto repeat border-box border-box add match-source"113 PASS computedStyle("mask", "center left 30px") is "none 30px 50% / auto repeat border-box border-box add match-source"114 PASS computedStyle("mask", "left 20% top") is "none 20% 0% / auto repeat border-box border-box add match-source"115 PASS computedStyle("mask", "center center") is "none 50% 50% / auto repeat border-box border-box add match-source"116 PASS computedStyle("mask", "repeat-x") is "none 0% 0% / auto repeat-x border-box border-box add match-source"117 PASS computedStyle("mask", "repeat-y") is "none 0% 0% / auto repeat-y border-box border-box add match-source"118 PASS computedStyle("mask", "repeat") is "none 0% 0% / auto repeat border-box border-box add match-source"119 PASS computedStyle("mask", "space") is "none 0% 0% / auto space border-box border-box add match-source"120 PASS computedStyle("mask", "no-repeat") is "none 0% 0% / auto no-repeat border-box border-box add match-source"121 PASS computedStyle("mask", "repeat space") is "none 0% 0% / auto repeat space border-box border-box add match-source"122 PASS computedStyle("mask", "repeat round") is "none 0% 0% / auto repeat round border-box border-box add match-source"123 PASS computedStyle("mask", "repeat no-repeat") is "none 0% 0% / auto repeat-x border-box border-box add match-source"124 PASS computedStyle("mask", "repeat none") is "none 0% 0% / auto repeat border-box border-box add match-source"125 PASS computedStyle("mask", "none repeat") is "none 0% 0% / auto repeat border-box border-box add match-source"126 PASS computedStyle("mask", "padding-box") is "none 0% 0% / auto repeat padding-box padding-box add match-source"127 PASS computedStyle("mask", "border-box") is "none 0% 0% / auto repeat border-box border-box add match-source"128 PASS computedStyle("mask", "content-box") is "none 0% 0% / auto repeat content-box content-box add match-source"129 PASS computedStyle("mask", "padding-box none") is "none 0% 0% / auto repeat padding-box padding-box add match-source"130 PASS computedStyle("mask", "none padding-box") is "none 0% 0% / auto repeat padding-box padding-box add match-source"131 PASS computedStyle("mask", "padding-box content-box") is "none 0% 0% / auto repeat padding-box content-box add match-source"132 PASS computedStyle("mask", "content-box content-box") is "none 0% 0% / auto repeat content-box content-box add match-source"133 PASS computedStyle("mask", "padding-box border-box") is "none 0% 0% / auto repeat padding-box border-box add match-source"134 PASS computedStyle("mask", "padding-box border-box none") is "none 0% 0% / auto repeat padding-box border-box add match-source"135 PASS computedStyle("mask", "none padding-box border-box") is "none 0% 0% / auto repeat padding-box border-box add match-source"136 PASS computedStyle("mask", "none left top / auto") is "none 0% 0% / auto repeat border-box border-box add match-source"137 PASS computedStyle("mask", "none left top / auto auto") is "none 0% 0% / auto repeat border-box border-box add match-source"138 PASS computedStyle("mask", "none left top / 100%") is "none 0% 0% / 100% repeat border-box border-box add match-source"139 PASS computedStyle("mask", "none left top / 0%") is "none 0% 0% / 0% repeat border-box border-box add match-source"140 PASS computedStyle("mask", "none left top / auto 0%") is "none 0% 0% / auto 0% repeat border-box border-box add match-source"141 PASS computedStyle("mask", "none left top / cover") is "none 0% 0% / cover repeat border-box border-box add match-source"142 PASS computedStyle("mask", "none left top / contain") is "none 0% 0% / contain repeat border-box border-box add match-source"143 PASS computedStyle("mask", "none left 20px top 10px / contain") is "none 20px 10px / contain repeat border-box border-box add match-source"144 PASS computedStyle("mask", "none left 20px top / contain") is "none 20px 0% / contain repeat border-box border-box add match-source"145 PASS computedStyle("mask", "none padding-box content-box") is "none 0% 0% / auto repeat padding-box content-box add match-source"146 PASS computedStyle("mask", "none padding-box") is "none 0% 0% / auto repeat padding-box padding-box add match-source"147 PASS computedStyle("mask", "none top") is "none 50% 0% / auto repeat border-box border-box add match-source"148 PASS computedStyle("mask", "none center right 20px") is "none right 20px 50% / auto repeat border-box border-box add match-source"149 PASS computedStyle("mask", "none border-box left top") is "none 0% 0% / auto repeat border-box border-box add match-source"150 PASS computedStyle("mask", "none border-box left top 20px") is "none 0% 20px / auto repeat border-box border-box add match-source"151 PASS computedStyle("mask", "none border-box content-box left top repeat-x") is "none 0% 0% / auto repeat-x border-box content-box add match-source"152 PASS computedStyle("mask", "none border-box content-box left top / auto repeat-x") is "none 0% 0% / auto repeat-x border-box content-box add match-source"153 PASS computedStyle("mask", "none border-box content-box right 0px center / auto repeat-x") is "none right 0px 50% / auto repeat-x border-box content-box add match-source"92 PASS computedStyle("mask", "top left") is "none" 93 PASS computedStyle("mask", "bottom right") is "none" 94 PASS computedStyle("mask", "left bottom") is "none" 95 PASS computedStyle("mask", "right top") is "none" 96 PASS computedStyle("mask", "center") is "none" 97 PASS computedStyle("mask", "none top") is "none" 98 PASS computedStyle("mask", "none bottom") is "none" 99 PASS computedStyle("mask", "none right") is "none" 100 PASS computedStyle("mask", "none top right") is "none" 101 PASS computedStyle("mask", "none bottom left") is "none" 102 PASS computedStyle("mask", "none right") is "none" 103 PASS computedStyle("mask", "none left") is "none" 104 PASS computedStyle("mask", "center 50%") is "none" 105 PASS computedStyle("mask", "50px 50%") is "none" 106 PASS computedStyle("mask", "center left") is "none" 107 PASS computedStyle("mask", "top center") is "none" 108 PASS computedStyle("mask", "left 10px top 15px") is "none" 109 PASS computedStyle("mask", "left 10% top 30%") is "none" 110 PASS computedStyle("mask", "right top 15px") is "none" 111 PASS computedStyle("mask", "left 10px center") is "none" 112 PASS computedStyle("mask", "center top 20px") is "none" 113 PASS computedStyle("mask", "center left 30px") is "none" 114 PASS computedStyle("mask", "left 20% top") is "none" 115 PASS computedStyle("mask", "center center") is "none" 116 PASS computedStyle("mask", "repeat-x") is "none" 117 PASS computedStyle("mask", "repeat-y") is "none" 118 PASS computedStyle("mask", "repeat") is "none" 119 PASS computedStyle("mask", "space") is "none" 120 PASS computedStyle("mask", "no-repeat") is "none" 121 PASS computedStyle("mask", "repeat space") is "none" 122 PASS computedStyle("mask", "repeat round") is "none" 123 PASS computedStyle("mask", "repeat no-repeat") is "none" 124 PASS computedStyle("mask", "repeat none") is "none" 125 PASS computedStyle("mask", "none repeat") is "none" 126 PASS computedStyle("mask", "padding-box") is "none" 127 PASS computedStyle("mask", "border-box") is "none" 128 PASS computedStyle("mask", "content-box") is "none" 129 PASS computedStyle("mask", "padding-box none") is "none" 130 PASS computedStyle("mask", "none padding-box") is "none" 131 PASS computedStyle("mask", "padding-box content-box") is "none" 132 PASS computedStyle("mask", "content-box content-box") is "none" 133 PASS computedStyle("mask", "padding-box border-box") is "none" 134 PASS computedStyle("mask", "padding-box border-box none") is "none" 135 PASS computedStyle("mask", "none padding-box border-box") is "none" 136 PASS computedStyle("mask", "none left top / auto") is "none" 137 PASS computedStyle("mask", "none left top / auto auto") is "none" 138 PASS computedStyle("mask", "none left top / 100%") is "none" 139 PASS computedStyle("mask", "none left top / 0%") is "none" 140 PASS computedStyle("mask", "none left top / auto 0%") is "none" 141 PASS computedStyle("mask", "none left top / cover") is "none" 142 PASS computedStyle("mask", "none left top / contain") is "none" 143 PASS computedStyle("mask", "none left 20px top 10px / contain") is "none" 144 PASS computedStyle("mask", "none left 20px top / contain") is "none" 145 PASS computedStyle("mask", "none padding-box content-box") is "none" 146 PASS computedStyle("mask", "none padding-box") is "none" 147 PASS computedStyle("mask", "none top") is "none" 148 PASS computedStyle("mask", "none center right 20px") is "none" 149 PASS computedStyle("mask", "none border-box left top") is "none" 150 PASS computedStyle("mask", "none border-box left top 20px") is "none" 151 PASS computedStyle("mask", "none border-box content-box left top repeat-x") is "none" 152 PASS computedStyle("mask", "none border-box content-box left top / auto repeat-x") is "none" 153 PASS computedStyle("mask", "none border-box content-box right 0px center / auto repeat-x") is "none" 154 154 PASS innerStyle("mask", "top none left") is "" 155 155 PASS innerStyle("mask", "right none bottom") is "" -
trunk/LayoutTests/fast/masking/parsing-mask.html
r286795 r289377 143 143 144 144 // test mask-position 145 testComputed("mask", "top left", "none 0% 0% / auto repeat border-box border-box add match-source");146 testComputed("mask", "bottom right", "none 100% 100% / auto repeat border-box border-box add match-source");147 testComputed("mask", "left bottom", "none 0% 100% / auto repeat border-box border-box add match-source");148 testComputed("mask", "right top", "none 100% 0% / auto repeat border-box border-box add match-source");149 testComputed("mask", "center", "none 50% 50% / auto repeat border-box border-box add match-source");150 testComputed("mask", "none top", "none 50% 0% / auto repeat border-box border-box add match-source");151 testComputed("mask", "none bottom", "none 50% 100% / auto repeat border-box border-box add match-source");152 testComputed("mask", "none right", "none 100% 50% / auto repeat border-box border-box add match-source");153 testComputed("mask", "none top right", "none 100% 0% / auto repeat border-box border-box add match-source");154 testComputed("mask", "none bottom left", "none 0% 100% / auto repeat border-box border-box add match-source");155 testComputed("mask", "none right", "none 100% 50% / auto repeat border-box border-box add match-source");156 testComputed("mask", "none left", "none 0% 50% / auto repeat border-box border-box add match-source");157 testComputed("mask", "center 50%", "none 50% 50% / auto repeat border-box border-box add match-source");158 testComputed("mask", "50px 50%", "none 50px 50% / auto repeat border-box border-box add match-source");159 testComputed("mask", "center left", "none 0% 50% / auto repeat border-box border-box add match-source");160 testComputed("mask", "top center", "none 50% 0% / auto repeat border-box border-box add match-source");161 testComputed("mask", "left 10px top 15px", "none 10px 15px / auto repeat border-box border-box add match-source");162 testComputed("mask", "left 10% top 30%", "none 10% 30% / auto repeat border-box border-box add match-source");163 testComputed("mask", "right top 15px", "none 100% 15px / auto repeat border-box border-box add match-source");164 testComputed("mask", "left 10px center", "none 10px 50% / auto repeat border-box border-box add match-source");165 testComputed("mask", "center top 20px", "none 50% 20px / auto repeat border-box border-box add match-source");166 testComputed("mask", "center left 30px", "none 30px 50% / auto repeat border-box border-box add match-source");167 testComputed("mask", "left 20% top", "none 20% 0% / auto repeat border-box border-box add match-source");168 testComputed("mask", "center center", "none 50% 50% / auto repeat border-box border-box add match-source");145 testComputed("mask", "top left", "none"); 146 testComputed("mask", "bottom right", "none"); 147 testComputed("mask", "left bottom", "none"); 148 testComputed("mask", "right top", "none"); 149 testComputed("mask", "center", "none"); 150 testComputed("mask", "none top", "none"); 151 testComputed("mask", "none bottom", "none"); 152 testComputed("mask", "none right", "none"); 153 testComputed("mask", "none top right", "none"); 154 testComputed("mask", "none bottom left", "none"); 155 testComputed("mask", "none right", "none"); 156 testComputed("mask", "none left", "none"); 157 testComputed("mask", "center 50%", "none"); 158 testComputed("mask", "50px 50%", "none"); 159 testComputed("mask", "center left", "none"); 160 testComputed("mask", "top center", "none"); 161 testComputed("mask", "left 10px top 15px", "none"); 162 testComputed("mask", "left 10% top 30%", "none"); 163 testComputed("mask", "right top 15px", "none"); 164 testComputed("mask", "left 10px center", "none"); 165 testComputed("mask", "center top 20px", "none"); 166 testComputed("mask", "center left 30px", "none"); 167 testComputed("mask", "left 20% top", "none"); 168 testComputed("mask", "center center", "none"); 169 169 170 170 // test mask-repeat 171 testComputed("mask", "repeat-x", "none 0% 0% / auto repeat-x border-box border-box add match-source");172 testComputed("mask", "repeat-y", "none 0% 0% / auto repeat-y border-box border-box add match-source");173 testComputed("mask", "repeat", "none 0% 0% / auto repeat border-box border-box add match-source");174 testComputed("mask", "space", "none 0% 0% / auto space border-box border-box add match-source");175 testComputed("mask", "no-repeat", "none 0% 0% / auto no-repeat border-box border-box add match-source");176 testComputed("mask", "repeat space", "none 0% 0% / auto repeat space border-box border-box add match-source");177 testComputed("mask", "repeat round", "none 0% 0% / auto repeat round border-box border-box add match-source");178 testComputed("mask", "repeat no-repeat", "none 0% 0% / auto repeat-x border-box border-box add match-source");179 testComputed("mask", "repeat none", "none 0% 0% / auto repeat border-box border-box add match-source");180 testComputed("mask", "none repeat", "none 0% 0% / auto repeat border-box border-box add match-source");171 testComputed("mask", "repeat-x", "none"); 172 testComputed("mask", "repeat-y", "none"); 173 testComputed("mask", "repeat", "none"); 174 testComputed("mask", "space", "none"); 175 testComputed("mask", "no-repeat", "none"); 176 testComputed("mask", "repeat space", "none"); 177 testComputed("mask", "repeat round", "none"); 178 testComputed("mask", "repeat no-repeat", "none"); 179 testComputed("mask", "repeat none", "none"); 180 testComputed("mask", "none repeat", "none"); 181 181 182 182 // test mask-origin / mask-clip 183 testComputed("mask", "padding-box", "none 0% 0% / auto repeat padding-box padding-box add match-source");184 testComputed("mask", "border-box", "none 0% 0% / auto repeat border-box border-box add match-source");185 testComputed("mask", "content-box", "none 0% 0% / auto repeat content-box content-box add match-source");186 testComputed("mask", "padding-box none", "none 0% 0% / auto repeat padding-box padding-box add match-source");187 testComputed("mask", "none padding-box", "none 0% 0% / auto repeat padding-box padding-box add match-source");188 testComputed("mask", "padding-box content-box", "none 0% 0% / auto repeat padding-box content-box add match-source");189 testComputed("mask", "content-box content-box", "none 0% 0% / auto repeat content-box content-box add match-source");190 testComputed("mask", "padding-box border-box", "none 0% 0% / auto repeat padding-box border-box add match-source");191 testComputed("mask", "padding-box border-box none", "none 0% 0% / auto repeat padding-box border-box add match-source");192 testComputed("mask", "none padding-box border-box", "none 0% 0% / auto repeat padding-box border-box add match-source");183 testComputed("mask", "padding-box", "none"); 184 testComputed("mask", "border-box", "none"); 185 testComputed("mask", "content-box", "none"); 186 testComputed("mask", "padding-box none", "none"); 187 testComputed("mask", "none padding-box", "none"); 188 testComputed("mask", "padding-box content-box", "none"); 189 testComputed("mask", "content-box content-box", "none"); 190 testComputed("mask", "padding-box border-box", "none"); 191 testComputed("mask", "padding-box border-box none", "none"); 192 testComputed("mask", "none padding-box border-box", "none"); 193 193 194 194 // test mask-size 195 testComputed("mask", "none left top / auto", "none 0% 0% / auto repeat border-box border-box add match-source");196 testComputed("mask", "none left top / auto auto", "none 0% 0% / auto repeat border-box border-box add match-source");197 testComputed("mask", "none left top / 100%", "none 0% 0% / 100% repeat border-box border-box add match-source");198 testComputed("mask", "none left top / 0%", "none 0% 0% / 0% repeat border-box border-box add match-source");199 testComputed("mask", "none left top / auto 0%", "none 0% 0% / auto 0% repeat border-box border-box add match-source");200 testComputed("mask", "none left top / cover", "none 0% 0% / cover repeat border-box border-box add match-source");201 testComputed("mask", "none left top / contain", "none 0% 0% / contain repeat border-box border-box add match-source");202 testComputed("mask", "none left 20px top 10px / contain", "none 20px 10px / contain repeat border-box border-box add match-source");203 testComputed("mask", "none left 20px top / contain", "none 20px 0% / contain repeat border-box border-box add match-source");195 testComputed("mask", "none left top / auto", "none"); 196 testComputed("mask", "none left top / auto auto", "none"); 197 testComputed("mask", "none left top / 100%", "none"); 198 testComputed("mask", "none left top / 0%", "none"); 199 testComputed("mask", "none left top / auto 0%", "none"); 200 testComputed("mask", "none left top / cover", "none"); 201 testComputed("mask", "none left top / contain", "none"); 202 testComputed("mask", "none left 20px top 10px / contain", "none"); 203 testComputed("mask", "none left 20px top / contain", "none"); 204 204 205 205 // combinations 206 testComputed("mask", "none padding-box content-box", "none 0% 0% / auto repeat padding-box content-box add match-source");207 testComputed("mask", "none padding-box", "none 0% 0% / auto repeat padding-box padding-box add match-source");208 testComputed("mask", "none top", "none 50% 0% / auto repeat border-box border-box add match-source");209 testComputed("mask", "none center right 20px", "none right 20px 50% / auto repeat border-box border-box add match-source");210 testComputed("mask", "none border-box left top", "none 0% 0% / auto repeat border-box border-box add match-source");211 testComputed("mask", "none border-box left top 20px", "none 0% 20px / auto repeat border-box border-box add match-source");212 testComputed("mask", "none border-box content-box left top repeat-x", "none 0% 0% / auto repeat-x border-box content-box add match-source");213 testComputed("mask", "none border-box content-box left top / auto repeat-x", "none 0% 0% / auto repeat-x border-box content-box add match-source");214 testComputed("mask", "none border-box content-box right 0px center / auto repeat-x", "none right 0px 50% / auto repeat-x border-box content-box add match-source");206 testComputed("mask", "none padding-box content-box", "none"); 207 testComputed("mask", "none padding-box", "none"); 208 testComputed("mask", "none top", "none"); 209 testComputed("mask", "none center right 20px", "none"); 210 testComputed("mask", "none border-box left top", "none"); 211 testComputed("mask", "none border-box left top 20px", "none"); 212 testComputed("mask", "none border-box content-box left top repeat-x", "none"); 213 testComputed("mask", "none border-box content-box left top / auto repeat-x", "none"); 214 testComputed("mask", "none border-box content-box right 0px center / auto repeat-x", "none"); 215 215 216 216 // negative tests -
trunk/Source/WebCore/ChangeLog
r289376 r289377 1 2022-02-08 Matt Woodrow <mattwoodrow@apple.com> 2 3 Return 'none' for the computed style of mask when there are no mask images 4 https://bugs.webkit.org/show_bug.cgi?id=236265 5 <rdar://88178304> 6 7 Reviewed by Dean Jackson. 8 9 Rather than returning all the longhand properties, return 'none' if there are no 10 mask images. This no longer matches the behaviour of the 'background' property, but 11 better matches what other UAs do. 12 13 Ideally we'd return the smallest possible canonical representation of the non-initial 14 property values, but this is a much simpler change to fix a compat regression. 15 16 Test: fast/masking/parsing-mask.html 17 Updates expected results to match new behavior. 18 19 * css/CSSComputedStyleDeclaration.cpp: 20 (WebCore::ComputedStyleExtractor::getLayerCount): 21 (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): 22 (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): 23 (WebCore::ComputedStyleExtractor::getMaskShorthandValue): 24 * css/CSSComputedStyleDeclaration.h: 25 1 26 2022-02-08 Alan Bujtas <zalan@apple.com> 2 27 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r289225 r289377 4430 4430 for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next()) 4431 4431 layerCount++; 4432 if (layerCount == 1 && property == CSSPropertyMask && !layers.image()) 4433 return 0; 4432 4434 return layerCount; 4433 4435 } 4434 4436 4435 Ref <CSSValueList> ComputedStyleExtractor::getFillLayerPropertyShorthandValue(CSSPropertyID property, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty)4437 RefPtr<CSSValue> ComputedStyleExtractor::getFillLayerPropertyShorthandValue(CSSPropertyID property, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty) 4436 4438 { 4437 4439 ASSERT(property == CSSPropertyBackground || property == CSSPropertyMask); 4438 4440 size_t layerCount = getLayerCount(property); 4439 ASSERT(layerCount); 4441 if (!layerCount) { 4442 ASSERT(property == CSSPropertyMask); 4443 return CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 4444 } 4440 4445 4441 4446 auto lastValue = lastLayerProperty != CSSPropertyInvalid ? propertyValue(lastLayerProperty, DoNotUpdateLayout) : nullptr; … … 4478 4483 4479 4484 4480 Ref <CSSValueList> ComputedStyleExtractor::getBackgroundShorthandValue()4485 RefPtr<CSSValue> ComputedStyleExtractor::getBackgroundShorthandValue() 4481 4486 { 4482 4487 static const CSSPropertyID propertiesBeforeSlashSeparator[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition }; … … 4486 4491 } 4487 4492 4488 Ref <CSSValueList> ComputedStyleExtractor::getMaskShorthandValue()4493 RefPtr<CSSValue> ComputedStyleExtractor::getMaskShorthandValue() 4489 4494 { 4490 4495 static const CSSPropertyID propertiesBeforeSlashSeperator[2] = { CSSPropertyMaskImage, CSSPropertyMaskPosition }; -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h
r287987 r289377 95 95 96 96 size_t getLayerCount(CSSPropertyID); 97 Ref <CSSValueList> getFillLayerPropertyShorthandValue(CSSPropertyID, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty);98 Ref <CSSValueList> getBackgroundShorthandValue();99 Ref <CSSValueList> getMaskShorthandValue();97 RefPtr<CSSValue> getFillLayerPropertyShorthandValue(CSSPropertyID, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty); 98 RefPtr<CSSValue> getBackgroundShorthandValue(); 99 RefPtr<CSSValue> getMaskShorthandValue(); 100 100 Ref<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePropertyShorthand&); 101 101
Note: See TracChangeset
for help on using the changeset viewer.