Not all properties apply to the '::cue' pseudo-element
authordgorbik@apple.com <dgorbik@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 20:43:43 +0000 (20:43 +0000)
committerdgorbik@apple.com <dgorbik@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2013 20:43:43 +0000 (20:43 +0000)
commitf74e5dd733cbf56d2418f536674112a48429d16d
tree275e6afb5880dd9068551e71926c570ef7de23ac
parenta5ab4a01bff89839f34dec52da3e1fd7b1202da5
Not all properties apply to the '::cue' pseudo-element
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: https://svn.webkit.org/repository/webkit/trunk@145397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/media/media-controls.js
LayoutTests/media/track/track-css-all-cues-expected.txt
LayoutTests/media/track/track-css-all-cues.html
LayoutTests/media/track/track-css-cue-lifetime.html
LayoutTests/media/track/track-css-matching-default.html
LayoutTests/media/track/track-css-matching-lang.html
LayoutTests/media/track/track-css-matching-timestamps.html
LayoutTests/media/track/track-css-matching.html
LayoutTests/media/track/track-css-property-whitelist.html
LayoutTests/media/track/track-in-band-style.html
LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/RuleSet.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/mediaControls.css
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControlsChromium.cpp
Source/WebCore/html/shadow/MediaControlsGtk.cpp
Source/WebCore/html/track/TextTrackCue.cpp
Source/WebCore/html/track/TextTrackCue.h
Source/WebCore/page/CaptionUserPreferencesMac.mm