Bug 258967

Summary: ShouldPaintUsingCompositeCopy feature is not stable with respect to layouts, resizes or similar
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: CompositingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 258964    
Bug Blocks:    
Attachments:
Description Flags
proposal for LayoutTests/compositing/canvas/ none

Description Kimmo Kinnunen 2023-07-07 04:50:26 PDT
Somehow on resizing and bringing up the print dialog, possibly just doing layout, the m_subpixelOffsetFromRenderer gets a small value such as ~0.18. This causes the optimization to be lost, because contentsBox "moves" away from the origo, even though in practice it does not.
    auto contents = contentsBox();
    if (contents.location() != LayoutPoint(0, 0))
        return false;
E.g. repro case like:
load page
canvas gets the optimization
resize
canvas does not get the optimization
reload
canvas gets the optimization
Comment 1 Radar WebKit Bug Importer 2023-07-07 04:50:36 PDT
<rdar://problem/111902075>
Comment 2 Kimmo Kinnunen 2023-07-07 04:52:13 PDT
Created attachment 466970 [details]
proposal for LayoutTests/compositing/canvas/

resize/print this and add debug print to inspect whether the canvas is painted with Copy or SourceOver