PreferredSizeChangedMode causes an additional blink lifecycle update after every layout.
Testcase:
----------------8<----------------
<!doctype html>
<div id="div" style="width: 100px; height: 100px; background: lightblue;"></div>
<script>
setTimeout(function() {
console.log('about to change layout')
div.style.width = "200px";
}, 1500);
</script>
----------------8<----------------
Output:
----------------8<----------------
[CONSOLE(5)] "about to change layout"
[local_frame_view.cc(2355)] UpdateLifecyclePhasesInternal
[local_frame_view.cc(2355)] UpdateLifecyclePhasesInternal
----------------8<----------------
This mode is on by default on MacOS in case the user clicks the green zoom button on the window:
https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_view_mac.mm?l=418
Comment 1 by bugdroid1@chromium.org
, Jul 31