<!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>[166180] 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/166180">166180</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-03-24 10:38:28 -0700 (Mon, 24 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge Minor WebVTT Cleanups from Blink
https://bugs.webkit.org/show_bug.cgi?id=130681

Reviewed by Eric Carlson.

Merged from Blink (patch by philipj@opera.com):
https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
http://crbug.com/52593009
https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
http://crbug.com/104243003

* html/track/TextTrack.cpp:
(WebCore::TextTrack::setMode):
* html/track/TextTrack.idl:
* html/track/TextTrackCue.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::VTTCue):
* html/track/VTTCue.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackcpp">trunk/Source/WebCore/html/track/TextTrack.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackidl">trunk/Source/WebCore/html/track/TextTrack.idl</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackCueh">trunk/Source/WebCore/html/track/TextTrackCue.h</a></li>
<li><a href="#trunkSourceWebCorehtmltrackVTTCuecpp">trunk/Source/WebCore/html/track/VTTCue.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackVTTCueh">trunk/Source/WebCore/html/track/VTTCue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/ChangeLog        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-03-24  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Merge Minor WebVTT Cleanups from Blink
+        https://bugs.webkit.org/show_bug.cgi?id=130681
+
+        Reviewed by Eric Carlson.
+
+        Merged from Blink (patch by philipj@opera.com):
+        https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
+        http://crbug.com/52593009
+        https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
+        http://crbug.com/104243003
+
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::setMode):
+        * html/track/TextTrack.idl:
+        * html/track/TextTrackCue.h:
+        * html/track/VTTCue.cpp:
+        (WebCore::VTTCue::VTTCue):
+        * html/track/VTTCue.h:
+
</ins><span class="cx"> 2014-03-24  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r166169.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrack.cpp        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -210,11 +210,10 @@
</span><span class="cx"> 
</span><span class="cx"> void TextTrack::setMode(const AtomicString&amp; mode)
</span><span class="cx"> {
</span><ins>+    ASSERT(mode == disabledKeyword() || mode == hiddenKeyword() || mode == showingKeyword());
+
</ins><span class="cx">     // On setting, if the new value isn't equal to what the attribute would currently
</span><span class="cx">     // return, the new value must be processed as follows ...
</span><del>-    if (mode != disabledKeyword() &amp;&amp; mode != hiddenKeyword() &amp;&amp; mode != showingKeyword())
-        return;
-
</del><span class="cx">     if (m_mode == mode)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrack.idl (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrack.idl        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/html/track/TextTrack.idl        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+enum TextTrackMode { &quot;disabled&quot;,  &quot;hidden&quot;,  &quot;showing&quot; };
+enum TextTrackKind { &quot;subtitles&quot;,  &quot;captions&quot;,  &quot;descriptions&quot;,  &quot;chapters&quot;, &quot;metadata&quot; };
+
</ins><span class="cx"> [
</span><span class="cx">     Conditional=VIDEO_TRACK,
</span><span class="cx">     EventTarget,
</span><span class="lines">@@ -31,19 +34,20 @@
</span><span class="cx">     SkipVTableValidation,
</span><span class="cx"> ] interface TextTrack {
</span><span class="cx">     readonly attribute DOMString id;
</span><del>-    [CustomSetter] attribute DOMString kind;
</del><ins>+    [CustomSetter] attribute TextTrackKind kind;
</ins><span class="cx">     readonly attribute DOMString label;
</span><span class="cx">     [CustomSetter] attribute DOMString language;
</span><span class="cx"> 
</span><del>-    attribute DOMString mode;
</del><ins>+    attribute TextTrackMode mode;
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute TextTrackCueList cues;
</span><span class="cx">     readonly attribute TextTrackCueList activeCues;
</span><del>-             attribute EventListener oncuechange;
</del><span class="cx"> 
</span><span class="cx">     [RaisesException] void addCue(TextTrackCue cue);
</span><span class="cx">     [RaisesException] void removeCue(TextTrackCue cue);
</span><span class="cx"> 
</span><ins>+             attribute EventListener oncuechange;
+
</ins><span class="cx"> #if defined(ENABLE_WEBVTT_REGIONS) &amp;&amp; ENABLE_WEBVTT_REGIONS
</span><span class="cx">     readonly attribute VTTRegionList regions;
</span><span class="cx">     void addRegion(VTTRegion region);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCue.h (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCue.h        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/html/track/TextTrackCue.h        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -120,8 +120,8 @@
</span><span class="cx"> 
</span><span class="cx">     ScriptExecutionContext&amp; m_scriptExecutionContext;
</span><span class="cx"> 
</span><del>-    bool m_isActive;
-    bool m_pauseOnExit;
</del><ins>+    bool m_isActive : 1;
+    bool m_pauseOnExit : 1;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.cpp        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -218,12 +218,12 @@
</span><span class="cx">     , m_cueSize(100)
</span><span class="cx">     , m_writingDirection(Horizontal)
</span><span class="cx">     , m_cueAlignment(Middle)
</span><del>-    , m_webVTTNodeTree(0)
-    , m_snapToLines(true)
</del><ins>+    , m_webVTTNodeTree(nullptr)
</ins><span class="cx">     , m_cueBackgroundBox(HTMLSpanElement::create(spanTag, toDocument(context)))
</span><del>-    , m_displayTreeShouldChange(true)
</del><span class="cx">     , m_displayDirection(CSSValueLtr)
</span><span class="cx">     , m_displaySize(0)
</span><ins>+    , m_snapToLines(true)
+    , m_displayTreeShouldChange(true)
</ins><span class="cx">     , m_notifyRegion(true)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.h (166179 => 166180)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.h        2014-03-24 17:37:54 UTC (rev 166179)
+++ trunk/Source/WebCore/html/track/VTTCue.h        2014-03-24 17:38:28 UTC (rev 166180)
</span><span class="lines">@@ -201,25 +201,21 @@
</span><span class="cx"> 
</span><span class="cx">     WritingDirection m_writingDirection;
</span><span class="cx">     CueAlignment m_cueAlignment;
</span><ins>+#if ENABLE(WEBVTT_REGIONS)
+    String m_regionId;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DocumentFragment&gt; m_webVTTNodeTree;
</span><del>-
-    bool m_snapToLines;
-
</del><span class="cx">     RefPtr&lt;HTMLSpanElement&gt; m_cueBackgroundBox;
</span><del>-
-    bool m_displayTreeShouldChange;
</del><span class="cx">     RefPtr&lt;VTTCueBox&gt; m_displayTree;
</span><span class="cx"> 
</span><span class="cx">     CSSValueID m_displayDirection;
</span><del>-
</del><span class="cx">     int m_displaySize;
</span><del>-
</del><span class="cx">     std::pair&lt;float, float&gt; m_displayPosition;
</span><del>-#if ENABLE(WEBVTT_REGIONS)
-    String m_regionId;
-#endif
-    bool m_notifyRegion;
</del><ins>+
+    bool m_snapToLines : 1;
+    bool m_displayTreeShouldChange : 1;
+    bool m_notifyRegion : 1;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> VTTCue* toVTTCue(TextTrackCue*);
</span></span></pre>
</div>
</div>

</body>
</html>