Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1406763002: Move touch-action property into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index ca14e73d6ff6351f850871baf8c092b7c03b0086..78094f5f6c33dcea4836ec7e065b2ed1060fe94a 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -1236,10 +1236,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
validPrimitive = validUnit(value, FNumber);
break;
- case CSSPropertyTouchAction:
- parsedValue = parseTouchAction();
- break;
-
case CSSPropertyAlignContent:
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
parsedValue = parseContentDistributionOverflowPosition();
@@ -1302,6 +1298,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitLogicalWidth:
case CSSPropertyWebkitLogicalHeight:
case CSSPropertyClip:
+ case CSSPropertyTouchAction:
validPrimitive = false;
break;
@@ -6138,57 +6135,6 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
-{
- CSSParserValue* value = m_valueList->current();
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- if (m_valueList->size() == 1 && value && (value->id == CSSValueAuto || value->id == CSSValueNone || value->id == CSSValueManipulation)) {
- list->append(cssValuePool().createIdentifierValue(value->id));
- m_valueList->next();
- return list.release();
- }
-
- bool xSet = false;
- bool ySet = false;
- while (value) {
- switch (value->id) {
- case CSSValuePanX:
- case CSSValuePanRight:
- case CSSValuePanLeft: {
- if (xSet)
- return nullptr;
- xSet = true;
- if (value->id != CSSValuePanX && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
- return nullptr;
-
- RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
- list->append(panValue.release());
- break;
- }
- case CSSValuePanY:
- case CSSValuePanDown:
- case CSSValuePanUp: {
- if (ySet)
- return nullptr;
- ySet = true;
- if (value->id != CSSValuePanY && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
- return nullptr;
- RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
- list->append(panValue.release());
- break;
- }
- default:
- return nullptr;
- }
- value = m_valueList->next();
- }
-
- if (list->length())
- return list.release();
-
- return nullptr;
-}
-
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration()
{
CSSParserValue* value = m_valueList->current();
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698