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

Unified Diff: Source/WebCore/accessibility/AccessibilityRenderObject.cpp

Issue 8037036: Merge 94716 - Changes to aria-hidden don't change VO navigation (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/accessibility/AccessibilityObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/accessibility/AccessibilityRenderObject.cpp
===================================================================
--- Source/WebCore/accessibility/AccessibilityRenderObject.cpp (revision 95991)
+++ Source/WebCore/accessibility/AccessibilityRenderObject.cpp (working copy)
@@ -1701,7 +1701,7 @@
// aria-hidden hides this object and any children
AccessibilityObject* object = parentObject();
while (object) {
- if (object->isAccessibilityRenderObject() && equalIgnoringCase(static_cast<AccessibilityRenderObject*>(object)->getAttribute(aria_hiddenAttr), "true"))
+ if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
return true;
object = object->parentObject();
}
@@ -3325,7 +3325,7 @@
if (!parent->isAccessibilityRenderObject())
continue;
- AccessibilityRenderObject* axParent = static_cast<AccessibilityRenderObject*>(parent);
+ AccessibilityRenderObject* axParent = toAccessibilityRenderObject(parent);
// Send the children changed notification on the first accessibility render object ancestor.
if (!sentChildrenChanged) {
@@ -3407,7 +3407,12 @@
// add all unignored acc children
for (RefPtr<AccessibilityObject> obj = firstChild(); obj; obj = obj->nextSibling()) {
if (obj->accessibilityIsIgnored()) {
- obj->updateChildrenIfNecessary();
+
+ // If the parent is asking for this child's children, then either it's the first time (and clearing is a no-op),
+ // or its visibility has changed. In the latter case, this child may have a stale child cached.
+ // This can prevent aria-hidden changes from working correctly. Hence, whenever a parent is getting children, ensure data is not stale.
+ obj->clearChildren();
+
AccessibilityChildrenVector children = obj->children();
unsigned length = children.size();
for (unsigned i = 0; i < length; ++i)
Property changes on: Source\WebCore\accessibility\AccessibilityRenderObject.cpp
___________________________________________________________________
Added: svn:mergeinfo
Merged /trunk/WebCore/accessibility/AccessibilityRenderObject.cpp:r53455
« no previous file with comments | « Source/WebCore/accessibility/AccessibilityObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698