| 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 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 const Node* parentNodeAcrossFrames(const Node* curNode) | 31 const Node* parentNodeAcrossFrames(const Node* curNode) |
| 32 { | 32 { |
| 33 Node* parentNode = FlatTreeTraversal::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->localOwner(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 return nullptr; | 42 return nullptr; |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 TouchAction computeEffectiveTouchAction(const Node& node) | 47 TouchAction computeEffectiveTouchAction(const Node& node) |
| 48 { | 48 { |
| 49 // Start by permitting all actions, then walk the elements supporting | 49 // Start by permitting all actions, then walk the elements supporting |
| (...skipping 17 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 |