Open Bug 836977 Opened 7 years ago Updated 2 years ago

inIDOMUtils.getCSSStyleRules() should accept a CSS3 style pseudo-element

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

People

(Reporter: tetsuharu, Unassigned)

References

(Blocks 1 open bug)

Details

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).
Component: DOM → Layout
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 ':'.
Component: Layout → Style System (CSS)
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
Blocks: css-pseudo-4
You need to log in before you can comment on or make changes to this bug.