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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" 131 #include "core/page/scrolling/ScrollCustomizationCallbacks.h"
132 #include "core/page/scrolling/ScrollState.h" 132 #include "core/page/scrolling/ScrollState.h"
133 #include "core/page/scrolling/ScrollStateCallback.h" 133 #include "core/page/scrolling/ScrollStateCallback.h"
134 #include "core/page/scrolling/TopDocumentRootScrollerController.h" 134 #include "core/page/scrolling/TopDocumentRootScrollerController.h"
135 #include "core/paint/PaintLayer.h" 135 #include "core/paint/PaintLayer.h"
136 #include "core/svg/SVGAElement.h" 136 #include "core/svg/SVGAElement.h"
137 #include "core/svg/SVGDocumentExtensions.h" 137 #include "core/svg/SVGDocumentExtensions.h"
138 #include "core/svg/SVGElement.h" 138 #include "core/svg/SVGElement.h"
139 #include "platform/EventDispatchForbiddenScope.h" 139 #include "platform/EventDispatchForbiddenScope.h"
140 #include "platform/RuntimeEnabledFeatures.h" 140 #include "platform/RuntimeEnabledFeatures.h"
141 #include "platform/UserGestureIndicator.h"
142 #include "platform/graphics/CompositorMutableProperties.h" 141 #include "platform/graphics/CompositorMutableProperties.h"
143 #include "platform/graphics/CompositorMutation.h" 142 #include "platform/graphics/CompositorMutation.h"
144 #include "platform/scroll/ScrollableArea.h" 143 #include "platform/scroll/ScrollableArea.h"
145 #include "wtf/BitVector.h" 144 #include "wtf/BitVector.h"
146 #include "wtf/HashFunctions.h" 145 #include "wtf/HashFunctions.h"
147 #include "wtf/text/CString.h" 146 #include "wtf/text/CString.h"
148 #include "wtf/text/StringBuilder.h" 147 #include "wtf/text/StringBuilder.h"
149 #include "wtf/text/TextPosition.h" 148 #include "wtf/text/TextPosition.h"
150 #include <memory> 149 #include <memory>
151 150
(...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 WebFocusTypeForward, nullptr)); 2601 WebFocusTypeForward, nullptr));
2603 return; 2602 return;
2604 } 2603 }
2605 } 2604 }
2606 2605
2607 if (!document().page()->focusController().setFocusedElement( 2606 if (!document().page()->focusController().setFocusedElement(
2608 this, document().frame(), params)) 2607 this, document().frame(), params))
2609 return; 2608 return;
2610 2609
2611 if (document().focusedElement() == this && 2610 if (document().focusedElement() == this &&
2612 UserGestureIndicator::processedUserGestureSinceLoad()) { 2611 document().hasReceivedUserGesture()) {
2613 // Bring up the keyboard in the context of anything triggered by a user 2612 // Bring up the keyboard in the context of anything triggered by a user
2614 // gesture. Since tracking that across arbitrary boundaries (eg. 2613 // gesture. Since tracking that across arbitrary boundaries (eg.
2615 // animations) is difficult, for now we match IE's heuristic and bring 2614 // animations) is difficult, for now we match IE's heuristic and bring
2616 // up the keyboard if there's been any gesture since load. 2615 // up the keyboard if there's been any gesture since load.
2617 document().page()->chromeClient().showImeIfNeeded(); 2616 document().page()->chromeClient().showImeIfNeeded();
2618 } 2617 }
2619 } 2618 }
2620 2619
2621 void Element::updateFocusAppearance( 2620 void Element::updateFocusAppearance(
2622 SelectionBehaviorOnFocus selectionBehavior) { 2621 SelectionBehaviorOnFocus selectionBehavior) {
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
4082 } 4081 }
4083 4082
4084 DEFINE_TRACE_WRAPPERS(Element) { 4083 DEFINE_TRACE_WRAPPERS(Element) {
4085 if (hasRareData()) { 4084 if (hasRareData()) {
4086 visitor->traceWrappers(elementRareData()); 4085 visitor->traceWrappers(elementRareData());
4087 } 4086 }
4088 ContainerNode::traceWrappers(visitor); 4087 ContainerNode::traceWrappers(visitor);
4089 } 4088 }
4090 4089
4091 } // namespace blink 4090 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698