Commit 324b0985 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Implement :future pseudo class for the WebVTT ::cue pseudo element

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

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-04
Reviewed by Antti Koivisto.

Source/WebCore:

This patch changes the approach of showing past/future node objects.
Before upper-level containers were used to put past and future nodes inside. Styles were applied
to containers. Now styles could be applied directly to nodes by using ::cue(:future).
That allows to style future/past WebVTT nodes even if they are nested.

Existing test was modified to cover new cases.

* css/CSSSelector.cpp: added :future pseudo class support.
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
* css/SelectorChecker.cpp: ditto.
(WebCore::SelectorChecker::checkOneSelector):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): define style sharing rules for WebVTT objects.
* css/mediaControls.css:
(video::-webkit-media-text-track-all-nodes):
(video::cue(:future)): added standard user-agent styles for the future nodes.
* dom/Element.cpp: setter functions don't have an argument now because WebVTT type enum was introduced and the right type is set
when the setter is being called.
(WebCore::Element::setIsWebVTTNode):
(WebCore):
(WebCore::Element::isWebVTTFutureNode):
(WebCore::Element::setIsWebVTTFutureNode):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(ElementRareData):
* dom/NodeRareData.cpp:
(SameSizeAsNodeRareData): added a dummy enum value. Enum is integer type and is aligned in Windows when placed in the bitfield,
so it takes more space.
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::isWebVTTNode):
(WebCore::NodeRareData::setIsWebVTTNode):
(WebCore::NodeRareData::isWebVTTFutureNode):
(WebCore::NodeRareData::setIsWebVTTFutureNode):
(NodeRareData):
* html/shadow/MediaControlElements.cpp:
(WebCore):
* html/track/TextTrack.h: add a WebVTT node object type enum.
(TextTrack):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::allNodesShadowPseudoId):
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::getCueAsHTML):
(WebCore):
(WebCore::TextTrackCue::setNodeObjectFlags): determine if the node is future or past and mark as WebVTT node.
This combines the functionality related to marking nodes implemented before in updateDisplayTree and
markNodesAsWebVTTNodes.
(WebCore::TextTrackCue::updateDisplayTree):
(WebCore::TextTrackCue::getDisplayTree):
* html/track/TextTrackCue.h:
(TextTrackCue):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): no need to mark nodes as WebVTT nodes when parsing. This is done at the
rendering stage later.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): the container name has changed.

LayoutTests:

Modified the track css matching test to cover :future pseudo-class case.

* media/track/captions-webvtt/captions-inner-timestamps.vtt: Removed.
* media/track/captions-webvtt/styling.vtt:
* media/track/track-css-matching-expected.txt:
* media/track/track-css-matching.html:
* media/track/track-cue-rendering-inner-timestamps-expected.txt: Removed.
* media/track/track-cue-rendering-inner-timestamps.html: The test was removed because it was based on the old
future/past nodes rendering logic.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d5029ca3
2013-01-04 Dima Gorbik <dgorbik@apple.com>
Implement :future pseudo class for the WebVTT ::cue pseudo element
https://bugs.webkit.org/show_bug.cgi?id=105473
Reviewed by Antti Koivisto.
Modified the track css matching test to cover :future pseudo-class case.
* media/track/captions-webvtt/captions-inner-timestamps.vtt: Removed.
* media/track/captions-webvtt/styling.vtt:
* media/track/track-css-matching-expected.txt:
* media/track/track-css-matching.html:
* media/track/track-cue-rendering-inner-timestamps-expected.txt: Removed.
* media/track/track-cue-rendering-inner-timestamps.html: The test was removed because it was based on the old
future/past nodes rendering logic.
2013-01-04 Carlos Garcia Campos <cgarcia@igalia.com>
 
REGRESSION (r138222?): Assertion failure on appcache/main-resource-redirect.html
WEBVTT
1
00:00:00.000 --> 00:00:00.950
<00:00:00.200>Chocolate <00:00:00.450>Rain <00:00:00.700>Karaoke
2
00:00:01.000 --> 00:00:03.600
<00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
3
00:00:03.700 --> 00:00:04.250
<00:00:03.750>Chocolate <00:00:04.000>Rain
......@@ -7,3 +7,7 @@ Lorum ipsum
2
00:01.000 --> 00:02.000
<c.red>dolor sit </c><c.green>amet, consectetur </c><c.red2>adipiscing elit</c>
3
00:02.000 --> 00:05.000
<00:02.000><c>Suspendisse accumsan, </c><00:03.000><c>mauris sed </c><00:04.000><c>euismod pharetra</c>
\ No newline at end of file
Test that cues are being matched properly by the class name
1. Test that cues are being matched properly by the class name
EVENT(canplaythrough)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
RUN(video.currentTime = 2.5)
EVENT(seeked)
2. Test that cues are being matched properly by the ':future' pseudo class.
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
RUN(video.currentTime = 3.5)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
RUN(video.currentTime = 4.5)
EVENT(seeked)
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 255)') OK
END OF TEST
......@@ -17,21 +17,51 @@
<script>
var cueNode;
var seekedCount = 0;
var info = [["rgb(255, 0, 0)", "rgb(0, 128, 0)", "rgb(255, 0, 0)"],
["rgb(255, 255, 255)", "rgb(128, 128, 128)", "rgb(128, 128, 128)"],
["rgb(255, 255, 255)", "rgb(255, 255, 255)", "rgb(128, 128, 128)"],
["rgb(255, 255, 255)", "rgb(255, 255, 255)", "rgb(255, 255, 255)"]];
function skipNonElements(root)
{
nextElementSibling = root;
while (nextElementSibling.nodeType != 1) {
nextElementSibling = nextElementSibling.nextSibling;
}
return nextElementSibling;
}
function seeked()
{
cueNode = textTrackDisplayElement(video, 'past-nodes').firstChild;
testExpected("getComputedStyle(cueNode).color", "rgb(255, 0, 0)");
cueNode = cueNode.nextSibling;
testExpected("getComputedStyle(cueNode).color", "rgb(0, 128, 0)");
cueNode = cueNode.nextSibling;
testExpected("getComputedStyle(cueNode).color", "rgb(255, 0, 0)");
endTest();
if (testEnded)
return;
if (seekedCount == 1) {
consoleWrite("");
consoleWrite("");
consoleWrite("2. Test that cues are being matched properly by the ':future' pseudo class.");
}
cueNode = skipNonElements(textTrackDisplayElement(video, 'all-nodes').firstChild);
skipNonElements(cueNode);
testExpected("getComputedStyle(cueNode).color", info[seekedCount][0]);
cueNode = skipNonElements(cueNode.nextSibling);
testExpected("getComputedStyle(cueNode).color", info[seekedCount][1]);
cueNode = skipNonElements(cueNode.nextSibling);
testExpected("getComputedStyle(cueNode).color", info[seekedCount][2]);
if (++seekedCount == info.length)
endTest();
else {
consoleWrite("");
run("video.currentTime = " + (video.currentTime + 1));
}
}
function loaded()
{
consoleWrite("Test that cues are being matched properly by the class name");
consoleWrite("1. Test that cues are being matched properly by the class name");
findMediaElement();
video.src = findMediaFile('video', '../content/test');
video.id = "testvideo";
......
Test that TextTrack's cues are rendered correctly when they contain inner timestamps.
EVENT(canplaythrough)
** First cue (empty) **
EVENT(seeked)
* Cue 0 *
Current time: 0
Past:
Future: Chocolate Rain Karaoke
Complete: <00:00:00.200>Chocolate <00:00:00.450>Rain <00:00:00.700>Karaoke
** First cue (one word) **
EVENT(seeked)
* Cue 0 *
Current time: 0.25
Past: Chocolate
Future: Rain Karaoke
Complete: <00:00:00.200>Chocolate <00:00:00.450>Rain <00:00:00.700>Karaoke
** First cue (two words) **
EVENT(seeked)
* Cue 0 *
Current time: 0.5
Past: Chocolate Rain
Future: Karaoke
Complete: <00:00:00.200>Chocolate <00:00:00.450>Rain <00:00:00.700>Karaoke
** First cue (three words) **
EVENT(seeked)
* Cue 0 *
Current time: 0.75
Past: Chocolate Rain Karaoke
Future:
Complete: <00:00:00.200>Chocolate <00:00:00.450>Rain <00:00:00.700>Karaoke
** Second cue (empty) **
EVENT(seeked)
* Cue 0 *
Current time: 1
Past:
Future: Some stay dry and others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (one word) **
EVENT(seeked)
* Cue 0 *
Current time: 1.25
Past: Some
Future: stay dry and others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (two words) **
EVENT(seeked)
* Cue 0 *
Current time: 1.5
Past: Some stay
Future: dry and others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (three words) **
EVENT(seeked)
* Cue 0 *
Current time: 1.75
Past: Some stay dry
Future: and others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (same as before) **
EVENT(seeked)
* Cue 0 *
Current time: 2
Past: Some stay dry
Future: and others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (four words) **
EVENT(seeked)
* Cue 0 *
Current time: 2.25
Past: Some stay dry and
Future: others feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (five words) **
EVENT(seeked)
* Cue 0 *
Current time: 2.5
Past: Some stay dry and others
Future: feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (same as before) **
EVENT(seeked)
* Cue 0 *
Current time: 2.75
Past: Some stay dry and others
Future: feel the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (six words) **
EVENT(seeked)
* Cue 0 *
Current time: 3
Past: Some stay dry and others feel
Future: the pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (seven words) **
EVENT(seeked)
* Cue 0 *
Current time: 3.25
Past: Some stay dry and others feel the
Future: pain
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Second cue (eight words) **
EVENT(seeked)
* Cue 0 *
Current time: 3.5
Past: Some stay dry and others feel the pain
Future:
Complete: <00:00:01.200>Some <00:00:01.450>stay <00:00:01.700>dry <00:00:02.200>and <00:00:02.450>others <00:00:02.950>feel <00:00:03.200>the <00:00:03.450>pain
** Third cue (one word) **
EVENT(seeked)
* Cue 0 *
Current time: 3.75
Past: Chocolate
Future: Rain
Complete: <00:00:03.750>Chocolate <00:00:04.000>Rain
** Third cue (two words) **
EVENT(seeked)
* Cue 0 *
Current time: 4
Past: Chocolate Rain
Future:
Complete: <00:00:03.750>Chocolate <00:00:04.000>Rain
END OF TEST
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=../media-file.js></script>
<script src=../video-test.js></script>
<script src=../media-controls.js></script>
<script>
var testTrack;
var cueDisplayElement;
var cueDisplayContainer;
var seekedCount = 0;
var testCaseDescription = [
"First cue (empty)",
"First cue (one word)",
"First cue (two words)",
"First cue (three words)",
"Second cue (empty)",
"Second cue (one word)",
"Second cue (two words)",
"Second cue (three words)",
"Second cue (same as before)",
"Second cue (four words)",
"Second cue (five words)",
"Second cue (same as before)",
"Second cue (six words)",
"Second cue (seven words)",
"Second cue (eight words)",
"Third cue (one word)",
"Third cue (two words)"
];
// Each test case is found by incrementing with 0.250 the current time.
var testCaseSeekTime = [
];
var currentTestCase = 0;
function seeked()
{
for (var i = 0; i < testTrack.track.activeCues.length; ++i) {
cueDisplayElement = textTrackDisplayElement(video, 'display', i);
consoleWrite("");
consoleWrite("* Cue " + i + " *");
consoleWrite("Current time: " + Math.round(video.currentTime * 100) / 100);
consoleWrite("Past: " + cueDisplayElement.childNodes[0].innerHTML);
consoleWrite("Future: " + cueDisplayElement.childNodes[1].innerHTML);
consoleWrite("Complete: " + testTrack.track.activeCues[i].text);
}
runNextTestCase();
};
function runNextTestCase()
{
if (currentTestCase == testCaseDescription.length) {
endTest();
return;
}
consoleWrite("");
consoleWrite("** " + testCaseDescription[currentTestCase] + " **");
video.currentTime = testCaseSeekTime[currentTestCase];
waitForEvent('seeked', seeked, false, true);
currentTestCase++;
}
function loaded()
{
consoleWrite("Test that TextTrack's cues are rendered correctly when they contain inner timestamps.");
findMediaElement();
testTrack = document.querySelector('track');
video.src = findMediaFile('video', '../content/test');
waitForEvent('canplaythrough', function() {
cueDisplayContainer = textTrackDisplayElement(video);
for (i = 0.0; i < 4.500; i += 0.250)
testCaseSeekTime.push(i);
runNextTestCase();
});
}
</script>
</head>
<body onload="loaded()">
<video controls>
<track src="captions-webvtt/captions-inner-timestamps.vtt" kind="captions" default>
</video>
</body>
</html>
2013-01-04 Dima Gorbik <dgorbik@apple.com>
Implement :future pseudo class for the WebVTT ::cue pseudo element
https://bugs.webkit.org/show_bug.cgi?id=105473
Reviewed by Antti Koivisto.
This patch changes the approach of showing past/future node objects.
Before upper-level containers were used to put past and future nodes inside. Styles were applied
to containers. Now styles could be applied directly to nodes by using ::cue(:future).
That allows to style future/past WebVTT nodes even if they are nested.
Existing test was modified to cover new cases.
* css/CSSSelector.cpp: added :future pseudo class support.
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
* css/SelectorChecker.cpp: ditto.
(WebCore::SelectorChecker::checkOneSelector):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): define style sharing rules for WebVTT objects.
* css/mediaControls.css:
(video::-webkit-media-text-track-all-nodes):
(video::cue(:future)): added standard user-agent styles for the future nodes.
* dom/Element.cpp: setter functions don't have an argument now because WebVTT type enum was introduced and the right type is set
when the setter is being called.
(WebCore::Element::setIsWebVTTNode):
(WebCore):
(WebCore::Element::isWebVTTFutureNode):
(WebCore::Element::setIsWebVTTFutureNode):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(ElementRareData):
* dom/NodeRareData.cpp:
(SameSizeAsNodeRareData): added a dummy enum value. Enum is integer type and is aligned in Windows when placed in the bitfield,
so it takes more space.
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::isWebVTTNode):
(WebCore::NodeRareData::setIsWebVTTNode):
(WebCore::NodeRareData::isWebVTTFutureNode):
(WebCore::NodeRareData::setIsWebVTTFutureNode):
(NodeRareData):
* html/shadow/MediaControlElements.cpp:
(WebCore):
* html/track/TextTrack.h: add a WebVTT node object type enum.
(TextTrack):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::allNodesShadowPseudoId):
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::getCueAsHTML):
(WebCore):
(WebCore::TextTrackCue::setNodeObjectFlags): determine if the node is future or past and mark as WebVTT node.
This combines the functionality related to marking nodes implemented before in updateDisplayTree and
markNodesAsWebVTTNodes.
(WebCore::TextTrackCue::updateDisplayTree):
(WebCore::TextTrackCue::getDisplayTree):
* html/track/TextTrackCue.h:
(TextTrackCue):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): no need to mark nodes as WebVTT nodes when parsing. This is done at the
rendering stage later.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): the container name has changed.
2013-01-04 Carlos Garcia Campos <cgarcia@igalia.com>
 
REGRESSION (r138222?): Assertion failure on appcache/main-resource-redirect.html
......@@ -222,6 +222,7 @@ PseudoId CSSSelector::pseudoId(PseudoType type)
case PseudoWebKitCustomElement:
#if ENABLE(VIDEO_TRACK)
case PseudoCue:
case PseudoFutureCue:
#endif
#if ENABLE(IFRAME_SEAMLESS)
case PseudoSeamlessDocument:
......@@ -310,6 +311,7 @@ static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap(
#endif
#if ENABLE(VIDEO_TRACK)
DEFINE_STATIC_LOCAL(AtomicString, cue, ("cue(", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, futureCue, ("future", AtomicString::ConstructFromLiteral));
#endif
#if ENABLE(IFRAME_SEAMLESS)
DEFINE_STATIC_LOCAL(AtomicString, seamlessDocument, ("-webkit-seamless-document", AtomicString::ConstructFromLiteral));
......@@ -391,6 +393,7 @@ static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap(
#endif
#if ENABLE(VIDEO_TRACK)
nameToPseudoType->set(cue.impl(), CSSSelector::PseudoCue);
nameToPseudoType->set(futureCue.impl(), CSSSelector::PseudoFutureCue);
#endif
#if ENABLE(IFRAME_SEAMLESS)
nameToPseudoType->set(seamlessDocument.impl(), CSSSelector::PseudoSeamlessDocument);
......@@ -519,6 +522,9 @@ void CSSSelector::extractPseudoType() const
#endif
case PseudoInRange:
case PseudoOutOfRange:
#if ENABLE(VIDEO_TRACK)
case PseudoFutureCue:
#endif
break;
case PseudoFirstPage:
case PseudoLeftPage:
......
......@@ -158,6 +158,7 @@ namespace WebCore {
PseudoWebKitCustomElement,
#if ENABLE(VIDEO_TRACK)
PseudoCue,
PseudoFutureCue,
#endif
#if ENABLE(IFRAME_SEAMLESS)
PseudoSeamlessDocument
......
......@@ -939,6 +939,12 @@ bool SelectorChecker::checkOneSelector(const SelectorCheckingContext& context, c
return false;
element->document()->setContainsValidityStyleRules();
return element->isOutOfRange();
#if ENABLE(VIDEO_TRACK)
case CSSSelector::PseudoFutureCue:
if (element->isWebVTTFutureNode())
return true;
return false;
#endif
case CSSSelector::PseudoUnknown:
case CSSSelector::PseudoNotParsed:
default:
......
......@@ -1240,6 +1240,14 @@ bool StyleResolver::canShareStyleWithElement(StyledElement* element) const
if (element->isLink() && m_elementLinkState != style->insideLink())
return false;
#if ENABLE(VIDEO_TRACK)
if (element->isWebVTTNode() && m_element->isWebVTTNode() && element->isWebVTTFutureNode() != m_element->isWebVTTFutureNode())
return false;
// Deny sharing styles between WebVTT nodes and non-WebVTT nodes.
if (element->isWebVTTNode() != m_element->isWebVTTNode())
return false;
#endif
return true;
}
......
......@@ -238,25 +238,19 @@ video::-webkit-media-text-track-container {
-webkit-box-flex: 1;
}
video::-webkit-media-text-track-past-nodes {
video::-webkit-media-text-track-all-nodes {
display: inline;
background-color: rgba(0, 0, 0, 0.8);
padding: 2px 2px;
}
video::-webkit-media-text-track-future-nodes {
visibility: hidden;
display: inline;
background-color: rgba(0, 0, 0, 0.8);
margin-left: -2px;
padding: 2px 2px 2px 0px;
}
video::-webkit-media-text-track-display {
position: absolute;
overflow: hidden;
white-space: pre-wrap;
}
video::cue(:future) {
color: gray;
}
......@@ -2284,9 +2284,19 @@ bool Element::isWebVTTNode() const
return hasRareData() && elementRareData()->isWebVTTNode();
}
void Element::setIsWebVTTNode(bool flag)
void Element::setIsWebVTTNode()
{
ensureElementRareData()->setIsWebVTTNode(flag);
ensureElementRareData()->setIsWebVTTNode();
}
bool Element::isWebVTTFutureNode() const
{
return hasRareData() && elementRareData()->isWebVTTFutureNode();
}
void Element::setIsWebVTTFutureNode()
{
ensureElementRareData()->setIsWebVTTFutureNode();
}
#endif
......
......@@ -433,7 +433,9 @@ public:
#if ENABLE(VIDEO_TRACK)
bool isWebVTTNode() const;
void setIsWebVTTNode(bool flag);
void setIsWebVTTNode();
bool isWebVTTFutureNode() const;