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

Sync bidirectional text UA Stylesheet rules from HTML Web Specification #23084

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ahmad-S792
Copy link
Contributor

@Ahmad-S792 Ahmad-S792 commented Jan 23, 2024

Sync `bidirectional text` UA Stylesheet rules from HTML Web Specification
https://bugs.webkit.org/show_bug.cgi?id=65617
rdar://problem/96912726

Reviewed by NOBODY (OOPS!).

This patch is to align WebKit with Web-Specification [1]:

[1] https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering

It syncs all bidirectional text user agent stylesheet rules to ensure that 
all HTML elements have respect direction based as per standard.

Currently, we cannot add all UA rules, so add appropriate
FIXME with bug references or function names.

Credits to Noam Rosenthal for reference initial test changes.

* Source/WebCore/css/html.css: From Web-Spec except few targeted changes
(summary): Add FIXME
(hr): Remove 'unicode-bidi' to add in single place
(bdo): Update to have `isolate-override`
(ruby): Add as per 'ruby' spec
* Source/WebCore/html/HTMLElement.cpp:
(unicodeBidiAttributeForDirAuto): Deleted
(HTMLElement::collectPresentationalHintsForAttribute): Deleted reference
and use 'html.css' as single source of truth
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
(ModifyTextWritingDirection): Update Test

> Test & Test Expectations Update:
* LayoutTests/platform/wpe/fast/text/word-break-expected.txt:
* LayoutTests/platform/mac/fast/text/word-break-expected.txt:

78ad3f9

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 βœ… πŸ§ͺ api-wpe
❌ πŸ§ͺ ios-wk2-wpt ❌ πŸ§ͺ mac-wk1 βœ… πŸ›  gtk
❌ πŸ§ͺ api-ios ❌ πŸ§ͺ mac-wk2 ❌ πŸ§ͺ gtk-wk2
βœ… πŸ›  tv ❌ πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim ❌ πŸ§ͺ mac-wk2-stress
βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@Ahmad-S792 Ahmad-S792 added the CSS Cascading Style Sheets implementation label Jan 23, 2024
@Ahmad-S792 Ahmad-S792 self-assigned this Jan 23, 2024
@webkit-early-warning-system

This comment was marked as outdated.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 23, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from fe2bb9e to fd4db4d Compare January 23, 2024 11:49
@webkit-early-warning-system

This comment was marked as outdated.

@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from fd4db4d to 9f37553 Compare January 25, 2024 12:29
@webkit-early-warning-system

This comment was marked as outdated.

@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Jan 25, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 25, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from 9f37553 to 3e294e3 Compare February 5, 2024 01:33
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Feb 5, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from 3e294e3 to ee122d6 Compare February 25, 2024 03:42
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 25, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from ee122d6 to efe188c Compare February 25, 2024 10:50
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from efe188c to 5aa1acb Compare February 25, 2024 12:22
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Feb 25, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 25, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from 5aa1acb to 04e6246 Compare March 1, 2024 19:20
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from 45a2156 to ec03929 Compare March 2, 2024 17:44
…tion

https://bugs.webkit.org/show_bug.cgi?id=65617
rdar://problem/96912726

Reviewed by NOBODY (OOPS!).

This patch is to align WebKit with Web-Specification [1]:

[1] https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering

It syncs all bidirectional text user agent stylesheet rules to ensure that all HTML elements have respect
direction based as per standard.

Currently, we cannot add all UA rules, so add appropriate
FIXME with bug references or function names.

Credits to Noam Rosenthal for reference initial test changes.

* Source/WebCore/css/html.css: From Web-Spec except few targeted changes
(summary): Add FIXME
(hr): Remove 'unicode-bidi' to add in single place
(bdo): Update to have `isolate-override`
(ruby): Add as per 'ruby' spec
* Source/WebCore/html/HTMLElement.cpp:
(unicodeBidiAttributeForDirAuto): Deleted
(HTMLElement::collectPresentationalHintsForAttribute): Deleted reference
and use 'html.css' as single source of truth
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
(ModifyTextWritingDirection): Update Test

> Test & Test Expectations Update:
* LayoutTests/platform/wpe/fast/text/word-break-expected.txt:
* LayoutTests/platform/mac/fast/text/word-break-expected.txt:
@Ahmad-S792 Ahmad-S792 force-pushed the fix65617-unicode-isolate-ua-stylesheet-rule branch from ec03929 to 78ad3f9 Compare March 3, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Cascading Style Sheets implementation merging-blocked Applied to prevent a change from being merged
Projects
None yet
3 participants