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

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

Issue 23903041: Make the Vector copy constructor for mismatched inline sizes explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback. Created 7 years, 3 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
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 2afd72a6b9ddca6a7d19fc5d3f3d67163cee9290..6ad3e1328003417dd07959a5598390aa68ab99e9 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2619,7 +2619,10 @@ bool EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, c
// in the case where further processing on the node is required. Returning the shadow ancestor prevents a
// regression in touchadjustment/html-label.html. Some refinement is required to testing/internals to
// handle targetNode being a shadow DOM node.
- bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, nodes);
+
+ // FIXME: the explicit Vector conversion copies into a temporary and is
+ // wasteful.
+ bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, Vector<RefPtr<Node> > (nodes));
if (success && targetNode)
targetNode = targetNode->deprecatedShadowAncestorNode();
return success;
@@ -2633,7 +2636,10 @@ bool EventHandler::bestContextMenuNodeForTouchPoint(const IntPoint& touchCenter,
IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
Vector<RefPtr<Node>, 11> nodes;
copyToVector(result.rectBasedTestResult(), nodes);
- return findBestContextMenuCandidate(targetNode, targetPoint, touchCenter, touchRect, nodes);
+
+ // FIXME: the explicit Vector conversion copies into a temporary and is
+ // wasteful.
+ return findBestContextMenuCandidate(targetNode, targetPoint, touchCenter, touchRect, Vector<RefPtr<Node> >(nodes));
}
bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode)
@@ -2644,7 +2650,10 @@ bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, co
IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
Vector<RefPtr<Node>, 11> nodes;
copyToVector(result.rectBasedTestResult(), nodes);
- return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, nodes);
+
+ // FIXME: the explicit Vector conversion copies into a temporary and is
+ // wasteful.
+ return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, Vector<RefPtr<Node> >(nodes));
}
bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEvent, IntPoint& adjustedPoint)
« no previous file with comments | « Source/core/html/track/WebVTTTokenizer.cpp ('k') | Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698