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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 3a188a47a028e227f79a2b2afb899fb2b23fcd3c..0714d24c6258aadc85e16e1ef0bb245a42063d20 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1108,7 +1108,7 @@ bool PaintLayerScrollableArea::hitTestOverflowControls(HitTestResult& result, co
int resizeControlSize = max(resizeControlRect.height(), 0);
if (hasVerticalScrollbar() && verticalScrollbar()->shouldParticipateInHitTesting()) {
LayoutRect vBarRect(verticalScrollbarStart(0, box().size().width()),
- box().borderTop(),
+ LayoutUnit(box().borderTop()),
verticalScrollbar()->width(),
box().size().height() - (box().borderTop() + box().borderBottom()) - (hasHorizontalScrollbar() ? horizontalScrollbar()->height() : resizeControlSize));
if (vBarRect.contains(localPoint)) {
@@ -1119,7 +1119,7 @@ bool PaintLayerScrollableArea::hitTestOverflowControls(HitTestResult& result, co
resizeControlSize = max(resizeControlRect.width(), 0);
if (hasHorizontalScrollbar() && horizontalScrollbar()->shouldParticipateInHitTesting()) {
- LayoutRect hBarRect(horizontalScrollbarStart(0),
+ LayoutRect hBarRect(horizontalScrollbarStart(LayoutUnit()),
box().size().height() - box().borderBottom() - horizontalScrollbar()->height(),
box().size().width() - (box().borderLeft() + box().borderRight()) - (hasVerticalScrollbar() ? verticalScrollbar()->width() : resizeControlSize),
horizontalScrollbar()->height());
@@ -1316,7 +1316,7 @@ LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
{
LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rect)), UseTransforms).boundingBox());
localExposeRect.move(-box().borderLeft(), -box().borderTop());
- LayoutRect layerBounds(0, 0, box().clientWidth(), box().clientHeight());
+ LayoutRect layerBounds(LayoutPoint(), LayoutSize(box().clientWidth(), box().clientHeight()));
LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect, alignX, alignY);
DoublePoint clampedScrollPosition = clampScrollPosition(scrollPositionDouble() + roundedIntSize(r.location()));

Powered by Google App Engine
This is Rietveld 408576698