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

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

Issue 955583002: InlinedVisitor: Migrate page to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/page/ValidationMessageClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const float zeroTolerance = 1e-6f; 45 const float zeroTolerance = 1e-6f;
46 46
47 // Class for remembering absolute quads of a target node and what node they repr esent. 47 // Class for remembering absolute quads of a target node and what node they repr esent.
48 class SubtargetGeometry { 48 class SubtargetGeometry {
49 ALLOW_ONLY_INLINE_ALLOCATION(); 49 ALLOW_ONLY_INLINE_ALLOCATION();
50 public: 50 public:
51 SubtargetGeometry(Node* node, const FloatQuad& quad) 51 SubtargetGeometry(Node* node, const FloatQuad& quad)
52 : m_node(node) 52 : m_node(node)
53 , m_quad(quad) 53 , m_quad(quad)
54 { } 54 { }
55 void trace(Visitor* visitor) { visitor->trace(m_node); } 55 DEFINE_INLINE_TRACE() { visitor->trace(m_node); }
56 56
57 Node* node() const { return m_node; } 57 Node* node() const { return m_node; }
58 FloatQuad quad() const { return m_quad; } 58 FloatQuad quad() const { return m_quad; }
59 IntRect boundingBox() const { return m_quad.enclosingBoundingBox(); } 59 IntRect boundingBox() const { return m_quad.enclosingBoundingBox(); }
60 60
61 private: 61 private:
62 RawPtrWillBeMember<Node> m_node; 62 RawPtrWillBeMember<Node> m_node;
63 FloatQuad m_quad; 63 FloatQuad m_quad;
64 }; 64 };
65 65
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 507
508 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes) 508 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes)
509 { 509 {
510 IntPoint targetPoint; 510 IntPoint targetPoint;
511 TouchAdjustment::SubtargetGeometryList subtargets; 511 TouchAdjustment::SubtargetGeometryList subtargets;
512 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); 512 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets);
513 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient); 513 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient);
514 } 514 }
515 515
516 } // namespace blink 516 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/page/ValidationMessageClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698