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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 723373006: Add CSS parsing support for the scroll-blocks-on property (in place of touch-action-delay) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Apply CR feedback Created 6 years, 1 month 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
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 3bf163cfb074c96d9a9620c3a84b9ae6cc77ee4d..16aff202ec735ce74fc5278caf18466784640dba 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -175,6 +175,7 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyResize,
CSSPropertyRight,
CSSPropertyScrollBehavior,
+ CSSPropertyScrollBlocksOn,
CSSPropertySpeak,
CSSPropertyTableLayout,
CSSPropertyTabSize,
@@ -193,7 +194,6 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyTextTransform,
CSSPropertyTop,
CSSPropertyTouchAction,
- CSSPropertyTouchActionDelay,
CSSPropertyTransitionDelay,
CSSPropertyTransitionDuration,
CSSPropertyTransitionProperty,
@@ -1467,6 +1467,23 @@ static PassRefPtrWillBeRawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction t
return list.release();
}
+static PassRefPtrWillBeRawPtr<CSSValue> scrollBlocksOnFlagsToCSSValue(ScrollBlocksOn scrollBlocksOn)
+{
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+
+ if (scrollBlocksOn == ScrollBlocksOnNone)
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+
+ if (scrollBlocksOn & ScrollBlocksOnStartTouch)
+ list->append(cssValuePool().createIdentifierValue(CSSValueStartTouch));
+ if (scrollBlocksOn & ScrollBlocksOnWheelEvent)
+ list->append(cssValuePool().createIdentifierValue(CSSValueWheelEvent));
+ if (scrollBlocksOn & ScrollBlocksOnScrollEvent)
+ list->append(cssValuePool().createIdentifierValue(CSSValueScrollEvent));
+ ASSERT(list->length());
+ return list.release();
+}
+
static bool isLayoutDependent(CSSPropertyID propertyID, PassRefPtr<RenderStyle> style, RenderObject* renderer)
{
// Some properties only depend on layout in certain conditions which
@@ -2176,6 +2193,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
return cssValuePool().createValue(style->rubyPosition());
case CSSPropertyScrollBehavior:
return cssValuePool().createValue(style->scrollBehavior());
+ case CSSPropertyScrollBlocksOn:
+ return scrollBlocksOnFlagsToCSSValue(style->scrollBlocksOn());
case CSSPropertyTableLayout:
return cssValuePool().createValue(style->tableLayout());
case CSSPropertyTextAlign:
@@ -2261,8 +2280,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
return valueForPositionOffset(*style, CSSPropertyTop, renderer);
case CSSPropertyTouchAction:
return touchActionFlagsToCSSValue(style->touchAction());
- case CSSPropertyTouchActionDelay:
- return cssValuePool().createValue(style->touchActionDelay());
case CSSPropertyUnicodeBidi:
return cssValuePool().createValue(style->unicodeBidi());
case CSSPropertyVerticalAlign:
« no previous file with comments | « LayoutTests/webexposed/css-properties-as-js-properties-expected.txt ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698