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

Unified Diff: Source/core/rendering/style/ShadowData.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/style/ShadowData.cpp
diff --git a/Source/core/rendering/style/ShadowData.cpp b/Source/core/rendering/style/ShadowData.cpp
index 52e391b6eb33b0a81bc8fda2ffd67128afa52166..b17f80500c5d976072780bd2573e3f55e6208737 100644
--- a/Source/core/rendering/style/ShadowData.cpp
+++ b/Source/core/rendering/style/ShadowData.cpp
@@ -51,10 +51,10 @@ bool ShadowData::operator==(const ShadowData& o) const
&& m_color == o.m_color;
}
-static inline void calculateShadowExtent(const ShadowData* shadow, int additionalOutlineSize, int& shadowLeft, int& shadowRight, int& shadowTop, int& shadowBottom)
+static inline void calculateShadowExtent(const ShadowData* shadow, LayoutUnit additionalOutlineSize, LayoutUnit& shadowLeft, LayoutUnit& shadowRight, LayoutUnit& shadowTop, LayoutUnit& shadowBottom)
{
do {
- int blurAndSpread = shadow->blur() + shadow->spread() + additionalOutlineSize;
+ LayoutUnit blurAndSpread = shadow->blur() + shadow->spread() + additionalOutlineSize;
if (shadow->style() == Normal) {
shadowLeft = min(shadow->x() - blurAndSpread, shadowLeft);
shadowRight = max(shadow->x() + blurAndSpread, shadowRight);
@@ -66,12 +66,12 @@ static inline void calculateShadowExtent(const ShadowData* shadow, int additiona
} while (shadow);
}
-void ShadowData::adjustRectForShadow(LayoutRect& rect, int additionalOutlineSize) const
+void ShadowData::adjustRectForShadow(LayoutRect& rect, LayoutUnit additionalOutlineSize) const
{
- int shadowLeft = 0;
- int shadowRight = 0;
- int shadowTop = 0;
- int shadowBottom = 0;
+ LayoutUnit shadowLeft = 0;
+ LayoutUnit shadowRight = 0;
+ LayoutUnit shadowTop = 0;
+ LayoutUnit shadowBottom = 0;
calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);
rect.move(shadowLeft, shadowTop);
@@ -79,12 +79,12 @@ void ShadowData::adjustRectForShadow(LayoutRect& rect, int additionalOutlineSize
rect.setHeight(rect.height() - shadowTop + shadowBottom);
}
-void ShadowData::adjustRectForShadow(FloatRect& rect, int additionalOutlineSize) const
+void ShadowData::adjustRectForShadow(FloatRect& rect, LayoutUnit additionalOutlineSize) const
{
- int shadowLeft = 0;
- int shadowRight = 0;
- int shadowTop = 0;
- int shadowBottom = 0;
+ LayoutUnit shadowLeft = 0;
+ LayoutUnit shadowRight = 0;
+ LayoutUnit shadowTop = 0;
+ LayoutUnit shadowBottom = 0;
calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);
rect.move(shadowLeft, shadowTop);

Powered by Google App Engine
This is Rietveld 408576698