[Webkit-unassigned] [Bug 20226] BORDER attribute with the IMG tag, using percentage values not working.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 18 10:41:36 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=20226


Tab Atkins <tabatkins at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |tabatkins at google.com
     Ever Confirmed|0                           |1




--- Comment #13 from Tab Atkins <tabatkins at google.com>  2011-07-18 10:41:36 PST ---
The behavior of border="10%" should be to apply a 10px border.

First, given that you are using a presentational attribute, we use HTML's rules for parsing it.  The 'border' attribute is defined as "mapping to a pixel length property" <http://www.whatwg.org/specs/web-apps/current-work/complete/rendering.html#maps-to-the-pixel-length-property>, which means we first try to parse it with the "rules for parsing non-negative integers" <http://www.whatwg.org/specs/web-apps/current-work/complete/common-microsyntaxes.html#rules-for-parsing-non-negative-integers>.  When you do that, it turns the value "10", which is then interpreted as the CSS length 10px.

Note that if you were to use "border-width: 10%" in actual CSS, it would have no effect, because the border-width property is defined as taking "<length> | thin | medium | thick" in both CSS 2.1 and the current ED of the Backgrounds & Borders module.  Thus, a declaration like that would be invalid and be ignored.

Since this is an actual bug in our parser, I've marked this bug as confirmed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list