Invalidate paint of FrameView before invalidating the layout tree

This makes the current path and the slimmingPaintInvalidation path
invalidate FrameView and layout tree in the same order, to avoid
unnecessary layout test result differences. The slimmingPaintInvalidation
path needs to handle invalidation of FrameView before traversing into
the layout tree because the former initializes PaintInvalidatorContext
which is needed by the latter.

This will change the order of object paint invalidation of caret and
frame scrollbars. In some cases, this will cause the caret to be
invalidated twice (one in FrameView, another in BlockPaintInvalidator).
Will optimize this when making partial rect invalidation work for spv2.

BUG=646176

Review-Url: https://codereview.chromium.org/2366853002
Cr-Commit-Position: refs/heads/master@{#420749}
3 files changed