OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/input/TouchActionUtil.h" | 5 #include "core/input/TouchActionUtil.h" |
6 | 6 |
7 #include "core/dom/Node.h" | 7 #include "core/dom/Node.h" |
8 #include "core/html/HTMLFrameOwnerElement.h" | 8 #include "core/html/HTMLFrameOwnerElement.h" |
9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
10 #include "core/layout/LayoutObject.h" | 10 #include "core/layout/LayoutObject.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 if (object.isInline() && !object.isAtomicInlineLevel()) | 23 if (object.isInline() && !object.isAtomicInlineLevel()) |
24 return false; | 24 return false; |
25 if (object.isTableRow() || object.isLayoutTableCol()) | 25 if (object.isTableRow() || object.isLayoutTableCol()) |
26 return false; | 26 return false; |
27 | 27 |
28 return true; | 28 return true; |
29 } | 29 } |
30 | 30 |
31 const Node* parentNodeAcrossFrames(const Node* curNode) | 31 const Node* parentNodeAcrossFrames(const Node* curNode) |
32 { | 32 { |
33 Node* parentNode = ComposedTreeTraversal::parent(*curNode); | 33 Node* parentNode = FlatTreeTraversal::parent(*curNode); |
34 if (parentNode) | 34 if (parentNode) |
35 return parentNode; | 35 return parentNode; |
36 | 36 |
37 if (curNode->isDocumentNode()) { | 37 if (curNode->isDocumentNode()) { |
38 const Document* doc = toDocument(curNode); | 38 const Document* doc = toDocument(curNode); |
39 return doc->ownerElement(); | 39 return doc->ownerElement(); |
40 } | 40 } |
41 | 41 |
42 return nullptr; | 42 return nullptr; |
43 } | 43 } |
(...skipping 23 matching lines...) Expand all Loading... |
67 if ((layoutObject->isBox() && toLayoutBox(layoutObject)->scrollsOver
flow()) | 67 if ((layoutObject->isBox() && toLayoutBox(layoutObject)->scrollsOver
flow()) |
68 || layoutObject->isLayoutView()) | 68 || layoutObject->isLayoutView()) |
69 handledTouchActions |= TouchActionPan; | 69 handledTouchActions |= TouchActionPan; |
70 } | 70 } |
71 } | 71 } |
72 return effectiveTouchAction; | 72 return effectiveTouchAction; |
73 } | 73 } |
74 | 74 |
75 } // namespace TouchActionUtil | 75 } // namespace TouchActionUtil |
76 } // namespace blink | 76 } // namespace blink |
OLD | NEW |