Bug 135625

Summary: Add the ability to force text to render in white, not just black
Product: WebKit Reporter: Peyton Randolph <prandolph>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, mmaxfield, prandolph, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 135257    
Attachments:
Description Flags
Patch
none
Patch none

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.