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

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

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Created 3 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/BoxPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
index 80e40f9122afe4761cd275c7a48874ef15a59594..584ba478b866cca6f00a7c7e5c69ce639fc8f381 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;

Powered by Google App Engine
This is Rietveld 408576698