DescriptionNotify the HTMLDocumentParser on document element available
This patch adds logic to the HTMLHtmlElement so that it can notify
the HTMLDocumentParser immediately when the document element is available.
This is triggered in HTMLHtmlElement::insertedByParser. Additionally,
logic to dispatch notifications to the embedder is refactored into
insertedByParser.
insertedByParser initializes the ApplicationCache, then sends the
notification to the HTMLDocumentParser to issue any queued preloads (the
preloads wait for ApplicationCache so they don't download needlessly).
Next, the method dispatches notifications to embedders, via
FrameLoader::dispatchDocumentElementAvailable and
FrameLoader::runscriptsAtDocumentAvailable.
Note the latter is used by extensions, which can run extremely expensive
content scripts. This patch changes ordering so that preloads can be sent
before this happens.
BUG=618101
Committed: https://crrev.com/d63bd15666f24c048b0caa641cace3eec9460769
Cr-Commit-Position: refs/heads/master@{#398937}
Patch Set 1 #Patch Set 2 : Always notify the parser #Patch Set 3 : Fix some layout test flakiness #
Total comments: 6
Patch Set 4 : Move dispatching logic to the html element #Patch Set 5 : Update other callsites #Patch Set 6 : #Patch Set 7 : insertedByParser after actual insertion point #Messages
Total messages: 28 (9 generated)
|