Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b6ee5d981582cff85e203d2403d422a86c53d922
https://github.com/WebKit/WebKit/commit/b6ee5d981582cff85e203d2403d422a86c53d922
Author: Said Abou-Hallawa <[email protected]>
Date: 2024-08-22 (Thu, 22 Aug 2024)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir-slots-directionality-expected.txt
M Source/WebCore/dom/ContainerNodeAlgorithms.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/SlotAssignment.cpp
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLSlotElement.cpp
M Source/WebCore/html/HTMLSlotElement.h
M Source/WebCore/html/HTMLTextAreaElement.cpp
M Source/WebCore/html/HTMLTextFormControlElement.cpp
M Source/WebCore/html/InputType.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/StyleSharingResolver.cpp
Log Message:
-----------
[Text Directionality] Fix directionality for shadow tree
https://bugs.webkit.org/show_bug.cgi?id=277862
rdar://133549820
Reviewed by Ryosuke Niwa.
This patch aligns the TextDirection computations with the specs [1].
Be aware of this difference in this patch:
(a) TextDirection: is an enum which has only two values: LTR and RTL.
(b) TextDirectionState: is enum which is similar to TextDirection but has an
additional values for Auto and Undefined.
Invalidating the Node textDirection and usesTextDirection was fixed in some
places. This fixed most of the WPT failures. But there are still a few failures
left in the test dir-auto-dynamic-changes.window.html.
[1] https://html.spec.whatwg.org/multipage/dom.html#attr-dir
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir-slots-directionality-expected.txt:
* Source/WebCore/dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyNodeInsertedIntoTree):
* Source/WebCore/dom/Element.cpp:
(WebCore::parseTextDirectionState):
(WebCore::elementTextDirectionState):
(WebCore::elementHasValidTextDirectionState):
(WebCore::elementHasAutoTextDirectionState):
(WebCore::updateHasDirAutoFlagForSubtree):
(WebCore::updateElementHasDirAutoFlag):
(WebCore::computeTextDirectionFromText):
(WebCore::computeTextDirection):
(WebCore::computeContainedTextAutoDirection):
(WebCore::computeTextDirectionOfSlotElement):
(WebCore::updateEffectiveTextDirectionOfElementAndShadowTree):
(WebCore::updateEffectiveTextDirectionState):
(WebCore::Element::hasValidTextDirectionState const):
(WebCore::Element::hasAutoTextDirectionState const):
(WebCore::Element::computeAutoTextDirection const):
(WebCore::Element::computeTextDirectionIfDirIsAuto const):
(WebCore::Element::updateEffectiveTextDirectionOfDescendants):
(WebCore::Element::updateEffectiveTextDirectionOfAncestors):
(WebCore::Element::updateEffectiveTextDirection):
(WebCore::Element::dirAttributeChanged):
(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::removedFromAncestor):
(WebCore::Element::childrenChanged):
(WebCore::parseTextDirection): Deleted.
(WebCore::isValidDirValue): Deleted.
(WebCore::elementAffectsDirectionality): Deleted.
(WebCore::setHasDirAutoFlagRecursively): Deleted.
(WebCore::Element::hasDirectionAuto const): Deleted.
(WebCore::Element::directionalityIfDirIsAuto const): Deleted.
(WebCore::Element::updateEffectiveDirectionality): Deleted.
(WebCore::Element::adjustDirectionalityIfNeededAfterChildrenChanged): Deleted.
(WebCore::Element::updateTextDirectionalityAfterInputTypeChange): Deleted.
(WebCore::Element::updateEffectiveDirectionalityOfDirAuto): Deleted.
(WebCore::Element::computeDirectionalityFromText const): Deleted.
(WebCore::Element::adjustDirectionalityIfNeededAfterChildAttributeChanged):
Deleted.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/SlotAssignment.cpp:
(WebCore::NamedSlotAssignment::didChangeSlot):
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::subtreeHasChanged):
(WebCore::HTMLInputElement::attributeChanged):
(WebCore::HTMLInputElement::setValue):
* Source/WebCore/html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::insertedIntoAncestor):
(WebCore::HTMLSlotElement::didFinishInsertingNode):
* Source/WebCore/html/HTMLSlotElement.h:
* Source/WebCore/html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::setValueCommon):
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::directionForFormData const):
* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::setValue):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::matchAllRules):
* Source/WebCore/style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::canShareStyleWithElement const):
(WebCore::Style::elementHasDirectionAuto): Deleted.
Canonical link: https://commits.webkit.org/282648@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes