| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 { | 1353 { |
| 1354 RenderLayer* curr = parent(); | 1354 RenderLayer* curr = parent(); |
| 1355 while (curr && !isPositionedContainer(curr)) | 1355 while (curr && !isPositionedContainer(curr)) |
| 1356 curr = curr->parent(); | 1356 curr = curr->parent(); |
| 1357 | 1357 |
| 1358 return curr; | 1358 return curr; |
| 1359 } | 1359 } |
| 1360 | 1360 |
| 1361 RenderLayer* RenderLayer::enclosingScrollableLayer() const | 1361 RenderLayer* RenderLayer::enclosingScrollableLayer() const |
| 1362 { | 1362 { |
| 1363 for (RenderObject* nextRenderer = renderer()->parent(); nextRenderer; nextRe
nderer = nextRenderer->parent()) { | 1363 for (RenderLayer* nextLayer = parent(); nextLayer; nextLayer = nextLayer->pa
rent()) { |
| 1364 if (nextRenderer->isBox() && toRenderBox(nextRenderer)->canBeScrolledAnd
HasScrollableArea()) | 1364 if (nextLayer->renderer()->isBox() && toRenderBox(nextLayer->renderer())
->canBeScrolledAndHasScrollableArea()) |
| 1365 return nextRenderer->enclosingLayer(); | 1365 return nextLayer; |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 return 0; | 1368 return 0; |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 IntRect RenderLayer::scrollableAreaBoundingBox() const | 1371 IntRect RenderLayer::scrollableAreaBoundingBox() const |
| 1372 { | 1372 { |
| 1373 return renderer()->absoluteBoundingBoxRect(); | 1373 return renderer()->absoluteBoundingBoxRect(); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2285 parentLayer = 0; | 2285 parentLayer = 0; |
| 2286 } | 2286 } |
| 2287 } else { | 2287 } else { |
| 2288 LayoutRect viewRect = frameView->visibleContentRect(); | 2288 LayoutRect viewRect = frameView->visibleContentRect(); |
| 2289 LayoutRect r = getRectToExpose(viewRect, rect, alignX, alignY); | 2289 LayoutRect r = getRectToExpose(viewRect, rect, alignX, alignY); |
| 2290 frameView->setScrollPosition(roundedIntPoint(r.location())); | 2290 frameView->setScrollPosition(roundedIntPoint(r.location())); |
| 2291 } | 2291 } |
| 2292 } | 2292 } |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 if (renderer()->frame()->page()->autoscrollInProgress()) |
| 2296 parentLayer = enclosingScrollableLayer(); |
| 2297 |
| 2295 if (parentLayer) | 2298 if (parentLayer) |
| 2296 parentLayer->scrollRectToVisible(newRect, alignX, alignY); | 2299 parentLayer->scrollRectToVisible(newRect, alignX, alignY); |
| 2297 | 2300 |
| 2298 if (frameView) | 2301 if (frameView) |
| 2299 frameView->resumeScheduledEvents(); | 2302 frameView->resumeScheduledEvents(); |
| 2300 } | 2303 } |
| 2301 | 2304 |
| 2302 void RenderLayer::updateCompositingLayersAfterScroll() | 2305 void RenderLayer::updateCompositingLayersAfterScroll() |
| 2303 { | 2306 { |
| 2304 if (compositor()->inCompositingMode()) { | 2307 if (compositor()->inCompositingMode()) { |
| (...skipping 4004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6309 } | 6312 } |
| 6310 } | 6313 } |
| 6311 | 6314 |
| 6312 void showLayerTree(const WebCore::RenderObject* renderer) | 6315 void showLayerTree(const WebCore::RenderObject* renderer) |
| 6313 { | 6316 { |
| 6314 if (!renderer) | 6317 if (!renderer) |
| 6315 return; | 6318 return; |
| 6316 showLayerTree(renderer->enclosingLayer()); | 6319 showLayerTree(renderer->enclosingLayer()); |
| 6317 } | 6320 } |
| 6318 #endif | 6321 #endif |
| OLD | NEW |