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

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

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9: rebase Created 4 years, 9 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Start by permitting all actions, then walk the elements supporting 49 // Start by permitting all actions, then walk the elements supporting
50 // touch-action from the target node up to root document, exclude any 50 // touch-action from the target node up to root document, exclude any
51 // prohibited actions at or below the element that supports them. 51 // prohibited actions at or below the element that supports them.
52 // I.e. pan-related actions are considered up to the nearest scroller, 52 // I.e. pan-related actions are considered up to the nearest scroller,
53 // and zoom related actions are considered up to the root. 53 // and zoom related actions are considered up to the root.
54 TouchAction effectiveTouchAction = TouchActionAuto; 54 TouchAction effectiveTouchAction = TouchActionAuto;
55 TouchAction handledTouchActions = TouchActionNone; 55 TouchAction handledTouchActions = TouchActionNone;
56 for (const Node* curNode = &node; curNode; curNode = parentNodeAcrossFrames( curNode)) { 56 for (const Node* curNode = &node; curNode; curNode = parentNodeAcrossFrames( curNode)) {
57 if (LayoutObject* layoutObject = curNode->layoutObject()) { 57 if (LayoutObject* layoutObject = curNode->layoutObject()) {
58 if (supportsTouchAction(*layoutObject)) { 58 if (supportsTouchAction(*layoutObject)) {
59 TouchAction action = layoutObject->style()->touchAction(); 59 TouchAction action = layoutObject->style()->getTouchAction();
60 action |= handledTouchActions; 60 action |= handledTouchActions;
61 effectiveTouchAction &= action; 61 effectiveTouchAction &= action;
62 if (effectiveTouchAction == TouchActionNone) 62 if (effectiveTouchAction == TouchActionNone)
63 break; 63 break;
64 } 64 }
65 65
66 // If we've reached an ancestor that supports panning, stop allowing panning to be disabled. 66 // If we've reached an ancestor that supports panning, stop allowing panning to be disabled.
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/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/ClipPathOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698