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

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

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Rebaselined tests. Created 3 years, 10 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 d3f78ad67ecea4ab51950a2f5fc12d8e818501c3..bd32373f2695113dee0ca0ebe2c5c22554464010 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1049,10 +1049,10 @@ IntRect PaintLayerScrollableArea::rectForHorizontalScrollbar(
const IntRect& scrollCorner = scrollCornerRect();
return IntRect(horizontalScrollbarStart(borderBoxRect.x()),
- borderBoxRect.maxY() - box().borderBottom() -
+ borderBoxRect.maxY() - box().borderBottom().toInt() -
horizontalScrollbar()->scrollbarThickness(),
borderBoxRect.width() -
- (box().borderLeft() + box().borderRight()) -
+ (box().borderLeft() + box().borderRight()).toInt() -
scrollCorner.width(),
horizontalScrollbar()->scrollbarThickness());
}
@@ -1066,20 +1066,22 @@ IntRect PaintLayerScrollableArea::rectForVerticalScrollbar(
return IntRect(
verticalScrollbarStart(borderBoxRect.x(), borderBoxRect.maxX()),
- borderBoxRect.y() + box().borderTop(),
+ borderBoxRect.y() + box().borderTop().toInt(),
verticalScrollbar()->scrollbarThickness(),
- borderBoxRect.height() - (box().borderTop() + box().borderBottom()) -
+ borderBoxRect.height() -
+ (box().borderTop() + box().borderBottom()).toInt() -
scrollCorner.height());
}
int PaintLayerScrollableArea::verticalScrollbarStart(int minX, int maxX) const {
if (box().shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
- return minX + box().borderLeft();
- return maxX - box().borderRight() - verticalScrollbar()->scrollbarThickness();
+ return minX + box().borderLeft().toInt();
+ return maxX - box().borderRight().toInt() -
+ verticalScrollbar()->scrollbarThickness();
}
int PaintLayerScrollableArea::horizontalScrollbarStart(int minX) const {
- int x = minX + box().borderLeft();
+ int x = minX + box().borderLeft().toInt();
if (box().shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
x += hasVerticalScrollbar()
? verticalScrollbar()->scrollbarThickness()
@@ -1091,9 +1093,10 @@ int PaintLayerScrollableArea::horizontalScrollbarStart(int minX) const {
IntSize PaintLayerScrollableArea::scrollbarOffset(
const Scrollbar& scrollbar) const {
- if (&scrollbar == verticalScrollbar())
+ if (&scrollbar == verticalScrollbar()) {
return IntSize(verticalScrollbarStart(0, box().size().width().toInt()),
- box().borderTop());
+ box().borderTop().toInt());
+ }
if (&scrollbar == horizontalScrollbar())
return IntSize(
@@ -1369,10 +1372,10 @@ bool PaintLayerScrollableArea::hitTestOverflowControls(
if (hasVerticalScrollbar() &&
verticalScrollbar()->shouldParticipateInHitTesting()) {
LayoutRect vBarRect(verticalScrollbarStart(0, box().size().width().toInt()),
- box().borderTop(),
+ box().borderTop().toInt(),
verticalScrollbar()->scrollbarThickness(),
box().size().height().toInt() -
- (box().borderTop() + box().borderBottom()) -
+ (box().borderTop() + box().borderBottom()).toInt() -
(hasHorizontalScrollbar()
? horizontalScrollbar()->scrollbarThickness()
: resizeControlSize));
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698