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

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

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 years, 7 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
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 const Vector<FloatQuad>::const_iterator end = quads.end(); 231 const Vector<FloatQuad>::const_iterator end = quads.end();
232 for (; it != end; ++it) 232 for (; it != end; ++it)
233 subtargets.append(SubtargetGeometry(node, *it)); 233 subtargets.append(SubtargetGeometry(node, *it));
234 } 234 }
235 235
236 static inline Node* parentShadowHostOrOwner(const Node* node) 236 static inline Node* parentShadowHostOrOwner(const Node* node)
237 { 237 {
238 if (Node* ancestor = node->parentOrShadowHostNode()) 238 if (Node* ancestor = node->parentOrShadowHostNode())
239 return ancestor; 239 return ancestor;
240 if (node->isDocumentNode()) 240 if (node->isDocumentNode())
241 return toDocument(node)->ownerElement(); 241 return toDocument(node)->localOwner();
242 return nullptr; 242 return nullptr;
243 } 243 }
244 244
245 // Compiles a list of subtargets of all the relevant target nodes. 245 // Compiles a list of subtargets of all the relevant target nodes.
246 void compileSubtargetList(const HeapVector<Member<Node>>& intersectedNodes, Subt argetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode ap pendSubtargetsForNode) 246 void compileSubtargetList(const HeapVector<Member<Node>>& intersectedNodes, Subt argetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode ap pendSubtargetsForNode)
247 { 247 {
248 // Find candidates responding to tap gesture events in O(n) time. 248 // Find candidates responding to tap gesture events in O(n) time.
249 HeapHashMap<Member<Node>, Member<Node>> responderMap; 249 HeapHashMap<Member<Node>, Member<Node>> responderMap;
250 HeapHashSet<Member<Node>> ancestorsToRespondersSet; 250 HeapHashSet<Member<Node>> ancestorsToRespondersSet;
251 HeapVector<Member<Node>> candidates; 251 HeapVector<Member<Node>> candidates;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const HeapVector<Member<Node>>& nodes) 498 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const HeapVector<Member<Node>>& nodes)
499 { 499 {
500 IntPoint targetPoint; 500 IntPoint targetPoint;
501 TouchAdjustment::SubtargetGeometryList subtargets; 501 TouchAdjustment::SubtargetGeometryList subtargets;
502 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); 502 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets);
503 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient); 503 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient);
504 } 504 }
505 505
506 } // namespace blink 506 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/SinkDocument.cpp ('k') | third_party/WebKit/Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698