Changeset 278848 in webkit
- Timestamp:
- Jun 14, 2021 1:01:30 PM (13 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/inspector/css/overridden-property-expected.txt (modified) (1 diff)
-
LayoutTests/inspector/css/overridden-property.html (modified) (3 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/inspector/InspectorStyleSheet.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r278842 r278848 1 2021-06-14 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: CSS variables not handled as case sensitive 4 https://bugs.webkit.org/show_bug.cgi?id=226875 5 6 Reviewed by Devin Rousso. 7 8 Add a test to make sure that CSS variable declarations that vary only in case do not override each other. 9 10 * inspector/css/overridden-property-expected.txt: 11 * inspector/css/overridden-property.html: 12 1 13 2021-06-14 Youenn Fablet <youenn@apple.com> 2 14 -
trunk/LayoutTests/inspector/css/overridden-property-expected.txt
r246223 r278848 28 28 PASS: border-top-color is NOT overridden. 29 29 30 -- Running test case: OverriddenProperty.MixedCaseVariablesNotOverridden 31 PASS: `--foo` is NOT overridden. 32 PASS: `--FOO` is NOT overridden. 33 -
trunk/LayoutTests/inspector/css/overridden-property.html
r253242 r278848 153 153 }); 154 154 155 suite.addTestCase({ 156 name: "OverriddenProperty.MixedCaseVariablesNotOverridden", 157 test(resolve, reject) { 158 getStyleDeclaration(".mixed-case-variables-not-overridden", (style) => { 159 const dontCreateIfMissing = true; 160 let lowercaseVariableProperty = style.propertyForName("--foo", dontCreateIfMissing); 161 InspectorTest.expectFalse(lowercaseVariableProperty.overridden, "`--foo` is NOT overridden."); 162 163 let uppercaseVariableProperty = style.propertyForName("--FOO", dontCreateIfMissing); 164 InspectorTest.expectFalse(uppercaseVariableProperty.overridden, "`--FOO` is NOT overridden."); 165 166 resolve(); 167 }, reject); 168 } 169 }); 170 155 171 suite.runTestCasesAndFinish(); 156 172 } … … 183 199 border-top-color: red; 184 200 } 201 202 .mixed-case-variables-not-overridden { 203 --foo: green; 204 --FOO: red; 205 } 185 206 </style> 186 207 <div id="x" style="color: green"></div> … … 189 210 <div class="shorthand-overridden-by-important-longhand"></div> 190 211 <div class="shorthand-not-overridden-by-longhand"></div> 212 <div class="mixed-case-variables-not-overridden"></div> 191 213 </body> 192 214 </html> -
trunk/Source/WebCore/ChangeLog
r278842 r278848 1 2021-06-14 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: CSS variables not handled as case sensitive 4 https://bugs.webkit.org/show_bug.cgi?id=226875 5 6 Reviewed by Devin Rousso. 7 8 Test: inspector/css/overridden-property.html 9 10 CSS variables support distinct declarations with only differences in cases. Previously, we naively converted all 11 property names to lowercase, instead of properly providing variable names in their original case. 12 13 * inspector/InspectorStyleSheet.cpp: 14 (WebCore::InspectorStyle::styleWithProperties const): 15 1 16 2021-06-14 Youenn Fablet <youenn@apple.com> 2 17 -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r278185 r278848 646 646 647 647 auto property = Protocol::CSS::CSSProperty::create() 648 .setName( name.convertToASCIILowercase())648 .setName(lowercasePropertyName(name)) 649 649 .setValue(propertyEntry.value) 650 650 .release();
Note: See TracChangeset
for help on using the changeset viewer.