Bug 218777

Summary: ContentfulPaintChecker should not trigger plugin snapshotting
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Noam Rosenthal <noam>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, noam, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2020-11-10 15:53:21 PST
This can happen:

    +                     2610 WebCore::Page::updateRendering()  (in WebCore) + 1102  [0x1099c501e]
    +                       2610 WebCore::Page::forEachDocument(WTF::Function<void (WebCore::Document&)> const&) const  (in WebCore) + 366  [0x1099be51e]
    +                         2610 WebCore::Document::enqueuePaintTimingEntryIfNeeded()  (in WebCore) + 208  [0x10938a9e0]
    +                           2610 WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint(WebCore::FrameView&)  (in WebCore) + 259  [0x109c46273]
    +                             2610 WebCore::ScrollView::paint(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::Widget::SecurityOriginPaintPolicy, WebCore::EventRegionContext*)  (in WebCore) + 1039  [0x109a6161f]
    +                               2610 WebCore::FrameView::paintContents(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::Widget::SecurityOriginPaintPolicy, WebCore::EventRegionContext*)  (in WebCore) + 760  [0x1099a6788]
    +                                 2610 WebCore::FrameView::willPaintContents(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::FrameView::PaintingState&)  (in WebCore) + 447  [0x1099a6baf]
    +                                   2610 WebKit::PluginView::notifyWidget(WebCore::WidgetNotification)  (in WebKit) + 134  [0x106501f0a]
    +                                     2610 WebKit::PDFPlugin::snapshot()  (in WebKit) + 297  [0x1069433d7]
    +                                       2610 -[PDFLayerController snapshotInContext:]  (in PDFKit) + 1753  [0x7fff3ebf963b]
    +                                         2610 -[PDFPage drawWithBox:toContext:]  (in PDFKit) + 141  [0x7fff3ec34edd]

Plugin snapshotting here is just a waste of cycles.
Comment 1 Simon Fraser (smfr) 2020-11-10 15:53:53 PST
<rdar://problem/71256352>
Comment 2 Noam Rosenthal 2020-11-10 23:24:38 PST
Created attachment 413787 [details]
Patch
Comment 3 EWS 2020-11-11 09:23:33 PST
Committed r269687: <https://trac.webkit.org/changeset/269687>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413787 [details].