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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.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/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 59372a39a4468f9d0bd9084d0db2b58691b21dbc..192f1fb11bef77982ef3b900e7f38887694d50fe 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1461,10 +1461,10 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
if (!currValue->isShadowValue())
continue;
ShadowValue* item = static_cast<ShadowValue*>(currValue);
- int x = item->x->computeLength<int>(state.style(), state.rootElementStyle(), zoomFactor);
- int y = item->y->computeLength<int>(state.style(), state.rootElementStyle(), zoomFactor);
- int blur = item->blur ? item->blur->computeLength<int>(state.style(), state.rootElementStyle(), zoomFactor) : 0;
- int spread = item->spread ? item->spread->computeLength<int>(state.style(), state.rootElementStyle(), zoomFactor) : 0;
+ LayoutUnit x = item->x->computeLength<float>(state.style(), state.rootElementStyle(), zoomFactor);
+ LayoutUnit y = item->y->computeLength<float>(state.style(), state.rootElementStyle(), zoomFactor);
+ LayoutUnit blur = item->blur ? item->blur->computeLength<float>(state.style(), state.rootElementStyle(), zoomFactor) : 0;
+ LayoutUnit spread = item->spread ? item->spread->computeLength<float>(state.style(), state.rootElementStyle(), zoomFactor) : 0;
ShadowStyle shadowStyle = item->style && item->style->getValueID() == CSSValueInset ? Inset : Normal;
StyleColor color;
if (item->color)
@@ -1474,7 +1474,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
if (!color.isValid())
color = Color::transparent;
- OwnPtr<ShadowData> shadow = ShadowData::create(IntPoint(x, y), blur, spread, shadowStyle, color);
+ OwnPtr<ShadowData> shadow = ShadowData::create(LayoutPoint(x, y), blur, spread, shadowStyle, color);
if (id == CSSPropertyTextShadow)
state.style()->setTextShadow(shadow.release(), i.index()); // add to the list if this is not the first entry
else

Powered by Google App Engine
This is Rietveld 408576698