[Webkit-unassigned] [Bug 76736] window.getMatchedCSSRules() not supporting pseudo classes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 4 19:59:17 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=76736
--- Comment #3 from Tab Atkins Jr. <jackalmage at gmail.com> 2012-04-04 19:59:17 PST ---
(In reply to comment #0)
> Another problem with the method is that if a pseudo argument is supplied, but no css rules match the pseudo, it will return the non-psuedo CSS rules. I think returning null is the appropriate behavior.
Please file one bug per bug. ^_^
This is half-valid. If you specify a valid pseudo-element, and no rules match the pseudo, it returns null, as it should. However, it you pass it a string that doesn't correspond to any pseudo (like getMatchedCSSRules(el, 'foo') ), then it just ignores the second argument and returns the rules that match the element normally.
I agree this isn't ideal behavior, as it's future-hostile (if we later add a ::foo pseudo-element, someone accidentally depending on that call returning the rules that match the passed element will break). Please file a separate bug for this, with a title like "getMatchedCSSRules() should return null when the second argument is an unrecognized pseudo-element name".
--
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