[Webkit-unassigned] [Bug 104191] Implement matching cue by the class name with ::cue pseudo element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 5 16:57:15 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=104191





--- Comment #2 from Dima Gorbik <dgorbik at apple.com>  2012-12-05 16:59:42 PST ---
(From update of attachment 177869)
View in context: https://bugs.webkit.org/attachment.cgi?id=177869&action=review

> Source/WebCore/css/CSSParser.cpp:10108
> +#if ENABLE(VIDEO_TRACK)
> +        // Don't set the tag for the PseudoCue element because the matchig will not work when the tags are being compared.
> +        if (!(specifiers->pseudoType() == CSSSelector::PseudoCue))
> +#endif
> +            specifiers->setTag(tag);

I will fix the typo in the comment.
I am not sure about this piece of code. Maybe I could use the tag somehow to find out that this is a webvtt node and let it set here?

> Source/WebCore/css/CSSParser.cpp:10142
> +#if ENABLE(VIDEO_TRACK)
> +    if (newSpecifier->isUnknownPseudoElement() || newSpecifier->pseudoType() == CSSSelector::PseudoCue) {
> +#else
>      if (newSpecifier->isUnknownPseudoElement()) {
> +#endif
>          // Unknown pseudo element always goes at the top of selector chain.
>          newSpecifier->appendTagHistory(CSSSelector::ShadowDescendant, sinkFloatingSelector(specifiers));
>          return newSpecifier;

Without this change the cue basically wouldn't work when the selector has a parent element matched by an ID (and other cases when updateSpecifiers in the parser is used). For example: #myvideo::cue(.test) wouldn't work because the pseudo element wouldn't get on top of the selector chain.

> Source/WebCore/css/SelectorChecker.cpp:462
> +            if (pseudoId != NOPSEUDO && m_mode != SharingRules && pseudoId != CUE)
>                  dynamicPseudo = pseudoId;

Not sure about this as well. Without this change the properties wouldn't be applied to the cue.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list