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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Re-add dropped null check Created 4 years, 1 month 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "modules/accessibility/AXNodeObject.h" 29 #include "modules/accessibility/AXNodeObject.h"
30 30
31 #include "core/InputTypeNames.h" 31 #include "core/InputTypeNames.h"
32 #include "core/dom/DocumentUserGestureToken.h"
32 #include "core/dom/Element.h" 33 #include "core/dom/Element.h"
33 #include "core/dom/NodeTraversal.h" 34 #include "core/dom/NodeTraversal.h"
34 #include "core/dom/Text.h" 35 #include "core/dom/Text.h"
35 #include "core/dom/shadow/FlatTreeTraversal.h" 36 #include "core/dom/shadow/FlatTreeTraversal.h"
36 #include "core/editing/EditingUtilities.h" 37 #include "core/editing/EditingUtilities.h"
37 #include "core/editing/markers/DocumentMarkerController.h" 38 #include "core/editing/markers/DocumentMarkerController.h"
38 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
39 #include "core/html/HTMLDListElement.h" 40 #include "core/html/HTMLDListElement.h"
40 #include "core/html/HTMLFieldSetElement.h" 41 #include "core/html/HTMLFieldSetElement.h"
41 #include "core/html/HTMLFrameElementBase.h" 42 #include "core/html/HTMLFrameElementBase.h"
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 document->clearFocusedElement(); 2148 document->clearFocusedElement();
2148 2149
2149 toElement(node)->focus(); 2150 toElement(node)->focus();
2150 } else { 2151 } else {
2151 document->clearFocusedElement(); 2152 document->clearFocusedElement();
2152 } 2153 }
2153 } 2154 }
2154 } 2155 }
2155 2156
2156 void AXNodeObject::increment() { 2157 void AXNodeObject::increment() {
2157 UserGestureIndicator gestureIndicator( 2158 UserGestureIndicator gestureIndicator(DocumentUserGestureToken::create(
2158 UserGestureToken::create(UserGestureToken::NewGesture)); 2159 getDocument(), UserGestureToken::NewGesture));
2159 alterSliderValue(true); 2160 alterSliderValue(true);
2160 } 2161 }
2161 2162
2162 void AXNodeObject::decrement() { 2163 void AXNodeObject::decrement() {
2163 UserGestureIndicator gestureIndicator( 2164 UserGestureIndicator gestureIndicator(DocumentUserGestureToken::create(
2164 UserGestureToken::create(UserGestureToken::NewGesture)); 2165 getDocument(), UserGestureToken::NewGesture));
2165 alterSliderValue(false); 2166 alterSliderValue(false);
2166 } 2167 }
2167 2168
2168 void AXNodeObject::setSequentialFocusNavigationStartingPoint() { 2169 void AXNodeObject::setSequentialFocusNavigationStartingPoint() {
2169 if (!getNode()) 2170 if (!getNode())
2170 return; 2171 return;
2171 2172
2172 getNode()->document().setSequentialFocusNavigationStartingPoint(getNode()); 2173 getNode()->document().setSequentialFocusNavigationStartingPoint(getNode());
2173 } 2174 }
2174 2175
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2961 } 2962 }
2962 return placeholder; 2963 return placeholder;
2963 } 2964 }
2964 2965
2965 DEFINE_TRACE(AXNodeObject) { 2966 DEFINE_TRACE(AXNodeObject) {
2966 visitor->trace(m_node); 2967 visitor->trace(m_node);
2967 AXObject::trace(visitor); 2968 AXObject::trace(visitor);
2968 } 2969 }
2969 2970
2970 } // namespace blink 2971 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.cpp ('k') | third_party/WebKit/Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698