[Webkit-unassigned] [Bug 42110] New: Inconsistent Handling of Text Drawing Mode Flags

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 12 13:52:23 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42110

           Summary: Inconsistent Handling of Text Drawing Mode Flags
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bfulgham at webkit.org
                CC: mihnea at adobe.com


During a recent IRC chat with Mihnea Ovidenea, he pointed out that the handling of text drawing modes in FontCairo was inconsistent.  In one place we check for the explicit type "cTextFill", while in others we check for the presence of the "cTextFill" bit in the textDrawingMode member.

A quick 'grep' of the WebKit sources indicate that text drawing mode is often set explicitly:

Example 1:
CanvasRenderingContext2D.cpp:
1687:        c->setTextDrawingMode(fill ? cTextFill : cTextStroke);

On first glance, this seems correct.  But consider that text drawing mode is a bitmask, which might already have one or more drawing styles set (e.g., cTextStroke), which the user does not want to lose, just because the text should be filled.

Example 2:
FontCGWin.cpp:
357:           bool hasSimpleShadow = graphicsContext->textDrawingMode() == cTextFill && shadowColor.isValid [...]

Shouldn't this be checking to see if 'text filled' flag is on, rather than that ONLY the text fill flag is set?  What if the text is clipped and filled (cTextFill & cTextClip)?

Likewise, RenderSVGResourceGradient.cpp:
199:           context->setTextDrawingMode(resourceMode & ApplyToFillMode ? cTextFill : cTextStroke);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list