| OLD | NEW |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 const float zeroTolerance = 1e-6f; | 44 const float zeroTolerance = 1e-6f; |
| 45 | 45 |
| 46 // Class for remembering absolute quads of a target node and what node they repr
esent. | 46 // Class for remembering absolute quads of a target node and what node they repr
esent. |
| 47 class SubtargetGeometry { | 47 class SubtargetGeometry { |
| 48 ALLOW_ONLY_INLINE_ALLOCATION(); | 48 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 49 public: | 49 public: |
| 50 SubtargetGeometry(Node* node, const FloatQuad& quad) | 50 SubtargetGeometry(Node* node, const FloatQuad& quad) |
| 51 : m_node(node) | 51 : m_node(node) |
| 52 , m_quad(quad) | 52 , m_quad(quad) |
| 53 { } | 53 { } |
| 54 void trace(Visitor* visitor) { visitor->trace(m_node); } | |
| 55 | 54 |
| 56 Node* node() const { return m_node; } | 55 Node* node() const { return m_node; } |
| 57 FloatQuad quad() const { return m_quad; } | 56 FloatQuad quad() const { return m_quad; } |
| 58 IntRect boundingBox() const { return m_quad.enclosingBoundingBox(); } | 57 IntRect boundingBox() const { return m_quad.enclosingBoundingBox(); } |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 RawPtr<Node> m_node; | 60 RawPtr<Node> m_node; |
| 62 FloatQuad m_quad; | 61 FloatQuad m_quad; |
| 63 }; | 62 }; |
| 64 | 63 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 330 |
| 332 bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const
IntPoint& touchHotspot, const IntRect& touchArea, const Vector<RefPtr<Node> >& n
odes) | 331 bool findBestClickableCandidate(Node*& targetNode, IntPoint& targetPoint, const
IntPoint& touchHotspot, const IntRect& touchArea, const Vector<RefPtr<Node> >& n
odes) |
| 333 { | 332 { |
| 334 IntRect targetArea; | 333 IntRect targetArea; |
| 335 TouchAdjustment::SubtargetGeometryList subtargets; | 334 TouchAdjustment::SubtargetGeometryList subtargets; |
| 336 TouchAdjustment::compileSubtargetList(nodes, subtargets, TouchAdjustment::no
deRespondsToTapGesture, TouchAdjustment::appendBasicSubtargetsForNode); | 335 TouchAdjustment::compileSubtargetList(nodes, subtargets, TouchAdjustment::no
deRespondsToTapGesture, TouchAdjustment::appendBasicSubtargetsForNode); |
| 337 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP
oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDi
stanceFunction); | 336 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP
oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::hybridDi
stanceFunction); |
| 338 } | 337 } |
| 339 | 338 |
| 340 } // namespace blink | 339 } // namespace blink |
| OLD | NEW |