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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/SpatialNavigation.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/TouchAdjustment.cpp
diff --git a/Source/core/page/TouchAdjustment.cpp b/Source/core/page/TouchAdjustment.cpp
index de2674d5ab4e84b3960b9d5225c3337a281207f7..b78ffc024142ca5b86de19be78b12d46a51c5d53 100644
--- a/Source/core/page/TouchAdjustment.cpp
+++ b/Source/core/page/TouchAdjustment.cpp
@@ -320,7 +320,7 @@ float zoomableIntersectionQuotient(const IntPoint& touchHotspot, const IntRect&
IntRect rect = subtarget.boundingBox();
// Convert from frame coordinates to window coordinates.
- rect = subtarget.node()->document()->view()->contentsToWindow(rect);
+ rect = subtarget.node()->document().view()->contentsToWindow(rect);
// Check the rectangle is meaningful zoom target. It should at least contain the hotspot.
if (!rect.contains(touchHotspot))
@@ -343,7 +343,7 @@ float hybridDistanceFunction(const IntPoint& touchHotspot, const IntRect& touchR
IntRect rect = subtarget.boundingBox();
// Convert from frame coordinates to window coordinates.
- rect = subtarget.node()->document()->view()->contentsToWindow(rect);
+ rect = subtarget.node()->document().view()->contentsToWindow(rect);
float radiusSquared = 0.25f * (touchRect.size().diagonalLengthSquared());
float distanceToAdjustScore = rect.distanceSquaredToPoint(touchHotspot) / radiusSquared;
@@ -384,7 +384,7 @@ void adjustPointToRect(FloatPoint& point, const FloatRect& rect)
bool snapTo(const SubtargetGeometry& geom, const IntPoint& touchPoint, const IntRect& touchArea, IntPoint& adjustedPoint)
{
- FrameView* view = geom.node()->document()->view();
+ FrameView* view = geom.node()->document().view();
FloatQuad quad = geom.quad();
if (quad.isRectilinear()) {
@@ -462,7 +462,7 @@ bool findNodeWithLowestDistanceMetric(Node*& targetNode, IntPoint& targetPoint,
}
}
if (targetNode) {
- targetArea = targetNode->document()->view()->contentsToWindow(targetArea);
+ targetArea = targetNode->document().view()->contentsToWindow(targetArea);
}
return (targetNode);
}
« no previous file with comments | « Source/core/page/SpatialNavigation.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698