WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136612
REGRESSION (
r172153
): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
https://bugs.webkit.org/show_bug.cgi?id=136612
Summary
REGRESSION (r172153): Text drawn with wrong color when second text shadow has...
mitz
Reported
2014-09-07 12:46:56 PDT
To reproduce, open the URL. The text is drawn in black, but it should be green. This was caused by <
http://trac.webkit.org/r172153
>, the fix for
bug 135357
.
Attachments
Patch
(8.88 KB, patch)
2014-09-08 13:04 PDT
,
Myles C. Maxfield
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2014-09-07 12:47:52 PDT
<
rdar://problem/18260645
>
Myles C. Maxfield
Comment 2
2014-09-08 13:04:27 PDT
Created
attachment 237805
[details]
Patch
Darin Adler
Comment 3
2014-09-08 14:10:50 PDT
Comment on
attachment 237805
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237805&action=review
> Source/WebCore/rendering/TextPainter.cpp:68 > static bool isEmptyShadow(const ShadowData* shadow) > { > if (!shadow) > - return true; > + return false; > return shadow->location() == IntPoint() && !shadow->radius(); > }
I think it’s confusing to change the behavior of this function without changing its name. Maybe it should take a reference and the null check could be at the call site. Or maybe we can just call this a pure bug fix and say that the old behavior was a bug.
> Source/WebCore/rendering/TextPainter.cpp:86 > + if (isEmptyShadow(shadow)) { > + shadow = shadow->next(); > + continue; > + }
Should put this before the definitions of extraOffset and didSaveContext.
> Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:598 > + bool didSaveContext = false;
You forgot to change the code below to use this boolean! It still says “if (shadow->next())” but should say “if (didSaveContext)”.
Myles C. Maxfield
Comment 4
2014-09-08 19:54:21 PDT
Comment on
attachment 237805
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=237805&action=review
>> Source/WebCore/rendering/TextPainter.cpp:68 >> } > > I think it’s confusing to change the behavior of this function without changing its name. Maybe it should take a reference and the null check could be at the call site. Or maybe we can just call this a pure bug fix and say that the old behavior was a bug.
I think that calling this a pure bug fix is the right way to go.
>> Source/WebCore/rendering/TextPainter.cpp:86 >> + } > > Should put this before the definitions of extraOffset and didSaveContext.
Done.
>> Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:598 >> + bool didSaveContext = false; > > You forgot to change the code below to use this boolean! It still says “if (shadow->next())” but should say “if (didSaveContext)”.
Done.
Myles C. Maxfield
Comment 5
2014-09-08 19:56:51 PDT
http://trac.webkit.org/changeset/173418
mitz
Comment 6
2014-09-12 23:23:12 PDT
(In reply to
comment #5
)
>
http://trac.webkit.org/changeset/173418
This change made things worse! Now a single shadow with zero offset and blur makes text vanish entirely: <div style="color: green; text-shadow: blue 0 0">text</div>
mitz
Comment 7
2014-09-12 23:26:39 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > >
http://trac.webkit.org/changeset/173418
> > This change made things worse! Now a single shadow with zero offset and blur makes text vanish entirely: > <div style="color: green; text-shadow: blue 0 0">text</div>
Reported that separately as
bug 136801
. It’s incredible that there isn’t a single regression test for this.
Darin Adler
Comment 8
2014-09-14 12:05:46 PDT
Wow, really embarrassing. Myles, I won’t be able to think about anything other than this bug if we play Destiny now!
Myles C. Maxfield
Comment 9
2014-09-15 13:05:16 PDT
On it.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug