Bug 135625 - Add the ability to force text to render in white, not just black
Summary: Add the ability to force text to render in white, not just black
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 135257
  Show dependency treegraph
 
Reported: 2014-08-05 15:32 PDT by Peyton Randolph
Modified: 2014-08-05 16:40 PDT (History)
8 users (show)

See Also:


Attachments
Patch (13.00 KB, patch)
2014-08-05 15:41 PDT, Peyton Randolph
no flags Details | Formatted Diff | Diff
Patch (13.27 KB, patch)
2014-08-05 16:03 PDT, Peyton Randolph
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peyton Randolph 2014-08-05 15:32:32 PDT
One of the paint behavior options is PaintBehaviorForceBlackText. I'd like to add a corresponding behavior for forcing white text.
Comment 1 Peyton Randolph 2014-08-05 15:41:00 PDT
Created attachment 236057 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-08-05 15:52:58 PDT
Comment on attachment 236057 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=236057&action=review

> Source/WebCore/rendering/InlineTextBox.cpp:631
> +    const ShadowData* textShadow = (paintInfo.forceTextColor()) ? 0 : lineStyle.textShadow();

0 -> nullptr

> Source/WebCore/rendering/PaintPhase.h:63
> +    PaintBehaviorForceWhiteText = 1 << 6,

Please put this under PaintBehaviorForceBlackText and change the numbers.

> Source/WebCore/rendering/TextPaintStyle.cpp:142
> +        const ShadowData* shadow = paintInfo.forceTextColor() ? 0 : pseudoStyle->textShadow();

0 -> nullptr
Comment 3 Peyton Randolph 2014-08-05 16:02:22 PDT
(In reply to comment #2)
> (From update of attachment 236057 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=236057&action=review
> 
> > Source/WebCore/rendering/InlineTextBox.cpp:631
> > +    const ShadowData* textShadow = (paintInfo.forceTextColor()) ? 0 : lineStyle.textShadow();
> 
> 0 -> nullptr

Done.
> 
> > Source/WebCore/rendering/PaintPhase.h:63
> > +    PaintBehaviorForceWhiteText = 1 << 6,
> 
> Please put this under PaintBehaviorForceBlackText and change the numbers.

Done.
> 
> > Source/WebCore/rendering/TextPaintStyle.cpp:142
> > +        const ShadowData* shadow = paintInfo.forceTextColor() ? 0 : pseudoStyle->textShadow();
> 
> 0 -> nullptr

Done.
Comment 4 Peyton Randolph 2014-08-05 16:03:36 PDT
Created attachment 236061 [details]
Patch
Comment 5 Beth Dakin 2014-08-05 16:07:10 PDT
Comment on attachment 236061 [details]
Patch

Re-doing Simon's r+ and adding cq+
Comment 6 Sam Weinig 2014-08-05 16:08:13 PDT
Instead of having both Black and white hard coded, should we instead just allow specifying a specific color?
Comment 7 WebKit Commit Bot 2014-08-05 16:40:40 PDT
Comment on attachment 236061 [details]
Patch

Clearing flags on attachment: 236061

Committed r172110: <http://trac.webkit.org/changeset/172110>
Comment 8 WebKit Commit Bot 2014-08-05 16:40:44 PDT
All reviewed patches have been landed.  Closing bug.