<!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>[169440] 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/169440">169440</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-05-28 20:22:12 -0700 (Wed, 28 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Captions during HLS playback flash/are difficult to readily
https://bugs.webkit.org/show_bug.cgi?id=133365
<rdar://problem/16584132>
Reviewed by Eric Carlson.
Correct two problems:
1. Add new logic to handle cues that are identical to existing cues, except
that they cover a slightly later moment in playback. For example, a cue
encoding device might emit a cue at 24 fps, with many of the cues containing
the same content but covering only 1/24th of a second.
Rather than hiding and displaying our cues at the cue encoding rate, we should
simply continue to display the same cue as long as the content is unchanged.
2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
VTTCue isEqual logic. This was done to avoid a false failure due to the cue
type being 'generic' rather than 'vtt', but incorrectly treated cues with
non-matching text as equal.
* html/track/DataCue.cpp:
(WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
doesn't check that the 'type' of the cue is identical.
(WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
(WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
* html/track/DataCue.h:
* html/track/TextTrack.cpp:
(WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
of an existing cue.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
that used to live in 'isEqual'.
(WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
(WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
end times.
* html/track/TextTrackCue.h:
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
code that used to live in 'isEqual'.
(WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
(WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
end times.
* html/track/TextTrackCueGeneric.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
used to live in 'isEqual'.
(WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
(WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
* html/track/VTTCue.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmltrackDataCuecpp">trunk/Source/WebCore/html/track/DataCue.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackDataCueh">trunk/Source/WebCore/html/track/DataCue.h</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="#trunkSourceWebCorehtmltrackTextTrackCueh">trunk/Source/WebCore/html/track/TextTrackCue.h</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackCueGenericcpp">trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackCueGenerich">trunk/Source/WebCore/html/track/TextTrackCueGeneric.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 (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/ChangeLog        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2014-05-28 Brent Fulgham <bfulgham@apple.com>
+
+ Captions during HLS playback flash/are difficult to readily
+ https://bugs.webkit.org/show_bug.cgi?id=133365
+ <rdar://problem/16584132>
+
+ Reviewed by Eric Carlson.
+
+ Correct two problems:
+ 1. Add new logic to handle cues that are identical to existing cues, except
+ that they cover a slightly later moment in playback. For example, a cue
+ encoding device might emit a cue at 24 fps, with many of the cues containing
+ the same content but covering only 1/24th of a second.
+
+ Rather than hiding and displaying our cues at the cue encoding rate, we should
+ simply continue to display the same cue as long as the content is unchanged.
+ 2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
+ VTTCue isEqual logic. This was done to avoid a false failure due to the cue
+ type being 'generic' rather than 'vtt', but incorrectly treated cues with
+ non-matching text as equal.
+
+ * html/track/DataCue.cpp:
+ (WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
+ doesn't check that the 'type' of the cue is identical.
+ (WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
+ (WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
+ * html/track/DataCue.h:
+ * html/track/TextTrack.cpp:
+ (WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
+ of an existing cue.
+ * html/track/TextTrackCue.cpp:
+ (WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
+ that used to live in 'isEqual'.
+ (WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
+ (WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
+ end times.
+ * html/track/TextTrackCue.h:
+ * html/track/TextTrackCueGeneric.cpp:
+ (WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
+ code that used to live in 'isEqual'.
+ (WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
+ (WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
+ end times.
+ * html/track/TextTrackCueGeneric.h:
+ * html/track/VTTCue.cpp:
+ (WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
+ used to live in 'isEqual'.
+ (WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
+ (WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
+ * html/track/VTTCue.h:
+
</ins><span class="cx"> 2014-05-28 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Whoops, update bindings tests results.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackDataCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/DataCue.cpp (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/DataCue.cpp        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/DataCue.cpp        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -121,11 +121,8 @@
</span><span class="cx"> return static_cast<const DataCue*>(cue);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool DataCue::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
</del><ins>+bool DataCue::cueContentsMatch(const TextTrackCue& cue) const
</ins><span class="cx"> {
</span><del>- if (!TextTrackCue::isEqual(cue, match))
- return false;
-
</del><span class="cx"> if (cue.cueType() != TextTrackCue::Data)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -156,6 +153,25 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool DataCue::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
+{
+ if (!TextTrackCue::isEqual(cue, match))
+ return false;
+
+ if (cue.cueType() != TextTrackCue::Data)
+ return false;
+
+ return cueContentsMatch(cue);
+}
+
+bool DataCue::doesExtendCue(const TextTrackCue& cue) const
+{
+ if (!cueContentsMatch(cue))
+ return false;
+
+ return TextTrackCue::doesExtendCue(cue);
+}
+
</ins><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx"> JSC::JSValue DataCue::value(JSC::ExecState* exec) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackDataCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/DataCue.h (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/DataCue.h        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/DataCue.h        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -90,6 +90,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> virtual bool isEqual(const TextTrackCue&, CueMatchRules) const override;
</span><ins>+ virtual bool cueContentsMatch(const TextTrackCue&) const override;
+ virtual bool doesExtendCue(const TextTrackCue&) const override;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> DataCue(ScriptExecutionContext&, double start, double end, ArrayBuffer*, const String&, ExceptionCode&);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrack.cpp        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -519,13 +519,19 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> existingCue = m_cues->item(searchStart - 1);
</span><del>- if (!existingCue || cue->startTime() > (existingCue->startTime() + startTimeVariance()))
</del><ins>+ if (!existingCue)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!existingCue->isEqual(*cue, match))
- continue;
-
- return true;
</del><ins>+ if (existingCue->doesExtendCue(*cue)) {
+ existingCue->setEndTime(cue->endTime(), IGNORE_EXCEPTION);
+ return true;
+ }
+
+ if (cue->startTime() > (existingCue->startTime() + startTimeVariance()))
+ return false;
+
+ if (existingCue->isEqual(*cue, match))
+ return true;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCue.cpp (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCue.cpp        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/TextTrackCue.cpp        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -202,6 +202,17 @@
</span><span class="cx"> return startTime() < other->startTime() || (startTime() == other->startTime() && endTime() > other->endTime());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool TextTrackCue::cueContentsMatch(const TextTrackCue& cue) const
+{
+ if (cueType() != cue.cueType())
+ return false;
+
+ if (id() != cue.id())
+ return false;
+
+ return true;
+}
+
</ins><span class="cx"> bool TextTrackCue::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
</span><span class="cx"> {
</span><span class="cx"> if (cueType() != cue.cueType())
</span><span class="lines">@@ -211,7 +222,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!hasEquivalentStartTime(cue))
</span><span class="cx"> return false;
</span><del>- if (id() != cue.id())
</del><ins>+ if (!cueContentsMatch(cue))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -228,6 +239,17 @@
</span><span class="cx"> return std::abs(std::abs(startTime()) - std::abs(cue.startTime())) <= startTimeVariance;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool TextTrackCue::doesExtendCue(const TextTrackCue& cue) const
+{
+ if (!cueContentsMatch(cue))
+ return false;
+
+ if (endTime() != cue.startTime())
+ return false;
+
+ return true;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCue.h (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCue.h        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/TextTrackCue.h        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -98,6 +98,8 @@
</span><span class="cx"> IgnoreDuration,
</span><span class="cx"> };
</span><span class="cx"> virtual bool isEqual(const TextTrackCue&, CueMatchRules) const;
</span><ins>+ virtual bool cueContentsMatch(const TextTrackCue&) const;
+ virtual bool doesExtendCue(const TextTrackCue&) const;
</ins><span class="cx">
</span><span class="cx"> void willChange();
</span><span class="cx"> virtual void didChange();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCueGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 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">@@ -150,17 +150,14 @@
</span><span class="cx">
</span><span class="cx"> LOG(Media, "TextTrackCueGeneric::setFontSize - setting cue font size to %li", lround(size));
</span><span class="cx"> }
</span><del>-
-bool TextTrackCueGeneric::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
</del><ins>+
+bool TextTrackCueGeneric::cueContentsMatch(const TextTrackCue& cue) const
</ins><span class="cx"> {
</span><del>- // Do not call the parent class isEqual here, because we are not cueType() == VTTCue,
- // and will fail that equality test.
- if (!TextTrackCue::isEqual(cue, match))
</del><ins>+ // Do call the parent class cueContentsMatch here, because we want to confirm
+ // the content of the two cues are identical (even though the types are not the same).
+ if (!VTTCue::cueContentsMatch(cue))
</ins><span class="cx"> return false;
</span><del>-
- if (cue.cueType() != TextTrackCue::Generic)
- return false;
-
</del><ins>+
</ins><span class="cx"> const TextTrackCueGeneric* other = static_cast<const TextTrackCueGeneric*>(&cue);
</span><span class="cx">
</span><span class="cx"> if (m_baseFontSizeRelativeToVideoHeight != other->baseFontSizeRelativeToVideoHeight())
</span><span class="lines">@@ -177,6 +174,28 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool TextTrackCueGeneric::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
+{
+ // Do not call the parent class isEqual here, because we are not cueType() == VTTCue,
+ // and will fail that equality test.
+ if (!TextTrackCue::isEqual(cue, match))
+ return false;
+
+ if (cue.cueType() != TextTrackCue::Generic)
+ return false;
+
+ return cueContentsMatch(cue);
+}
+
+
+bool TextTrackCueGeneric::doesExtendCue(const TextTrackCue& cue) const
+{
+ if (!cueContentsMatch(cue))
+ return false;
+
+ return VTTCue::doesExtendCue(cue);
+}
+
</ins><span class="cx"> bool TextTrackCueGeneric::isOrderedBefore(const TextTrackCue* that) const
</span><span class="cx"> {
</span><span class="cx"> if (VTTCue::isOrderedBefore(that))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCueGenerich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCueGeneric.h (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCueGeneric.h        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/TextTrackCueGeneric.h        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 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">@@ -73,6 +73,8 @@
</span><span class="cx"> virtual void setFontSize(int, const IntSize&, bool important) override;
</span><span class="cx">
</span><span class="cx"> virtual bool isEqual(const TextTrackCue&, CueMatchRules) const override;
</span><ins>+ virtual bool cueContentsMatch(const TextTrackCue&) const override;
+ virtual bool doesExtendCue(const TextTrackCue&) const override;
</ins><span class="cx">
</span><span class="cx"> virtual TextTrackCue::CueType cueType() const override { return TextTrackCue::Generic; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.cpp        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -1062,14 +1062,8 @@
</span><span class="cx"> return m_displayPosition;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool VTTCue::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
</del><ins>+bool VTTCue::cueContentsMatch(const TextTrackCue& cue) const
</ins><span class="cx"> {
</span><del>- if (!TextTrackCue::isEqual(cue, match))
- return false;
-
- if (cue.cueType() != WebVTT)
- return false;
-
</del><span class="cx"> const VTTCue* vttCue = toVTTCue(&cue);
</span><span class="cx"> if (text() != vttCue->text())
</span><span class="cx"> return false;
</span><span class="lines">@@ -1087,6 +1081,25 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool VTTCue::isEqual(const TextTrackCue& cue, TextTrackCue::CueMatchRules match) const
+{
+ if (!TextTrackCue::isEqual(cue, match))
+ return false;
+
+ if (cue.cueType() != WebVTT)
+ return false;
+
+ return cueContentsMatch(cue);
+}
+
+bool VTTCue::doesExtendCue(const TextTrackCue& cue) const
+{
+ if (!cueContentsMatch(cue))
+ return false;
+
+ return TextTrackCue::doesExtendCue(cue);
+}
+
</ins><span class="cx"> void VTTCue::setFontSize(int fontSize, const IntSize&, bool important)
</span><span class="cx"> {
</span><span class="cx"> if (!hasDisplayTree() || !fontSize)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.h (169439 => 169440)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.h        2014-05-29 01:41:22 UTC (rev 169439)
+++ trunk/Source/WebCore/html/track/VTTCue.h        2014-05-29 03:22:12 UTC (rev 169440)
</span><span class="lines">@@ -154,6 +154,8 @@
</span><span class="cx"> virtual void setFontSize(int, const IntSize&, bool important);
</span><span class="cx">
</span><span class="cx"> virtual bool isEqual(const TextTrackCue&, CueMatchRules) const override;
</span><ins>+ virtual bool cueContentsMatch(const TextTrackCue&) const override;
+ virtual bool doesExtendCue(const TextTrackCue&) const override;
</ins><span class="cx">
</span><span class="cx"> virtual CueType cueType() const { return WebVTT; }
</span><span class="cx"> virtual bool isRenderable() const override final { return true; }
</span></span></pre>
</div>
</div>
</body>
</html>