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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix nits Created 4 years, 10 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2af844ee0717fcfb7e676f32add5cf3ea26bfc18..79f5ca38f56ab9be1ce062f0d2bfeaf5881c1f1a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2044,13 +2044,14 @@ void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne
//
// Since a CSS property cannot be applied directly to a text node, a
// handler will have already been added for its parent so ignore it.
+ // TODO: Remove this blocking event handler; crbug.com/318381
TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionAuto;
if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) != (newStyle.touchAction() == TouchActionAuto)) {
EventHandlerRegistry& registry = document().frameHost()->eventHandlerRegistry();
if (newStyle.touchAction() != TouchActionAuto)
- registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEvent);
+ registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEventBlocking);
else
- registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEvent);
+ registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEventBlocking);
}
}
@@ -2572,8 +2573,8 @@ void LayoutObject::willBeDestroyed()
// previously may have already been removed by the Document independently.
if (node() && !node()->isTextNode() && m_style && m_style->touchAction() != TouchActionAuto) {
EventHandlerRegistry& registry = document().frameHost()->eventHandlerRegistry();
- if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEvent)->contains(node()))
- registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEvent);
+ if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEventBlocking)->contains(node()))
+ registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEventBlocking);
}
setAncestorLineBoxDirty(false);

Powered by Google App Engine
This is Rietveld 408576698