Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 25373006: Correction to layoutOverflowRect in case of direction:rtl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added expected result file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« Source/core/rendering/RenderBlock.cpp ('K') | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698