Closed Bug 1641139 Opened 4 years ago Closed 4 years ago

Absolutely-positioned element in <ruby> is not shown

Categories

(Core :: Layout: Ruby, defect)

78 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla79
Webcompat Priority ?
Tracking Status
firefox78 --- wontfix
firefox79 --- fixed

People

(Reporter: karlcow, Assigned: xidorn)

References

()

Details

Attachments

(3 files)

following the bug report on https://webcompat.com/issues/53076

And this test:

<div>
  <ruby data-ruby="しぶ">澁<rt>しぶ</rt></ruby>
</div>
    div {
      padding: 5em;
    }

    [data-ruby] {
      position: relative;
    }

    [data-ruby]::before {
      content: attr(data-ruby);
      position: absolute;
      top: -1em;
      left: 0px;
      right: 0px;
      margin: auto;
      font-size: 0.5em;
      text-align: center;
      background-color: gold;
    }

    rt {
      display: none;
    }

as we can see in the screenshot. Chrome displays the characters but not firefox.

Attachment #9152006 - Attachment mime type: text/plain → text/html

::before creates a regular inline box inside the <ruby> box, so it's basically equivalent to using a <span> instead of a ::before pseudo-element, which doesn't show up either.

Xidorn do you know if this is supposed to work per spec?

Err, see above :)

Component: Layout: Generated Content, Lists, and Counters → Layout: Ruby
Flags: needinfo?(xidorn+moz)

That's a very interesting case... I totally have no idea what the site get from doing this :/

Anyway, I don't see why it shouldn't be displayed. I'll have a look this weekend.

Assignee: nobody → xidorn+moz
Flags: needinfo?(xidorn+moz)
Summary: data attribute and position: absolute on ::before/::after → Absolutely-positioned element in <ruby> is not shown

Given that this is confirmed and assigned, I am going to give this an S3 severity.

Severity: -- → S3
See Also: → 1642104
Pushed by mozilla@upsuper.org:
https://hg.mozilla.org/integration/autoland/rev/6bb6a5cdc941
Reflow absolute frames in ruby container and ruby base container. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/23972 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR was closed without merging

I believe the test failure is related to bug 1643868 somehow. I can observe similar issue on Linux, but it happens more consistently on Android for some reason. It's especially interesting that connecting inspector to GeckoView resets the position.

Pushed by mozilla@upsuper.org:
https://hg.mozilla.org/integration/autoland/rev/2dd4b6b2f0d7
Reflow absolute frames in ruby container and ruby base container. r=dholbert
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:xidorn, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(xidorn+moz)
Flags: needinfo?(xidorn+moz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: