Open Bug 1389286 Opened 7 years ago Updated 1 month ago

Ruby layout doesn't play nice with ::first-line

Categories

(Core :: Layout: Ruby, defect, P3)

53 Branch
defect

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: bzbarsky, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

One of the testcases I wrote for bug 1388625 asserts in Gecko (without those changes):

###!!! ASSERTION: Wrong parent style context: 'Error', file /Users/bzbarsky/mozilla/vanilla/mozilla/layout/base/RestyleManager.cpp, line 582
Wrong parent style context:  style: 0x11991b838 :first-line {}
should be using:  style: 0x11248fa48 {}

The testcase is:

<!DOCTYPE html>
<style>
    div::first-line { color: green }
</style>
<body style="width: 100px" onload="document.body.style.width = 'auto'">
  <div>
    <span style="display: ruby-base-container">Some</span>
    <span style="display: ruby-base-container">text that is fairly long</span>
  </div>
</body>

No idea what the right rendering is here.

I expect the problem is that ruby code pulls things like inline frames do, but may not be doing the expected reparenting when crossing first-line boundaries?
Priority: -- → P3
Ruby code does pull things like inline frames, and I'm not aware of special handling of reparenting for that. 

Probably we need to somehow replicate or reuse nsInlineFrame's ReparentChildListStyle function in nsRubyFrame and nsRubyBaseContainerFrame (both of the two frames have pulling code).
Component: Layout → Layout: Ruby
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.