<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165765] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165765">165765</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-03-17 15:15:23 -0700 (Mon, 17 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebVTT] Extending WebVTT Rendering with Regions
https://bugs.webkit.org/show_bug.cgi?id=109822

Reviewed by Eric Carlson.

Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d

No new tests, as this feature is not active in default builds. New tests will be added
in an upcoming bug.

* css/mediaControls.css:
(video::-webkit-media-text-track-region):
(video::-webkit-media-text-track-region-container):
(video::-webkit-media-text-track-region-container.scrolling):
(video::-webkit-media-text-track-display):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::~TextTrack):
* html/track/TextTrackCue.cpp:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
(WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
(WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
(WebCore::TextTrackRegion::displayLastTextTrackCueBox):
(WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
(WebCore::TextTrackRegion::getDisplayTree):
(WebCore::TextTrackRegion::prepareRegionDisplayTree):
(WebCore::TextTrackRegion::startTimer):
(WebCore::TextTrackRegion::stopTimer):
(WebCore::TextTrackRegion::scrollTimerFired):
* html/track/TextTrackRegion.h:
(WebCore::TextTrackRegion::create):
(WebCore::TextTrackRegion::isScrollingRegion):
(WebCore::TextTrackRegion::ownerDocument):
* html/track/TextTrackRegion.idl:
* html/track/TextTrackRegionList.cpp:
(WebCore::TextTrackRegionList::getRegionById):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):
(WebCore::VTTCue::setIsActive):
(WebCore::VTTCue::removeDisplayTree):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::createNewRegion):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::layout):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssmediaControlscss">trunk/Source/WebCore/css/mediaControls.css</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlElementscpp">trunk/Source/WebCore/html/shadow/MediaControlElements.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackcpp">trunk/Source/WebCore/html/track/TextTrack.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackCuecpp">trunk/Source/WebCore/html/track/TextTrackCue.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackRegioncpp">trunk/Source/WebCore/html/track/TextTrackRegion.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackRegionh">trunk/Source/WebCore/html/track/TextTrackRegion.h</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackRegionidl">trunk/Source/WebCore/html/track/TextTrackRegion.idl</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackRegionListcpp">trunk/Source/WebCore/html/track/TextTrackRegionList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackVTTCuecpp">trunk/Source/WebCore/html/track/VTTCue.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackWebVTTParsercpp">trunk/Source/WebCore/html/track/WebVTTParser.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderVTTCuecpp">trunk/Source/WebCore/rendering/RenderVTTCue.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/ChangeLog        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-03-17  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [WebVTT] Extending WebVTT Rendering with Regions
+        https://bugs.webkit.org/show_bug.cgi?id=109822
+
+        Reviewed by Eric Carlson.
+
+        Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
+        https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d
+
+        No new tests, as this feature is not active in default builds. New tests will be added
+        in an upcoming bug.
+
+        * css/mediaControls.css:
+        (video::-webkit-media-text-track-region):
+        (video::-webkit-media-text-track-region-container):
+        (video::-webkit-media-text-track-region-container.scrolling):
+        (video::-webkit-media-text-track-display):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::~TextTrack):
+        * html/track/TextTrackCue.cpp:
+        * html/track/TextTrackRegion.cpp:
+        (WebCore::TextTrackRegion::TextTrackRegion):
+        (WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
+        (WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
+        (WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
+        (WebCore::TextTrackRegion::appendTextTrackCueBox):
+        (WebCore::TextTrackRegion::displayLastTextTrackCueBox):
+        (WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
+        (WebCore::TextTrackRegion::getDisplayTree):
+        (WebCore::TextTrackRegion::prepareRegionDisplayTree):
+        (WebCore::TextTrackRegion::startTimer):
+        (WebCore::TextTrackRegion::stopTimer):
+        (WebCore::TextTrackRegion::scrollTimerFired):
+        * html/track/TextTrackRegion.h:
+        (WebCore::TextTrackRegion::create):
+        (WebCore::TextTrackRegion::isScrollingRegion):
+        (WebCore::TextTrackRegion::ownerDocument):
+        * html/track/TextTrackRegion.idl:
+        * html/track/TextTrackRegionList.cpp:
+        (WebCore::TextTrackRegionList::getRegionById):
+        * html/track/VTTCue.cpp:
+        (WebCore::VTTCueBox::applyCSSProperties):
+        (WebCore::VTTCue::~VTTCue):
+        (WebCore::VTTCue::setIsActive):
+        (WebCore::VTTCue::removeDisplayTree):
+        * html/track/WebVTTParser.cpp:
+        (WebCore::WebVTTParser::createNewRegion):
+        * rendering/RenderVTTCue.cpp:
+        (WebCore::RenderVTTCue::layout):
+
</ins><span class="cx"> 2014-03-17  Brendan Long  &lt;b.long@cablelabs.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GStreamer] human readable language code for tracks
</span></span></pre></div>
<a id="trunkSourceWebCorecssmediaControlscss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/mediaControls.css (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/mediaControls.css        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/css/mediaControls.css        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2009, 2010, 2011 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2009, 2010, 2011, 2013, 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -244,12 +244,36 @@
</span><span class="cx">     background-color: rgba(0, 0, 0, 0.8);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+video::-webkit-media-text-track-region {
+    position: absolute;
+    line-height: 5.33vh;
+    writing-mode: horizontal-tb;
+    background: rgba(0, 0, 0, 0.8);
+    color: rgba(255, 255, 255, 1);
+    word-wrap: break-word;
+    overflow-wrap: break-word;
+    overflow: hidden;
+}
+
+video::-webkit-media-text-track-region-container {
+    position: relative;
+
+    display: -webkit-flex;
+    -webkit-flex-flow: column;
+    -webkit-flex-direction: column;
+}
+
+video::-webkit-media-text-track-region-container.scrolling {
+    -webkit-transition: top 433ms linear;
+}
+
</ins><span class="cx"> video::-webkit-media-text-track-display {
</span><span class="cx">     position: absolute;
</span><span class="cx">     overflow: hidden;
</span><span class="cx">     white-space: pre-wrap;
</span><span class="cx">     -webkit-box-sizing: border-box;
</span><span class="cx">     font: 22px sans-serif;
</span><ins>+    -webkit-flex: 0 0 auto;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> video::cue(:future) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -59,6 +59,10 @@
</span><span class="cx"> #include &quot;RenderWidget.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+#include &quot;TextTrackRegionList.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="lines">@@ -1292,11 +1296,34 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;VTTCueBox&gt; displayBox = cue-&gt;getDisplayTree(m_videoDisplaySize.size());
</span><del>-        if (displayBox-&gt;hasChildNodes() &amp;&amp; !contains(displayBox.get())) {
-            // Note: the display tree of a cue is removed when the active flag of the cue is unset.
-            appendChild(displayBox, ASSERT_NO_EXCEPTION);
-            cue-&gt;setFontSize(m_fontSize, m_videoDisplaySize.size(), m_fontSizeIsImportant);
</del><ins>+#if ENABLE(WEBVTT_REGIONS)
+        if (cue-&gt;track()-&gt;mode() == TextTrack::disabledKeyword())
+            continue;
+
+        TextTrackRegion* region = cue-&gt;track()-&gt;regions()-&gt;getRegionById(cue-&gt;regionId());
+        if (!region) {
+            // If cue has an empty text track cue region identifier or there is no
+            // WebVTT region whose region identifier is identical to cue's text
+            // track cue region identifier, run the following substeps:
+#endif
+            if (displayBox-&gt;hasChildNodes() &amp;&amp; !contains(displayBox.get())) {
+                // Note: the display tree of a cue is removed when the active flag of the cue is unset.
+                appendChild(displayBox, ASSERT_NO_EXCEPTION);
+                cue-&gt;setFontSize(m_fontSize, m_videoDisplaySize.size(), m_fontSizeIsImportant);
+            }
+#if ENABLE(WEBVTT_REGIONS)
+        } else {
+            // Let region be the WebVTT region whose region identifier
+            // matches the text track cue region identifier of cue.
+            RefPtr&lt;HTMLDivElement&gt; regionNode = region-&gt;getDisplayTree();
+
+            // Append the region to the viewport, if it was not already.
+            if (!contains(regionNode.get()))
+                appendChild(region-&gt;getDisplayTree());
+
+            region-&gt;appendTextTrackCueBox(displayBox);
</ins><span class="cx">         }
</span><ins>+#endif
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 11. Return output.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrack.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2013 Google Inc.  All rights reserved.
</ins><span class="cx">  * Copyright (C) 2011-2014 Apple Inc.  All rights reserved.
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -139,8 +139,10 @@
</span><span class="cx">         for (size_t i = 0; i &lt; m_cues-&gt;length(); ++i)
</span><span class="cx">             m_cues-&gt;item(i)-&gt;setTrack(0);
</span><span class="cx"> #if ENABLE(WEBVTT_REGIONS)
</span><del>-        for (size_t i = 0; i &lt; m_regions-&gt;length(); ++i)
-            m_regions-&gt;item(i)-&gt;setTrack(0);
</del><ins>+        if (m_regions) {
+            for (size_t i = 0; i &lt; m_regions-&gt;length(); ++i)
+                m_regions-&gt;item(i)-&gt;setTrack(0);
+        }
</ins><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx">     clearClient();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCue.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCue.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrackCue.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Google Inc.  All rights reserved.
- * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2013 Google Inc.  All rights reserved.
+ * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -50,6 +50,10 @@
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+#include &quot;TextTrackRegionList.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static const int invalidCueIndex = -1;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackRegioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackRegion.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackRegion.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrackRegion.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 Google Inc.  All rights reserved.
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -34,13 +35,20 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;TextTrackRegion.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;ClientRect.h&quot;
+#include &quot;DOMTokenList.h&quot;
</ins><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><ins>+#include &quot;HTMLDivElement.h&quot;
</ins><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;VTTCue.h&quot;
</ins><span class="cx"> #include &quot;WebVTTParser.h&quot;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+// The following values default values are defined within the WebVTT Regions Spec.
+// https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html
+
</ins><span class="cx"> // The region occupies by default 100% of the width of the video viewport.
</span><span class="cx"> static const float defaultWidth = 100;
</span><span class="cx"> 
</span><span class="lines">@@ -54,14 +62,25 @@
</span><span class="cx"> // The region doesn't have scrolling text, by default.
</span><span class="cx"> static const bool defaultScroll = false;
</span><span class="cx"> 
</span><del>-TextTrackRegion::TextTrackRegion()
-    : m_id(emptyString())
</del><ins>+// Default region line-height (vh units)
+static const float lineHeight = 5.33;
+
+// Default scrolling animation time period (s).
+static const float scrollTime = 0.433;
+
+TextTrackRegion::TextTrackRegion(ScriptExecutionContext&amp; context)
+    : ContextDestructionObserver(&amp;context)
+    , m_id(emptyString())
</ins><span class="cx">     , m_width(defaultWidth)
</span><span class="cx">     , m_heightInLines(defaultHeightInLines)
</span><span class="cx">     , m_regionAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY))
</span><span class="cx">     , m_viewportAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY))
</span><span class="cx">     , m_scroll(defaultScroll)
</span><del>-    , m_track(0)
</del><ins>+    , m_regionDisplayTree(nullptr)
+    , m_cueContainer(nullptr)
+    , m_track(nullptr)
+    , m_currentTop(0)
+    , m_scrollTimer(this, &amp;TextTrackRegion::scrollTimerFired)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -309,7 +328,165 @@
</span><span class="cx"> 
</span><span class="cx">     parseSettingValue(name, value);
</span><span class="cx"> }
</span><ins>+    
+const AtomicString&amp; TextTrackRegion::textTrackCueContainerScrollingClass()
+{
+    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, trackRegionCueContainerScrollingClass, (&quot;scrolling&quot;, AtomicString::ConstructFromLiteral));
</ins><span class="cx"> 
</span><ins>+    return trackRegionCueContainerScrollingClass;
+}
+
+const AtomicString&amp; TextTrackRegion::textTrackCueContainerShadowPseudoId()
+{
+    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, trackRegionCueContainerPseudoId,
+        (&quot;-webkit-media-text-track-region-container&quot;, AtomicString::ConstructFromLiteral));
+
+    return trackRegionCueContainerPseudoId;
+}
+
+const AtomicString&amp; TextTrackRegion::textTrackRegionShadowPseudoId()
+{
+    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, trackRegionShadowPseudoId,
+        (&quot;-webkit-media-text-track-region&quot;, AtomicString::ConstructFromLiteral));
+
+    return trackRegionShadowPseudoId;
+}
+
+void TextTrackRegion::appendTextTrackCueBox(PassRefPtr&lt;VTTCueBox&gt; displayBox)
+{
+    if (m_cueContainer-&gt;contains(displayBox.get()))
+        return;
+
+    m_cueContainer-&gt;appendChild(displayBox, ASSERT_NO_EXCEPTION);
+    displayLastTextTrackCueBox();
+}
+
+void TextTrackRegion::displayLastTextTrackCueBox()
+{
+    ASSERT(m_cueContainer);
+
+    // The container needs to be rendered, if it is not empty and the region is not currently scrolling.
+    if (!m_cueContainer-&gt;renderer() || !m_cueContainer-&gt;childNodeCount() || m_scrollTimer.isActive())
+        return;
+
+    // If it's a scrolling region, add the scrolling class.
+    if (isScrollingRegion())
+        m_cueContainer-&gt;classList()-&gt;add(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
+
+    float regionBottom = m_regionDisplayTree-&gt;getBoundingClientRect()-&gt;bottom();
+
+    // Find first cue that is not entirely displayed and scroll it upwards.
+    for (size_t i = 0; i &lt; m_cueContainer-&gt;childNodeCount() &amp;&amp; !m_scrollTimer.isActive(); ++i) {
+        float childTop = static_cast&lt;HTMLDivElement*&gt;(m_cueContainer-&gt;childNode(i))-&gt;getBoundingClientRect()-&gt;top();
+        float childBottom = static_cast&lt;HTMLDivElement*&gt;(m_cueContainer-&gt;childNode(i))-&gt;getBoundingClientRect()-&gt;bottom();
+
+        if (regionBottom &gt;= childBottom)
+            continue;
+
+        float height = childBottom - childTop;
+
+        m_currentTop -= std::min(height, childBottom - regionBottom);
+        m_cueContainer-&gt;setInlineStyleProperty(CSSPropertyTop, m_currentTop, CSSPrimitiveValue::CSS_PX);
+
+        startTimer();
+    }
+}
+
+void TextTrackRegion::willRemoveTextTrackCueBox(VTTCueBox* box)
+{
+    LOG(Media, &quot;TextTrackRegion::willRemoveTextTrackCueBox&quot;);
+    ASSERT(m_cueContainer-&gt;contains(box));
+
+    double boxHeight = box-&gt;getBoundingClientRect()-&gt;bottom() - box-&gt;getBoundingClientRect()-&gt;top();
+
+    m_cueContainer-&gt;classList()-&gt;remove(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
+
+    m_currentTop += boxHeight;
+    m_cueContainer-&gt;setInlineStyleProperty(CSSPropertyTop, m_currentTop, CSSPrimitiveValue::CSS_PX);
+}
+
+PassRefPtr&lt;HTMLDivElement&gt; TextTrackRegion::getDisplayTree()
+{
+    if (!m_regionDisplayTree) {
+        m_regionDisplayTree = HTMLDivElement::create(*ownerDocument());
+        prepareRegionDisplayTree();
+    }
+
+    return m_regionDisplayTree;
+}
+
+void TextTrackRegion::prepareRegionDisplayTree()
+{
+    ASSERT(m_regionDisplayTree);
+
+    // 7.2 Prepare region CSS boxes
+
+    // FIXME: Change the code below to use viewport units when
+    // http://crbug/244618 is fixed.
+
+    // Let regionWidth be the text track region width.
+    // Let width be 'regionWidth vw' ('vw' is a CSS unit)
+    m_regionDisplayTree-&gt;setInlineStyleProperty(CSSPropertyWidth, m_width, CSSPrimitiveValue::CSS_PERCENTAGE);
+
+    // Let lineHeight be '0.0533vh' ('vh' is a CSS unit) and regionHeight be
+    // the text track region height. Let height be 'lineHeight' multiplied
+    // by regionHeight.
+    double height = lineHeight * m_heightInLines;
+    m_regionDisplayTree-&gt;setInlineStyleProperty(CSSPropertyHeight, height, CSSPrimitiveValue::CSS_VH);
+
+    // Let viewportAnchorX be the x dimension of the text track region viewport
+    // anchor and regionAnchorX be the x dimension of the text track region
+    // anchor. Let leftOffset be regionAnchorX multiplied by width divided by
+    // 100.0. Let left be leftOffset subtracted from 'viewportAnchorX vw'.
+    double leftOffset = m_regionAnchor.x() * m_width / 100;
+    m_regionDisplayTree-&gt;setInlineStyleProperty(CSSPropertyLeft, m_viewportAnchor.x() - leftOffset, CSSPrimitiveValue::CSS_PERCENTAGE);
+
+    // Let viewportAnchorY be the y dimension of the text track region viewport
+    // anchor and regionAnchorY be the y dimension of the text track region
+    // anchor. Let topOffset be regionAnchorY multiplied by height divided by
+    // 100.0. Let top be topOffset subtracted from 'viewportAnchorY vh'.
+    double topOffset = m_regionAnchor.y() * height / 100;
+    m_regionDisplayTree-&gt;setInlineStyleProperty(CSSPropertyTop, m_viewportAnchor.y() - topOffset, CSSPrimitiveValue::CSS_PERCENTAGE);
+
+    // The cue container is used to wrap the cues and it is the object which is
+    // gradually scrolled out as multiple cues are appended to the region.
+    m_cueContainer = HTMLDivElement::create(*ownerDocument());
+    m_cueContainer-&gt;setInlineStyleProperty(CSSPropertyTop, 0.0f, CSSPrimitiveValue::CSS_PX);
+
+    m_cueContainer-&gt;setPseudo(textTrackCueContainerShadowPseudoId());
+    m_regionDisplayTree-&gt;appendChild(m_cueContainer);
+
+    // 7.5 Every WebVTT region object is initialised with the following CSS
+    m_regionDisplayTree-&gt;setPseudo(textTrackRegionShadowPseudoId());
+}
+
+void TextTrackRegion::startTimer()
+{
+    LOG(Media, &quot;TextTrackRegion::startTimer&quot;);
+
+    if (m_scrollTimer.isActive())
+        return;
+
+    double duration = isScrollingRegion() ? scrollTime : 0;
+    m_scrollTimer.startOneShot(duration);
+}
+
+void TextTrackRegion::stopTimer()
+{
+    LOG(Media, &quot;TextTrackRegion::stopTimer&quot;);
+
+    if (m_scrollTimer.isActive())
+        m_scrollTimer.stop();
+}
+
+void TextTrackRegion::scrollTimerFired(Timer&lt;TextTrackRegion&gt;*)
+{
+    LOG(Media, &quot;TextTrackRegion::scrollTimerFired&quot;);
+
+    stopTimer();
+    displayLastTextTrackCueBox();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackRegionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackRegion.h (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackRegion.h        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrackRegion.h        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 Google Inc.  All rights reserved.
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -33,17 +34,22 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK) &amp;&amp; ENABLE(WEBVTT_REGIONS)
</span><span class="cx"> 
</span><ins>+#include &quot;ContextDestructionObserver.h&quot;
+#include &quot;Document.h&quot;
</ins><span class="cx"> #include &quot;FloatPoint.h&quot;
</span><span class="cx"> #include &quot;TextTrack.h&quot;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class TextTrackRegion : public RefCounted&lt;TextTrackRegion&gt; {
</del><ins>+class HTMLDivElement;
+class VTTCueBox;
+
+class TextTrackRegion : public RefCounted&lt;TextTrackRegion&gt;, public ContextDestructionObserver {
</ins><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;TextTrackRegion&gt; create()
</del><ins>+    static PassRefPtr&lt;TextTrackRegion&gt; create(ScriptExecutionContext&amp; context)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new TextTrackRegion());
</del><ins>+        return adoptRef(new TextTrackRegion(context));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual ~TextTrackRegion();
</span><span class="lines">@@ -80,9 +86,26 @@
</span><span class="cx">     const String&amp; regionSettings() const { return m_settings; }
</span><span class="cx">     void setRegionSettings(const String&amp;);
</span><span class="cx"> 
</span><ins>+    bool isScrollingRegion() { return m_scroll; }
+
+    PassRefPtr&lt;HTMLDivElement&gt; getDisplayTree();
+    
+    void appendTextTrackCueBox(PassRefPtr&lt;VTTCueBox&gt;);
+    void displayLastTextTrackCueBox();
+    void willRemoveTextTrackCueBox(VTTCueBox*);
+
</ins><span class="cx"> private:
</span><del>-    TextTrackRegion();
</del><ins>+    TextTrackRegion(ScriptExecutionContext&amp;);
</ins><span class="cx"> 
</span><ins>+    Document* ownerDocument() { return toDocument(m_scriptExecutionContext); }
+
+    void prepareRegionDisplayTree();
+
+    // The timer is needed to continue processing when cue scrolling ended.
+    void startTimer();
+    void stopTimer();
+    void scrollTimerFired(Timer&lt;TextTrackRegion&gt;*);
+
</ins><span class="cx">     enum RegionSetting {
</span><span class="cx">         None,
</span><span class="cx">         Id,
</span><span class="lines">@@ -98,6 +121,10 @@
</span><span class="cx">     void parseSettingValue(RegionSetting, const String&amp;);
</span><span class="cx">     void parseSetting(const String&amp;, unsigned*);
</span><span class="cx"> 
</span><ins>+    static const AtomicString&amp; textTrackCueContainerShadowPseudoId();
+    static const AtomicString&amp; textTrackCueContainerScrollingClass();
+    static const AtomicString&amp; textTrackRegionShadowPseudoId();
+
</ins><span class="cx">     String m_id;
</span><span class="cx">     String m_settings;
</span><span class="cx"> 
</span><span class="lines">@@ -109,11 +136,27 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_scroll;
</span><span class="cx"> 
</span><ins>+    RefPtr&lt;HTMLDivElement&gt; m_regionDisplayTree;
+
+    // The cue container is the container that is scrolled up to obtain the
+    // effect of scrolling cues when this is enabled for the regions.
+    RefPtr&lt;HTMLDivElement&gt; m_cueContainer;
+
</ins><span class="cx">     // The member variable track can be a raw pointer as it will never
</span><span class="cx">     // reference a destroyed TextTrack, as this member variable
</span><span class="cx">     // is cleared in the TextTrack destructor and it is generally
</span><span class="cx">     // set/reset within the addRegion and removeRegion methods.
</span><span class="cx">     TextTrack* m_track;
</span><ins>+
+    // Keep track of the current numeric value of the css &quot;top&quot; property.
+    double m_currentTop;
+
+    // The timer is used to display the next cue line after the current one has
+    // been displayed. It's main use is for scrolling regions and it triggers as
+    // soon as the animation for rolling out one line has finished, but
+    // currently it is used also for non-scrolling regions to use a single
+    // code path.
+    Timer&lt;TextTrackRegion&gt; m_scrollTimer;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackRegionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackRegion.idl (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackRegion.idl        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrackRegion.idl        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 Google Inc.  All rights reserved.
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,7 +27,8 @@
</span><span class="cx"> [
</span><span class="cx">     Conditional=VIDEO_TRACK &amp; WEBVTT_REGIONS,
</span><span class="cx">     JSGenerateToNativeObject,
</span><del>-    Constructor()
</del><ins>+    Constructor(),
+    ConstructorCallWith=ScriptExecutionContext
</ins><span class="cx"> ] interface TextTrackRegion {
</span><span class="cx">     readonly attribute TextTrack track;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackRegionListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackRegionList.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackRegionList.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/TextTrackRegionList.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -50,10 +51,14 @@
</span><span class="cx"> 
</span><span class="cx"> TextTrackRegion* TextTrackRegionList::getRegionById(const String&amp; id) const
</span><span class="cx"> {
</span><del>-    for (size_t i = 0; i &lt; m_list.size(); ++i) {
-        if (m_list[i]-&gt;id() == id)
-            return m_list[i].get();
</del><ins>+    if (id.isEmpty())
+        return 0;
+
+    for (const auto&amp; region : m_list) {
+        if (region-&gt;id() == id)
+            return region.get();
</ins><span class="cx">     }
</span><ins>+
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -51,6 +51,10 @@
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+#include &quot;TextTrackRegionList.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static const int undefinedPosition = -1;
</span><span class="lines">@@ -107,6 +111,12 @@
</span><span class="cx"> void VTTCueBox::applyCSSProperties(const IntSize&amp;)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Apply all the initial CSS positioning properties. http://wkb.ug/79916
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+    if (!m_cue-&gt;regionId().isEmpty()) {
+        setInlineStyleProperty(CSSPropertyPosition, CSSValueRelative);
+        return;
+    }
+#endif
</ins><span class="cx"> 
</span><span class="cx">     // 3.5.1 On the (root) List of WebVTT Node Objects:
</span><span class="cx"> 
</span><span class="lines">@@ -210,7 +220,10 @@
</span><span class="cx"> 
</span><span class="cx"> VTTCue::~VTTCue()
</span><span class="cx"> {
</span><del>-    removeDisplayTree();
</del><ins>+    if (!hasDisplayTree())
+        return;
+
+    displayTreeInternal()-&gt;remove(ASSERT_NO_EXCEPTION);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;VTTCueBox&gt; VTTCue::createDisplayTree()
</span><span class="lines">@@ -458,7 +471,7 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         // Remove the display tree as soon as the cue becomes inactive.
</span><del>-        displayTreeInternal()-&gt;remove(ASSERT_NO_EXCEPTION);
</del><ins>+        removeDisplayTree();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -732,6 +745,16 @@
</span><span class="cx"> 
</span><span class="cx"> void VTTCue::removeDisplayTree()
</span><span class="cx"> {
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+    // The region needs to be informed about the cue removal.
+    if (track()) {
+        if (TextTrackRegionList* regions = track()-&gt;regions()) {
+            if (TextTrackRegion* region = regions-&gt;getRegionById(m_regionId))
+                region-&gt;willRemoveTextTrackCueBox(m_displayTree.get());
+        }
+    }
+#endif
+
</ins><span class="cx">     if (!hasDisplayTree())
</span><span class="cx">         return;
</span><span class="cx">     displayTreeInternal()-&gt;remove(ASSERT_NO_EXCEPTION);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackWebVTTParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/WebVTTParser.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/WebVTTParser.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/html/track/WebVTTParser.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2011, 2013 Google Inc.  All rights reserved.
</span><span class="cx">  * Copyright (C) 2013 Cable Television Labs, Inc.
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -398,7 +399,7 @@
</span><span class="cx">     if (!m_currentHeaderValue.length())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;TextTrackRegion&gt; region = TextTrackRegion::create();
</del><ins>+    RefPtr&lt;TextTrackRegion&gt; region = TextTrackRegion::create(*m_scriptExecutionContext);
</ins><span class="cx">     region-&gt;setRegionSettings(m_currentHeaderValue);
</span><span class="cx"> 
</span><span class="cx">     // 15.5.10 If the text track list of regions regions contains a region
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderVTTCue.cpp (165764 => 165765)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderVTTCue.cpp        2014-03-17 22:14:35 UTC (rev 165764)
+++ trunk/Source/WebCore/rendering/RenderVTTCue.cpp        2014-03-17 22:15:23 UTC (rev 165765)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2012 Victor Carbune (victor@rosedu.org)
</span><ins>+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -46,6 +47,15 @@
</span><span class="cx">     StackStats::LayoutCheckPoint layoutCheckPoint;
</span><span class="cx">     RenderBlockFlow::layout();
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+    // If WebVTT Regions are used, the regular WebVTT layout algorithm is no
+    // longer necessary, since cues having the region parameter set do not have
+    // any positioning parameters. Also, in this case, the regions themselves
+    // have positioning information.
+    if (!m_cue-&gt;regionId().isEmpty())
+        return;
+#endif
+
</ins><span class="cx">     LayoutStateMaintainer statePusher(view(), *this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
</span><span class="cx">     
</span><span class="cx">     if (m_cue-&gt;cueType()== TextTrackCue::WebVTT) {
</span></span></pre>
</div>
</div>

</body>
</html>