Bug 99741 - Generate fewer repaint calls during subtree detaching
Summary: Generate fewer repaint calls during subtree detaching
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on: 100499
Blocks: 92697
  Show dependency treegraph
 
Reported: 2012-10-18 11:48 PDT by Julien Chaffraix
Modified: 2012-10-26 05:20 PDT (History)
6 users (show)

See Also:


Attachments
Proposed change: Don't repaint our removed children unless they have a RenderLayer and repaint the subtree root. (25.03 KB, patch)
2012-10-18 13:48 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-10-18 11:48:54 PDT
Now that bug 98336 has landed, we can use the top-down implementation to avoid generating a repaint for each child removal. This is currently the case due to RenderObjectChildList::removeChild (see http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderObjectChildList.cpp#L75).

This can work as we track the visual overflow during layout so the root's clippedOverflowRectForRepaint includes the children's overflow. There are some exceptions to that though: the example being positioned object way outside it's containing block's box as including them would yield to too overpainting.
Comment 1 Julien Chaffraix 2012-10-18 13:48:20 PDT
Created attachment 169463 [details]
Proposed change: Don't repaint our removed children unless they have a RenderLayer and repaint the subtree root.
Comment 2 Eric Seidel (no email) 2012-10-18 15:03:45 PDT
Comment on attachment 169463 [details]
Proposed change: Don't repaint our removed children unless they have a RenderLayer and repaint the subtree root.

LGTM.  However mitz is the best repaint expert these days, and you may wish to engage him before landing on this and future repaint bugs (I see you have already CC'd him).
Comment 3 Julien Chaffraix 2012-10-26 02:03:41 PDT
Comment on attachment 169463 [details]
Proposed change: Don't repaint our removed children unless they have a RenderLayer and repaint the subtree root.

> LGTM.  However mitz is the best repaint expert these days, and you may wish to engage him before landing on this and future repaint bugs (I see you have already CC'd him).

The repaint experts are CC'ed and didn't scream so I assume the patch is not completely broken. I invited Dan to review this patch last week but haven't heard back.
Comment 4 WebKit Review Bot 2012-10-26 02:34:25 PDT
Comment on attachment 169463 [details]
Proposed change: Don't repaint our removed children unless they have a RenderLayer and repaint the subtree root.

Clearing flags on attachment: 169463

Committed r132591: <http://trac.webkit.org/changeset/132591>
Comment 5 WebKit Review Bot 2012-10-26 02:34:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2012-10-26 04:35:56 PDT
Re-opened since this is blocked by bug 100499
Comment 7 Julien Chaffraix 2012-10-26 05:20:30 PDT
New Chromium baselines landed in http://trac.webkit.org/changeset/132626.