Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index d55645e614dfe44aece0455d296605469d0c60a7..6d849e9daa6b60fa7c132b77c52f1a68d1bae4fc 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" |
@@ -2056,9 +2057,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); |
} |
} |
@@ -2587,7 +2588,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); |