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

RESOLVED FIXED in Firefox 55

Status

()

Core
CSS Parsing and Computation
P1
normal
RESOLVED FIXED
9 months ago
6 months ago

People

(Reporter: xidorn, Assigned: canaltinova)

Tracking

(Blocks: 1 bug)

Trunk
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

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
(Assignee)

Comment 1

8 months ago
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

Comment 2

8 months ago
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9da96b87d014
Adjust stylo expectations for test_computed_style.html a=bustage

Comment 3

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9da96b87d014
Status: NEW → RESOLVED
Last Resolved: 7 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
status-firefox53: affected → ---
You need to log in before you can comment on or make changes to this bug.