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

Fix HTML directionality inheritance for empty <bdi> elements with no dir attribute. #43933

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 10, 2024

This correctly initializes the flag indicating that the HTML
directionality is inherited from the parent for <bdi> elements, which
behaves like it has dir=auto by default. Even without this change, it
gets initialized correctly when a dir attribute is changed or when the
text content of the element changes.

This also clears the same flag when the dir attribute changes. This
should affect some other cases of dir attribute changes, but we somehow
didn't hit it until fixing the previous bug exposed the problem.

This fixes the failure of a test that I added in
#43896 in response to
noticing and fixing an error I made in the HTML spec in
whatwg/html#10005 .

Bug: 576815
Change-Id: I3006d45079694d90dd178f8c439e22f6419bd992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5186678
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: David Baron <dbaron@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1246176}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

…dir attribute.

This correctly initializes the flag indicating that the HTML
directionality is inherited from the parent for <bdi> elements, which
behaves like it has dir=auto by default.  Even without this change, it
gets initialized correctly when a dir attribute is changed or when the
text content of the element changes.

This also clears the same flag when the dir attribute changes.  This
should affect some other cases of dir attribute changes, but we somehow
didn't hit it until fixing the previous bug exposed the problem.

This fixes the failure of a test that I added in
#43896 in response to
noticing and fixing an error I made in the HTML spec in
whatwg/html#10005 .

Bug: 576815
Change-Id: I3006d45079694d90dd178f8c439e22f6419bd992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5186678
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: David Baron <dbaron@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1246176}
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 40b49b7 into master Jan 12, 2024
22 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5186678 branch January 12, 2024 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants