[Webkit-unassigned] [Bug 83298] getMatchedCSSRules() should return null when the second argument is an unrecognized pseudo-element name
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 24 15:18:22 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=83298
Kulanthaivel Palanichamy <kulanthaivel at codeaurora.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kulanthaivel at codeaurora.org
--- Comment #6 from Kulanthaivel Palanichamy <kulanthaivel at codeaurora.org> 2012-04-24 15:18:21 PST ---
(In reply to comment #5)
> (From update of attachment 138598 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=138598&action=review
>
> > LayoutTests/fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements.html:18
> > +shouldBe("getMatchedCSSRules(document.querySelector('p'), 'before')", "null")
> > +shouldBe("getMatchedCSSRules(document.querySelector('p'), 'foo')", "null")
>
> Please add test cases for null and undefined in the second argument.
>
> > Source/WebCore/page/DOMWindow.idl:156
> > + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement);
>
> What is the expected behavior for null or undefined in the second argument? Look at here: https://trac.webkit.org/wiki/WebKitIDL#TreatNullAs
>
> We do not specify [TreatNullAs=NullString, TreatUndefinedAs=NullString], unless the spec requires it.
I couldn't find any W3C spec for this API (any pointers?). I think this was originally added for WebInspector, but web developers started using it in the wild lately. In any case it shouldn't be different from window.getComputedStyle() as far as the parameters are concerned.
In the mean time I found that getMatchedCSSRules is not supporting ':' and '::' prefixed pseudo-elements like how getComputedStyle does. My follow-up patch has fixed this issue as well.
Let me know if you suggest separating that into a different patch.
--
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