Reland: Make the HTMLDocumentParser yield more aggressively
The patch caused failure in Android DumpAccessibilityTreeTest.ACcessibilityANoText.
However, it turns out the expectation of the test is currently wrong.
The test is disabled in Chromium tree as of now, and I'll rebaseline the test after this patch is landed.
---
Based on eseidel@'s CL:
https://codereview.chromium.org/258013009/
Before this CL,
HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser
parsed the received chunk inline.
This was problematic because the function is invoked in IPC priority,
and DOM construction can block other time critical tasks.
This CL stops inline parsing and didReceiveParsedChunkFromBackgroundParser
is changed to always defer the processing.
Note that this also changes how HTMLPreloader is scheduled.
Before this CL, the preloader was not invoked when pump was done inline
from didReceiveParsedChunkFromBackgroundParser.
However, this CL ensures that the preloader is always invoked for all
confirmed tokens so that resource loading would not be delayed from
running slow synchronous scripts. This CL also delays the preloader
invocation until appcache is initialized, so that preloader requests would
respect it.
Rebaselines due to preloader being invoked more eagerly:
inspector/tracing/timeline-script-tag-1.html
fast/dom/HTMLLinkElement/link-and-subresource-test.html
permissionclient/image-permissions.html
tables/mozilla_expected_failures/bugs/bug128876.html
BUG=
356292,
421300
Committed:
https://src.chromium.org/viewvc/blink?view=rev&revision=188275
Committed:
https://src.chromium.org/viewvc/blink?view=rev&revision=188369