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