This is a deliberate change from preexisting behavior, see https://www.w3.org/2015/10/28-htmlcue-minutes.html https://github.com/whatwg/html/issues/293 Test https://github.com/w3c/web-platform-tests/pull/2941
Web compat analysis: https://groups.google.com/d/msg/mozilla.dev.platform/42-W463M4Ig/TwrqPyCjAAAJ
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/00923f90277216a21263f16898fb404c4a5741c8 commit 00923f90277216a21263f16898fb404c4a5741c8 Author: fs <fs@opera.com> Date: Wed May 11 13:54:41 2016 Change "invalid value default" for HTMLTrackElement 'kind' to "metadata" Rename TrackBase::defaultKind() to invalidValueDefaultKind() to better reflect its semantics. Also make sure that the "missing value default" is set appropriately (in TextTrack constructors and on removal in HTMLTrackElement parseAttribute) now that it differs from the "invalid value default". The test media/track/track-kind.html is adjusted so that it doesn't check if a cue is displayed, since that depends on unspecified behavior wrt how 'mode' changes when 'kind' does. (See comment in TextTrack::setKind.) The WPT tests will eventually get updated via Mozilla's automatic sync, so adding expectations for now. (Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1269712) Intent: https://groups.google.com/a/chromium.org/d/topic/blink-dev/6-oPQN4lZ2o/discussion https://github.com/whatwg/html/issues/293 https://html.spec.whatwg.org/multipage/embedded-content.html#attr-track-kind BUG= 608772 Review-Url: https://codereview.chromium.org/1947033002 Cr-Commit-Position: refs/heads/master@{#392911} [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/fast/dom/element-attribute-js-null-expected.txt [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/fast/dom/element-attribute-js-null.html [add] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt [add] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/media/track/opera/interfaces/TextTrack/kind.html [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/LayoutTests/media/track/track-kind.html [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/AudioTrack.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/AudioTrack.h [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/TextTrack.h [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/TrackBase.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/TrackBase.h [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/VideoTrack.cpp [modify] https://crrev.com/00923f90277216a21263f16898fb404c4a5741c8/third_party/WebKit/Source/core/html/track/VideoTrack.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338 commit 80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338 Author: fs <fs@opera.com> Date: Mon May 16 09:05:07 2016 Clean up HTMLTrackElement.kind invalid/missing value default handling Get rid of the isValidKind(...) and invalidValueDefaultKind() virtual methods on TrackBase and do any required checking "up front" instead as required. This should present less surprises and work in a less side-effectful way. Also start setting the 'kind' directly in the constructor rather than invoking setKind() in (all) the constructor body (bodies). Drop some redundant parenthesis and fix some obviously "wrong" names in TextTrack.cpp. BUG= 608772 Review-Url: https://codereview.chromium.org/1973343002 Cr-Commit-Position: refs/heads/master@{#393812} [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/AudioTrack.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/AudioTrack.h [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/TextTrack.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/TextTrack.h [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/TrackBase.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/TrackBase.h [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/VideoTrack.cpp [modify] https://crrev.com/80ef82107b8f9c2cd1bc707d86bc0fd8bc8cd338/third_party/WebKit/Source/core/html/track/VideoTrack.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aea239459e30190050f8897b6e5b2b9856d2de4f commit aea239459e30190050f8897b6e5b2b9856d2de4f Author: fs <fs@opera.com> Date: Tue May 17 14:38:04 2016 Remove mode-transition in TextTrack::setKind This mode-transition gives rise to inconsistent state-updates, and isn't specified [1]. Remove it, and with it the setKind override. Also move all the mutators to TextTrack since that's the only type of track where these fields can be mutated (and only if sourced via a HTMLTrackElement.) [1] https://html.spec.whatwg.org/multipage/embedded-content.html#attr-track-kind BUG= 460923 , 608772 Review-Url: https://codereview.chromium.org/1984663002 Cr-Commit-Position: refs/heads/master@{#394122} [modify] https://crrev.com/aea239459e30190050f8897b6e5b2b9856d2de4f/third_party/WebKit/Source/core/html/track/TextTrack.cpp [modify] https://crrev.com/aea239459e30190050f8897b6e5b2b9856d2de4f/third_party/WebKit/Source/core/html/track/TextTrack.h [modify] https://crrev.com/aea239459e30190050f8897b6e5b2b9856d2de4f/third_party/WebKit/Source/core/html/track/TrackBase.cpp [modify] https://crrev.com/aea239459e30190050f8897b6e5b2b9856d2de4f/third_party/WebKit/Source/core/html/track/TrackBase.h
Renamed Blink>Text>Track to Blink>Media>Track. Moving these bugs to the new component.
Comment 1 by f...@opera.com
, May 3 2016