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

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

Issue 1118753004: Fix another case where scrollToMakeVisible was off. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObject.cpp
diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp
index 6c614bc316af40c592fb7ac80277f6d05df46665..4f032150164201b18f0d86ee5f807a19f048f004 100644
--- a/Source/modules/accessibility/AXObject.cpp
+++ b/Source/modules/accessibility/AXObject.cpp
@@ -1134,6 +1134,12 @@ void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
IntPoint scrollPosition = scrollableArea->scrollPosition();
IntRect scrollVisibleRect = scrollableArea->visibleContentRect();
+ // Convert the object rect into local coordinates.
+ if (!scrollParent->isAXScrollView()) {
je_julie(Not used) 2015/05/01 16:14:38 Don't we need null checking for scrollParent? Beca
dmazzoni 2015/05/01 16:52:23 It's supposed to not reach this far if scrollParen
+ objectRect.moveBy(scrollPosition);
+ objectRect.moveBy(-pixelSnappedIntRect(scrollParent->elementRect()).location());
+ }
+
int desiredX = computeBestScrollOffset(
scrollPosition.x(),
objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(),
« no previous file with comments | « LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698