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

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: Fix mentioned issues Created 6 years, 8 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 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;
}
« 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