[layoutng] Only clear the paint fragment if we get a successful layout

That way, we can keep around the old paint fragment while we wait for
a final new one.

This patch fixes a dcheck failure when enabling fragment caching.

R=kojii@chromium.org,eae@chromium.org

Bug: 635619
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I763446ab3411c828a636317421fd398f500be67f
Reviewed-on: https://chromium-review.googlesource.com/1012499
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551335}
1 file changed