Closed Bug 1332193 Opened 3 years ago Closed 3 years ago

Subproperties of border-image does not update when the the value they inherit from changes

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file)

See the following code:
<!DOCTYPE html>
<div id="p"><div id="c"></div></div>
<script>
  var prop = 'border-image-source';
  var value = 'url(x.png)';
  p.style.setProperty(prop, value, '');
  c.style.setProperty(prop, 'inherit', '');
  getComputedStyle(c).getPropertyValue(prop);
  p.style.removeProperty(prop);
  alert(getComputedStyle(c).getPropertyValue(prop));
</script>

It shows "url(x.png)" on Firefox, while it should show "none" (and it does in all other browsers).

This affects border-image-{source,slice,width,repeat}, but not border-image-outset.

It seems to be a regression in range of: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9696d1c4b3ba&tochange=986e840a2979

I suspect bug 1125391 and bug 1127198.

This regression was not caught by test because of bug 1331903.
OK I know the reason.
Assignee: nobody → xidorn+moz
Comment on attachment 8828234 [details]
Bug 1332193 - Fix several properties to return NeutralChange hint.

https://reviewboard.mozilla.org/r/105702/#review106594

::: layout/style/nsStyleStruct.cpp:4149
(Diff revision 1)
> +  if (mIMEMode != aNewData.mIMEMode) {
> +    return nsChangeHint_NeutralChange;
> +  }

You'll need to add nsChangeHint_NeutralChange to this struct's MaxDifference method.

Nit: a blank line below this block probably matches the prevailing style.
Attachment #8828234 - Flags: review?(cam) → review+
https://hg.mozilla.org/mozilla-central/rev/168ea3e9ff0b
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.