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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 Element* element = toElement(node); | 87 Element* element = toElement(node); |
88 // Tapping on a text field or other focusable item should trigger adjust
ment, except | 88 // Tapping on a text field or other focusable item should trigger adjust
ment, except |
89 // that iframe elements are hard-coded to support focus but the effect i
s often invisible | 89 // that iframe elements are hard-coded to support focus but the effect i
s often invisible |
90 // so they should be excluded. | 90 // so they should be excluded. |
91 if (element->isMouseFocusable() && !isHTMLIFrameElement(element)) | 91 if (element->isMouseFocusable() && !isHTMLIFrameElement(element)) |
92 return true; | 92 return true; |
93 // Accept nodes that has a CSS effect when touched. | 93 // Accept nodes that has a CSS effect when touched. |
94 if (element->childrenOrSiblingsAffectedByActive() || element->childrenOr
SiblingsAffectedByHover()) | 94 if (element->childrenOrSiblingsAffectedByActive() || element->childrenOr
SiblingsAffectedByHover()) |
95 return true; | 95 return true; |
96 } | 96 } |
97 if (LayoutStyle* layoutStyle = node->layoutStyle()) { | 97 if (const LayoutStyle* layoutStyle = node->layoutStyle()) { |
98 if (layoutStyle->affectedByActive() || layoutStyle->affectedByHover()) | 98 if (layoutStyle->affectedByActive() || layoutStyle->affectedByHover()) |
99 return true; | 99 return true; |
100 } | 100 } |
101 return false; | 101 return false; |
102 } | 102 } |
103 | 103 |
104 bool nodeIsZoomTarget(Node* node) | 104 bool nodeIsZoomTarget(Node* node) |
105 { | 105 { |
106 if (node->isTextNode() || node->isShadowRoot()) | 106 if (node->isTextNode() || node->isShadowRoot()) |
107 return false; | 107 return false; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |