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

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

Issue 2024053003: Revert of Uses the activedescendant_changed event received from Blink to fire the right focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 float value = valueForRange(); 139 float value = valueForRange();
140 float step = stepValueForRange(); 140 float step = stepValueForRange();
141 141
142 value += increase ? step : -step; 142 value += increase ? step : -step;
143 143
144 setValue(String::number(value)); 144 setValue(String::number(value));
145 axObjectCache().postNotification(getNode(), AXObjectCacheImpl::AXValueChange d); 145 axObjectCache().postNotification(getNode(), AXObjectCacheImpl::AXValueChange d);
146 } 146 }
147 147
148 AXObject* AXNodeObject::activeDescendant() 148 AXObject* AXNodeObject::activeDescendant() const
149 { 149 {
150 if (!getNode() || !getNode()->isElementNode()) 150 if (!getNode() || !getNode()->isElementNode())
151 return nullptr; 151 return nullptr;
152 152
153 const AtomicString& activeDescendantAttr = getAttribute(aria_activedescendan tAttr); 153 const AtomicString& activeDescendantAttr = getAttribute(aria_activedescendan tAttr);
154 if (activeDescendantAttr.isNull() || activeDescendantAttr.isEmpty()) 154 if (activeDescendantAttr.isNull() || activeDescendantAttr.isEmpty())
155 return nullptr; 155 return nullptr;
156 156
157 Element* element = toElement(getNode()); 157 Element* element = toElement(getNode());
158 Element* descendant = element->treeScope().getElementById(activeDescendantAt tr); 158 Element* descendant = element->treeScope().getElementById(activeDescendantAt tr);
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 return placeholder; 2847 return placeholder;
2848 } 2848 }
2849 2849
2850 DEFINE_TRACE(AXNodeObject) 2850 DEFINE_TRACE(AXNodeObject)
2851 { 2851 {
2852 visitor->trace(m_node); 2852 visitor->trace(m_node);
2853 AXObject::trace(visitor); 2853 AXObject::trace(visitor);
2854 } 2854 }
2855 2855
2856 } // namespace blink 2856 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698