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

Unified Diff: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.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/BoxPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
index bb16faecec1302c18cffe558fa493453645c439f..9e797d492e1dd2ef7483f973342a2050e26a5fb3 100644
--- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
@@ -38,7 +38,7 @@ void BoxPaintInvalidator::boxWillBeDestroyed(const LayoutBox& box) {
static LayoutRect computeRightDelta(const LayoutPoint& location,
const LayoutSize& oldSize,
const LayoutSize& newSize,
- int extraWidth) {
+ const LayoutUnit& extraWidth) {
LayoutUnit delta = newSize.width() - oldSize.width();
if (delta > 0) {
return LayoutRect(location.x() + oldSize.width() - extraWidth, location.y(),
@@ -54,7 +54,7 @@ static LayoutRect computeRightDelta(const LayoutPoint& location,
static LayoutRect computeBottomDelta(const LayoutPoint& location,
const LayoutSize& oldSize,
const LayoutSize& newSize,
- int extraHeight) {
+ const LayoutUnit& extraHeight) {
LayoutUnit delta = newSize.height() - oldSize.height();
if (delta > 0) {
return LayoutRect(location.x(),
@@ -76,10 +76,12 @@ bool BoxPaintInvalidator::incrementallyInvalidatePaint(
DCHECK(oldRect.location() == newRect.location());
LayoutRect rightDelta = computeRightDelta(
newRect.location(), oldRect.size(), newRect.size(),
- reason == PaintInvalidationIncremental ? m_box.borderRight() : 0);
+ reason == PaintInvalidationIncremental ? m_box.borderRight()
+ : LayoutUnit());
LayoutRect bottomDelta = computeBottomDelta(
newRect.location(), oldRect.size(), newRect.size(),
- reason == PaintInvalidationIncremental ? m_box.borderBottom() : 0);
+ reason == PaintInvalidationIncremental ? m_box.borderBottom()
+ : LayoutUnit());
if (rightDelta.isEmpty() && bottomDelta.isEmpty())
return false;
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp ('k') | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698