Bug 52358

Summary: text-emphasis should not be suppressed by ruby, but rather appear above the ruby
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, bfulgham, hyatt, simon.fraser, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=130400

Description mitz 2011-01-13 00:41:12 PST
The CSS Text Level 3 Editor’s Draft (CVS Revision 1.6 <http://dev.w3.org/cvsweb/~checkout~/csswg/css3-text/Overview.html?rev=1.6&content-type=text/html;%20charset=iso-8859-1>) has been updated to say:

“If emphasis marks are drawn for grapheme clusters for which ruby is drawn in the same position as the emphasis mark, the ruby should be stacked between the emphasis marks and the base text. In this case, the position of the emphasis marks for a given element should be determined as if all grapheme clusters have ruby boxes of the same height as the highest ruby box in the element. If the UA is not capable of drawing ruby and emphasis marks on the same side, the UA may hide ruby and draw only emphasis marks.”

The suppression behavior introduced in <http://trac.webkit.org/changeset/75257> (for bug 51267) needs to be reverted and the above behavior implemented instead.
Comment 1 mitz 2011-01-13 00:41:57 PST
<rdar://problem/8858522>
Comment 2 Ahmad Saleem 2022-09-24 05:29:20 PDT
We still have this test - https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/text/emphasis-avoid-ruby.html

which was introduced via <http://trac.webkit.org/changeset/75257>. Do we need to do something else? Thanks!
Comment 3 mitz 2022-09-24 07:59:45 PDT
Unless the spec has changed since the cited revision, WebKit is still not in compliance, since it still just suppresses the emphasis marks.
Comment 4 mitz 2022-09-24 08:02:10 PDT
This is still required as of the current version (now in Text Decoration): <https://www.w3.org/TR/2022/CRD-css-text-decor-3-20220505/#text-emphasis-position-property>.
Comment 5 mitz 2022-09-24 08:03:08 PDT
Although it seems that inaction on this bug may lead to a change in the recommendation:

> The following features are at-risk, and may be dropped during the CR period:
> 
> The ability to place both emphasis marks and ruby on the same base text.