Closed Bug 1781046 Opened 3 years ago Closed 2 years ago

Implement last remembered size for contain-intrinsic-size:auto

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(5 files, 1 obsolete file)

https://drafts.csswg.org/css-sizing-4/#last-remembered

  • At the time that ResizeObserver events are determined and delivered, if an element has contain-intrinsic-size: auto, is capable of being a ResizeObserver target, but does not have size containment, record the current inner dimensions of its principal box as its last remembered size.

  • At the time that ResizeObserver events are determined and delivered, if an element has a last remembered size but does not have contain-intrinsic-size: auto, remove its last remembered size.

Add logic for storing and removing the last remembered size.
This will be used in bug 1781045 for contain-intrinsic-size:auto.

Otherwise static analysis may complain.

Depends on D154322

So that it can accept a callback function implemented in C++.

Analogous to what D61436 did for DOMIntersectionObserver.

Depends on D154323

In a follow-up, it will take care of updating the last remembered size
as described in https://drafts.csswg.org/css-sizing-4/#last-remembered

Depends on D154324

Attachment #9286867 - Attachment description: Bug 1781046 - Implement last remembered size. r?emilio → Bug 1781046 - Add logic for updating the last remembered size. r?emilio

They just redirect to LogicalPixelSize's B/ISize(), which return floats.
So it seems pointless to return a double, and static analysis would
complain when storing the double as float for the last remembered size.

Depends on D154325

Pushed by oriol-bugzilla@hotmail.com: https://hg.mozilla.org/integration/autoland/rev/a13b2ebf58f4 Let elements have a last remembered size. r=emilio https://hg.mozilla.org/integration/autoland/rev/aa2517e27f9f Initialize ResizeObserver::mHasSkippedTargets. r=emilio https://hg.mozilla.org/integration/autoland/rev/8a6ebd1ea05a Make ResizeObserver::mCallback Variant. r=emilio https://hg.mozilla.org/integration/autoland/rev/625ba7359384 Add internal ResizeObserver for last remembered size. r=emilio https://hg.mozilla.org/integration/autoland/rev/eb10e9ea7d4f Return float in ResizeObserverSize's Block/InlineSize(). r=emilio

Comment on attachment 9286867 [details]
Bug 1781046 - Add logic for updating the last remembered size. r?emilio

Revision D152642 was moved to bug 1784577. Setting attachment 9286867 [details] to obsolete.

Attachment #9286867 - Attachment is obsolete: true

Backed out temporarily to test if is the cause of Bug 1784591

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 105 Branch → ---

Bug 1784575 uses some methods added in D154322, so I guess it should be backed out too or Firefox won't compile.

Flags: needinfo?(ctuns)

I will proceed with a reland in a moment, I backed out the wrong bug, sorry for that.

Flags: needinfo?(ctuns)
Pushed by ctuns@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/a3724891b9c9 Let elements have a last remembered size. r=emilio https://hg.mozilla.org/mozilla-central/rev/6dc8a407aa1f Initialize ResizeObserver::mHasSkippedTargets. r=emilio https://hg.mozilla.org/mozilla-central/rev/a0574f6e88e1 Make ResizeObserver::mCallback Variant. r=emilio https://hg.mozilla.org/mozilla-central/rev/84228a1b82da Add internal ResizeObserver for last remembered size. r=emilio https://hg.mozilla.org/mozilla-central/rev/84e0f04d939c Return float in ResizeObserverSize's Block/InlineSize(). r=emilio
Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Backout by csabou@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/75e6f845d5b8 Backed out 6 changesets (bug 1781046, bug 1784575) for pressumably causing Bug 1784591 and Bug 1784625. a=backout
Pushed by csabou@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/9d312ae8db16 Let elements have a last remembered size. r=emilio https://hg.mozilla.org/mozilla-central/rev/4d0e8ea2f26b Initialize ResizeObserver::mHasSkippedTargets. r=emilio https://hg.mozilla.org/mozilla-central/rev/f83b42c4d287 Make ResizeObserver::mCallback Variant. r=emilio https://hg.mozilla.org/mozilla-central/rev/a52b1d9f5cfc Add internal ResizeObserver for last remembered size. r=emilio https://hg.mozilla.org/mozilla-central/rev/a8a30fe7ec94 Return float in ResizeObserverSize's Block/InlineSize(). r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: