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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2209773002: Remove the blocking touch handlers for the input[type=range] and add touch-action instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style.. Created 4 years, 4 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
Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index 3e86c47489d9828fad5e5956afdf62d54b6a2fdb..2a7a70605d4cb59019b8c918cb6545c7daafccb6 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -1445,6 +1445,7 @@ template <CSSPropertyPriority priority>
void StyleResolver::applyProperties(StyleResolverState& state, const StylePropertySet* properties, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
{
unsigned propertyCount = properties->propertyCount();
+ bool hasTouchAction = false;
for (unsigned i = 0; i < propertyCount; ++i) {
StylePropertySet::PropertyReference current = properties->propertyAt(i);
CSSPropertyID property = current.id();
@@ -1476,7 +1477,20 @@ void StyleResolver::applyProperties(StyleResolverState& state, const StyleProper
if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
continue;
+ if (property == CSSPropertyTouchAction) {
+ hasTouchAction = true;
+ }
+
StyleBuilder::applyProperty(current.id(), state, current.value());
+
+ if (property == CSSPropertyWebkitAppearance && !hasTouchAction) {
tkent 2016/08/09 00:29:46 This code looks like the state.style() will have t
+ if (state.style()->appearance() == SliderVerticalPart) {
+ state.style()->setTouchAction(TouchActionPanX);
+ }
+ if (state.style()->appearance() == SliderHorizontalPart) {
+ state.style()->setTouchAction(TouchActionPanY);
+ }
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698