[webkit-dev] getComputedStyle returns percentage values for left / right / top / bottom

Jarred Nicholls jarred at sencha.com
Tue Nov 22 04:34:40 PST 2011


Indeed it is correct.  The CSS W3 draft also states that those properties
return the "specified value", which if a percentage should return a
percentage by definition.

On Mon, Nov 21, 2011 at 10:49 PM, Xianzhu Wang (王显著) <
wangxianzhu at chromium.org> wrote:

> Sorry my previous post might be misleading. Just verified that in the
> CSSOM draft the list of properties that getComputedStyle() may return the
> used value doesn't include left/right/top/bottom. That is, according to the
> draft, WebKit's current behavior about left/right/top/bottom is correct.
>
>
> On Tue, Nov 22, 2011 at 10:50 AM, Xianzhu Wang (王显著) <
> wangxianzhu at chromium.org> wrote:
>
>> A related bug is: https://bugs.webkit.org/show_bug.cgi?id=42799
>> It's about the problem of pixelXXX CSS properties. Is these pixelXXX
>> properties a workaround of bug 29084? I think after we fix 29084 we can
>> drop the pixelXXX properties.
>>
>> The current draft CSSOM says getComputedStyle() should return the
>> resolved values, and for width, height etc., "if the property applies to
>> the element or pseudo-element and the resolved value of the 'display'
>> property is not none, the resolved value is the used value. Otherwise the
>> resolved value is the computed value."
>>
>> On Tue, Nov 22, 2011 at 8:02 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>>
>>> Per bugzilla discusion, FF, IE, and Opera all return pixel values so we
>>> should just fix this bug.
>>>
>>> - Ryosuke
>>>
>>> On Mon, Nov 21, 2011 at 3:19 PM, Mike Sherov <mike.sherov at gmail.com>wrote:
>>>
>>>> I'd like to begin working on this bug (
>>>> https://bugs.webkit.org/show_bug.cgi?id=29084), and making sure that
>>>> getComputedStyle() always returns a pixel value "used value" when expected,
>>>> although I suspect this is a controversial change, and
>>>> http://www.webkit.org/coding/contributing.html#writecode says to ask
>>>> in this mailing list before making a controversial change. Can anyone give
>>>> me some feedback here on whether or not I can and should move forward on
>>>> this?
>>>> _______________________________________________
>>>> webkit-dev mailing list
>>>> webkit-dev at lists.webkit.org
>>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>
>>>
>>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


-- 
................................................................

*Sencha*
Jarred Nicholls, Senior Software Architect
@jarrednicholls
<http://twitter.com/jarrednicholls>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111122/a70d496b/attachment.html>


More information about the webkit-dev mailing list