Closed Bug 1331516 Opened 7 years ago Closed 7 years ago

stylo: mask shorthand resets several subproperties to their non-initial value

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: xidorn, Assigned: canova)

References

Details

See the following code:
<!DOCTYPE html>
<p style=""></p>
<script>
  let p = document.querySelector('p');
  alert(getComputedStyle(p).maskOrigin);
  p.style.mask = "none";
  alert(getComputedStyle(p).maskOrigin);
</script>

The initial value of mask-origin property is "border-box", however, setting mask shorthand resets the value to its non-initial value "content-box" unexpectedly.

It is probably because StyleGeometryBox::ContentBox corresponds to zero.
Assignee: nobody → canaltinova
Priority: -- → P1
Opened a PR in Servo: https://github.com/servo/servo/pull/15908
Their initial values were wrong. Also contains other wrong single keyword properties.
Also found out that mask-repeat's initial value is wrong in gecko: 
https://bugzilla.mozilla.org/show_bug.cgi?id=1346193
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9da96b87d014
Adjust stylo expectations for test_computed_style.html a=bustage
https://hg.mozilla.org/mozilla-central/rev/9da96b87d014
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.