| Index: third_party/WebKit/Source/core/page/TouchAdjustment.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/TouchAdjustment.cpp b/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
|
| index 7c87156fbd76f1cf595d66ac7a4e22632649345c..b5aa3cb3454c629822e113503f6e2cf7670951df 100644
|
| --- a/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
|
| +++ b/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
|
| @@ -58,7 +58,7 @@ public:
|
| IntRect boundingBox() const { return m_quad.enclosingBoundingBox(); }
|
|
|
| private:
|
| - RawPtrWillBeMember<Node> m_node;
|
| + Member<Node> m_node;
|
| FloatQuad m_quad;
|
| };
|
|
|
| @@ -72,7 +72,7 @@ namespace blink {
|
|
|
| namespace TouchAdjustment {
|
|
|
| -typedef WillBeHeapVector<SubtargetGeometry> SubtargetGeometryList;
|
| +typedef HeapVector<SubtargetGeometry> SubtargetGeometryList;
|
| typedef bool (*NodeFilter)(Node*);
|
| typedef void (*AppendSubtargetsForNode)(Node*, SubtargetGeometryList&);
|
| typedef float (*DistanceFunction)(const IntPoint&, const IntRect&, const SubtargetGeometry&);
|
| @@ -243,20 +243,20 @@ static inline Node* parentShadowHostOrOwner(const Node* node)
|
| }
|
|
|
| // Compiles a list of subtargets of all the relevant target nodes.
|
| -void compileSubtargetList(const WillBeHeapVector<RefPtrWillBeMember<Node>>& intersectedNodes, SubtargetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode appendSubtargetsForNode)
|
| +void compileSubtargetList(const HeapVector<Member<Node>>& intersectedNodes, SubtargetGeometryList& subtargets, NodeFilter nodeFilter, AppendSubtargetsForNode appendSubtargetsForNode)
|
| {
|
| // Find candidates responding to tap gesture events in O(n) time.
|
| - WillBeHeapHashMap<RawPtrWillBeMember<Node>, RawPtrWillBeMember<Node>> responderMap;
|
| - WillBeHeapHashSet<RawPtrWillBeMember<Node>> ancestorsToRespondersSet;
|
| - WillBeHeapVector<RawPtrWillBeMember<Node>> candidates;
|
| - WillBeHeapHashSet<RawPtrWillBeMember<Node>> editableAncestors;
|
| + HeapHashMap<Member<Node>, Member<Node>> responderMap;
|
| + HeapHashSet<Member<Node>> ancestorsToRespondersSet;
|
| + HeapVector<Member<Node>> candidates;
|
| + HeapHashSet<Member<Node>> editableAncestors;
|
|
|
| // A node matching the NodeFilter is called a responder. Candidate nodes must either be a
|
| // responder or have an ancestor that is a responder.
|
| // This iteration tests all ancestors at most once by caching earlier results.
|
| for (unsigned i = 0; i < intersectedNodes.size(); ++i) {
|
| Node* node = intersectedNodes[i].get();
|
| - WillBeHeapVector<RawPtrWillBeMember<Node>> visitedNodes;
|
| + HeapVector<Member<Node>> visitedNodes;
|
| Node* respondingNode = nullptr;
|
| for (Node* visitedNode = node; visitedNode; visitedNode = visitedNode->parentOrShadowHostNode()) {
|
| // Check if we already have a result for a common ancestor from another candidate.
|
| @@ -269,7 +269,7 @@ void compileSubtargetList(const WillBeHeapVector<RefPtrWillBeMember<Node>>& inte
|
| respondingNode = visitedNode;
|
| // Continue the iteration to collect the ancestors of the responder, which we will need later.
|
| for (visitedNode = parentShadowHostOrOwner(visitedNode); visitedNode; visitedNode = parentShadowHostOrOwner(visitedNode)) {
|
| - WillBeHeapHashSet<RawPtrWillBeMember<Node>>::AddResult addResult = ancestorsToRespondersSet.add(visitedNode);
|
| + HeapHashSet<Member<Node>>::AddResult addResult = ancestorsToRespondersSet.add(visitedNode);
|
| if (!addResult.isNewEntry)
|
| break;
|
| }
|
| @@ -318,7 +318,7 @@ void compileSubtargetList(const WillBeHeapVector<RefPtrWillBeMember<Node>>& inte
|
| }
|
|
|
| // Compiles a list of zoomable subtargets.
|
| -void compileZoomableSubtargets(const WillBeHeapVector<RefPtrWillBeMember<Node>>& intersectedNodes, SubtargetGeometryList& subtargets)
|
| +void compileZoomableSubtargets(const HeapVector<Member<Node>>& intersectedNodes, SubtargetGeometryList& subtargets)
|
| {
|
| for (unsigned i = 0; i < intersectedNodes.size(); ++i) {
|
| Node* candidate = intersectedNodes[i].get();
|
| @@ -479,7 +479,7 @@ bool findNodeWithLowestDistanceMetric(Node*& targetNode, IntPoint& targetPoint,
|
|
|
| } // namespace TouchAdjustment
|
|
|
| -bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMember<Node>>& nodes)
|
| +bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const HeapVector<Member<Node>>& nodes)
|
| {
|
| IntRect targetArea;
|
| TouchAdjustment::SubtargetGeometryList subtargets;
|
| @@ -487,7 +487,7 @@ bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const
|
| return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDistanceFunction);
|
| }
|
|
|
| -bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMember<Node>>& nodes)
|
| +bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, const IntPoint& touchHotspot, const IntRect& touchArea, const HeapVector<Member<Node>>& nodes)
|
| {
|
| IntRect targetArea;
|
| TouchAdjustment::SubtargetGeometryList subtargets;
|
| @@ -495,7 +495,7 @@ bool findBestContextMenuCandidate(Node*& targetNode, IntPoint& targetPoint, cons
|
| return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDistanceFunction);
|
| }
|
|
|
| -bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMember<Node>>& nodes)
|
| +bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint& touchHotspot, const IntRect& touchArea, const HeapVector<Member<Node>>& nodes)
|
| {
|
| IntPoint targetPoint;
|
| TouchAdjustment::SubtargetGeometryList subtargets;
|
|
|