Closed Bug 1570759 Opened 4 years ago Closed 4 years ago

Consider enabling the optimization to not flush when getting fixed margins from getComputedStyle().


(Core :: Layout, defect, P3)




Tracking Status
firefox70 --- fixed


(Reporter: emilio, Assigned: emilio)




(2 files)

Attached file Testcase

This would align (dubiously) our behavior with other engines, but it's not 100% clear whether that's right, see

See the following test-case for a bit of surprising behavior. If you have fixed margins, we return the "wrong" used margin, but as soon as you have a percentage margin, presumably we store the UsedMarginProperty on the frame, and return the "proper" margin.

Our behavior is inconsistent, so it's unclear what to do here...

The priority flag is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)
Flags: needinfo?(jwatt) → needinfo?(emil.ghitta)
Flags: needinfo?(emil.ghitta) → needinfo?(emilio)

Yeah, I guess we should do this.

Assignee: nobody → emilio
Flags: needinfo?(emilio)
Priority: -- → P3

As noted this changes behavior, but it's unclear per what behavior is correct, and
our behavior is inconsistent depending on whether there's any percentage

This matches other browsers so it's pretty low risk I'd say.

The test starts passing without changes to the test, but given the CSSWG issue I
made the test not rely on the optimization.

Pushed by
Enable the optimization to not flush for fixed margin values. r=jwatt
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Pushed by
followup: Actually use the style value if we determine we don't need the layout one. r=bustage
Pushed by
Don't expect assertions since they all came from margin computation.
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.