Changeset 243318 in webkit
- Timestamp:
- Mar 21, 2019 1:20:14 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243317 r243318 1 2019-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add an internal feature flag to disable the -webkit-overflow-scrolling CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=196058 5 rdar://problem/49078202 6 7 Reviewed by Antti Koivisto. 8 9 Add tests testing that the stacking-context side-effects -webkit-overflow-scrolling:touch 10 go away when it's disabled. 11 12 * fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking-expected.html: Added. 13 * fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking.html: Added. 14 * fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking-expected.html: Added. 15 * fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking.html: Added. 16 1 17 2019-03-21 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r243316 r243318 1 2019-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add an internal feature flag to disable the -webkit-overflow-scrolling CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=196058 5 rdar://problem/49078202 6 7 Reviewed by Antti Koivisto. 8 9 Add an internal setting called "legacyOverflowScrollingTouchEnabled", initially 10 on by default. 11 12 When disabled, it makes the -webkit-overflow-scrolling property be unsupported. 13 14 Tests: fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking.html 15 fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking.html 16 17 * css/parser/CSSParserContext.cpp: 18 (WebCore::CSSParserContext::CSSParserContext): 19 (WebCore::operator==): 20 * css/parser/CSSParserContext.h: 21 (WebCore::CSSParserContextHash::hash): 22 * css/parser/CSSParserFastPaths.cpp: 23 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 24 * css/parser/CSSParserFastPaths.h: 25 * css/parser/CSSPropertyParser.cpp: 26 (WebCore::CSSPropertyParser::parseSingleValue): 27 * page/Settings.yaml: 28 1 29 2019-03-21 Antti Koivisto <antti@apple.com> 2 30 -
trunk/Source/WebCore/css/parser/CSSParserContext.cpp
r242780 r243318 59 59 textAutosizingEnabled = document.settings().textAutosizingEnabled(); 60 60 #endif 61 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 62 legacyOverflowScrollingTouchEnabled = document.settings().legacyOverflowScrollingTouchEnabled(); 63 #endif 61 64 springTimingFunctionEnabled = document.settings().springTimingFunctionEnabled(); 62 65 constantPropertiesEnabled = document.settings().constantPropertiesEnabled(); … … 78 81 && a.textAutosizingEnabled == b.textAutosizingEnabled 79 82 #endif 83 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 84 && a.legacyOverflowScrollingTouchEnabled == b.legacyOverflowScrollingTouchEnabled 85 #endif 80 86 && a.enforcesCSSMIMETypeInNoQuirksMode == b.enforcesCSSMIMETypeInNoQuirksMode 81 87 && a.useLegacyBackgroundSizeShorthandBehavior == b.useLegacyBackgroundSizeShorthandBehavior -
trunk/Source/WebCore/css/parser/CSSParserContext.h
r242780 r243318 50 50 bool textAutosizingEnabled { false }; 51 51 #endif 52 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 53 bool legacyOverflowScrollingTouchEnabled { false }; 54 #endif 52 55 bool enforcesCSSMIMETypeInNoQuirksMode { true }; 53 56 bool useLegacyBackgroundSizeShorthandBehavior { false }; … … 94 97 & key.textAutosizingEnabled << 1 95 98 #endif 96 & key.enforcesCSSMIMETypeInNoQuirksMode << 2 97 & key.useLegacyBackgroundSizeShorthandBehavior << 3 98 & key.springTimingFunctionEnabled << 4 99 & key.constantPropertiesEnabled << 5 100 & key.colorFilterEnabled << 6 101 & key.deferredCSSParserEnabled << 7 102 & key.hasDocumentSecurityOrigin << 8 103 & key.useSystemAppearance << 9 99 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 100 & key.legacyOverflowScrollingTouchEnabled << 2 101 #endif 102 & key.enforcesCSSMIMETypeInNoQuirksMode << 3 103 & key.useLegacyBackgroundSizeShorthandBehavior << 4 104 & key.springTimingFunctionEnabled << 5 105 & key.constantPropertiesEnabled << 6 106 & key.colorFilterEnabled << 7 107 & key.deferredCSSParserEnabled << 8 108 & key.hasDocumentSecurityOrigin << 9 109 & key.useSystemAppearance << 10 104 110 #if ENABLE(ATTACHMENT_ELEMENT) 105 & key.attachmentEnabled << 1 0111 & key.attachmentEnabled << 11 106 112 #endif 107 & key.mode << 1 1; // Keep this last.113 & key.mode << 12; // Keep this last. 108 114 hash ^= WTF::intHash(bits); 109 115 return hash; -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r243275 r243318 32 32 33 33 #include "CSSFunctionValue.h" 34 #include "CSSParserContext.h" 34 35 #include "CSSParserIdioms.h" 35 36 #include "CSSPrimitiveValue.h" … … 520 521 } 521 522 522 bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID, CSSParserMode parserMode) 523 { 524 if (valueID == CSSValueInvalid || !isValueAllowedInMode(valueID, parserMode)) 523 bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID, const CSSParserContext& context) 524 { 525 #if !ENABLE(OVERFLOW_SCROLLING_TOUCH) 526 UNUSED_PARAM(context); 527 #endif 528 529 if (valueID == CSSValueInvalid || !isValueAllowedInMode(valueID, context.mode)) 525 530 return false; 526 531 … … 803 808 #if ENABLE(OVERFLOW_SCROLLING_TOUCH) 804 809 case CSSPropertyWebkitOverflowScrolling: 810 if (!context.legacyOverflowScrollingTouchEnabled) 811 return nullptr; 805 812 return valueID == CSSValueAuto || valueID == CSSValueTouch; 806 813 #endif … … 982 989 } 983 990 984 static RefPtr<CSSValue> parseKeywordValue(CSSPropertyID propertyId, const String& string, CSSParserMode parserMode)991 static RefPtr<CSSValue> parseKeywordValue(CSSPropertyID propertyId, const String& string, const CSSParserContext& context) 985 992 { 986 993 ASSERT(!string.isEmpty()); … … 1014 1021 return CSSValuePool::singleton().createRevertValue(); 1015 1022 1016 if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyId, valueID, parserMode))1023 if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyId, valueID, context)) 1017 1024 return CSSPrimitiveValue::createIdentifier(valueID); 1018 1025 return nullptr; … … 1293 1300 } 1294 1301 1295 RefPtr<CSSValue> CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String& string, CSSParserMode parserMode)1296 { 1297 if (auto result = parseSimpleLengthValue(propertyID, string, parserMode))1302 RefPtr<CSSValue> CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String& string, const CSSParserContext& context) 1303 { 1304 if (auto result = parseSimpleLengthValue(propertyID, string, context.mode)) 1298 1305 return result; 1299 1306 if (propertyID == CSSPropertyCaretColor) 1300 return parseCaretColor(string, parserMode);1307 return parseCaretColor(string, context.mode); 1301 1308 if (isColorPropertyID(propertyID)) 1302 return parseColor(string, parserMode);1303 if (auto result = parseKeywordValue(propertyID, string, parserMode))1309 return parseColor(string, context.mode); 1310 if (auto result = parseKeywordValue(propertyID, string, context)) 1304 1311 return result; 1305 1312 return parseSimpleTransform(propertyID, string); -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.h
r209826 r243318 39 39 class CSSValue; 40 40 class StyleSheetContents; 41 struct CSSParserContext; 41 42 42 43 class CSSParserFastPaths { … … 44 45 // Parses simple values like '10px' or 'green', but makes no guarantees 45 46 // about handling any property completely. 46 static RefPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, CSSParserMode);47 static RefPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, const CSSParserContext&); 47 48 48 49 // Properties handled here shouldn't be explicitly handled in CSSPropertyParser 49 50 static bool isKeywordPropertyID(CSSPropertyID); 50 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, CSSParserMode);51 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, const CSSParserContext&); 51 52 52 53 static RefPtr<CSSValue> parseColor(const String&, CSSParserMode); -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r243163 r243318 3910 3910 { 3911 3911 if (CSSParserFastPaths::isKeywordPropertyID(property)) { 3912 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context.mode)) 3913 return nullptr; 3912 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context)) 3913 return nullptr; 3914 3914 3915 return consumeIdent(m_range); 3915 3916 } … … 5699 5700 case CSSPropertyWebkitMarginCollapse: { 5700 5701 CSSValueID id = m_range.consumeIncludingWhitespace().id(); 5701 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context .mode))5702 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context)) 5702 5703 return false; 5703 5704 addProperty(CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginCollapse, CSSValuePool::singleton().createIdentifierValue(id), important); … … 5707 5708 } 5708 5709 id = m_range.consumeIncludingWhitespace().id(); 5709 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context .mode))5710 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context)) 5710 5711 return false; 5711 5712 addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, CSSValuePool::singleton().createIdentifierValue(id), important); … … 5714 5715 case CSSPropertyOverflow: { 5715 5716 CSSValueID id = m_range.consumeIncludingWhitespace().id(); 5716 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context .mode))5717 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context)) 5717 5718 return false; 5718 5719 if (!m_range.atEnd()) -
trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
r243273 r243318 812 812 for (int j = firstCSSValueKeyword; j <= lastCSSValueKeyword; ++j) { 813 813 CSSValueID valueID = convertToCSSValueID(j); 814 if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyID, valueID, HTMLStandardMode))814 if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyID, valueID, strictCSSParserContext())) 815 815 values->addItem(getValueNameString(valueID)); 816 816 } -
trunk/Source/WebCore/page/Settings.yaml
r243046 r243318 389 389 onChange: setNeedsRelayoutAllFrames 390 390 391 legacyOverflowScrollingTouchEnabled: 392 initial: true 393 onChange: setNeedsRelayoutAllFrames 394 conditional: OVERFLOW_SCROLLING_TOUCH 395 391 396 webSecurityEnabled: 392 397 initial: true -
trunk/Source/WebKit/ChangeLog
r243316 r243318 1 2019-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add an internal feature flag to disable the -webkit-overflow-scrolling CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=196058 5 rdar://problem/49078202 6 7 Reviewed by Antti Koivisto. 8 9 Add an internal feature flag called "LegacyOverflowScrollingTouchEnabled", initially 10 on by default. 11 12 * Shared/WebPreferences.yaml: 13 1 14 2019-03-21 Antti Koivisto <antti@apple.com> 2 15 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r243292 r243318 1443 1443 category: internal 1444 1444 1445 LegacyOverflowScrollingTouchEnabled: 1446 type: bool 1447 defaultValue: true 1448 humanReadableName: "Legacy -webkit-overflow-scrolling property" 1449 humanReadableDescription: "Support the legacy -webkit-overflow-scrolling CSS property" 1450 condition: ENABLE(OVERFLOW_SCROLLING_TOUCH) 1451 category: internal 1452 1445 1453 FetchAPIKeepAliveEnabled: 1446 1454 type: bool
Note: See TracChangeset
for help on using the changeset viewer.