Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Issue 2042413002: Notify the HTMLDocumentParser on document element available (Closed)

Created:
4 years, 6 months ago by Charlie Harrison
Modified:
4 years, 2 months ago
Reviewers:
Devlin, kouhei (in TOK)
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, kinuko+watch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Notify 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -37 lines) Patch
M third_party/WebKit/LayoutTests/fast/images/width-on-broken-data-src.html View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/passive-mixed-content-iframe.html View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentParser.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLHtmlElement.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLHtmlElement.cpp View 1 2 3 4 5 1 chunk +14 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocument.cpp View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/MediaDocument.cpp View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/PluginDocument.cpp View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp View 1 2 3 2 chunks +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h View 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 3 chunks +4 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
Charlie Harrison
WDYT about this change? Let's see what the bots think. Devlin, do extension folks have ...
4 years, 6 months ago (2016-06-07 21:38:08 UTC) #3
Devlin
On 2016/06/07 21:38:08, csharrison wrote: > Let's see what the bots think. Devlin, do extension ...
4 years, 6 months ago (2016-06-08 00:18:53 UTC) #5
Charlie Harrison
On 2016/06/08 00:18:53, Devlin (slow until June 9) wrote: > On 2016/06/07 21:38:08, csharrison wrote: ...
4 years, 6 months ago (2016-06-08 00:33:34 UTC) #6
kouhei (in TOK)
> > Not really, no - not beyond normal chrome telemetry tests. > OK, that ...
4 years, 6 months ago (2016-06-08 05:09:11 UTC) #7
Charlie Harrison
OK looks like the bots are reasonably happy. Ready for a second pass. I updated ...
4 years, 6 months ago (2016-06-08 22:25:50 UTC) #8
kouhei (in TOK)
lgtm % description update Thanks for doing the refactoring work. I really like PS7. Yes, ...
4 years, 6 months ago (2016-06-09 01:13:47 UTC) #9
Charlie Harrison
On 2016/06/09 at 01:13:47, kouhei wrote: > lgtm % description update > > Thanks for ...
4 years, 6 months ago (2016-06-09 03:00:47 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042413002/120001
4 years, 6 months ago (2016-06-09 03:01:37 UTC) #14
kinuko
Since this is not adding tech debt but rather simplifying things (I like the resulting ...
4 years, 6 months ago (2016-06-09 03:55:32 UTC) #15
Charlie Harrison
On 2016/06/09 at 03:55:32, kinuko wrote: > Since this is not adding tech debt but ...
4 years, 6 months ago (2016-06-09 04:01:31 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-09 04:09:47 UTC) #18
Devlin
On 2016/06/09 03:00:47, csharrison wrote: > Thanks! Updated the description. Devlin, would you like to ...
4 years, 6 months ago (2016-06-09 17:32:10 UTC) #19
Charlie Harrison
On 2016/06/09 at 17:32:10, rdevlin.cronin wrote: > On 2016/06/09 03:00:47, csharrison wrote: > > Thanks! ...
4 years, 6 months ago (2016-06-09 17:33:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042413002/120001
4 years, 6 months ago (2016-06-09 17:34:11 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-09 17:40:43 UTC) #23
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-09 17:40:50 UTC) #24
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/d63bd15666f24c048b0caa641cace3eec9460769 Cr-Commit-Position: refs/heads/master@{#398937}
4 years, 6 months ago (2016-06-09 17:42:40 UTC) #26
Charlie Harrison
On 2016/06/09 at 17:42:40, commit-bot wrote: > Patchset 7 (id:??) landed as https://crrev.com/d63bd15666f24c048b0caa641cace3eec9460769 > Cr-Commit-Position: ...
4 years, 6 months ago (2016-06-12 11:18:47 UTC) #27
pdknsk
4 years, 2 months ago (2016-10-18 02:57:38 UTC) #28
Message was sent while issue was closed.
This has partially broken content scripts which insert a <script> tag at
document_start.

https://bugs.chromium.org/p/chromium/issues/detail?id=634381#c6

Powered by Google App Engine
This is Rietveld 408576698