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

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: all working! Created 7 years, 1 month 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 a4e8a8485a6b414d6eaa16221cb798eb5368150e..41a6eaa42881bbc633beda1ae546cffec97b8a6f 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -926,10 +926,10 @@ PassRefPtr<ShadowList> StyleBuilderConverter::convertShadow(StyleResolverState&
ShadowDataVector shadows;
for (size_t i = 0; i < shadowCount; ++i) {
const CSSShadowValue* item = toCSSShadowValue(valueList->item(i));
- int x = item->x->computeLength<int>(state.style(), state.rootElementStyle(), zoom);
- int y = item->y->computeLength<int>(state.style(), state.rootElementStyle(), zoom);
- int blur = item->blur ? item->blur->computeLength<int>(state.style(), state.rootElementStyle(), zoom) : 0;
- int spread = item->spread ? item->spread->computeLength<int>(state.style(), state.rootElementStyle(), zoom) : 0;
+ LayoutUnit x = item->x->computeLength<float>(state.style(), state.rootElementStyle(), zoom);
+ LayoutUnit y = item->y->computeLength<float>(state.style(), state.rootElementStyle(), zoom);
+ LayoutUnit blur = item->blur ? item->blur->computeLength<float>(state.style(), state.rootElementStyle(), zoom) : 0;
+ LayoutUnit spread = item->spread ? item->spread->computeLength<float>(state.style(), state.rootElementStyle(), zoom) : 0;
ShadowStyle shadowStyle = item->style && item->style->getValueID() == CSSValueInset ? Inset : Normal;
Color color;
if (item->color)
@@ -939,7 +939,7 @@ PassRefPtr<ShadowList> StyleBuilderConverter::convertShadow(StyleResolverState&
if (!color.isValid())
color = Color::transparent;
- shadows.append(ShadowData(IntPoint(x, y), blur, spread, shadowStyle, color));
+ shadows.append(ShadowData(LayoutPoint(x, y), blur, spread, shadowStyle, color));
}
return ShadowList::adopt(shadows);
}

Powered by Google App Engine
This is Rietveld 408576698