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

Unified Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 2814473003: Fix frame coordinate translation issue with scroll views. (Closed)
Patch Set: Add more zoom tests Created 3 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 | « no previous file | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
index 7b9defc7bf238a88ca6681c5367b07a8f38c8403..b30074369556e5b36a1629b59d02275f7c3f6d34 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -195,9 +195,17 @@ WebMouseEventBuilder::WebMouseEventBuilder(const FrameView* plugin_parent,
if (event.NativeEvent()) {
*static_cast<WebMouseEvent*>(this) =
event.NativeEvent()->FlattenTransform();
- WebFloatPoint absolute_root_frame_location = PositionInRootFrame();
- IntPoint local_point = RoundedIntPoint(layout_item.AbsoluteToLocal(
- absolute_root_frame_location, kUseTransforms));
+ WebFloatPoint absolute_location = PositionInRootFrame();
+
+ // TODO(dtapuska): |plugin_parent| should never be null. Remove this
+ // conditional code.
+ // Translate the root frame position to content coordinates.
+ if (plugin_parent) {
+ absolute_location = plugin_parent->RootFrameToContents(absolute_location);
+ }
+
+ IntPoint local_point = RoundedIntPoint(
+ layout_item.AbsoluteToLocal(absolute_location, kUseTransforms));
SetPositionInWidget(local_point.X(), local_point.Y());
return;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698