[Webkit-unassigned] [Bug 89697] [JSC] CSSStyleDeclaration report incorrect descriptor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 7 13:16:31 PDT 2013


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


Manuel Rego Casasnovas <rego at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rego at igalia.com




--- Comment #1 from Manuel Rego Casasnovas <rego at igalia.com>  2013-06-07 13:15:05 PST ---
(In reply to comment #0)
> The properties of the CSSStyleDeclaration are enumerable by the for in loop but the property descriptor reports them as non enumerable.
> 
> var style = document.getComputedStyle(document.body);
> var descr = Object.getOwnPropertyDescriptor(style, 'color');
> shouldBeTrue('descr.enumerable');

There's also more weird stuff regarding CSS2Properties in CSSStyleDeclaration.

For example if you get the descriptor of "color" property with Object.getOwnPropertyDescriptor() it returns:
Object {value: "", writable: false, enumerable: false, configurable: false}

So it appears as "writable: false" however things like the next line works properly:
style.color = "blue";

According to the spec (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) if writable is false you shouldn't be allowed to modify the value.

So it's clear that the descriptor is wrong.

BTW, the descriptor in Chrome is:
Object {value: "", writable: true, enumerable: true, configurable: true}

-- 
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