[webkit-reviews] review denied: [Bug 50790] Add simple pseudoelement style resolution and adapt slider thumb to use it. : [Attachment 76134] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 13:58:41 PST 2010


Dave Hyatt <hyatt at apple.com> has denied Dimitri Glazkov (Google)
<dglazkov at chromium.org>'s request for review:
Bug 50790: Add simple pseudoelement style resolution and adapt slider thumb to
use it.
https://bugs.webkit.org/show_bug.cgi?id=50790

Attachment 76134: Patch
https://bugs.webkit.org/attachment.cgi?id=76134&action=review

------- Additional Comments from Dave Hyatt <hyatt at apple.com>
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).


More information about the webkit-reviews mailing list