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

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

Issue 568453002: Removing container's Left & Top border from computed scroll offset bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reduced layout test file contents from javascript, style and html content Created 6 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 } 1391 }
1392 1392
1393 document.updateLayout(); 1393 document.updateLayout();
1394 1394
1395 // FIXME (Radar 4118564): We should also autoscroll the window as necessary to keep the point under the cursor in view. 1395 // FIXME (Radar 4118564): We should also autoscroll the window as necessary to keep the point under the cursor in view.
1396 } 1396 }
1397 1397
1398 LayoutRect RenderLayerScrollableArea::exposeRect(const LayoutRect& rect, const S crollAlignment& alignX, const ScrollAlignment& alignY) 1398 LayoutRect RenderLayerScrollableArea::exposeRect(const LayoutRect& rect, const S crollAlignment& alignX, const ScrollAlignment& alignY)
1399 { 1399 {
1400 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec t)), UseTransforms).boundingBox()); 1400 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec t)), UseTransforms).boundingBox());
1401 localExposeRect.move(-box().borderLeft(), -box().borderTop());
1401 LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight()); 1402 LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight());
1402 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect , alignX, alignY); 1403 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect , alignX, alignY);
1403 1404
1404 DoubleSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset() + toIntSize(roundedIntRect(r).location())); 1405 DoubleSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset() + toIntSize(roundedIntRect(r).location()));
1405 if (clampedScrollOffset == adjustedScrollOffset()) 1406 if (clampedScrollOffset == adjustedScrollOffset())
1406 return rect; 1407 return rect;
1407 1408
1408 DoubleSize oldScrollOffset = adjustedScrollOffset(); 1409 DoubleSize oldScrollOffset = adjustedScrollOffset();
1409 scrollToOffset(clampedScrollOffset); 1410 scrollToOffset(clampedScrollOffset);
1410 DoubleSize scrollOffsetDifference = adjustedScrollOffset() - oldScrollOffset ; 1411 DoubleSize scrollOffsetDifference = adjustedScrollOffset() - oldScrollOffset ;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 1487 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
1487 { 1488 {
1488 // We only want to track the topmost scroll child for scrollable areas with 1489 // We only want to track the topmost scroll child for scrollable areas with
1489 // overlay scrollbars. 1490 // overlay scrollbars.
1490 if (!hasOverlayScrollbars()) 1491 if (!hasOverlayScrollbars())
1491 return; 1492 return;
1492 m_nextTopmostScrollChild = scrollChild; 1493 m_nextTopmostScrollChild = scrollChild;
1493 } 1494 }
1494 1495
1495 } // namespace blink 1496 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/platform/linux/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698