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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Takes non-const Node* because isContentEditable is a non-const function. | 69 // Takes non-const Node* because isContentEditable is a non-const function. |
70 bool nodeRespondsToTapGesture(Node* node) | 70 bool nodeRespondsToTapGesture(Node* node) |
71 { | 71 { |
72 if (node->willRespondToMouseClickEvents() || node->willRespondToMouseMoveEve
nts()) | 72 if (node->willRespondToMouseClickEvents() || node->willRespondToMouseMoveEve
nts()) |
73 return true; | 73 return true; |
74 if (node->isElementNode()) { | 74 if (node->isElementNode()) { |
75 Element* element = toElement(node); | 75 Element* element = toElement(node); |
76 if (element->isMouseFocusable()) | 76 if (element->isMouseFocusable()) |
77 return true; | 77 return true; |
78 // Accept nodes that has a CSS effect when touched. | 78 // Accept nodes that has a CSS effect when touched. |
79 if (element->childrenAffectedByActive() || element->childrenAffectedByHo
ver()) | 79 if (element->childrenOrSiblingsAffectedByActive() || element->childrenOr
SiblingsAffectedByHover()) |
80 return true; | 80 return true; |
81 } | 81 } |
82 if (RenderStyle* renderStyle = node->renderStyle()) { | 82 if (RenderStyle* renderStyle = node->renderStyle()) { |
83 if (renderStyle->affectedByActive() || renderStyle->affectedByHover()) | 83 if (renderStyle->affectedByActive() || renderStyle->affectedByHover()) |
84 return true; | 84 return true; |
85 } | 85 } |
86 return false; | 86 return false; |
87 } | 87 } |
88 | 88 |
89 bool nodeIsZoomTarget(Node* node) | 89 bool nodeIsZoomTarget(Node* node) |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 487 |
488 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint
& touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem
ber<Node> >& nodes) | 488 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint
& touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem
ber<Node> >& nodes) |
489 { | 489 { |
490 IntPoint targetPoint; | 490 IntPoint targetPoint; |
491 TouchAdjustment::SubtargetGeometryList subtargets; | 491 TouchAdjustment::SubtargetGeometryList subtargets; |
492 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); | 492 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); |
493 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP
oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable
IntersectionQuotient); | 493 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP
oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable
IntersectionQuotient); |
494 } | 494 } |
495 | 495 |
496 } // namespace WebCore | 496 } // namespace WebCore |
OLD | NEW |