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

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: manishearth, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
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>
(Reporter)

Comment 1

a year ago
Emilio, you were working on fixup stuff, was this included?
Blocks: 1243581
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)
(Reporter)

Updated

a year ago
Blocks: 1324348
This is fixed with the above servo commit. Tests were updated in https://hg.mozilla.org/integration/autoland/rev/78a8cb97115e
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.