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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2266273002: Use LayoutUnit where previously LayoutUnits were implicitly converted to int (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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@gmail.com> 9 * Christian Biesinger <cbiesinger@gmail.com>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 1173
1174 IntRect resizeControlRect; 1174 IntRect resizeControlRect;
1175 if (box().style()->resize() != RESIZE_NONE) { 1175 if (box().style()->resize() != RESIZE_NONE) {
1176 resizeControlRect = resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer); 1176 resizeControlRect = resizerCornerRect(box().pixelSnappedBorderBoxRect(), ResizerForPointer);
1177 if (resizeControlRect.contains(localPoint)) 1177 if (resizeControlRect.contains(localPoint))
1178 return true; 1178 return true;
1179 } 1179 }
1180 1180
1181 int resizeControlSize = max(resizeControlRect.height(), 0); 1181 int resizeControlSize = max(resizeControlRect.height(), 0);
1182 if (hasVerticalScrollbar() && verticalScrollbar()->shouldParticipateInHitTes ting()) { 1182 if (hasVerticalScrollbar() && verticalScrollbar()->shouldParticipateInHitTes ting()) {
1183 // TODO(crbug.com/638981): Are the conversions to int intentional?
1184 LayoutRect vBarRect(verticalScrollbarStart(0, box().size().width().toInt ()), 1183 LayoutRect vBarRect(verticalScrollbarStart(0, box().size().width().toInt ()),
1185 box().borderTop(), 1184 box().borderTop(),
1186 verticalScrollbar()->width(), 1185 verticalScrollbar()->width(),
1187 (box().size().height() - (box().borderTop() + box().borderBottom()) - (hasHorizontalScrollbar() ? horizontalScrollbar()->height() : resizeControlSiz e)).toInt()); 1186 box().size().height().toInt() - (box().borderTop() + box().borderBot tom()) - (hasHorizontalScrollbar() ? horizontalScrollbar()->height() : resizeCon trolSize));
1188 if (vBarRect.contains(localPoint)) { 1187 if (vBarRect.contains(localPoint)) {
1189 result.setScrollbar(verticalScrollbar()); 1188 result.setScrollbar(verticalScrollbar());
1190 return true; 1189 return true;
1191 } 1190 }
1192 } 1191 }
1193 1192
1194 resizeControlSize = max(resizeControlRect.width(), 0); 1193 resizeControlSize = max(resizeControlRect.width(), 0);
1195 if (hasHorizontalScrollbar() && horizontalScrollbar()->shouldParticipateInHi tTesting()) { 1194 if (hasHorizontalScrollbar() && horizontalScrollbar()->shouldParticipateInHi tTesting()) {
1196 // TODO(crbug.com/638981): Are the conversions to int intentional? 1195 // TODO(crbug.com/638981): Are the conversions to int intentional?
1197 LayoutRect hBarRect(horizontalScrollbarStart(0), 1196 LayoutRect hBarRect(horizontalScrollbarStart(0),
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 1772
1774 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1773 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1775 { 1774 {
1776 for (auto& scrollableArea : *s_needsClamp) 1775 for (auto& scrollableArea : *s_needsClamp)
1777 scrollableArea->clampScrollPositionsAfterLayout(); 1776 scrollableArea->clampScrollPositionsAfterLayout();
1778 delete s_needsClamp; 1777 delete s_needsClamp;
1779 s_needsClamp = nullptr; 1778 s_needsClamp = nullptr;
1780 } 1779 }
1781 1780
1782 } // namespace blink 1781 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698