WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
44006
[Qt] Refactor shadow state handling in GraphicsContextQt
https://bugs.webkit.org/show_bug.cgi?id=44006
Summary
[Qt] Refactor shadow state handling in GraphicsContextQt
Ariya Hidayat
Reported
2010-08-13 23:01:23 PDT
Instead of repeatedly using getShadow(), the shadow state handling should be implemented in setPlatformShadow().
Attachments
Patch
(14.60 KB, patch)
2010-08-14 00:18 PDT
,
Ariya Hidayat
kenneth
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ariya Hidayat
Comment 1
2010-08-14 00:18:15 PDT
Created
attachment 64412
[details]
Patch
Ariya Hidayat
Comment 2
2010-08-14 00:23:31 PDT
The patch is just the slightly minor version from Patch 1 in
https://bugs.webkit.org/show_bug.cgi?id=34479
, which I rolled out because it breaks: 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 Now the problem is tackled propery. The small diff against the previous is: diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index a409328..94e6f67 100644 --- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -665,7 +665,7 @@ void GraphicsContext::fillRect(const FloatRect& rect) shadowDestRect.translate(m_data->shadowOffset); pShadow->setCompositionMode(QPainter::CompositionMode_Source); - pShadow->fillRect(shadowDestRect, m_data->shadowColor); + pShadow->fillRect(shadowImage->rect(), m_data->shadowColor); pShadow->setCompositionMode(QPainter::CompositionMode_DestinationIn); } @@ -895,7 +895,7 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, float blur, const // Can't paint the shadow with invalid or invisible color. m_data->shadowType = GraphicsContextPlatformPrivate::NoShadow; } else { - if (blur >= 1) { + if (blur > 0) { // Shadow is always blurred, even the offset is zero. m_data->shadowType = GraphicsContextPlatformPrivate::BlurShadow; } else {
Ariya Hidayat
Comment 3
2010-08-14 01:24:06 PDT
Manually committed
r65362
:
http://trac.webkit.org/changeset/65362
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug