| 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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 return m_vBar->width(); | 958 return m_vBar->width(); |
| 959 } | 959 } |
| 960 | 960 |
| 961 int RenderLayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarSizeRel
evancy relevancy) const | 961 int RenderLayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarSizeRel
evancy relevancy) const |
| 962 { | 962 { |
| 963 if (!m_hBar || (m_hBar->isOverlayScrollbar() && (relevancy == IgnoreOverlayS
crollbarSize || !m_hBar->shouldParticipateInHitTesting()))) | 963 if (!m_hBar || (m_hBar->isOverlayScrollbar() && (relevancy == IgnoreOverlayS
crollbarSize || !m_hBar->shouldParticipateInHitTesting()))) |
| 964 return 0; | 964 return 0; |
| 965 return m_hBar->height(); | 965 return m_hBar->height(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 void RenderLayerScrollableArea::positionOverflowControls() | |
| 969 { | |
| 970 RenderGeometryMap geometryMap(UseTransforms); | |
| 971 RenderView* view = box().view(); | |
| 972 if (box().layer() != view->layer() && box().layer()->parent()) | |
| 973 geometryMap.pushMappingsToAncestor(box().layer()->parent(), 0); | |
| 974 | |
| 975 LayoutPoint offsetFromRoot = LayoutPoint(geometryMap.absolutePoint(FloatPoin
t())); | |
| 976 positionOverflowControls(toIntSize(roundedIntPoint(offsetFromRoot))); | |
| 977 } | |
| 978 | |
| 979 void RenderLayerScrollableArea::positionOverflowControls(const IntSize& offsetFr
omRoot) | 968 void RenderLayerScrollableArea::positionOverflowControls(const IntSize& offsetFr
omRoot) |
| 980 { | 969 { |
| 981 if (!hasScrollbar() && !box().canResize()) | 970 if (!hasScrollbar() && !box().canResize()) |
| 982 return; | 971 return; |
| 983 | 972 |
| 984 const IntRect borderBox = box().pixelSnappedBorderBoxRect(); | 973 const IntRect borderBox = box().pixelSnappedBorderBoxRect(); |
| 985 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { | 974 if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { |
| 986 IntRect vBarRect = rectForVerticalScrollbar(borderBox); | 975 IntRect vBarRect = rectForVerticalScrollbar(borderBox); |
| 987 vBarRect.move(offsetFromRoot); | 976 vBarRect.move(offsetFromRoot); |
| 988 verticalScrollbar->setFrameRect(vBarRect); | 977 verticalScrollbar->setFrameRect(vBarRect); |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 DisableCompositingQueryAsserts disabler; | 1479 DisableCompositingQueryAsserts disabler; |
| 1491 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); | 1480 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); |
| 1492 } | 1481 } |
| 1493 | 1482 |
| 1494 bool RenderLayerScrollableArea::needsCompositedScrolling() const | 1483 bool RenderLayerScrollableArea::needsCompositedScrolling() const |
| 1495 { | 1484 { |
| 1496 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); | 1485 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); |
| 1497 } | 1486 } |
| 1498 | 1487 |
| 1499 } // Namespace WebCore | 1488 } // Namespace WebCore |
| OLD | NEW |