[webkit-changes] [WebKit/WebKit] b93351: Make VTTCue.size() from 'int' to 'double'

Ahmad Saleem noreply at github.com
Fri Aug 18 09:15:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b93351e6debe3c7ca46a6c14111bdcd85a3f823e
      https://github.com/WebKit/WebKit/commit/b93351e6debe3c7ca46a6c14111bdcd85a3f823e
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/vtt-cue-float-precision-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/webvtt/api/VTTCue/size-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/webvtt/api/VTTCue/size.html
    R LayoutTests/media/track/track-webvtt-tc019-cue-size-expected.txt
    R LayoutTests/media/track/track-webvtt-tc019-cue-size.html
    M Source/WebCore/html/track/VTTCue.cpp
    M Source/WebCore/html/track/VTTCue.h

  Log Message:
  -----------
  Make VTTCue.size() from 'int' to 'double'

https://bugs.webkit.org/show_bug.cgi?id=260365
rdar://problem/114089775

Reviewed by Jer Noble.

This patch aligns WebKit with Gecko / Firefox, Blink / Chromium and Web-Spec [1][2].

[1] https://w3c.github.io/webvtt/#the-vttcue-interface
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=19836

Spec Commit: https://github.com/w3c/webvtt/commit/64825911acce356bdd95c5ce8a8755f87f1d0702

In Web-Spec, `size` is double but in WebKit's implementation, it was using 'int',
so this PR just changes it to 'double'.

* Source/WebCore/html/track/VTTCue.h: Change 'size' to 'double' and also usage in 'setSize()' argument
* Source/WebCore/html/track/VTTCue.cpp:
(VTTCue::setSize): Update argument to 'double'
* LayoutTests/imported/w3c/web-platform-tests/webvtt/api/VTTCue/size.html: Add Test Case (manually)
* LayoutTests/imported/w3c/web-platform-tests/webvtt/api/VTTCue/size-expected.txt: Add Test Case Expectation
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/vtt-cue-float-precision-expected.txt: Rebaselined
* LayoutTests/media/track/track-webvtt-tc019-cue-size.html: Removed in favor of 'WPT' test
* LayoutTests/media/track/track-webvtt-tc019-cue-size-expected.txt: Ditto

Canonical link: https://commits.webkit.org/267041@main




More information about the webkit-changes mailing list