Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 36cc3c3a510e50dfaeb972df4d7b9afffce99ba7..a6b46b9e3a6e46ceabbf4936a2238710ce6d976d 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -32,6 +32,7 @@ |
#include "core/accessibility/AXObjectCache.h" |
#include "core/animation/ActiveAnimations.h" |
#include "core/css/resolver/StyleResolver.h" |
+#include "core/dom/EventHandlerRegistry.h" |
#include "core/editing/EditingBoundary.h" |
#include "core/editing/FrameSelection.h" |
#include "core/editing/htmlediting.h" |
@@ -2102,9 +2103,9 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle& newS |
TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionAuto; |
if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) != (newStyle.touchAction() == TouchActionAuto)) { |
if (newStyle.touchAction() != TouchActionAuto) |
- document().didAddTouchEventHandler(node()); |
+ EventHandlerRegistry::from(document())->didAddEventHandler(*node(), EventHandlerRegistry::TouchEvent); |
else |
- document().didRemoveTouchEventHandler(node()); |
+ EventHandlerRegistry::from(document())->didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEvent); |
} |
} |
@@ -2633,7 +2634,7 @@ void RenderObject::willBeDestroyed() |
// previously. Handlers are not added for text nodes so don't try removing |
// for one too. Need to check if m_style is null in cases of partial construction. |
if (!documentBeingDestroyed() && node() && !node()->isTextNode() && m_style && m_style->touchAction() != TouchActionAuto) |
- document().didRemoveTouchEventHandler(node()); |
+ EventHandlerRegistry::from(document())->didRemoveEventHandler(*node(), EventHandlerRegistry::TouchEvent); |
setAncestorLineBoxDirty(false); |