WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
50790
Add simple pseudoelement style resolution and adapt slider thumb to use it.
https://bugs.webkit.org/show_bug.cgi?id=50790
Summary
Add simple pseudoelement style resolution and adapt slider thumb to use it.
Dimitri Glazkov (Google)
Reported
2010-12-09 16:17:35 PST
Add simple pseudoelement style resolution and adapt slider thumb to use it.
Attachments
Patch
(4.63 KB, patch)
2010-12-09 16:22 PST
,
Dimitri Glazkov (Google)
hyatt
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2010-12-09 16:22:15 PST
Created
attachment 76134
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2010-12-09 16:24:02 PST
Dave, this is still pretty hacky, but at least there's no double-resolving the style as it was in the first RenderSlider patch. Long-term, I guess we should rework pseudoElement resolution to be more like normal element matching. WDYT?
Dave Hyatt
Comment 3
2010-12-10 13:58:41 PST
Comment on
attachment 76134
[details]
Patch This feature is comparable to the :xbl-pseudo.
http://www.w3.org/TR/xbl/#the-xblpseudo
It's basically something new, a hybrid, that is both an element with a shadow DOM position (that needs to match normal rules that apply to that element type), but that also matches pseudo-element rules. *This is not a pseudo style.* It's a normal style that happens to also match a pseudo-element rule. Your instinct to patch styleForElement is correct, but you need to implement it such that you don't lose normal rule matching as well. Here's the basic template I would use. (1) Remove the hard-coded pseudo-element from the pseudo-element list. It shouldn't be there any more. (2) Have elements know their shadowPseudoId. That part is fine. (3) Flag rules that have unrecognized pseudo-elements (and that are therefore potentially matched by a shadow pseudo). You should be able to make another hash (similar to the id, tag, class hashes) that lets you easily grab rules for your shadow pseudo id. (4) Match on it treating the shadow pseudo id as yourself (and then you have to go to the parent to test it for the rest of the rule, similar to a > selector).
Dimitri Glazkov (Google)
Comment 4
2010-12-17 08:48:32 PST
(In reply to
comment #3
)
> (From update of
attachment 76134
[details]
) > This feature is comparable to the :xbl-pseudo. > >
http://www.w3.org/TR/xbl/#the-xblpseudo
> > It's basically something new, a hybrid, that is both an element with a shadow DOM position (that needs to match normal rules that apply to that element type), but that also matches pseudo-element rules. > > *This is not a pseudo style.* > > It's a normal style that happens to also match a pseudo-element rule. Your instinct to patch styleForElement is correct, but you need to implement it such that you don't lose normal rule matching as well. > > Here's the basic template I would use. > > (1) Remove the hard-coded pseudo-element from the pseudo-element list. It shouldn't be there any more. > (2) Have elements know their shadowPseudoId. That part is fine. > (3) Flag rules that have unrecognized pseudo-elements (and that are therefore potentially matched by a shadow pseudo). You should be able to make another hash (similar to the id, tag, class hashes) that lets you easily grab rules for your shadow pseudo id. > (4) Match on it treating the shadow pseudo id as yourself (and then you have to go to the parent to test it for the rest of the rule, similar to a > selector).
This is basically the TODO list for
bug 46595
, closing this as invalid.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug