W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2010

[Bug 10647] New: shadowBlur should be linear throughout rather than changing to sqrt() above 8px

From: <bugzilla@jessica.w3.org>
Date: Fri, 17 Sep 2010 18:01:57 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-10647-2486@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10647

           Summary: shadowBlur should be linear throughout rather than
                    changing to sqrt() above 8px
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Canvas 2D Context (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: dbaron@dbaron.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


http://www.w3.org/TR/2010/WD-2dcontext-20100624/#dom-context-2d-shadowblur
says, in point 4.1:

If shadowBlur is less than 8, let σ be half the value of shadowBlur;
otherwise, let σ be the square root of multiplying the value of shadowBlur by
2.

This is bizarre behavior that's emulation of a bug in Safari for Mac.  It
doesn't seem present in Chromium for Linux, and until very recently the
implementation of it in Gecko was actually wrong by a factor of sqrt(2) for the
>8px case because the *2 inside the sqrt() was missing.  No Gecko bugs were
filed about this difference; I only noticed because I was changing our blur
code to conform to css3-background.

Instead of this bizarre formula, I think it should instead define σ as half
the value of shadowBlur, no matter what the value of shadowBlur.  This would
match css3-background's definition of blur for box-shadow.

Given the current lack of interoperability, I don't think changing this would
pose a problem, and it would be much better to have a sensible behavior that's
consistent with other specifications.

I have a testcase at http://dbaron.org/css/test/2010/shadow-blur ; the example
on the left is box-shadow and the example on the right is canvas.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 17 September 2010 18:01:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:24 UTC