<!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>[171004] trunk</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/171004">171004</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-07-11 10:32:17 -0700 (Fri, 11 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use a separate backdrop element to allow cues to have highlight and background color
https://bugs.webkit.org/show_bug.cgi?id=134821
<rdar://problem/15999721>
Reviewed by Eric Carlson.
Source/WebCore:
Add a new <div> element wrapping the existing cue <span>. This allows
us to have a highlight on the cue (in the <span> background), as well
as an overall background color.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-text-track-display-backdrop): New markup for
the backdrop element of the caption.
* html/track/VTTCue.cpp:
(WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
allow user customization of the cue backdrop.
(WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
"m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
(WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
(WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
of the new m_cueBackdropBox element, and add m_cueBackdropBox to
the display tree.
* html/track/VTTCue.h:
(WebCore::VTTCue::element):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
Fix for missing caption style updates. Even if we are already
listening for caption changes, we still want to update the new
instance's style sheet to match.
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
<div> into consideration when looking for the Cue text element.
LayoutTests:
Updated tests for new formatting logic.
* platform/mac/media/track/track-cue-rendering-horizontal-expected.png:
* platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediatracktrackcuerenderinghorizontalexpectedpng">trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediatracktrackcuerenderinghorizontalexpectedtxt">trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsiOScss">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css</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>
<li><a href="#trunkSourceWebCorepageCaptionUserPreferencesMediaAFcpp">trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderVTTCuecpp">trunk/Source/WebCore/rendering/RenderVTTCue.cpp</a></li>
<li><a href="#trunkWebKitxcworkspacexcshareddataxcschemesAllSourcexcscheme">trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacmediatracktrackcuerenderinghorizontalexpectedpng">trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.png</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/LayoutTests/ChangeLog        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-07-11 Brent Fulgham <bfulgham@apple.com>
+
+ Use a separate backdrop element to allow cues to have highlight and background color
+ https://bugs.webkit.org/show_bug.cgi?id=134821
+ <rdar://problem/15999721>
+
+ Reviewed by Eric Carlson.
+
+ Updated tests for new formatting logic.
+
+ * platform/mac/media/track/track-cue-rendering-horizontal-expected.png:
+ * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:
+
</ins><span class="cx"> 2014-07-11 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Subpixel layout: return integral results for offset*, client*, scroll* by default.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediatracktrackcuerenderinghorizontalexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacmediatracktrackcuerenderinghorizontalexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -26,31 +26,37 @@
</span><span class="cx"> RenderBlock (relative positioned) {DIV} at (0,0) size 320x240 [color=#FFFFFF]
</span><span class="cx"> layer at (8,8) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,0) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 276x14 [bgcolor=#000000CC]
- RenderText {#text} at (22,0) size 276x14
- text run at (22,0) width 276: "Cue 1: should be positioned at the top of the video."
</del><ins>+ RenderBlock {DIV} at (22,0) size 276x14
+ RenderInline {SPAN} at (0,0) size 275x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 275x14
+ text run at (0,0) width 275: "Cue 1: should be positioned at the top of the video."
</ins><span class="cx"> layer at (8,22) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,14) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 304x14 [bgcolor=#000000CC]
- RenderText {#text} at (8,0) size 304x14
- text run at (8,0) width 304: "Cue 2: should be the second cue and not overlap cue 1."
</del><ins>+ RenderBlock {DIV} at (8,0) size 304x14
+ RenderInline {SPAN} at (0,0) size 303x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 303x14
+ text run at (0,0) width 303: "Cue 2: should be the second cue and not overlap cue 1."
</ins><span class="cx"> layer at (8,36) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,28) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 296x14 [bgcolor=#000000CC]
- RenderText {#text} at (12,0) size 296x14
- text run at (12,0) width 296: "Cue 3: should become the third line from top to bottom."
</del><ins>+ RenderBlock {DIV} at (12,0) size 296x14
+ RenderInline {SPAN} at (0,0) size 296x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 296x14
+ text run at (0,0) width 296: "Cue 3: should become the third line from top to bottom."
</ins><span class="cx"> layer at (8,78) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,70) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 288x14 [bgcolor=#000000CC]
- RenderText {#text} at (16,0) size 288x14
- text run at (16,0) width 288: "Cue 4: should be fixed positioned around the middle."
</del><ins>+ RenderBlock {DIV} at (16,0) size 288x14
+ RenderInline {SPAN} at (0,0) size 287x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 287x14
+ text run at (0,0) width 287: "Cue 4: should be fixed positioned around the middle."
</ins><span class="cx"> layer at (8,234) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,226) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 292x14 [bgcolor=#000000CC]
- RenderText {#text} at (14,0) size 292x14
- text run at (14,0) width 292: "Cue 5: should be displayed at the bottom of the video."
</del><ins>+ RenderBlock {DIV} at (14,0) size 292x14
+ RenderInline {SPAN} at (0,0) size 291x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 291x14
+ text run at (0,0) width 291: "Cue 5: should be displayed at the bottom of the video."
</ins><span class="cx"> layer at (8,220) size 320x14
</span><span class="cx"> RenderBlock (positioned) {DIV} at (0,212) size 320x14
</span><del>- RenderInline {SPAN} at (0,0) size 280x14 [bgcolor=#000000CC]
- RenderText {#text} at (20,0) size 280x14
- text run at (20,0) width 280: "Cue 6: should be on top of bottom positioned cue 5."
</del><ins>+ RenderBlock {DIV} at (20,0) size 280x14
+ RenderInline {SPAN} at (0,0) size 279x14 [bgcolor=#000000CC]
+ RenderText {#text} at (0,0) size 279x14
+ text run at (0,0) width 279: "Cue 6: should be on top of bottom positioned cue 5."
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/ChangeLog        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-07-10 Brent Fulgham <bfulgham@apple.com>
+
+ Use a separate backdrop element to allow cues to have highlight and background color
+ https://bugs.webkit.org/show_bug.cgi?id=134821
+ <rdar://problem/15999721>
+
+ Reviewed by Eric Carlson.
+
+ Add a new <div> element wrapping the existing cue <span>. This allows
+ us to have a highlight on the cue (in the <span> background), as well
+ as an overall background color.
+
+ * Modules/mediacontrols/mediaControlsApple.css:
+ (video::-webkit-media-text-track-display-backdrop): New markup for
+ the backdrop element of the caption.
+ * html/track/VTTCue.cpp:
+ (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
+ allow user customization of the cue backdrop.
+ (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
+ "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
+ (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
+ (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
+ of the new m_cueBackdropBox element, and add m_cueBackdropBox to
+ the display tree.
+ * html/track/VTTCue.h:
+ (WebCore::VTTCue::element):
+ * page/CaptionUserPreferencesMediaAF.cpp:
+ (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
+ Fix for missing caption style updates. Even if we are already
+ listening for caption changes, we still want to update the new
+ instance's style sheet to match.
+ (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
+ * rendering/RenderVTTCue.cpp:
+ (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
+ <div> into consideration when looking for the Cue text element.
+
</ins><span class="cx"> 2014-07-11 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Subpixel layout: return integral results for offset*, client*, scroll* by default.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -728,6 +728,10 @@
</span><span class="cx"> font: 22px sans-serif;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+video::-webkit-media-text-track-display-backdrop {
+ display: inline-block;
+}
+
</ins><span class="cx"> video::cue(:future) {
</span><span class="cx"> color: gray;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsiOScss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -380,6 +380,10 @@
</span><span class="cx"> font: 22px sans-serif;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+video::-webkit-media-text-track-display-backdrop {
+ display: inline-block;
+}
+
</ins><span class="cx"> video::cue(:future) {
</span><span class="cx"> color: gray;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.cpp        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -216,6 +216,12 @@
</span><span class="cx">
</span><span class="cx"> // ----------------------------
</span><span class="cx">
</span><ins>+const AtomicString& VTTCue::cueBackdropShadowPseudoId()
+{
+ DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, cueBackdropShadowPseudoId, ("-webkit-media-text-track-display-backdrop", AtomicString::ConstructFromLiteral));
+ return cueBackdropShadowPseudoId;
+}
+
</ins><span class="cx"> PassRefPtr<VTTCue> VTTCue::create(ScriptExecutionContext& context, double start, double end, const String& content)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new VTTCue(context, start, end, content));
</span><span class="lines">@@ -262,7 +268,8 @@
</span><span class="cx"> m_writingDirection = Horizontal;
</span><span class="cx"> m_cueAlignment = Middle;
</span><span class="cx"> m_webVTTNodeTree = nullptr;
</span><del>- m_cueBackgroundBox = HTMLSpanElement::create(spanTag, toDocument(context));
</del><ins>+ m_cueBackdropBox = HTMLDivElement::create(toDocument(context));
+ m_cueHighlightBox = HTMLSpanElement::create(spanTag, toDocument(context));
</ins><span class="cx"> m_displayDirection = CSSValueLtr;
</span><span class="cx"> m_displaySize = 0;
</span><span class="cx"> m_snapToLines = true;
</span><span class="lines">@@ -757,7 +764,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Clear the contents of the set.
</span><del>- m_cueBackgroundBox->removeChildren();
</del><ins>+ m_cueHighlightBox->removeChildren();
</ins><span class="cx">
</span><span class="cx"> // Update the two sets containing past and future WebVTT objects.
</span><span class="cx"> RefPtr<DocumentFragment> referenceTree = createCueRenderingTree();
</span><span class="lines">@@ -765,7 +772,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> markFutureAndPastNodes(referenceTree.get(), startTime(), movieTime);
</span><del>- m_cueBackgroundBox->appendChild(referenceTree);
</del><ins>+ m_cueHighlightBox->appendChild(referenceTree);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> VTTCueBox* VTTCue::getDisplayTree(const IntSize& videoSize)
</span><span class="lines">@@ -788,10 +795,13 @@
</span><span class="cx"> // 'display' property has the value 'inline'. This is the WebVTT cue
</span><span class="cx"> // background box.
</span><span class="cx">
</span><del>- // Note: This is contained by default in m_cueBackgroundBox.
- m_cueBackgroundBox->setPseudo(cueShadowPseudoId());
- displayTree->appendChild(m_cueBackgroundBox, ASSERT_NO_EXCEPTION);
</del><ins>+ // Note: This is contained by default in m_cueHighlightBox.
+ m_cueHighlightBox->setPseudo(cueShadowPseudoId());
</ins><span class="cx">
</span><ins>+ m_cueBackdropBox->setPseudo(cueBackdropShadowPseudoId());
+ m_cueBackdropBox->appendChild(m_cueHighlightBox, ASSERT_NO_EXCEPTION);
+ displayTree->appendChild(m_cueBackdropBox, ASSERT_NO_EXCEPTION);
+
</ins><span class="cx"> // FIXME(BUG 79916): Runs of children of WebVTT Ruby Objects that are not
</span><span class="cx"> // WebVTT Ruby Text Objects must be wrapped in anonymous boxes whose
</span><span class="cx"> // 'display' property has the value 'ruby-base'.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.h (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.h        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/html/track/VTTCue.h        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class DocumentFragment;
</span><ins>+class HTMLDivElement;
</ins><span class="cx"> class HTMLSpanElement;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx"> class VTTCue;
</span><span class="lines">@@ -74,6 +75,8 @@
</span><span class="cx"> static PassRefPtr<VTTCue> create(ScriptExecutionContext&, double start, double end, const String&);
</span><span class="cx"> static PassRefPtr<VTTCue> create(ScriptExecutionContext&, const WebVTTCueData&);
</span><span class="cx">
</span><ins>+ static const AtomicString& cueBackdropShadowPseudoId();
+
</ins><span class="cx"> virtual ~VTTCue();
</span><span class="cx">
</span><span class="cx"> const String& vertical() const;
</span><span class="lines">@@ -113,7 +116,7 @@
</span><span class="cx">
</span><span class="cx"> bool hasDisplayTree() const { return m_displayTree; }
</span><span class="cx"> VTTCueBox* getDisplayTree(const IntSize& videoSize);
</span><del>- HTMLSpanElement* element() const { return m_cueBackgroundBox.get(); }
</del><ins>+ HTMLSpanElement* element() const { return m_cueHighlightBox.get(); }
</ins><span class="cx">
</span><span class="cx"> void updateDisplayTree(double);
</span><span class="cx"> void removeDisplayTree();
</span><span class="lines">@@ -202,7 +205,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> RefPtr<DocumentFragment> m_webVTTNodeTree;
</span><del>- RefPtr<HTMLSpanElement> m_cueBackgroundBox;
</del><ins>+ RefPtr<HTMLSpanElement> m_cueHighlightBox;
+ RefPtr<HTMLDivElement> m_cueBackdropBox;
</ins><span class="cx"> RefPtr<VTTCueBox> m_displayTree;
</span><span class="cx">
</span><span class="cx"> CSSValueID m_displayDirection;
</span></span></pre></div>
<a id="trunkSourceWebCorepageCaptionUserPreferencesMediaAFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -234,8 +234,9 @@
</span><span class="cx"> if (!m_listeningForPreferenceChanges) {
</span><span class="cx"> m_listeningForPreferenceChanges = true;
</span><span class="cx"> CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, userCaptionPreferencesChangedNotificationCallback, kMAXCaptionAppearanceSettingsChangedNotification, 0, CFNotificationSuspensionBehaviorCoalesce);
</span><del>- updateCaptionStyleSheetOveride();
</del><span class="cx"> }
</span><ins>+
+ updateCaptionStyleSheetOveride();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CaptionUserPreferencesMediaAF::captionPreferencesChanged()
</span><span class="lines">@@ -540,13 +541,14 @@
</span><span class="cx"> String windowCornerRadius = windowRoundedCornerRadiusCSS();
</span><span class="cx"> if (!windowColor.isEmpty() || !windowCornerRadius.isEmpty()) {
</span><span class="cx"> captionsOverrideStyleSheet.append(" video::");
</span><del>- captionsOverrideStyleSheet.append(VTTCueBox::vttCueBoxShadowPseudoId());
</del><ins>+ captionsOverrideStyleSheet.append(VTTCue::cueBackdropShadowPseudoId());
</ins><span class="cx"> captionsOverrideStyleSheet.append('{');
</span><span class="cx">
</span><span class="cx"> if (!windowColor.isEmpty())
</span><span class="cx"> captionsOverrideStyleSheet.append(windowColor);
</span><del>- if (!windowCornerRadius.isEmpty())
</del><ins>+ if (!windowCornerRadius.isEmpty()) {
</ins><span class="cx"> captionsOverrideStyleSheet.append(windowCornerRadius);
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> captionsOverrideStyleSheet.append('}');
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderVTTCue.cpp (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderVTTCue.cpp        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/Source/WebCore/rendering/RenderVTTCue.cpp        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -74,7 +74,13 @@
</span><span class="cx"> ASSERT(firstChild());
</span><span class="cx">
</span><span class="cx"> RenderBlock* parentBlock = containingBlock();
</span><del>- firstLineBox = toRenderInline(firstChild())->firstLineBox();
</del><ins>+
+ // firstChild() returns the wrapping (backdrop) <div>. The cue object is
+ // the <div>'s first child.
+ RenderObject* firstChild = this->firstChild();
+ RenderElement* backdropElement = toRenderElement(firstChild);
+
+ firstLineBox = toRenderInline(backdropElement->firstChild())->firstLineBox();
</ins><span class="cx"> if (!firstLineBox)
</span><span class="cx"> firstLineBox = this->firstRootBox();
</span><span class="cx">
</span><span class="lines">@@ -334,7 +340,13 @@
</span><span class="cx"> void RenderVTTCue::repositionGenericCue()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(firstChild());
</span><del>- InlineFlowBox* firstLineBox = toRenderInline(firstChild())->firstLineBox();
</del><ins>+
+ // firstChild() returns the wrapping (backdrop) <div>. The cue object is
+ // the <div>'s first child.
+ RenderObject* firstChild = this->firstChild();
+ RenderElement* backdropElement = toRenderElement(firstChild);
+
+ InlineFlowBox* firstLineBox = toRenderInline(backdropElement->firstChild())->firstLineBox();
</ins><span class="cx"> if (static_cast<TextTrackCueGeneric*>(m_cue)->useDefaultPosition() && firstLineBox) {
</span><span class="cx"> LayoutUnit parentWidth = containingBlock()->logicalWidth();
</span><span class="cx"> LayoutUnit width = firstLineBox->width();
</span></span></pre></div>
<a id="trunkWebKitxcworkspacexcshareddataxcschemesAllSourcexcscheme"></a>
<div class="modfile"><h4>Modified: trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme (171003 => 171004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme        2014-07-11 17:15:31 UTC (rev 171003)
+++ trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme        2014-07-11 17:32:17 UTC (rev 171004)
</span><span class="lines">@@ -130,6 +130,15 @@
</span><span class="cx"> buildConfiguration = "Debug">
</span><span class="cx"> <Testables>
</span><span class="cx"> </Testables>
</span><ins>+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8D1107260486CEB800E47090"
+ BuildableName = "MiniBrowser.app"
+ BlueprintName = "MiniBrowser"
+ ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
</ins><span class="cx"> </TestAction>
</span><span class="cx"> <LaunchAction
</span><span class="cx"> selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
</span><span class="lines">@@ -140,9 +149,15 @@
</span><span class="cx"> ignoresPersistentStateOnLaunch = "YES"
</span><span class="cx"> debugDocumentVersioning = "YES"
</span><span class="cx"> allowLocationSimulation = "YES">
</span><del>- <PathRunnable
- FilePath = "/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment">
- </PathRunnable>
</del><ins>+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8D1107260486CEB800E47090"
+ BuildableName = "MiniBrowser.app"
+ BlueprintName = "MiniBrowser"
+ ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
</ins><span class="cx"> <AdditionalOptions>
</span><span class="cx"> </AdditionalOptions>
</span><span class="cx"> </LaunchAction>
</span></span></pre>
</div>
</div>
</body>
</html>