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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 268803005: Replace SVGDocument by XMLDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add rootElement() variant Created 6 years, 7 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
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/svg/SVGDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 2c57862dcc21a9a1e890935f48db0ffca70a537c..2481c9d2e85ee80e1f0e59a5d58e20e57229d9b1 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/SVGUseElement.h"
#include "platform/PlatformGestureEvent.h"
#include "platform/PlatformKeyboardEvent.h"
@@ -585,11 +585,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()));
return true;
}
}
@@ -1395,7 +1394,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()->accessSVGExtensions().updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition));
return true;
}
@@ -1525,7 +1524,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()->accessSVGExtensions().updatePan(m_frame->view()->windowToContents(m_lastKnownMousePosition));
return true;
}
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/svg/SVGDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698