Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all of HTML's character entities in WebVTT #19879

Merged

Conversation

cola119
Copy link
Member

@cola119 cola119 commented Nov 2, 2023

023c540

Support all of HTML's character entities in WebVTT
https://bugs.webkit.org/show_bug.cgi?id=176225

Reviewed by Darin Adler.

WebVTT cue text tokenizer algorithm has been updated to support
all of HTML's character entities in w3c/webvtt#253
This patch updates the tokenizer to align with the latest spec.
Spec: https://w3c.github.io/webvtt/#webvtt-cue-text-tokenizer

The old `EscapeState` state for handling escape characters has been
removed in favor of new two states. And the `WEBVTT_SWITCH_TO` operation
has been added for the purpose of enabling state transition without
the requirement to advance the input position.

* LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/cue-text-parsing/tests/entities-expected.txt:
* Source/WebCore/html/track/WebVTTTokenizer.cpp:
(WebCore::ProcessEntity):
(WebCore::WebVTTTokenizer::nextToken):

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

256d17f

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@cola119 cola119 self-assigned this Nov 2, 2023
@cola119 cola119 added the Media Bugs related to the HTML 5 Media elements. label Nov 2, 2023
@Ahmad-S792
Copy link
Contributor

@cola119 - Awesome!!! It will definitely progress a lot of WPT tests.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 2, 2023
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Nov 2, 2023
Source/WebCore/html/track/WebVTTTokenizer.cpp Outdated Show resolved Hide resolved
@cola119 cola119 force-pushed the eng/support-entities-in-webvtt branch from cec8ab3 to 256d17f Compare November 5, 2023 01:17
@Ahmad-S792 Ahmad-S792 added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Nov 5, 2023
@webkit-ews-buildbot webkit-ews-buildbot added merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Nov 5, 2023
@webkit-ews-buildbot
Copy link
Collaborator

Safe-Merge-Queue: Build #2401.

https://bugs.webkit.org/show_bug.cgi?id=176225

Reviewed by Darin Adler.

WebVTT cue text tokenizer algorithm has been updated to support
all of HTML's character entities in w3c/webvtt#253.
This patch updates the tokenizer to align with the latest spec.
Spec: https://w3c.github.io/webvtt/#webvtt-cue-text-tokenizer

The old `EscapeState` state for handling escape characters has been
removed in favor of new two states. And the `WEBVTT_SWITCH_TO` operation
has been added for the purpose of enabling state transition without
the requirement to advance the input position.

* LayoutTests/imported/w3c/web-platform-tests/webvtt/parsing/cue-text-parsing/tests/entities-expected.txt:
* Source/WebCore/html/track/WebVTTTokenizer.cpp:
(WebCore::ProcessEntity):
(WebCore::WebVTTTokenizer::nextToken):

Canonical link: https://commits.webkit.org/270240@main
@webkit-commit-queue
Copy link
Collaborator

Committed 270240@main (023c540): https://commits.webkit.org/270240@main

Reviewed commits have been landed. Closing PR #19879 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 023c540 into WebKit:main Nov 5, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 5, 2023
@cola119 cola119 deleted the eng/support-entities-in-webvtt branch November 5, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
6 participants