Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 579f828a4c55913c59cc26a9e6e316e6cf40a45b
      
https://github.com/WebKit/WebKit/commit/579f828a4c55913c59cc26a9e6e316e6cf40a45b
  Author: Alan Baradlay <[email protected]>
  Date:   2024-06-12 (Wed, 12 Jun 2024)

  Changed paths:
    A LayoutTests/fast/dynamic/table-crash-only-first-forced-layout-expected.txt
    A LayoutTests/fast/dynamic/table-crash-only-first-forced-layout.html
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderTable.cpp

  Log Message:
  -----------
  [content-visibility] Never run simplified layout as first layout on a renderer
https://bugs.webkit.org/show_bug.cgi?id=275380
<rdar://126279006>

Reviewed by Antti Koivisto.

1. Normally the initial layout on a renderer (soon after getting attached to 
the render tree) is a "full" layout (as opposed to a simplified one).
2. However renderers inserted into a "content-visibility: hidden/auto" subtree 
are getting skipped
   during layout as if they were not part of the content (this is one of the 
perf benefits of using content-visibility).

Now if a subsequent _content_ mutation triggers simplified type of layout (e.g. 
and out of flow child is attached) and the
same time through DOM API (and/or scrolling in case of "content-visibility: 
auto") we run forced layout on this otherwise
skipped subtree, the first real layout may very well be a simplified one.

This change ensures that we always run full layout on a renderer that was 
previously skipped.
It helps to completely recover from all accumulated mutations while inside a 
"content-visibility: hidden/auto" subtree.

* LayoutTests/fast/dynamic/table-crash-only-first-forced-layout-expected.txt: 
Added.
* LayoutTests/fast/dynamic/table-crash-only-first-forced-layout.html: Added.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::canPerformSimplifiedLayout const):
* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::RenderTable::recalcSections const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to