• dgorbik@apple.com's avatar
    Not all properties apply to the '::cue' pseudo-element · ba1240dc
    dgorbik@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=110705
    
    Reviewed by Eric Carlson.
    
    Source/WebCore:
    
    Background properties are not inherited and they were not applied to right elements.
    Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
    container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
    Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
    to this container internally. m_cueContainer is removed because it is no longer needed.
    m_allDocumentNodes container was renamed to m_cueBackgroundBox.
    
    Existing tests modified to cover this case.
    
    * css/RuleSet.h:
    (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
    * css/StyleResolver.cpp:
    (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
    * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
    (video::cue):
    * html/shadow/MediaControlElements.cpp:
    (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
    * html/shadow/MediaControlElements.h:
    (MediaControlTextTrackContainerElement):
    * html/shadow/MediaControls.cpp:
    (WebCore::MediaControls::createTextTrackDisplay):
    * html/shadow/MediaControlsChromium.cpp:
    (WebCore::MediaControlsChromium::createTextTrackDisplay):
    * html/shadow/MediaControlsGtk.cpp:
    (WebCore::MediaControlsGtk::createTextTrackDisplay):
    * html/track/TextTrackCue.cpp:
    (WebCore::TextTrackCue::TextTrackCue):
    (WebCore::TextTrackCue::updateDisplayTree):
    (WebCore::TextTrackCue::getDisplayTree):
    * html/track/TextTrackCue.h:
    (WebCore::TextTrackCue::element):
    * page/CaptionUserPreferencesMac.mm:
    (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):
    
    LayoutTests:
    
    * media/media-controls.js:
    (textTrackDisplayElement):
    * media/track/track-css-all-cues-expected.txt:
    * media/track/track-css-all-cues.html:
    * media/track/track-css-cue-lifetime.html:
    * media/track/track-css-matching-default.html:
    * media/track/track-css-matching-lang.html:
    * media/track/track-css-matching-timestamps.html:
    * media/track/track-css-matching.html:
    * media/track/track-css-property-whitelist.html:
    * media/track/track-in-band-style.html:
    * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ba1240dc
CaptionUserPreferencesMac.mm 21.5 KB