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

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

Issue 2401123002: UserGestureIndicator is a mess. Clean it up. (Closed)
Patch Set: Callback cleanup, comments 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) 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 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 document->clearFocusedElement(); 2147 document->clearFocusedElement();
2148 2148
2149 toElement(node)->focus(); 2149 toElement(node)->focus();
2150 } else { 2150 } else {
2151 document->clearFocusedElement(); 2151 document->clearFocusedElement();
2152 } 2152 }
2153 } 2153 }
2154 } 2154 }
2155 2155
2156 void AXNodeObject::increment() { 2156 void AXNodeObject::increment() {
2157 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); 2157 UserGestureIndicator gestureIndicator(
2158 UserGestureToken::create(UserGestureToken::NewGesture));
2158 alterSliderValue(true); 2159 alterSliderValue(true);
2159 } 2160 }
2160 2161
2161 void AXNodeObject::decrement() { 2162 void AXNodeObject::decrement() {
2162 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); 2163 UserGestureIndicator gestureIndicator(
2164 UserGestureToken::create(UserGestureToken::NewGesture));
2163 alterSliderValue(false); 2165 alterSliderValue(false);
2164 } 2166 }
2165 2167
2166 void AXNodeObject::childrenChanged() { 2168 void AXNodeObject::childrenChanged() {
2167 // This method is meant as a quick way of marking a portion of the 2169 // This method is meant as a quick way of marking a portion of the
2168 // accessibility tree dirty. 2170 // accessibility tree dirty.
2169 if (!getNode() && !getLayoutObject()) 2171 if (!getNode() && !getLayoutObject())
2170 return; 2172 return;
2171 2173
2172 // If this is not part of the accessibility tree because an ancestor 2174 // If this is not part of the accessibility tree because an ancestor
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 } 2954 }
2953 return placeholder; 2955 return placeholder;
2954 } 2956 }
2955 2957
2956 DEFINE_TRACE(AXNodeObject) { 2958 DEFINE_TRACE(AXNodeObject) {
2957 visitor->trace(m_node); 2959 visitor->trace(m_node);
2958 AXObject::trace(visitor); 2960 AXObject::trace(visitor);
2959 } 2961 }
2960 2962
2961 } // namespace blink 2963 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698