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

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

Issue 1899823002: 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: Fixed Mac compilation issue. Created 4 years, 7 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 float value = valueForRange(); 137 float value = valueForRange();
138 float step = stepValueForRange(); 138 float step = stepValueForRange();
139 139
140 value += increase ? step : -step; 140 value += increase ? step : -step;
141 141
142 setValue(String::number(value)); 142 setValue(String::number(value));
143 axObjectCache().postNotification(getNode(), AXObjectCacheImpl::AXValueChange d); 143 axObjectCache().postNotification(getNode(), AXObjectCacheImpl::AXValueChange d);
144 } 144 }
145 145
146 AXObject* AXNodeObject::activeDescendant() const 146 AXObject* AXNodeObject::activeDescendant()
147 { 147 {
148 if (!getNode() || !getNode()->isElementNode()) 148 if (!getNode() || !getNode()->isElementNode())
149 return nullptr; 149 return nullptr;
150 150
151 const AtomicString& activeDescendantAttr = getAttribute(aria_activedescendan tAttr); 151 const AtomicString& activeDescendantAttr = getAttribute(aria_activedescendan tAttr);
152 if (activeDescendantAttr.isNull() || activeDescendantAttr.isEmpty()) 152 if (activeDescendantAttr.isNull() || activeDescendantAttr.isEmpty())
153 return nullptr; 153 return nullptr;
154 154
155 Element* element = toElement(getNode()); 155 Element* element = toElement(getNode());
156 Element* descendant = element->treeScope().getElementById(activeDescendantAt tr); 156 Element* descendant = element->treeScope().getElementById(activeDescendantAt tr);
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 return placeholder; 2792 return placeholder;
2793 } 2793 }
2794 2794
2795 DEFINE_TRACE(AXNodeObject) 2795 DEFINE_TRACE(AXNodeObject)
2796 { 2796 {
2797 visitor->trace(m_node); 2797 visitor->trace(m_node);
2798 AXObject::trace(visitor); 2798 AXObject::trace(visitor);
2799 } 2799 }
2800 2800
2801 } // namespace blink 2801 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698