Changeset 260340 in webkit
- Timestamp:
- Apr 19, 2020 11:01:18 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260338 r260340 1 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> 2 3 Don't use the inherited custom properties to store environment variables. 4 https://bugs.webkit.org/show_bug.cgi?id=210707 5 6 Reviewed by Antti Koivisto. 7 8 * platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 9 1 10 2020-04-19 Antti Koivisto <antti@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/ChangeLog
r260335 r260340 1 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> 2 3 Don't use the inherited custom properties to store environment variables. 4 https://bugs.webkit.org/show_bug.cgi?id=210707 5 6 Reviewed by Antti Koivisto. 7 8 Annotate the progressions. 9 10 * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 11 * web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt: 12 13 1 14 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r260335 r260340 377 377 PASS -webkit-user-modify 378 378 PASS -webkit-user-select 379 PASS fullscreen-inset-bottom380 PASS safe-area-inset-bottom381 PASS safe-area-inset-left382 PASS fullscreen-inset-left383 PASS fullscreen-auto-hide-duration384 PASS fullscreen-inset-right385 PASS safe-area-inset-right386 PASS fullscreen-inset-top387 PASS safe-area-inset-top388 379 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt
r260335 r260340 1 1 2 FAIL Logical properties in enumeration of computed style assert_false: environment variables should not be enumerated in computed style expected false got true 2 PASS Logical properties in enumeration of computed style 3 3 -
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r260335 r260340 379 379 PASS -webkit-user-modify 380 380 PASS -webkit-user-select 381 PASS fullscreen-inset-bottom382 PASS safe-area-inset-bottom383 PASS safe-area-inset-left384 PASS fullscreen-inset-left385 PASS fullscreen-auto-hide-duration386 PASS fullscreen-inset-right387 PASS safe-area-inset-right388 PASS fullscreen-inset-top389 PASS safe-area-inset-top390 381 -
trunk/Source/WebCore/ChangeLog
r260338 r260340 1 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> 2 3 Don't use the inherited custom properties to store environment variables. 4 https://bugs.webkit.org/show_bug.cgi?id=210707 5 6 Reviewed by Antti Koivisto. 7 8 It leaks this implementation detail when enumerating the computed style. 9 10 Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.xhtml 11 imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html 12 13 * css/CSSVariableReferenceValue.cpp: 14 (WebCore::resolveVariableReference): 15 (WebCore::resolveTokenRange): 16 * style/StyleResolveForDocument.cpp: 17 (WebCore::Style::resolveForDocument): 18 1 19 2020-04-19 Antti Koivisto <antti@apple.com> 2 20 -
trunk/Source/WebCore/css/CSSVariableReferenceValue.cpp
r259988 r260340 32 32 33 33 #include "CSSVariableData.h" 34 #include "ConstantPropertyMap.h" 34 35 #include "RenderStyle.h" 35 36 #include "StyleBuilder.h" … … 72 73 } 73 74 74 static bool resolveVariableReference(CSSParserTokenRange range, Vector<CSSParserToken>& result, Style::BuilderState& builderState)75 static bool resolveVariableReference(CSSParserTokenRange range, CSSValueID functionId, Vector<CSSParserToken>& result, Style::BuilderState& builderState) 75 76 { 77 ASSERT(functionId == CSSValueVar || functionId == CSSValueEnv); 78 76 79 auto& registeredProperties = builderState.document().getCSSRegisteredCustomPropertySet(); 77 80 auto& style = builderState.style(); … … 89 92 bool fallbackReturn = resolveVariableFallback(CSSParserTokenRange(range), fallbackResult, builderState); 90 93 91 auto* property = style.getCustomProperty(variableName);92 94 95 auto* property = functionId == CSSValueVar 96 ? style.getCustomProperty(variableName) 97 : builderState.document().constantProperties().values().get(variableName); 93 98 if (!property || property->isUnset()) { 94 99 auto* registered = registeredProperties.get(variableName); … … 113 118 bool success = true; 114 119 while (!range.atEnd()) { 115 if (range.peek().functionId() == CSSValueVar || range.peek().functionId() == CSSValueEnv) 116 success &= resolveVariableReference(range.consumeBlock(), result, builderState); 120 auto functionId = range.peek().functionId(); 121 if (functionId == CSSValueVar || functionId == CSSValueEnv) 122 success &= resolveVariableReference(range.consumeBlock(), functionId, result, builderState); 117 123 else 118 124 result.append(range.consume()); -
trunk/Source/WebCore/style/StyleResolveForDocument.cpp
r251413 r260340 31 31 32 32 #include "CSSFontSelector.h" 33 #include "ConstantPropertyMap.h"34 33 #include "Document.h" 35 34 #include "FontCascade.h" … … 126 125 documentStyle.fontCascade().update(&const_cast<Document&>(document).fontSelector()); 127 126 128 for (auto& it : document.constantProperties().values())129 documentStyle.setInheritedCustomPropertyValue(it.key, makeRef(it.value.get()));130 131 127 return documentStyle; 132 128 }
Note: See TracChangeset
for help on using the changeset viewer.