Bug 19728

Summary: [Qt] Support text-shadow blur
Product: WebKit Reporter: Jonathon Jongsma (jonner) <jonathon>
Component: TextAssignee: Ariya Hidayat <ariya.hidayat>
Status: RESOLVED FIXED    
Severity: Enhancement CC: ademar, ariya.hidayat, benjamin, bero, hausmann, j, vestbo
Priority: P3 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 34479    
Attachments:
Description Flags
Screenshot of the result of applying the patch
none
Patch kenneth: review+

Description Jonathon Jongsma (jonner) 2008-06-23 09:14:58 PDT
There is an initial patch to support text shadows in the Qt port (Bug #18459), but that doesn't yet support blur.  There is a commented-out function GraphicsContext::drawTextShadow() in the source that seems to have a blur implementation.  We should try to port this to the new text-shadow implementation.
Comment 1 Jonathon Jongsma (jonner) 2008-06-24 10:58:18 PDT
hm, I tried to port the old implementation and performance seemed incredibly bad.  I may have done something wrong, but my first impression is that it will be difficult to add blur support with decent performance.  I may come back to this later, but I'm moving on to other things for the moment.  If anybody else is interested in adding blur, feel free to grab this bug.
Comment 2 Simon Hausmann 2008-06-25 01:09:48 PDT
I can imagine that the performance is related to the FIXME's in the old code, which allocates a QImage with the size of the entire viewport.
Comment 3 Ariya Hidayat 2010-08-12 12:17:35 PDT
Add and assign to myself.
Comment 4 Ariya Hidayat 2010-08-12 12:20:01 PDT
See also https://bugs.webkit.org/show_bug.cgi?id=34479
Comment 5 Ariya Hidayat 2010-08-23 16:06:48 PDT
Created attachment 65169 [details]
Screenshot of the result of applying the patch

I have a patch ready, the attached screenshot shows the result of the blur shadow.
Comment 6 Ariya Hidayat 2010-08-23 16:07:41 PDT
Created attachment 65170 [details]
Patch
Comment 7 Kenneth Rohde Christiansen 2010-08-24 00:35:27 PDT
Comment on attachment 65170 [details]
Patch

Isn't there some way to factor some of this into online methods?
Comment 8 Ariya Hidayat 2010-08-24 00:41:39 PDT
> Isn't there some way to factor some of this into online methods?

It is not trivial since one works with QPainter::drawText while the other uses QTextLayout/QTextLine. It is unfortunate that the boilerplate for the prolog and epilog are similar, but I can't see a clean way to refactor them, without falling back to C-ism macro magic.
Comment 9 Ariya Hidayat 2010-08-24 02:02:30 PDT
Committed r65876: <http://trac.webkit.org/changeset/65876>
Comment 10 Ademar Reis 2010-11-16 09:15:53 PST
There must be a very good reason to include any more bugs as blockers for the qtwebkit-2.1 release at this point. Since I don't see one, I'm removing it from the blocking list. :-)

Feel free to add it as a *candidate* for inclusion (bug #44677) and please state the motivation/reason/requirement for it.