Title: [257752] trunk/Source/WebCore
- Revision
- 257752
- Author
- [email protected]
- Date
- 2020-03-02 18:19:13 -0800 (Mon, 02 Mar 2020)
Log Message
Frame::layerTreeAsText should make sure that all the frames are clean and up-to-date
https://bugs.webkit.org/show_bug.cgi?id=208484
<rdar://problem/59972433>
Reviewed by Simon Fraser.
window.internals.layerTreeAsText() is designed to dump the layer structure of the current page content.
It calls updateLayout() on the mainframe's document to make sure we collect the layer information on a clear tree.
However Document::updateLayout is scoped to the current document's frame (the mainframe in this case) and
leaves all the other frames dirty.
* page/Frame.cpp:
(WebCore::Frame::layerTreeAsText const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (257751 => 257752)
--- trunk/Source/WebCore/ChangeLog 2020-03-03 01:49:16 UTC (rev 257751)
+++ trunk/Source/WebCore/ChangeLog 2020-03-03 02:19:13 UTC (rev 257752)
@@ -1,3 +1,19 @@
+2020-03-02 Zalan Bujtas <[email protected]>
+
+ Frame::layerTreeAsText should make sure that all the frames are clean and up-to-date
+ https://bugs.webkit.org/show_bug.cgi?id=208484
+ <rdar://problem/59972433>
+
+ Reviewed by Simon Fraser.
+
+ window.internals.layerTreeAsText() is designed to dump the layer structure of the current page content.
+ It calls updateLayout() on the mainframe's document to make sure we collect the layer information on a clear tree.
+ However Document::updateLayout is scoped to the current document's frame (the mainframe in this case) and
+ leaves all the other frames dirty.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::layerTreeAsText const):
+
2020-03-02 Daniel Bates <[email protected]>
Annotate editable elements with hit test order
Modified: trunk/Source/WebCore/page/Frame.cpp (257751 => 257752)
--- trunk/Source/WebCore/page/Frame.cpp 2020-03-03 01:49:16 UTC (rev 257751)
+++ trunk/Source/WebCore/page/Frame.cpp 2020-03-03 02:19:13 UTC (rev 257752)
@@ -859,10 +859,12 @@
String Frame::layerTreeAsText(LayerTreeFlags flags) const
{
- document()->updateLayout();
+ if (!m_view)
+ return { };
+ m_view->updateLayoutAndStyleIfNeededRecursive();
if (!contentRenderer())
- return String();
+ return { };
return contentRenderer()->compositor().layerTreeAsText(flags);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes