Source/WebCore:
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 15:57:45 +0000 (15:57 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2019 15:57:45 +0000 (15:57 +0000)
commit16c79e196af392345102c46a43b08675dbe58ff9
treebd19dfc50998a35317a9ca3cd176026d50add0cb
parentfcde99c3ebe0cfe5e96b271ad1945ec606436058
Source/WebCore:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Test: media/track/track-in-band-metadata-display-order.html

Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
TextTrackCueGeneric for testing.

Drive-by fixes:

Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
a HTMLMediaElement*

TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
enable use of is<> and downcast<>.

* Source/WebCore/CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Sources.txt:
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::parentMediaElement):
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::logger const):
(WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
(WebCore::MediaControlTextTrackContainerElement::logChannel const):
* html/shadow/MediaControlElements.h:
* html/track/DataCue.h:
(isType):
* html/track/TextTrackCueGeneric.h:
(isType):
* html/track/TextTrackCueGeneric.idl: Added.
* html/track/VTTCue.h:
(isType):
* testing/Internals.cpp:
(WebCore::Internals::createGenericCue):
* testing/Internals.h:
* testing/Internals.idl:

Tools:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Drive-by bug fix: allow tests to play audio without a user gesture by default.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:
Add test for fix of #196095
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

* media/track/track-in-band-metadata-display-order-expected.txt: Added.
* media/track/track-in-band-metadata-display-order.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/media/track/track-in-band-metadata-display-order-expected.txt [new file with mode: 0644]
LayoutTests/media/track/track-in-band-metadata-display-order.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources-input.xcfilelist
Source/WebCore/DerivedSources-output.xcfilelist
Source/WebCore/DerivedSources.make
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.h
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/html/track/DataCue.h
Source/WebCore/html/track/TextTrackCueGeneric.h
Source/WebCore/html/track/TextTrackCueGeneric.idl [new file with mode: 0644]
Source/WebCore/html/track/VTTCue.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp