[webkit-changes] [WebKit/WebKit] 7c138c: [CoordinatedGraphics] Setting `LocalFrameView`'s c...

Vitaly Dyachkov noreply at github.com
Thu Mar 14 02:22:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7c138c89f181e0a39ee64cd986ef11a848793575
      https://github.com/WebKit/WebKit/commit/7c138c89f181e0a39ee64cd986ef11a848793575
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp

  Log Message:
  -----------
  [CoordinatedGraphics] Setting `LocalFrameView`'s content size should not require relayout
https://bugs.webkit.org/show_bug.cgi?id=270445

Reviewed by Darin Adler.

In `LocalFrameViewLayoutContext::performLayout()` we layout the render
tree in several phases:

- `LayoutPhase::InPreLayout`
- `LayoutPhase::InRenderTreeLayout`
- `LayoutPhase::InViewSizeAdjust`
- `LayoutPhase::InPostLayout`

In the last phase, we assert that the layout root doesn't require
relayout after updating `LocalFrameView`'s content size.

Currently, at the end of `LayerTreeHost::contentsSizeChanged()` we call
`didChangeViewport()`, which in some circumstances (e.g. when fixed
layout is used) can trigger
`LocalFrameView::setViewportConstrainedObjectsNeedLayout()` and make
`RenderView::needsLayout()` return `true`. This should not happen.

* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::contentsSizeChanged):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list