Changeset 273385 in webkit
- Timestamp:
- Feb 24, 2021 8:45:08 AM (17 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/css3/color-filters/color-filter-exposed-if-disabled-expected.txt (added)
-
LayoutTests/css3/color-filters/color-filter-exposed-if-disabled.html (added)
-
LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt (modified) (1 diff)
-
LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled.html (modified) (1 diff)
-
LayoutTests/fast/css/scroll-behavior-exposed-if-disabled-expected.txt (added)
-
LayoutTests/fast/css/scroll-behavior-exposed-if-disabled.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/parser/CSSParserImpl.cpp (modified) (2 diffs)
-
Source/WebCore/css/parser/CSSParserImpl.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r273381 r273385 1 2021-02-24 Simon Fraser <simon.fraser@apple.com> 2 3 Runtime-disabled CSS features still appear enabled via CSS.supports() 4 https://bugs.webkit.org/show_bug.cgi?id=222280 5 rdar://74595641 6 7 Reviewed by Sam Weinig. 8 9 * css3/color-filters/color-filter-exposed-if-disabled-expected.txt: Added. Fails tracked in webkit.org/b/217626 10 * css3/color-filters/color-filter-exposed-if-disabled.html: Added. 11 * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: 12 * fast/css/overscroll-behavior-invalidate-if-disabled.html: 13 * fast/css/scroll-behavior-exposed-if-disabled-expected.txt: Added. 14 * fast/css/scroll-behavior-exposed-if-disabled.html: Added. 15 1 16 2021-02-24 Imanol Fernandez <ifernandez@igalia.com> 2 17 -
trunk/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt
r273314 r273385 7 7 PASS 'aspect-ratio' in getComputedStyle(document.documentElement) is false 8 8 PASS CSS.supports('aspect-ratio: 1 / 1') is false 9 FAIL CSS.supports('aspect-ratio: inherit') should be false. Was true. 9 PASS CSS.supports('aspect-ratio: inherit') is false 10 10 PASS successfullyParsed is true 11 Some tests failed.12 11 13 12 TEST COMPLETE -
trunk/LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt
r270613 r273385 1 Test overscrollBehavior should be invalidated if overscrollBehaviorEnabledis disabled1 Tests that overscroll-behavior is not exposed when the feature is disabled 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". … … 6 6 PASS 'overscrollBehavior' in document.documentElement.style is false 7 7 PASS 'overscroll-behavior' in getComputedStyle(document.documentElement) is false 8 PASS CSS.supports('overscroll-behavior: contain') is false 9 PASS CSS.supports('overscroll-behavior: inherit') is false 10 PASS CSS.supports('overscroll-behavior-x: inherit') is false 11 PASS CSS.supports('overscroll-behavior-y: inherit') is false 8 12 PASS successfullyParsed is true 9 13 -
trunk/LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled.html
r270613 r273385 7 7 <body> 8 8 <script> 9 description("Test overscrollBehavior should be invalidated if overscrollBehaviorEnabledis disabled");9 description("Tests that overscroll-behavior is not exposed when the feature is disabled"); 10 10 11 11 shouldBeFalse("'overscrollBehavior' in document.documentElement.style"); 12 12 shouldBeFalse("'overscroll-behavior' in getComputedStyle(document.documentElement)"); 13 shouldBeFalse("CSS.supports('overscroll-behavior: contain')"); 14 shouldBeFalse("CSS.supports('overscroll-behavior: inherit')"); 15 shouldBeFalse("CSS.supports('overscroll-behavior-x: inherit')"); 16 shouldBeFalse("CSS.supports('overscroll-behavior-y: inherit')"); 13 17 14 18 </script> -
trunk/Source/WebCore/ChangeLog
r273382 r273385 1 2021-02-24 Simon Fraser <simon.fraser@apple.com> 2 3 Runtime-disabled CSS features still appear enabled via CSS.supports() 4 https://bugs.webkit.org/show_bug.cgi?id=222280 5 rdar://74595641 6 7 Reviewed by Sam Weinig. 8 9 When parsing CSS.supports() for a runtime-disabled property, we'd successfully 10 parse a CSS-wide keyword like "inherit" and report that the property is supported. 11 12 We need to explicitly check for runtime-disabled properties. 13 14 Tests: css3/color-filters/color-filter-exposed-if-disabled.html 15 fast/css/scroll-behavior-exposed-if-disabled.html 16 17 * css/parser/CSSParserImpl.cpp: 18 (WebCore::CSSParserImpl::isPropertyRuntimeDisabled const): 19 (WebCore::CSSParserImpl::consumeDeclaration): 20 * css/parser/CSSParserImpl.h: 21 1 22 2021-02-24 Imanol Fernandez <ifernandez@igalia.com> 2 23 -
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
r268741 r273385 774 774 } 775 775 776 bool CSSParserImpl::isPropertyRuntimeDisabled(CSSPropertyID property) const 777 { 778 switch (property) { 779 case CSSPropertyAspectRatio: 780 return !m_context.aspectRatioEnabled; 781 case CSSPropertyAppleColorFilter: 782 return !m_context.colorFilterEnabled; 783 case CSSPropertyTranslate: 784 case CSSPropertyRotate: 785 case CSSPropertyScale: 786 return !m_context.individualTransformPropertiesEnabled; 787 case CSSPropertyOverscrollBehavior: 788 case CSSPropertyOverscrollBehaviorX: 789 case CSSPropertyOverscrollBehaviorY: 790 return !m_context.overscrollBehaviorEnabled; 791 case CSSPropertyScrollBehavior: 792 return !m_context.scrollBehaviorEnabled; 793 #if ENABLE(TEXT_AUTOSIZING) 794 case CSSPropertyWebkitTextSizeAdjust: 795 #if !PLATFORM(IOS_FAMILY) 796 return !m_context.textAutosizingEnabled; 797 #endif 798 return false; 799 #endif // ENABLE(TEXT_AUTOSIZING) 800 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 801 case CSSPropertyWebkitOverflowScrolling: 802 return !m_context.legacyOverflowScrollingTouchEnabled; 803 #endif 804 default: 805 return false; 806 } 807 return false; 808 } 809 776 810 void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRuleType ruleType) 777 811 { … … 783 817 if (range.consume().type() != ColonToken) 784 818 return; // Parse error 819 820 if (isPropertyRuntimeDisabled(propertyID)) 821 propertyID = CSSPropertyInvalid; 785 822 786 823 bool important = false; -
trunk/Source/WebCore/css/parser/CSSParserImpl.h
r266253 r273385 144 144 void consumeDeclarationValue(CSSParserTokenRange, CSSPropertyID, bool important, StyleRuleType); 145 145 void consumeCustomPropertyValue(CSSParserTokenRange, const AtomString& propertyName, bool important); 146 147 bool isPropertyRuntimeDisabled(CSSPropertyID) const; 146 148 147 149 static Vector<double> consumeKeyframeKeyList(CSSParserTokenRange);
Note: See TracChangeset
for help on using the changeset viewer.