RenderView is null for import documents.

Documents for html imports have separate StyleEngines and separate lists of
pending stylesheets. However, they don't have a RenderView. In r176050 the
repaint was moved from the StyleEngine where non-master documents skipped
the repaint. Trying to do a repaint from a non-master document will crash
without a check for renderView().

I have added a renderView() check with an assert that checks that it happens
if we are in an import document. I did keep the changing of
m_pendingSheetLayout to IgnoreLayoutWithPendingSheets, since we
envidentially do set it to DidLayoutWithPendingSheets for import documents,
even before the r176050 change.

It is possible that the m_pendingSheetLayout machinery does nothing useful
for imported documents, but I frankly don't know how it should work.

I am only able to reproduce the crash in the layout test with --debug.

R=ojan@chromium.org,esprehn@chromium.org
BUG=386564

Review URL: https://codereview.chromium.org/330093003

git-svn-id: svn://svn.chromium.org/blink/trunk@176649 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed
tree: 7c757e54b579ceb678a6fb83aa035f47dc5c9abf
  1. third_party/