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

Unified Diff: Source/core/paint/BoxPainter.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/paint/BoxBorderPainter.cpp ('k') | Source/core/paint/DeprecatedPaintLayerClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index 4e8cd240aa6f97510879643cac08ba7859262758..cc1428316613646b110bb2165f01cde14e47cf91 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -387,7 +387,8 @@ void BoxPainter::paintFillLayerExtended(LayoutBoxModelObject& obj, const PaintIn
if (clippedWithLocalScrolling) {
// Clip to the overflow area.
LayoutBox* thisBox = toLayoutBox(&obj);
- context->clip(thisBox->overflowClipRect(rect.location()));
+ // TODO(chrishtr): this should be pixel-snapped.
+ context->clip(FloatRect(thisBox->overflowClipRect(rect.location())));
// Adjust the paint rect to reflect a scrolled content box with borders at the ends.
IntSize offset = thisBox->scrolledContentOffset();
@@ -407,12 +408,13 @@ void BoxPainter::paintFillLayerExtended(LayoutBoxModelObject& obj, const PaintIn
// Clip to the padding or content boxes as necessary.
bool includePadding = bgLayer.clip() == ContentFillBox;
- LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft + (includePadding ? pLeft : LayoutUnit()),
+ LayoutRect clipRect(scrolledPaintRect.x() + bLeft + (includePadding ? pLeft : LayoutUnit()),
scrolledPaintRect.y() + obj.borderTop() + (includePadding ? obj.paddingTop() : LayoutUnit()),
scrolledPaintRect.width() - bLeft - bRight - (includePadding ? pLeft + pRight : LayoutUnit()),
scrolledPaintRect.height() - obj.borderTop() - obj.borderBottom() - (includePadding ? obj.paddingTop() + obj.paddingBottom() : LayoutUnit()));
backgroundClipStateSaver.save();
- context->clip(clipRect);
+ // TODO(chrishtr): this should be pixel-snapped.
+ context->clip(FloatRect(clipRect));
break;
}
« no previous file with comments | « Source/core/paint/BoxBorderPainter.cpp ('k') | Source/core/paint/DeprecatedPaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698