Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 7a7d9d32f284f16d4cf130e72ac92ab40fd4932d..3d6fe5c716e3f268b9360c3a30ddb066a756a7fd 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -84,7 +84,7 @@ |
#include "core/rendering/RenderWidget.h" |
#include "core/rendering/style/CursorList.h" |
#include "core/rendering/style/RenderStyle.h" |
-#include "core/svg/SVGDocument.h" |
+#include "core/svg/SVGDocumentExtensions.h" |
#include "core/svg/SVGElementInstance.h" |
#include "core/svg/SVGUseElement.h" |
#include "platform/PlatformGestureEvent.h" |
@@ -587,11 +587,10 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve |
if (event.isOverWidget() && passWidgetMouseDownEventToWidget(event)) |
return true; |
- if (m_frame->document()->isSVGDocument() |
- && toSVGDocument(m_frame->document())->zoomAndPanEnabled()) { |
+ if (m_frame->document()->isSVGDocument() && m_frame->document()->accessSVGExtensions().zoomAndPanEnabled()) { |
if (event.event().shiftKey() && singleClick) { |
m_svgPan = true; |
- toSVGDocument(m_frame->document())->startPan(m_frame->view()->windowToContents(event.event().position())); |
+ m_frame->document()->accessSVGExtensions().startPan(m_frame->view()->windowToContents(event.event().position())); |
pdr.
2014/05/05 17:37:59
Nit: inside the if statement we can just use svgEx
|
return true; |
} |
} |
@@ -1397,7 +1396,7 @@ bool EventHandler::handleMouseMoveOrLeaveEvent(const PlatformMouseEvent& mouseEv |
cancelFakeMouseMoveEvent(); |
if (m_svgPan) { |
- toSVGDocument(m_frame->document())->updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition)); |
+ m_frame->document()->svgExtensions()->updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition)); |
pdr.
2014/05/05 17:37:59
Nit: It isn't obvious to me that this always hits
|
return true; |
} |
@@ -1527,7 +1526,7 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent) |
if (m_svgPan) { |
m_svgPan = false; |
- toSVGDocument(m_frame->document())->updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition)); |
+ m_frame->document()->svgExtensions()->updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition)); |
return true; |
} |