[Webkit-unassigned] [Bug 138577] th { text-align: inherit; } is not respected
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 2 13:13:46 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=138577
Tim Nguyen (:ntim) <ntim at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ntim at apple.com
--- Comment #6 from Tim Nguyen (:ntim) <ntim at apple.com> ---
This is the relevant bit in WebKit:
https://webkit-search.igalia.com/webkit/rev/26eff7cbe4e53bbd8b325ee12a3567128ba52d2e/Source/WebCore/style/StyleAdjuster.cpp#318-323
I personally haven't tested which approach works, but the 2 I have in mind are:
1. Add a applyInheritTextAlign function here: https://webkit-search.igalia.com/webkit/rev/26eff7cbe4e53bbd8b325ee12a3567128ba52d2e/Source/WebCore/style/StyleBuilderCustom.h#197-207 that sets both textAlign, but also hasExplicitlySetTextAlign(). This needs to change: https://webkit-search.igalia.com/webkit/rev/26eff7cbe4e53bbd8b325ee12a3567128ba52d2e/Source/WebCore/css/CSSProperties.json#4590 to "custom": "All" in order to work.
2. Remove the StyleAdjuster code, do like Firefox/Chrome and add an `-internal-center-or-inherit` value, implement it in https://webkit-search.igalia.com/webkit/rev/26eff7cbe4e53bbd8b325ee12a3567128ba52d2e/Source/WebCore/style/StyleBuilderConverter.h#609 , something like:
```
if (primitiveValue.valueID() == CSSValueInternalCenterOrInherit)
if (parentStyle.textAlign() != TextAlign::Start)
return parentStyle.textAlign();
return TextAlign::Center;
```
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220602/6f755253/attachment.htm>
More information about the webkit-unassigned
mailing list