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

Unified Diff: Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

Issue 11865013: Merge 139346 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
===================================================================
--- Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (revision 139460)
+++ Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (working copy)
@@ -185,9 +185,16 @@
if (parentRect.isEmpty() || renderer->isFloating() || renderer->isPositioned() || renderer->hasTransform()) {
// FIXME: This method is O(N^2) as it walks the tree to the root for every renderer. RenderGeometryMap would fix this.
IntRect r = enclosingIntRect(renderer->clippedOverflowRectForRepaint(0));
- if (!r.isEmpty() && !parentRect.contains(r)) {
- rects.append(r);
- adjustedParentRect = r;
+ if (!r.isEmpty()) {
+ // Convert to the top-level view's coordinates.
+ ASSERT(renderer->document()->view());
+ for (ScrollView* view = renderer->document()->view(); view && view->parent(); view = view->parent())
+ r = view->convertToContainingView(r);
+
+ if (!parentRect.contains(r)) {
+ rects.append(r);
+ adjustedParentRect = r;
+ }
}
}
« no previous file with comments | « LayoutTests/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698