[webkit-changes] [WebKit/WebKit] 6c997a: Fix WebVTT Parser to disallow negative percentages

Kohei Ueno noreply at github.com
Fri Oct 27 20:38:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6c997a688fcdb3d8a2ee11ccc1118b5cb5349733
      https://github.com/WebKit/WebKit/commit/6c997a688fcdb3d8a2ee11ccc1118b5cb5349733
  Author: Kohei Ueno <kohei.ueno119 at gmail.com>
  Date:   2023-10-27 (Fri, 27 Oct 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/file-parsing/tests/regions-regionanchor-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/file-parsing/tests/regions-viewportanchor-expected.txt
    M Source/WebCore/html/track/WebVTTParser.cpp

  Log Message:
  -----------
  Fix WebVTT Parser to disallow negative percentages
https://bugs.webkit.org/show_bug.cgi?id=263640

Reviewed by Eric Carlson.

This patch addresses an issue in the WebVTT parser where it incorrectly
allowed negative percentage values for region and viewport anchors.
According to the WebVTT specification, percentage values must be in the
range of 0 to 100, and negative percentages are not valid. This patch
ensures that the parser correctly identifies negative percentages
as invalid values.

* LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/file-parsing/tests/regions-regionanchor-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/file-parsing/tests/regions-viewportanchor-expected.txt:
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseFloatPercentageValue):

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




More information about the webkit-changes mailing list