Diff
Modified: trunk/LayoutTests/ChangeLog (136527 => 136528)
--- trunk/LayoutTests/ChangeLog 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/ChangeLog 2012-12-04 18:47:31 UTC (rev 136528)
@@ -1,3 +1,21 @@
+2012-12-04 Antoine Quint <[email protected]>
+
+ INVALID_STATE_ERR error upon calling .addCue() for an already-in-use cue
+ https://bugs.webkit.org/show_bug.cgi?id=103264
+
+ Reviewed by Eric Carlson.
+
+ Stop skipping media/track/opera/interfaces/TextTrack/addCue.html as it now mostly passes, the remaining issue
+ being tracked by https://bugs.webkit.org/show_bug.cgi?id=103258.
+
+ * media/track/opera/interfaces/TextTrack/addCue-expected.txt: Added.
+ * platform/chromium/TestExpectations:
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/mac/TestExpectations:
+ * platform/qt/TestExpectations:
+ * platform/win/TestExpectations:
+
2012-12-04 Mike West <[email protected]>
Log to console when forms and popups are blocked by 'sandbox'.
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -3000,7 +3000,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/LayoutTests/platform/efl/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/efl/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -723,7 +723,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -542,7 +542,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/mac/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -479,7 +479,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/LayoutTests/platform/qt/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/qt/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -905,7 +905,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (136527 => 136528)
--- trunk/LayoutTests/platform/win/TestExpectations 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/LayoutTests/platform/win/TestExpectations 2012-12-04 18:47:31 UTC (rev 136528)
@@ -1563,7 +1563,6 @@
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/HTMLElement/HTMLTrackElement/src.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/activeCues.html [ Skip ]
-webkit.org/b/103926 media/track/opera/interfaces/TextTrack/addCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/cues.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TextTrack/removeCue.html [ Skip ]
webkit.org/b/103926 media/track/opera/interfaces/TrackEvent/constructor.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (136527 => 136528)
--- trunk/Source/WebCore/ChangeLog 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/Source/WebCore/ChangeLog 2012-12-04 18:47:31 UTC (rev 136528)
@@ -1,3 +1,20 @@
+2012-12-04 Antoine Quint <[email protected]>
+
+ INVALID_STATE_ERR error upon calling .addCue() for an already-in-use cue
+ https://bugs.webkit.org/show_bug.cgi?id=103264
+
+ Reviewed by Eric Carlson.
+
+ Adhere to the latest spec for TextTrack's .addCue() method. This also fixes
+ https://bugs.webkit.org/show_bug.cgi?id=103265 and we've removed
+ media/track/opera/interfaces/TextTrack/addCue.html from the Skipped list.
+
+ * html/track/TextTrack.cpp:
+ (WebCore::TextTrack::addCue):
+ * html/track/TextTrack.h:
+ (TextTrack):
+ * html/track/TextTrack.idl:
+
2012-12-04 Mike West <[email protected]>
Log to console when forms and popups are blocked by 'sandbox'.
Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (136527 => 136528)
--- trunk/Source/WebCore/html/track/TextTrack.cpp 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp 2012-12-04 18:47:31 UTC (rev 136528)
@@ -214,7 +214,7 @@
return 0;
}
-void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue, ExceptionCode& ec)
+void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue)
{
if (!prpCue)
return;
@@ -225,30 +225,19 @@
if (isnan(cue->startTime()) || isnan(cue->endTime()) || cue->startTime() < 0 || cue->endTime() < 0)
return;
- // 4.8.10.12.4 Text track API
+ // 4.8.10.12.5 Text track API
// The addCue(cue) method of TextTrack objects, when invoked, must run the following steps:
- // 1. If the given cue is already associated with a text track other than
- // the method's TextTrack object's text track, then throw an InvalidStateError
- // exception and abort these steps.
+ // 1. If the given cue is in a text track list of cues, then remove cue from that text track
+ // list of cues.
TextTrack* cueTrack = cue->track();
- if (cueTrack && cueTrack != this) {
- ec = INVALID_STATE_ERR;
- return;
- }
+ if (cueTrack && cueTrack != this)
+ cueTrack->removeCue(cue.get(), ASSERT_NO_EXCEPTION);
- // 2. Associate cue with the method's TextTrack object's text track, if it is
- // not currently associated with a text track.
+ // 2. Add cue to the method's TextTrack object's text track's text track list of cues.
cue->setTrack(this);
-
- // 3. If the given cue is already listed in the method's TextTrack object's text
- // track's text track list of cues, then throw an InvalidStateError exception.
- // 4. Add cue to the method's TextTrack object's text track's text track list of cues.
- if (!ensureTextTrackCueList()->add(cue)) {
- ec = INVALID_STATE_ERR;
- return;
- }
+ ensureTextTrackCueList()->add(cue);
if (m_client)
m_client->textTrackAddCue(this, cue.get());
Modified: trunk/Source/WebCore/html/track/TextTrack.h (136527 => 136528)
--- trunk/Source/WebCore/html/track/TextTrack.h 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/Source/WebCore/html/track/TextTrack.h 2012-12-04 18:47:31 UTC (rev 136528)
@@ -100,7 +100,7 @@
void clearClient() { m_client = 0; }
TextTrackClient* client() { return m_client; }
- void addCue(PassRefPtr<TextTrackCue>, ExceptionCode&);
+ void addCue(PassRefPtr<TextTrackCue>);
void removeCue(TextTrackCue*, ExceptionCode&);
void cueWillChange(TextTrackCue*);
Modified: trunk/Source/WebCore/html/track/TextTrack.idl (136527 => 136528)
--- trunk/Source/WebCore/html/track/TextTrack.idl 2012-12-04 18:34:27 UTC (rev 136527)
+++ trunk/Source/WebCore/html/track/TextTrack.idl 2012-12-04 18:47:31 UTC (rev 136528)
@@ -40,8 +40,7 @@
readonly attribute TextTrackCueList activeCues;
attribute EventListener oncuechange;
- void addCue(in TextTrackCue cue)
- raises (DOMException);
+ void addCue(in TextTrackCue cue);
void removeCue(in TextTrackCue cue)
raises (DOMException);