Changeset 45956 in webkit
- Timestamp:
- Jul 15, 2009 4:11:18 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r45953 r45956 1 2009-07-15 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 text-shadow is not drawn for text with transparent colour 6 https://bugs.webkit.org/show_bug.cgi?id=21374 7 8 * fast/text/shadow-translucent-fill.html: Added. 9 * platform/mac/fast/css/shadow-multiple-expected.checksum: 10 * platform/mac/fast/css/shadow-multiple-expected.png: 11 * platform/mac/fast/text/shadow-translucent-fill-expected.checksum: Added. 12 * platform/mac/fast/text/shadow-translucent-fill-expected.png: Added. 13 * platform/mac/fast/text/shadow-translucent-fill-expected.txt: Added. 14 1 15 2009-07-15 Chris Marrin <cmarrin@apple.com> 2 16 -
trunk/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.checksum
r38008 r45956 1 76314ae9859ab1094ce038f386121825 1 26dc49849b9d75e96b0c8ac74cf0378e -
trunk/WebCore/ChangeLog
r45955 r45956 1 2009-07-15 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 text-shadow is not drawn for text with transparent colour 6 https://bugs.webkit.org/show_bug.cgi?id=21374 7 8 Test: fast/text/shadow-translucent-fill.html 9 10 * rendering/InlineTextBox.cpp: 11 (WebCore::paintTextWithShadows): If the text fill color is not opaque, 12 paint all shadows separately from the text, by casting them from 13 clipped-out opaque text. 14 1 15 2009-07-15 Adam Treat <adam.treat@torchmobile.com> 2 16 -
trunk/WebCore/rendering/InlineTextBox.cpp
r45624 r45956 257 257 static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, int startOffset, int endOffset, const IntPoint& textOrigin, int x, int y, int w, int h, ShadowData* shadow, bool stroked) 258 258 { 259 Color fillColor = context->fillColor(); 260 bool opaque = fillColor.alpha() == 255; 261 if (!opaque) 262 context->setFillColor(Color::black); 263 259 264 do { 260 265 IntSize extraOffset; … … 265 270 const Color& shadowColor = shadow->color; 266 271 267 if (shadow->next || stroked ) {272 if (shadow->next || stroked || !opaque) { 268 273 IntRect shadowRect(x, y, w, h); 269 274 shadowRect.inflate(shadowBlur); … … 276 281 } 277 282 context->setShadow(shadowOffset, shadowBlur, shadowColor); 278 } 283 } else if (!opaque) 284 context->setFillColor(fillColor); 279 285 280 286 if (startOffset <= endOffset) … … 290 296 break; 291 297 292 if (shadow->next || stroked )298 if (shadow->next || stroked || !opaque) 293 299 context->restore(); 294 300 else … … 296 302 297 303 shadow = shadow->next; 298 } while (shadow || stroked );304 } while (shadow || stroked || !opaque); 299 305 } 300 306
Note: See TracChangeset
for help on using the changeset viewer.