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

Unified Diff: sky/engine/core/events/MouseRelatedEvent.cpp

Issue 681023002: Remove a bunch of frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/dom/Touch.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/events/MouseRelatedEvent.cpp
diff --git a/sky/engine/core/events/MouseRelatedEvent.cpp b/sky/engine/core/events/MouseRelatedEvent.cpp
index 5a4fae3a9a3cbbe35b43200ba73f0d9bc49803b1..972b78986f7635619e799bc042e0d78ec8d93033 100644
--- a/sky/engine/core/events/MouseRelatedEvent.cpp
+++ b/sky/engine/core/events/MouseRelatedEvent.cpp
@@ -48,22 +48,19 @@ MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubb
, m_isSimulated(isSimulated)
{
LayoutPoint adjustedPageLocation;
- LayoutPoint scrollPosition;
LocalFrame* frame = view() ? view()->frame() : 0;
if (frame && !isSimulated) {
if (FrameView* frameView = frame->view()) {
- scrollPosition = frameView->scrollPosition();
adjustedPageLocation = frameView->windowToContents(windowLocation);
float scaleFactor = 1 / frame->pageZoomFactor();
if (scaleFactor != 1.0f) {
adjustedPageLocation.scale(scaleFactor, scaleFactor);
- scrollPosition.scale(scaleFactor, scaleFactor);
}
}
}
- m_clientLocation = adjustedPageLocation - toLayoutSize(scrollPosition);
+ m_clientLocation = adjustedPageLocation;
m_pageLocation = adjustedPageLocation;
initCoordinates();
« no previous file with comments | « sky/engine/core/dom/Touch.cpp ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698