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

Side by Side Diff: Source/core/page/TouchAdjustment.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 appendQuadsToSubtargetList(quads, textNode, subtargets); 215 appendQuadsToSubtargetList(quads, textNode, subtargets);
216 } 216 }
217 } 217 }
218 218
219 static inline void appendZoomableSubtargets(Node* node, SubtargetGeometryList& s ubtargets) 219 static inline void appendZoomableSubtargets(Node* node, SubtargetGeometryList& s ubtargets)
220 { 220 {
221 LayoutBox* layoutObject = toLayoutBox(node->layoutObject()); 221 LayoutBox* layoutObject = toLayoutBox(node->layoutObject());
222 ASSERT(layoutObject); 222 ASSERT(layoutObject);
223 223
224 Vector<FloatQuad> quads; 224 Vector<FloatQuad> quads;
225 FloatRect borderBoxRect = layoutObject->borderBoxRect(); 225 FloatRect borderBoxRect(layoutObject->borderBoxRect());
226 FloatRect contentBoxRect = layoutObject->contentBoxRect(); 226 FloatRect contentBoxRect(layoutObject->contentBoxRect());
227 quads.append(layoutObject->localToAbsoluteQuad(borderBoxRect)); 227 quads.append(layoutObject->localToAbsoluteQuad(borderBoxRect));
228 if (borderBoxRect != contentBoxRect) 228 if (borderBoxRect != contentBoxRect)
229 quads.append(layoutObject->localToAbsoluteQuad(contentBoxRect)); 229 quads.append(layoutObject->localToAbsoluteQuad(contentBoxRect));
230 // FIXME: For LayoutBlocks, add column boxes and content boxes cleared for f loats. 230 // FIXME: For LayoutBlocks, add column boxes and content boxes cleared for f loats.
231 231
232 Vector<FloatQuad>::const_iterator it = quads.begin(); 232 Vector<FloatQuad>::const_iterator it = quads.begin();
233 const Vector<FloatQuad>::const_iterator end = quads.end(); 233 const Vector<FloatQuad>::const_iterator end = quads.end();
234 for (; it != end; ++it) 234 for (; it != end; ++it)
235 subtargets.append(SubtargetGeometry(node, *it)); 235 subtargets.append(SubtargetGeometry(node, *it));
236 } 236 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes) 500 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes)
501 { 501 {
502 IntPoint targetPoint; 502 IntPoint targetPoint;
503 TouchAdjustment::SubtargetGeometryList subtargets; 503 TouchAdjustment::SubtargetGeometryList subtargets;
504 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); 504 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets);
505 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient); 505 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient);
506 } 506 }
507 507
508 } // namespace blink 508 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGText.h ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698