[webkit-changes] [WebKit/WebKit] 99e7a2: Remove WebVTTRubyElement and WebVTTRubyTextElement
Antti Koivisto
noreply at github.com
Wed Mar 13 08:18:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 99e7a283e2ed8bda5d0455d2cabb581ee66cf3d9
https://github.com/WebKit/WebKit/commit/99e7a283e2ed8bda5d0455d2cabb581ee66cf3d9
Author: Antti Koivisto <antti at apple.com>
Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths:
M LayoutTests/media/track/webvtt-ruby-expected.txt
M LayoutTests/media/track/webvtt-ruby.html
M Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css
M Source/WebCore/css/SelectorCheckerTestFunctions.h
M Source/WebCore/css/html.css
M Source/WebCore/css/mediaControls.css
M Source/WebCore/dom/Node.h
M Source/WebCore/html/track/VTTCue.cpp
M Source/WebCore/html/track/WebVTTElement.cpp
M Source/WebCore/html/track/WebVTTElement.h
M Source/WebCore/html/track/WebVTTParser.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/StyleAdjuster.cpp
Log Message:
-----------
Remove WebVTTRubyElement and WebVTTRubyTextElement
https://bugs.webkit.org/show_bug.cgi?id=270852
rdar://problem/124449628
Reviewed by Alan Baradlay.
WebVTT tree is implemented using an Element subclass, except for ruby elements. For those there
were special subclasses inheriting from RubyElement and RubyTextElement. These are no longer needed
since ruby is now CSS based. We can style WebVTT ruby elements similarly to other WebVTT elements.
* LayoutTests/media/track/webvtt-ruby-expected.txt:
* LayoutTests/media/track/webvtt-ruby.html:
Turns our offsetFoo functions are only available on HTMLElement. Since all WebVTT elements now inherit from plain Element
we can no longer use it to inspect the internal state. Use more universal getBoundingClientRect() instead.
* Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css:
([useragentpart="-webkit-media-text-track-display"] ruby):
([useragentpart="-webkit-media-text-track-display"] ruby > rt):
([useragentpart="-webkit-media-text-track-display"] ruby > :not(ruby)):
Add a relevant subset of ruby rules to the text-track stylesheet, similar to other WebVTT elements.
The rules on html.css don't match since these elements are not in HTML namespace.
* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
(WebCore::matchesFutureCuePseudoClass):
(WebCore::matchesPastCuePseudoClass):
* Source/WebCore/css/mediaControls.css:
([useragentpart="-webkit-media-text-track-display"] ruby):
([useragentpart="-webkit-media-text-track-display"] ruby > rt):
([useragentpart="-webkit-media-text-track-display"] ruby > :not(ruby)):
* Source/WebCore/dom/Node.h:
(WebCore::Node::isWebVTTElement const):
(WebCore::Node::isWebVTTRubyElement const): Deleted.
(WebCore::Node::isWebVTTRubyTextElement const): Deleted.
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCue::markFutureAndPastNodes):
* Source/WebCore/html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::WebVTTElement):
(WebCore::m_language):
(WebCore::WebVTTElement::create):
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
(WebCore::WebVTTElement::createEquivalentHTMLElement):
(WebCore::WebVTTElementImpl::create): Deleted.
Remove the now-unnedeed WebVTTElement/WebVTTElementImpl split.
(WebCore::WebVTTElementImpl::cloneElementWithoutAttributesAndChildren): Deleted.
(WebCore::WebVTTElementImpl::createEquivalentHTMLElement): Deleted.
* Source/WebCore/html/track/WebVTTElement.h:
(WebCore::WebVTTElementImpl::setWebVTTNodeType): Deleted.
(WebCore::WebVTTElementImpl::webVTTNodeType const): Deleted.
(WebCore::WebVTTElementImpl::isPastNode const): Deleted.
(WebCore::WebVTTElementImpl::setIsPastNode): Deleted.
(WebCore::WebVTTElementImpl::language const): Deleted.
(WebCore::WebVTTElementImpl::setLanguage): Deleted.
(WebCore::WebVTTElementImpl::voiceAttributeName): Deleted.
(WebCore::WebVTTElementImpl::langAttributeName): Deleted.
(WebCore::WebVTTElementImpl::WebVTTElementImpl): Deleted.
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingUserAgentPartRules):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::hasUnsupportedRubyDisplay):
Relax the check to allow any elements called "ruby" or "rt" to have ruby display type, not just the HTML ones
Canonical link: https://commits.webkit.org/276025@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list