Changeset 273792 in webkit
- Timestamp:
- Mar 2, 2021, 7:08:39 PM (6 years ago)
- Location:
- branches/safari-612.1.5-branch
- 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
-
branches/safari-612.1.5-branch/LayoutTests/ChangeLog
r273791 r273792 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273385. rdar://problem/74953186 4 5 Runtime-disabled CSS features still appear enabled via CSS.supports() 6 https://bugs.webkit.org/show_bug.cgi?id=222280 7 rdar://74595641 8 9 Reviewed by Sam Weinig. 10 11 Source/WebCore: 12 13 When parsing CSS.supports() for a runtime-disabled property, we'd successfully 14 parse a CSS-wide keyword like "inherit" and report that the property is supported. 15 16 We need to explicitly check for runtime-disabled properties. 17 18 Tests: css3/color-filters/color-filter-exposed-if-disabled.html 19 fast/css/scroll-behavior-exposed-if-disabled.html 20 21 * css/parser/CSSParserImpl.cpp: 22 (WebCore::CSSParserImpl::isPropertyRuntimeDisabled const): 23 (WebCore::CSSParserImpl::consumeDeclaration): 24 * css/parser/CSSParserImpl.h: 25 26 LayoutTests: 27 28 * css3/color-filters/color-filter-exposed-if-disabled-expected.txt: Added. Fails tracked in webkit.org/b/217626 29 * css3/color-filters/color-filter-exposed-if-disabled.html: Added. 30 * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: 31 * fast/css/overscroll-behavior-invalidate-if-disabled.html: 32 * fast/css/scroll-behavior-exposed-if-disabled-expected.txt: Added. 33 * fast/css/scroll-behavior-exposed-if-disabled.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273385 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-02-24 Simon Fraser <simon.fraser@apple.com> 39 40 Runtime-disabled CSS features still appear enabled via CSS.supports() 41 https://bugs.webkit.org/show_bug.cgi?id=222280 42 rdar://74595641 43 44 Reviewed by Sam Weinig. 45 46 * css3/color-filters/color-filter-exposed-if-disabled-expected.txt: Added. Fails tracked in webkit.org/b/217626 47 * css3/color-filters/color-filter-exposed-if-disabled.html: Added. 48 * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: 49 * fast/css/overscroll-behavior-invalidate-if-disabled.html: 50 * fast/css/scroll-behavior-exposed-if-disabled-expected.txt: Added. 51 * fast/css/scroll-behavior-exposed-if-disabled.html: Added. 52 1 53 2021-03-02 Alan Coon <alancoon@apple.com> 2 54 -
branches/safari-612.1.5-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt
r273791 r273792 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 -
branches/safari-612.1.5-branch/LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt
r270613 r273792 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 -
branches/safari-612.1.5-branch/LayoutTests/fast/css/overscroll-behavior-invalidate-if-disabled.html
r270613 r273792 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> -
branches/safari-612.1.5-branch/Source/WebCore/ChangeLog
r273791 r273792 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273385. rdar://problem/74953186 4 5 Runtime-disabled CSS features still appear enabled via CSS.supports() 6 https://bugs.webkit.org/show_bug.cgi?id=222280 7 rdar://74595641 8 9 Reviewed by Sam Weinig. 10 11 Source/WebCore: 12 13 When parsing CSS.supports() for a runtime-disabled property, we'd successfully 14 parse a CSS-wide keyword like "inherit" and report that the property is supported. 15 16 We need to explicitly check for runtime-disabled properties. 17 18 Tests: css3/color-filters/color-filter-exposed-if-disabled.html 19 fast/css/scroll-behavior-exposed-if-disabled.html 20 21 * css/parser/CSSParserImpl.cpp: 22 (WebCore::CSSParserImpl::isPropertyRuntimeDisabled const): 23 (WebCore::CSSParserImpl::consumeDeclaration): 24 * css/parser/CSSParserImpl.h: 25 26 LayoutTests: 27 28 * css3/color-filters/color-filter-exposed-if-disabled-expected.txt: Added. Fails tracked in webkit.org/b/217626 29 * css3/color-filters/color-filter-exposed-if-disabled.html: Added. 30 * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: 31 * fast/css/overscroll-behavior-invalidate-if-disabled.html: 32 * fast/css/scroll-behavior-exposed-if-disabled-expected.txt: Added. 33 * fast/css/scroll-behavior-exposed-if-disabled.html: Added. 34 35 36 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273385 268f45cc-cd09-0410-ab3c-d52691b4dbfc 37 38 2021-02-24 Simon Fraser <simon.fraser@apple.com> 39 40 Runtime-disabled CSS features still appear enabled via CSS.supports() 41 https://bugs.webkit.org/show_bug.cgi?id=222280 42 rdar://74595641 43 44 Reviewed by Sam Weinig. 45 46 When parsing CSS.supports() for a runtime-disabled property, we'd successfully 47 parse a CSS-wide keyword like "inherit" and report that the property is supported. 48 49 We need to explicitly check for runtime-disabled properties. 50 51 Tests: css3/color-filters/color-filter-exposed-if-disabled.html 52 fast/css/scroll-behavior-exposed-if-disabled.html 53 54 * css/parser/CSSParserImpl.cpp: 55 (WebCore::CSSParserImpl::isPropertyRuntimeDisabled const): 56 (WebCore::CSSParserImpl::consumeDeclaration): 57 * css/parser/CSSParserImpl.h: 58 1 59 2021-03-02 Alan Coon <alancoon@apple.com> 2 60 -
branches/safari-612.1.5-branch/Source/WebCore/css/parser/CSSParserImpl.cpp
r268741 r273792 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; -
branches/safari-612.1.5-branch/Source/WebCore/css/parser/CSSParserImpl.h
r266253 r273792 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.