Closed Bug 1342739 Opened 7 years ago Closed 7 years ago

stylo: need to do display fixup based on writing-mode

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox54 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Whiteboard: [Stylo:servo])

I don't see an obvious servo equivalent of http://searchfox.org/mozilla-central/rev/93f1641e394cfbdfbeed44e81f7dab0f2aff7b6f/layout/style/nsStyleContext.cpp#974-998

Maybe we do this somewhere other than apply_declarations in servo/components/style/properties/properties.mako.rs?  I don't have a working stylo build right now to check what the actual observable behavior is.....
I have a working stylo build now.  The observable behavior is in fact wrong.  Testcase:

  <div>
    <span style="writing-mode: vertical-rl">Text</span>
  </div>
  <script>
    document.write(getComputedStyle(document.querySelector("span")).display);
  </script>

and stylo outputs "inline".

Or for an example that shows a rendering difference:

  <div>
    <span style="writing-mode: vertical-rl; border: 20px solid green">Text</span>
  </div>
Filed https://github.com/servo/servo/issues/15754 on this.

If that gets fixed and we don't end up with corresponding unexpected passes, that means we need to add some tests.
Priority: -- → P2
Whiteboard: [Stylo:servo]
A contributor is working on this in https://github.com/servo/servo/pull/16044
This landed: https://github.com/servo/servo/pull/16044#issuecomment-289134966
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Looks like we have unexpected passes with the servo patch in three tests:

  layout/reftests/css-display/display-contents-writing-mode-2.html
  layout/reftests/writing-mode/1134849-orthogonal-inline.html
  layout/reftests/writing-mode/1196887-1-computed-display-inline-block.html

so no need for more tests.  ;)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e937fe42f949
Adjust stylo reftest expectations on CLOSED TREE after fix for bug 1342739 landed.  r=unbustage
You need to log in before you can comment on or make changes to this bug.