Bug 34479 - [Qt] Canvas and CSS: blur option in shadow not working
Summary: [Qt] Canvas and CSS: blur option in shadow not working
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: Ariya Hidayat
URL:
Keywords: HTML5, Qt, QtTriaged
: 42156 49131 (view as bug list)
Depends on: 19728 43952 43980 44006 44015 44025 44031 44091 44094 44222 44369 44380 44464 44488 46327 48223 49490 49491 49878 50104 51161
Blocks: 35808 50849
  Show dependency treegraph
 
Reported: 2010-02-02 08:19 PST by Chang Shu
Modified: 2012-07-11 14:13 PDT (History)
14 users (show)

See Also:


Attachments
patch (6.68 KB, text/plain)
2010-07-14 12:52 PDT, qi
no flags Details
Patch (14.64 KB, patch)
2010-08-13 05:44 PDT, Ariya Hidayat
no flags Details | Formatted Diff | Diff
Patch 2 (8.60 KB, patch)
2010-08-13 09:04 PDT, Ariya Hidayat
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chang Shu 2010-02-02 08:19:09 PST
QtLauncher fails the following test case but Safari works fine.
http://waplabdc.nokia-boston.com/browser/users/ligman/canvas tests/shadow/shadow_offsetX.html
Comment 1 Chang Shu 2010-03-08 13:30:16 PST
LayoutTests/fast/canvas/canvas-incremental-repaint.html
Comment 2 Tor Arne Vestbø 2010-03-10 06:40:21 PST
Please follow the QtWebKit bug reporting guidelines when reporting bugs.

See http://trac.webkit.org/wiki/QtWebKitBugs

Specifically:

  - The 'QtWebKit' component should only be used for bugs/features in the
    public QtWebKit API layer, not to signify that the bug is specific to
    the Qt port of WebKit

      http://trac.webkit.org/wiki/QtWebKitBugs#Component

  - Add the keyword 'Qt' to signal that it's a Qt-related bug

      http://trac.webkit.org/wiki/QtWebKitBugs#Keywords
Comment 3 qi 2010-03-10 13:27:18 PST
Copy some comments about blur and shadow from bug 34477:
1. By the way, today, I found the similar issue with “blur”. The “blur” is
one property of “shadow”. Currently, “shadow” is implemented in
GraphicsContextQt.cpp. Since, everything (text, image, line, rect, etc) can
have “shadow”, we draw “shadow” for each one, but we didn’t apply the “blur”
pattern for “shadow” now. I am not sure, GraphicsContextQt should draw the
“shadow” or let lower level like QBrush to draw “shadow”. Anyway, currently I
find it is difficult to draw a “blur” “shadow” now in GraphicsContextQt.
2. Does QT have a "blur" or "shadow" function?
In this case, "canvas" can draw a image, rect, line, text, etc. And, each of
them can have a "shadow" and "shadow" can be "blur".
I searched in QT, I found QGraphicsBlurEffect and QGraphicsDropShadowEffect
(QGraphicsEffect)looks for this purpose. But they suppose to be taken by
QGraphicsItem, it looks heavy and not for this purpose. 
Not sure, QT has function for our purpose.
3. I found class "QPixmapDropShadowFilter" pretty much meet our requirement for
shadow and blur, but unfortunately it is private class.
Comment 4 Chang Shu 2010-04-01 10:48:46 PDT
This issue depends on the support from Qt.
I found one open bug in Qt that requires support for text shadow:
http://bugreports.qt.nokia.com/browse/QTBUG-5087
Set this webkit bug to resolved.
Comment 5 Chang Shu 2010-04-16 11:36:17 PDT
There is a possibility to implement blur in qtwebkit. So we reopen this bug.
Comment 6 qi 2010-07-14 12:52:52 PDT
Created attachment 61551 [details]
patch
Comment 7 qi 2010-07-14 12:57:19 PDT
Comment on attachment 61551 [details]
patch

This is mistake
Comment 8 Ariya Hidayat 2010-08-12 12:19:09 PDT
Add and assign to myself.

Chang Su: feel free to take it over if you are working on this again :)
Comment 9 Ariya Hidayat 2010-08-12 13:20:05 PDT
I am afraid the current situation with shadow painting in GraphicsContextQt is a bit of a mess. I will start by posting patches which cleans up and refactors the code. Also, hopefully one small patch at a time is easier to review.
Comment 10 Ariya Hidayat 2010-08-12 13:29:52 PDT
Same problem with CSS, adjust the title to point this out.
Comment 11 Ariya Hidayat 2010-08-13 05:44:21 PDT
Created attachment 64327 [details]
Patch
Comment 12 Simon Hausmann 2010-08-13 06:37:22 PDT
Comment on attachment 64327 [details]
Patch

Nice cleanup!
Comment 13 Chang Shu 2010-08-13 06:49:14 PDT
Awesome! Simon, can you cherry-pick this to 2.1 once it's in? Thanks!
Comment 14 Chang Shu 2010-08-13 06:52:56 PDT
Btw, this patch must make some philip's tests work (LayoutTests/canvas/philip/tests). Can you identify them and remove them from skip list?
Comment 15 Ariya Hidayat 2010-08-13 06:58:51 PDT
> Btw, this patch must make some philip's tests
> work(LayoutTests/canvas/philip/tests). 
> Can you identify them and remove them from skip list?

Of course, once I'm done with it :)
The first patch is only cleanup and does not add anything yet.
Comment 16 Chang Shu 2010-08-13 07:27:59 PDT
My bad, I didn't realize this is the 1st patch. :)
Comment 17 Ariya Hidayat 2010-08-13 09:04:44 PDT
Created attachment 64350 [details]
Patch 2
Comment 18 Ariya Hidayat 2010-08-13 09:05:48 PDT
Hmm, accidently obsolete patch 1 :(

For reference, it was already r+ by hausmann.
Comment 19 Ariya Hidayat 2010-08-13 10:26:20 PDT
Patch 1: Manually committed r65331: http://trac.webkit.org/changeset/65331
Comment 20 WebKit Review Bot 2010-08-13 10:49:26 PDT
http://trac.webkit.org/changeset/65331 might have broken Qt Linux Release
Comment 21 Ariya Hidayat 2010-08-13 11:22:07 PDT
Few tests I missed in Patch 1:

canvas/philip/tests/2d.shadow.enable.blur.html
canvas/philip/tests/2d.shadow.offset.positiveX.html
canvas/philip/tests/2d.shadow.offset.positiveY.html
fast/canvas/canvas-shadow.html
Comment 22 Ariya Hidayat 2010-08-13 22:57:41 PDT
Instead of polluting this bug, I'll create new bug entries for the small patchsets and make this one as a master bug.
Comment 23 Ariya Hidayat 2010-08-21 16:54:45 PDT
*** Bug 42156 has been marked as a duplicate of this bug. ***
Comment 24 Ariya Hidayat 2010-12-21 08:32:12 PST
*** Bug 49131 has been marked as a duplicate of this bug. ***
Comment 25 Noam Rosenthal 2012-07-11 14:13:18 PDT
Time to close this.