DescriptionReland "Avoid layout/full-repaint on view height change if possible"
Original CL is https://codereview.chromium.org/99663004
Previously we always layout/full-repaint of the whole view when the height
of the RenderView changes. In many cases this is unnecessary. Especially,
this causes unnecessary cost on Android when the top control shows or
hides.
Avoid repaint if the RenderView doesn't needs full layout.
The original CL was reverted because of issues caused. This CL has the
following changes compared to the original CL:
- Call ChromeClient::layoutUpdated() after the simplified layout. This
is needed at least for WebViewImpl to update the page scale factor
when the screen rotates on Android;
- Combined the simplified layout code in RenderView::viewResized() and
RenderView::needsLayoutOnLogicalHeightChange() into
Renderview::trySimplifiedLayoutOnHeightChange() because the code are
highly dependent (e.g. the new overflow code);
- Handle overflow changes (bug 342185):
- During a normal layout, overflow may be created or destroyed based
on the relationship between the contents size and view size. We need
to mimic the logic in simplified layout path;
- Fallback to full layout if there is no vertical
render overflow (page is not vertically scrollable) and the view
height is shrinking, because without a full layout we can't know the
new contents size. For Android this case rarely happen because we
don't auto-hide the url bar if the page is not vertically scrollable.
BUG=258219, 327815, 342185
TEST=WebFrameTest.heightChangeRepaint, WebFrameTest.heightChangeNoFullRepaintOverflowChange
TEST=all layout tests still pass
Patch Set 1 : Original CL #Patch Set 2 : New CL #
Total comments: 17
Patch Set 3 : Viewport media query, comments, etc. #
Total comments: 13
Patch Set 4 : computeOverflow, etc. #
Total comments: 3
Messages
Total messages: 12 (0 generated)
|