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

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

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 9 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/page/TouchAdjustment.cpp ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/TouchDisambiguation.cpp
diff --git a/Source/core/page/TouchDisambiguation.cpp b/Source/core/page/TouchDisambiguation.cpp
index dbeeda03d20f30de275ca729685b64099ccc77b9..d565ed079475526b14ce31dccaa06e84ffb800a2 100644
--- a/Source/core/page/TouchDisambiguation.cpp
+++ b/Source/core/page/TouchDisambiguation.cpp
@@ -63,7 +63,7 @@ static IntRect boundingBoxForEventNodes(Node* eventNode)
result.unite(node->pixelSnappedBoundingBox());
node = NodeTraversal::next(*node, eventNode);
}
- return eventNode->document().view()->contentsToWindow(result);
+ return eventNode->document().view()->contentsToRootFrame(result);
}
static float scoreTouchTarget(IntPoint touchPoint, int padding, IntRect boundingBox)
@@ -86,14 +86,14 @@ struct TouchTargetData {
float score;
};
-void findGoodTouchTargets(const IntRect& touchBox, LocalFrame* mainFrame, Vector<IntRect>& goodTargets, WillBeHeapVector<RawPtrWillBeMember<Node>>& highlightNodes)
+void findGoodTouchTargets(const IntRect& touchBoxInRootFrame, LocalFrame* mainFrame, Vector<IntRect>& goodTargets, WillBeHeapVector<RawPtrWillBeMember<Node>>& highlightNodes)
{
goodTargets.clear();
- int touchPointPadding = ceil(std::max(touchBox.width(), touchBox.height()) * 0.5);
+ int touchPointPadding = ceil(std::max(touchBoxInRootFrame.width(), touchBoxInRootFrame.height()) * 0.5);
- IntPoint touchPoint = touchBox.center();
- IntPoint contentsPoint = mainFrame->view()->windowToContents(touchPoint);
+ IntPoint touchPoint = touchBoxInRootFrame.center();
+ IntPoint contentsPoint = mainFrame->view()->rootFrameToContents(touchPoint);
HitTestResult result = mainFrame->eventHandler().hitTestResultAtPoint(contentsPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, LayoutSize(touchPointPadding, touchPointPadding));
const WillBeHeapListHashSet<RefPtrWillBeMember<Node>>& hitResults = result.listBasedTestResult();
« no previous file with comments | « Source/core/page/TouchAdjustment.cpp ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698