Changeset 257752 in webkit


Ignore:
Timestamp:
Mar 2, 2020 6:19:13 PM (4 years ago)
Author:
Alan Bujtas
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r257749 r257752  
     12020-03-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Frame::layerTreeAsText should make sure that all the frames are clean and up-to-date
     4        https://bugs.webkit.org/show_bug.cgi?id=208484
     5        <rdar://problem/59972433>
     6
     7        Reviewed by Simon Fraser.
     8
     9        window.internals.layerTreeAsText() is designed to dump the layer structure of the current page content.
     10        It calls updateLayout() on the mainframe's document to make sure we collect the layer information on a clear tree.
     11        However Document::updateLayout is scoped to the current document's frame (the mainframe in this case) and
     12        leaves all the other frames dirty.
     13
     14        * page/Frame.cpp:
     15        (WebCore::Frame::layerTreeAsText const):
     16
    1172020-03-02  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebCore/page/Frame.cpp

    r257648 r257752  
    860860String Frame::layerTreeAsText(LayerTreeFlags flags) const
    861861{
    862     document()->updateLayout();
    863 
     862    if (!m_view)
     863        return { };
     864
     865    m_view->updateLayoutAndStyleIfNeededRecursive();
    864866    if (!contentRenderer())
    865         return String();
     867        return { };
    866868
    867869    return contentRenderer()->compositor().layerTreeAsText(flags);
Note: See TracChangeset for help on using the changeset viewer.