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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2365263003: Implement NSAccessibilityScrollToVisibleAction on Mac (Closed)
Patch Set: Fix endless loop in AXObject::scrollToMakeVisibleWithSubFocus Created 4 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 | « content/renderer/accessibility/render_accessibility_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 3167659f49f35e6729150c58318bc73291de8ec4..ac2b6a23433a5783ce68f9f3dd420475e86f937d 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -1516,7 +1516,7 @@ static int computeBestScrollOffset(int currentScrollOffset, int subfocusMin, int
void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
{
// Search up the parent chain until we find the first one that's scrollable.
- AXObject* scrollParent = parentObject();
+ const AXObject* scrollParent = parentObject() ? parentObject() : this;
ScrollableArea* scrollableArea = 0;
while (scrollParent) {
scrollableArea = scrollParent->getScrollableAreaIfScrollable();
« no previous file with comments | « content/renderer/accessibility/render_accessibility_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698