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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 return snapSizeToPixel(m_overflowRect.height(), m_box->clientTop() + m_box->
y()); | 498 return snapSizeToPixel(m_overflowRect.height(), m_box->clientTop() + m_box->
y()); |
499 } | 499 } |
500 | 500 |
501 void RenderLayerScrollableArea::computeScrollDimensions() | 501 void RenderLayerScrollableArea::computeScrollDimensions() |
502 { | 502 { |
503 m_scrollDimensionsDirty = false; | 503 m_scrollDimensionsDirty = false; |
504 | 504 |
505 m_overflowRect = m_box->layoutOverflowRect(); | 505 m_overflowRect = m_box->layoutOverflowRect(); |
506 m_box->flipForWritingMode(m_overflowRect); | 506 m_box->flipForWritingMode(m_overflowRect); |
507 | 507 |
508 int scrollableLeftOverflow = m_overflowRect.x() - m_box->borderLeft(); | 508 int scrollableLeftOverflow = m_overflowRect.x() - m_box->borderLeft() - (m_b
ox->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? m_box->vertical
ScrollbarWidth() : 0); |
509 int scrollableTopOverflow = m_overflowRect.y() - m_box->borderTop(); | 509 int scrollableTopOverflow = m_overflowRect.y() - m_box->borderTop(); |
510 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); | 510 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); |
511 } | 511 } |
512 | 512 |
513 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro
llOffsetClamping clamp) | 513 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro
llOffsetClamping clamp) |
514 { | 514 { |
515 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s
crollOffset) : scrollOffset; | 515 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s
crollOffset) : scrollOffset; |
516 if (newScrollOffset != adjustedScrollOffset()) | 516 if (newScrollOffset != adjustedScrollOffset()) |
517 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); | 517 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); |
518 } | 518 } |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 baseHeight = baseHeight / zoomFactor; | 1264 baseHeight = baseHeight / zoomFactor; |
1265 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::CSS_PX); | 1265 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::CSS_PX); |
1266 } | 1266 } |
1267 | 1267 |
1268 document.updateLayout(); | 1268 document.updateLayout(); |
1269 | 1269 |
1270 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. | 1270 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. |
1271 } | 1271 } |
1272 | 1272 |
1273 } // Namespace WebCore | 1273 } // Namespace WebCore |
OLD | NEW |