Let RenderText be first-class paint invalidation citizen
Previously we always delegate invalidation of RenderText to its parent.
However, if its parent use composited scrolling and the RenderText is
currently not in the visible area of the scroller, we'll miss the
invalidation of the RenderText.
In addition, with https://codereview.chromium.org/596643002/
which distinguish invalidations on scrolling container layer and
scrolling contents layer, we'll also invalidate the wrong layer.
This change makes RenderText::clippedOverflowRectForPaintInvalidation
work and lets RenderText invalidate itself.
Please see the bug for details about performance.
Tests:
- compositing/overflow/text-color-change.html: covers RenderText paint
invalidation on style change;
- compositing/overflow/text-match-highlight.html: covers RenderText
paint invalidation caused by direct setShouldDoFullpaintInvalidation().
BUG=418313
Review URL: https://codereview.chromium.org/611613002
git-svn-id: svn://svn.chromium.org/blink/trunk@184549 bbb929c8-8fbe-4397-9dbb-9b2b20218538
15 files changed