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

NEW
Unassigned

Status

()

6 years ago
8 months ago

People

(Reporter: tetsuharu, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

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).
(Reporter)

Updated

6 years ago
Blocks: 694019

Updated

6 years ago
Component: DOM → Layout
(Reporter)

Updated

6 years ago
Blocks: 557726
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)
(Reporter)

Updated

6 years ago
Summary: Cannot get ::-moz-selection css style rules from inIDOMUtils → inIDOMUtils.getCSSStyleRules() should accept a CSS3 style pseudo-element
(Reporter)

Updated

6 years ago
No longer blocks: 694019
OS: Mac OS X → All
Hardware: x86_64 → All
Version: Trunk → unspecified

Updated

8 months ago
Blocks: 1443969
You need to log in before you can comment on or make changes to this bug.