| 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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 document.updateLayout(); | 1376 document.updateLayout(); |
| 1377 | 1377 |
| 1378 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. | 1378 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 LayoutRect RenderLayerScrollableArea::exposeRect(const LayoutRect& rect, const S
crollAlignment& alignX, const ScrollAlignment& alignY) | 1381 LayoutRect RenderLayerScrollableArea::exposeRect(const LayoutRect& rect, const S
crollAlignment& alignX, const ScrollAlignment& alignY) |
| 1382 { | 1382 { |
| 1383 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); | 1383 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); |
| 1384 localExposeRect.move(-box().borderLeft(), -box().borderTop()); |
| 1384 LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight()); | 1385 LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight()); |
| 1385 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); | 1386 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); |
| 1386 | 1387 |
| 1387 IntSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset() + toI
ntSize(roundedIntRect(r).location())); | 1388 IntSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset() + toI
ntSize(roundedIntRect(r).location())); |
| 1388 if (clampedScrollOffset == adjustedScrollOffset()) | 1389 if (clampedScrollOffset == adjustedScrollOffset()) |
| 1389 return rect; | 1390 return rect; |
| 1390 | 1391 |
| 1391 IntSize oldScrollOffset = adjustedScrollOffset(); | 1392 IntSize oldScrollOffset = adjustedScrollOffset(); |
| 1392 scrollToOffset(clampedScrollOffset); | 1393 scrollToOffset(clampedScrollOffset); |
| 1393 IntSize scrollOffsetDifference = adjustedScrollOffset() - oldScrollOffset; | 1394 IntSize scrollOffsetDifference = adjustedScrollOffset() - oldScrollOffset; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1470 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 1470 { | 1471 { |
| 1471 // We only want to track the topmost scroll child for scrollable areas with | 1472 // We only want to track the topmost scroll child for scrollable areas with |
| 1472 // overlay scrollbars. | 1473 // overlay scrollbars. |
| 1473 if (!hasOverlayScrollbars()) | 1474 if (!hasOverlayScrollbars()) |
| 1474 return; | 1475 return; |
| 1475 m_nextTopmostScrollChild = scrollChild; | 1476 m_nextTopmostScrollChild = scrollChild; |
| 1476 } | 1477 } |
| 1477 | 1478 |
| 1478 } // namespace blink | 1479 } // namespace blink |
| OLD | NEW |