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

Unified Diff: Source/core/rendering/InlineTextBox.cpp

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: found one more spot Created 7 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
Index: Source/core/rendering/InlineTextBox.cpp
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 2bfe7de7bd567c9e49c226ef29d52ea77c0c14fd..a77eeef7ba63425bba6494658f220f6e64f5d9e3 100644
--- a/Source/core/rendering/InlineTextBox.cpp
+++ b/Source/core/rendering/InlineTextBox.cpp
@@ -1107,17 +1107,17 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint&
RenderStyle* styleToUse = renderer()->style(isFirstLineStyle());
int baseline = styleToUse->fontMetrics().ascent();
- int extraOffset = 0;
+ LayoutUnit extraOffset = 0;
if (!linesAreOpaque && shadow && shadow->next()) {
FloatRect clipRect(localOrigin, FloatSize(width, baseline + 2));
for (const ShadowData* s = shadow; s; s = s->next()) {
FloatRect shadowRect(localOrigin, FloatSize(width, baseline + 2));
shadowRect.inflate(s->blur());
- int shadowX = isHorizontal() ? s->x() : s->y();
- int shadowY = isHorizontal() ? s->y() : -s->x();
+ LayoutUnit shadowX = isHorizontal() ? s->x() : s->y();
+ LayoutUnit shadowY = isHorizontal() ? s->y() : -s->x();
shadowRect.move(shadowX, shadowY);
clipRect.unite(shadowRect);
- extraOffset = max(extraOffset, max(0, shadowY) + s->blur());
+ extraOffset = max(extraOffset, max(LayoutUnit(0), shadowY) + s->blur());
}
context->clip(clipRect);
extraOffset += baseline + 2;
@@ -1131,8 +1131,8 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint&
localOrigin.move(0, -extraOffset);
extraOffset = 0;
}
- int shadowX = isHorizontal() ? shadow->x() : shadow->y();
- int shadowY = isHorizontal() ? shadow->y() : -shadow->x();
+ LayoutUnit shadowX = isHorizontal() ? shadow->x() : shadow->y();
+ LayoutUnit shadowY = isHorizontal() ? shadow->y() : -shadow->x();
context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->blur(),
renderer()->resolveColor(shadow->color(), Color::stdShadowColor));
shadow = shadow->next();

Powered by Google App Engine
This is Rietveld 408576698