Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 7a7d9d32f284f16d4cf130e72ac92ab40fd4932d..1834a6ed747b8444185769bcba4cf841f0ade603 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()->svgExtensions() && m_frame->document()->svgExtensions()->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/03 21:35:30
This isn't necessary. Instead of checking for svgE
|
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/03 21:35:30
accessSVGExtensions (here, and elsewhere)
|
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; |
} |