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

Side by Side Diff: Source/core/accessibility/AXScrollView.cpp

Issue 659563006: Add live region root to the cached properties of an AXObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 void AXScrollView::clearChildren() 137 void AXScrollView::clearChildren()
138 { 138 {
139 AXObject::clearChildren(); 139 AXObject::clearChildren();
140 m_verticalScrollbar = nullptr; 140 m_verticalScrollbar = nullptr;
141 m_horizontalScrollbar = nullptr; 141 m_horizontalScrollbar = nullptr;
142 } 142 }
143 143
144 bool AXScrollView::computeAccessibilityIsIgnored() const 144 bool AXScrollView::computeAccessibilityIsIgnored() const
145 { 145 {
146 // We just want to match whatever's returned by our web area, which is a chi ld of this
147 // object. Normally cached attribute values may only search up the tree. We can't just
148 // call accessibilityIsIgnored on the web area, because the web area may sea rch up its
149 // ancestors and call this function recursively, and we'd loop until a stack overflow.
150
151 // Instead, we first update the cached accessibilityIsIgnored value for this node to
152 // false, call accessibilityIsIgnored on the web area, then return the mathc ing value.
153 m_cachedIsIgnored = false;
154 m_lastModificationCount = axObjectCache()->modificationCount();
155
146 AXObject* webArea = webAreaObject(); 156 AXObject* webArea = webAreaObject();
147 if (!webArea) 157 if (webArea)
148 return true; 158 return webArea->accessibilityIsIgnored();
149 159
150 return webArea->accessibilityIsIgnored(); 160 return false;
aboxhall 2014/10/27 17:29:53 Why did this change from true to false?
dmazzoni 2014/10/27 18:08:25 Good catch - should be true. Thanks.
151 } 161 }
152 162
153 void AXScrollView::addChildren() 163 void AXScrollView::addChildren()
154 { 164 {
155 ASSERT(!m_haveChildren); 165 ASSERT(!m_haveChildren);
156 m_haveChildren = true; 166 m_haveChildren = true;
157 167
158 AXObject* webArea = webAreaObject(); 168 AXObject* webArea = webAreaObject();
159 if (webArea && !webArea->accessibilityIsIgnored()) 169 if (webArea && !webArea->accessibilityIsIgnored())
160 m_children.append(webArea); 170 m_children.append(webArea);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 return m_scrollView; 244 return m_scrollView;
235 } 245 }
236 246
237 void AXScrollView::scrollTo(const IntPoint& point) const 247 void AXScrollView::scrollTo(const IntPoint& point) const
238 { 248 {
239 if (m_scrollView) 249 if (m_scrollView)
240 m_scrollView->setScrollPosition(point); 250 m_scrollView->setScrollPosition(point);
241 } 251 }
242 252
243 } // namespace blink 253 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698