[webkit-reviews] review granted: [Bug 19727] Add GraphicsContext::hasShadow() so the tests aren't duplicated so many times in Cairo and Qt ports : [Attachment 21884] add GraphicsContext::hasShadow()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 23 10:21:54 PDT 2008
Darin Adler <darin at apple.com> has granted Jonathon Jongsma
<jonathon.jongsma at collabora.co.uk>'s request for review:
Bug 19727: Add GraphicsContext::hasShadow() so the tests aren't duplicated so
many times in Cairo and Qt ports
https://bugs.webkit.org/show_bug.cgi?id=19727
Attachment 21884: add GraphicsContext::hasShadow()
https://bugs.webkit.org/attachment.cgi?id=21884&action=edit
------- Additional Comments from Darin Adler <darin at apple.com>
I think a better way to do this would be to make the getShadow function return
a boolean, so you can easily check if you can entirely skip the shadow drawing
while getting the specification for drawing it if you do need to.
You can see this would work because the calls to hasShadow both have calls to
getShadow immediately afterward.
+ return m_common->state.shadowColor.isValid() &&
+ (m_common->state.shadowSize.width() ||
+ m_common->state.shadowSize.height());
This should also check shadowColor.alpha() for a non-zero value.
I'm going to say r=me, but I think it would be better to do this without adding
a new function.
More information about the webkit-reviews
mailing list