Closed Bug 1363576 Opened 7 years ago Closed 7 years ago

stylo: text-align: -moz-foo should not inherit on display: table things

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: manishearth, Unassigned)

References

(Blocks 1 open bug)

Details

We fail layout/reftests/bugs/444015-1.html because of this

https://dxr.mozilla.org/mozilla-central/rev/b21b974d60d3075ae24f6fb1bae75d0f122f28fc/layout/style/nsStyleContext.cpp#833

text-align: -moz-center (and other -moz keywords) should be reset to `start` when inheriting, even though text-align is an inherit property. This applies to explicit `inherit`ing too.

Reduced testcase (div can be replaced by a `table`, and the style attr can use `align=center` instead)

<div style="text-align: -moz-center">
    <div style="display: table" id=foo style="text-align: inherit">blah</div style="display: table">
</div>
<script type="text/javascript">
    document.write(getComputedStyle(window.foo).textAlign)
</script>
Emilio, you were working on fixup stuff, was this included?
Blocks: stylo
Flags: needinfo?(emilio+bugs)
So it got lost in the void while doing the StyleAdjuster refactoring, but there you go: https://github.com/servo/servo/pull/16794
Flags: needinfo?(emilio+bugs)
This is fixed with the above servo commit. Tests were updated in https://hg.mozilla.org/integration/autoland/rev/78a8cb97115e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.