Bug 135106

Summary: Inline box culling breaks node snapshotting
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: hyatt, pangle, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case none

Description mitz 2014-07-20 16:45:50 PDT
Created attachment 235193 [details]
Test case

In the test case, when you drag the first span, the drag snapshot is correct. When you drag the second span, the snapshot is empty.

The reason is that the snapshots are made by setting PaintInfo’s subtreePaintRoot to span’s RenderInline, but since the second span doesn’t have inline boxes, we never hit the (subtreePaintRoot == renderer) case in PaintInfo::updateSubtreePaintRootForChildren() when it’s called from InlineFlowBox::paint, so the subtree root is never cleared and nothing paints.
Comment 1 mitz 2014-07-20 17:28:09 PDT
My idea for fixing this is to add another RenderObject* member to PaintInfo, which will contain the nearest ancestor of the subtreePaintRoot that isn’t a RenderInline with culled boxes, and whenever we are in that object’s subtree, do a more expensive shouldPaintWithinRoot() check.
Comment 2 mitz 2015-04-23 14:30:12 PDT
To see the bug you may need to undo the workaround from <http://trac.webkit.org/r171284>.
Comment 3 Radar WebKit Bug Importer 2021-06-16 15:49:08 PDT
<rdar://problem/79420098>