Changeset 273396 in webkit


Ignore:
Timestamp:
Feb 24, 2021, 9:10:31 AM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r273220. rdar://problem/74623537

[Paint Timing] Return early from contentful paint check when no contentful pixels/characters at all
https://bugs.webkit.org/show_bug.cgi?id=222245

Reviewed by Simon Fraser.

Bail from recursive contenful-paint check if there are no pixels/text characters in the entire document.

Covered by existing tests, an optimization only.

  • dom/Document.cpp: (WebCore::Document::enqueuePaintTimingEntryIfNeeded):
  • page/FrameView.cpp: (WebCore::FrameView::hasContenfulDescendants const):
  • page/FrameView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273220 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-611-branch/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611-branch/Source/WebCore/ChangeLog

    r273393 r273396  
     12021-02-23  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r273220. rdar://problem/74623537
     4
     5    [Paint Timing] Return early from contentful paint check when no contentful pixels/characters at all
     6    https://bugs.webkit.org/show_bug.cgi?id=222245
     7   
     8    Reviewed by Simon Fraser.
     9   
     10    Bail from recursive contenful-paint check if there are no pixels/text characters in the entire document.
     11   
     12    Covered by existing tests, an optimization only.
     13   
     14    * dom/Document.cpp:
     15    (WebCore::Document::enqueuePaintTimingEntryIfNeeded):
     16    * page/FrameView.cpp:
     17    (WebCore::FrameView::hasContenfulDescendants const):
     18    * page/FrameView.h:
     19   
     20   
     21    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     22
     23    2021-02-21  Noam Rosenthal  <noam@webkit.org>
     24
     25            [Paint Timing] Return early from contentful paint check when no contentful pixels/characters at all
     26            https://bugs.webkit.org/show_bug.cgi?id=222245
     27
     28            Reviewed by Simon Fraser.
     29
     30            Bail from recursive contenful-paint check if there are no pixels/text characters in the entire document.
     31
     32            Covered by existing tests, an optimization only.
     33
     34            * dom/Document.cpp:
     35            (WebCore::Document::enqueuePaintTimingEntryIfNeeded):
     36            * page/FrameView.cpp:
     37            (WebCore::FrameView::hasContenfulDescendants const):
     38            * page/FrameView.h:
     39
    1402021-02-23  Alan Coon  <alancoon@apple.com>
    241
  • branches/safari-611-branch/Source/WebCore/dom/Document.cpp

    r273346 r273396  
    32743274        return;
    32753275
     3276    if (!view()->hasContenfulDescendants())
     3277        return;
     3278
    32763279    if (!ContentfulPaintChecker::qualifiesForContentfulPaint(*view()))
    32773280        return;
  • branches/safari-611-branch/Source/WebCore/page/FrameView.cpp

    r272260 r273396  
    46064606}
    46074607
     4608bool FrameView::hasContenfulDescendants() const
     4609{
     4610    return m_visuallyNonEmptyCharacterCount || m_visuallyNonEmptyPixelCount;
     4611}
     4612
    46084613bool FrameView::isViewForDocumentInFrame() const
    46094614{
  • branches/safari-611-branch/Source/WebCore/page/FrameView.h

    r272260 r273396  
    414414    void incrementVisuallyNonEmptyPixelCount(const IntSize&);
    415415    bool isVisuallyNonEmpty() const { return m_contentQualifiesAsVisuallyNonEmpty; }
     416    bool hasContenfulDescendants() const;
    416417    void checkAndDispatchDidReachVisuallyNonEmptyState();
    417418
Note: See TracChangeset for help on using the changeset viewer.