Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e54ba88232e1805a9027fa848a4b3f8db79aa42a
      
https://github.com/WebKit/WebKit/commit/e54ba88232e1805a9027fa848a4b3f8db79aa42a
  Author: Sammy Gill <sammy.g...@apple.com>
  Date:   2023-06-28 (Wed, 28 Jun 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Silence ResizeObservers while backgrounding YouTube on iOS.
rdar://109837319
https://bugs.webkit.org/show_bug.cgi?id=258588

Reviewed by Brent Fulgham.

Currently, if you background and foreground Safari on iPad while on
YouTube, you will get a different page layout compared to what was
displayed before the backgrounding process. Since the viewport sizes are
the same one would expect there to be no difference in the page layout.
This is due to a ResizeObserver callback using requestAnimationFrame to
execute some logic to reinitalize the ResizeObserver, but the observer
is ultimately put into a bad state due to the quick viewport size
changed. By silencing ResizeObservers during this process we should not
trigger this behavior and reintroduce the expected page layout again.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateResizeObservations):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldSilenceResizeObservers const):
* Source/WebCore/page/Quirks.h:

Canonical link: https://commits.webkit.org/265603@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to