Open Bug 836977 Opened 9 years ago Updated 4 years ago
IDOMUtils .get CSSStyle Rules() should accept a CSS3 style pseudo-element
There is no way to get the style of ::(-moz-)selection pseudo-element with inIDOMUtils.getCSSStyleRules() or other methods. This need to implement the feature of inspect pseudo-element (bug 694019).
Seems to work fine for me. Do make sure you're passing ":-moz-selection" as the pseudo name to getCSSStyleRules?
(In reply to Boris Zbarsky (:bz) from comment #1) > Seems to work fine for me. Do make sure you're passing ":-moz-selection" as > the pseudo name to getCSSStyleRules? Thank you. getCSSStyleRules works as my expecting. However, this behavior is a little strange, isn't it? I hope that it also works fine if we passed "::foo" strings like selector level 3, not only CSS2 styles.
Sure. Might be worth factoring out the code at http://hg.mozilla.org/mozilla-central/file/50cf5bbcb180/layout/style/nsComputedDOMStyle.cpp#l116 and reusing it here or something. I didn't worry about it too much for an internal API; what's really being passed in is not the pseudo-element name but the internal Gecko atom naming it, which always has a single ':'.
Summary: Cannot get ::-moz-selection css style rules from inIDOMUtils → inIDOMUtils.getCSSStyleRules() should accept a CSS3 style pseudo-element
OS: Mac OS X → All
Hardware: x86_64 → All
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.