Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: third_party/WebKit/Source/core/input/TouchActionUtil.cpp

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/TouchEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698