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

Side by Side Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 684393002: Remove flipForWritingMode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return; 183 return;
184 184
185 if (scrollbar == m_vBar.get()) 185 if (scrollbar == m_vBar.get())
186 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo p()); 186 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo p());
187 else 187 else
188 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height()); 188 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord erBottom() - scrollbar->height());
189 189
190 if (scrollRect.isEmpty()) 190 if (scrollRect.isEmpty())
191 return; 191 return;
192 192
193 LayoutRect paintInvalidationRect = scrollRect; 193 IntRect intRect = pixelSnappedIntRect(scrollRect);
194 box().flipForWritingMode(paintInvalidationRect);
195
196 IntRect intRect = pixelSnappedIntRect(paintInvalidationRect);
197 194
198 if (box().frameView()->isInPerformLayout()) 195 if (box().frameView()->isInPerformLayout())
199 addScrollbarDamage(scrollbar, intRect); 196 addScrollbarDamage(scrollbar, intRect);
200 else 197 else
201 box().invalidatePaintRectangle(intRect); 198 box().invalidatePaintRectangle(intRect);
202 } 199 }
203 200
204 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) 201 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect)
205 { 202 {
206 if (GraphicsLayer* layer = layerForScrollCorner()) { 203 if (GraphicsLayer* layer = layerForScrollCorner()) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 int RenderLayerScrollableArea::pixelSnappedScrollHeight() const 499 int RenderLayerScrollableArea::pixelSnappedScrollHeight() const
503 { 500 {
504 return snapSizeToPixel(scrollHeight(), box().clientTop() + box().y()); 501 return snapSizeToPixel(scrollHeight(), box().clientTop() + box().y());
505 } 502 }
506 503
507 void RenderLayerScrollableArea::computeScrollDimensions() 504 void RenderLayerScrollableArea::computeScrollDimensions()
508 { 505 {
509 m_scrollDimensionsDirty = false; 506 m_scrollDimensionsDirty = false;
510 507
511 m_overflowRect = box().layoutOverflowRect(); 508 m_overflowRect = box().layoutOverflowRect();
512 box().flipForWritingMode(m_overflowRect);
513 509
514 int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft() - (box( ).style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box().verticalScr ollbarWidth() : 0); 510 int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft() - (box( ).style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box().verticalScr ollbarWidth() : 0);
515 int scrollableTopOverflow = m_overflowRect.y() - box().borderTop(); 511 int scrollableTopOverflow = m_overflowRect.y() - box().borderTop();
516 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); 512 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
517 } 513 }
518 514
519 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp) 515 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp)
520 { 516 {
521 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset; 517 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset;
522 if (newScrollOffset != adjustedScrollOffset()) 518 if (newScrollOffset != adjustedScrollOffset())
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 1295 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
1300 { 1296 {
1301 // We only want to track the topmost scroll child for scrollable areas with 1297 // We only want to track the topmost scroll child for scrollable areas with
1302 // overlay scrollbars. 1298 // overlay scrollbars.
1303 if (!hasOverlayScrollbars()) 1299 if (!hasOverlayScrollbars())
1304 return; 1300 return;
1305 m_nextTopmostScrollChild = scrollChild; 1301 m_nextTopmostScrollChild = scrollChild;
1306 } 1302 }
1307 1303
1308 } // namespace blink 1304 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerClipper.cpp ('k') | sky/engine/core/rendering/RenderLineBoxList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698