Title: [294303] branches/safari-613-branch/Source/WebCore
- Revision
- 294303
- Author
- alanc...@apple.com
- Date
- 2022-05-16 23:11:01 -0700 (Mon, 16 May 2022)
Log Message
Cherry-pick r293981. rdar://problem/92084291
ASSERT in WebCore::RenderTreeUpdater::updateRenderTree
https://bugs.webkit.org/show_bug.cgi?id=240237
Reviewed by Antti Koivisto.
There are instances where calling findRenderingRoots() in RenderTreeUpdater::commit will
returns two rendering roots, with one of them being an ancestor of the other.
Calling updateRenderTree on the ancestor rendering root could end up removing
the renderer of the descendant rendering root.
This patch merges findRenderingRoots() to RenderTreeUpdater::commit() which, and now we will
ignore the nested root if there is no longer a renderer when it is being processed.
* rendering/updating/RenderTreeUpdater.cpp:
Canonical link: https://commits.webkit.org/250419@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (294302 => 294303)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-05-17 06:10:58 UTC (rev 294302)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-05-17 06:11:01 UTC (rev 294303)
@@ -1,5 +1,46 @@
2022-05-16 Alan Coon <alanc...@apple.com>
+ Cherry-pick r293981. rdar://problem/92084291
+
+ ASSERT in WebCore::RenderTreeUpdater::updateRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=240237
+
+ Reviewed by Antti Koivisto.
+
+ There are instances where calling findRenderingRoots() in RenderTreeUpdater::commit will
+ returns two rendering roots, with one of them being an ancestor of the other.
+
+ Calling updateRenderTree on the ancestor rendering root could end up removing
+ the renderer of the descendant rendering root.
+
+ This patch merges findRenderingRoots() to RenderTreeUpdater::commit() which, and now we will
+ ignore the nested root if there is no longer a renderer when it is being processed.
+
+ * rendering/updating/RenderTreeUpdater.cpp:
+
+ Canonical link: https://commits.webkit.org/250419@main
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-05-09 Gabriel Nava Marino <gnavamar...@apple.com>
+
+ ASSERT in WebCore::RenderTreeUpdater::updateRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=240237
+
+ Reviewed by Antti Koivisto.
+
+ There are instances where calling findRenderingRoots() in RenderTreeUpdater::commit will
+ returns two rendering roots, with one of them being an ancestor of the other.
+
+ Calling updateRenderTree on the ancestor rendering root could end up removing
+ the renderer of the descendant rendering root.
+
+ This patch merges findRenderingRoots() to RenderTreeUpdater::commit() which, and now we will
+ ignore the nested root if there is no longer a renderer when it is being processed.
+
+ * rendering/updating/RenderTreeUpdater.cpp:
+
+2022-05-16 Alan Coon <alanc...@apple.com>
+
Cherry-pick r293894. rdar://problem/74201964
[iOS] Infinite recursion at -[WKFullScreenWindowController _exitFullscreenImmediately]
Modified: branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp (294302 => 294303)
--- branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp 2022-05-17 06:10:58 UTC (rev 294302)
+++ branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp 2022-05-17 06:11:01 UTC (rev 294303)
@@ -100,18 +100,6 @@
return nullptr;
}
-static ListHashSet<ContainerNode*> findRenderingRoots(const Style::Update& update)
-{
- ListHashSet<ContainerNode*> renderingRoots;
- for (auto& root : update.roots()) {
- auto* renderingRoot = findRenderingRoot(*root);
- if (!renderingRoot)
- continue;
- renderingRoots.add(renderingRoot);
- }
- return renderingRoots;
-}
-
void RenderTreeUpdater::commit(std::unique_ptr<const Style::Update> styleUpdate)
{
ASSERT(&m_document == &styleUpdate->document());
@@ -123,8 +111,12 @@
m_styleUpdate = WTFMove(styleUpdate);
- for (auto* root : findRenderingRoots(*m_styleUpdate))
- updateRenderTree(*root);
+ for (auto& root : m_styleUpdate->roots()) {
+ auto* renderingRoot = findRenderingRoot(*root);
+ if (!renderingRoot)
+ continue;
+ updateRenderTree(*renderingRoot);
+ }
generatedContent().updateRemainingQuotes();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes