Bug 135106 - Inline box culling breaks node snapshotting
Summary: Inline box culling breaks node snapshotting
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-20 16:45 PDT by mitz
Modified: 2018-07-17 20:10 PDT (History)
3 users (show)

See Also:


Attachments
Test case (188 bytes, text/html)
2014-07-20 16:45 PDT, mitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>.