Changeset 172153 in webkit
- Timestamp:
- Aug 6, 2014 10:35:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r172150 r172153 1 2014-07-28 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Text-shadow with (0, 0) offset and radius = 0 is ugly 4 https://bugs.webkit.org/show_bug.cgi?id=135357 5 6 Reviewed by Darin Adler. 7 8 Check that this kind of shadow ends up invisible. 9 10 * fast/text/empty-shadow-expected.html: Added 11 * fast/text/empty-shadow.html: Added 12 1 13 2014-08-06 Mihnea Ovidenie <mihnea@adobe.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r172151 r172153 1 2014-07-28 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Text-shadow with (0, 0) offset and radius = 0 is ugly 4 https://bugs.webkit.org/show_bug.cgi?id=135357 5 6 Reviewed by Darin Adler. 7 8 Instead, check for this kind of shadow and don't draw it. 9 10 Test: fast/text/empty-shadow.html 11 12 * rendering/TextPainter.cpp: 13 (WebCore::isEmptyShadow): Does a shadow match these criteria? 14 (WebCore::paintTextWithShadows): If so, don't draw it. 15 1 16 2014-08-06 Andy Estes <aestes@apple.com> 2 17 -
trunk/Source/WebCore/rendering/TextPainter.cpp
r165607 r172153 61 61 } 62 62 63 static bool isEmptyShadow(const ShadowData* shadowPtr) 64 { 65 if (!shadowPtr) 66 return true; 67 return shadow->location() == IntPoint() && !shadow->radius(); 68 } 69 63 70 static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark, 64 71 int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const FloatPoint& textOrigin, const FloatRect& boxRect, … … 73 80 do { 74 81 IntSize extraOffset; 75 if (shadow) 82 bool shadowIsEmpty = isEmptyShadow(shadow); 83 if (!shadowIsEmpty) 76 84 extraOffset = roundedIntSize(InlineTextBox::applyShadowToGraphicsContext(context, shadow, boxRect, stroked, opaque, horizontal)); 77 85 else if (!opaque) … … 92 100 if (shadow->next() || stroked || !opaque) 93 101 context->restore(); 94 else 102 else if (!shadowIsEmpty) 95 103 context->clearShadow(); 96 104
Note: See TracChangeset
for help on using the changeset viewer.