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

Issue 1859763003: DocumentLoader should commit the load before creating a DocumentWriter (Closed)

Created:
4 years, 8 months ago by meacer
Modified:
4 years, 8 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The current order of events in DocumentLoader causes an HTML parser to be created via DocumentWriter::create before the load commits. This causes the HTML parser to read a stale value for scriptEnabled setting in HTMLParserOptions if the setting changes between page loads. This in turn breaks the rendering of noscript tags. This CL moves receivedFirstData call before DocumentWriter::create and FrameLoader::didBeginDocument so that the load is committed before the HTML parser is created and the correct scriptEnabled value is used by the parser. It also moves creation of Content Security Policy and setting saved form data to a new callback didInstallNewDocument. The order of callbacks in FrameLoader are now: 1. didInstallNewDocument 2. receivedFirstData 3. didBeginDocument BUG=232410 Committed: https://crrev.com/3704be79c37e8fb0095c672e138241aa019f9add Cr-Commit-Position: refs/heads/master@{#388825}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Move receivedFirstData to before didBeginDocument #

Patch Set 4 : Static #

Patch Set 5 : Add tests #

Patch Set 6 : Fix baseURL #

Patch Set 7 : Fix test #

Total comments: 2

Patch Set 8 : Move didBeginDocument #

Patch Set 9 : Fix layout tests #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -51 lines) Patch
M chrome/renderer/content_settings_observer_browsertest.cc View 1 2 3 4 7 chunks +142 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -6 lines 0 comments Download

Messages

Total messages: 36 (13 generated)
meacer
Jochen: This is a follow up to https://codereview.chromium.org/1835753002/. I'm still looking at the failing tests ...
4 years, 8 months ago (2016-04-19 00:13:21 UTC) #3
dcheng
Sorry, for some reason, Rietveld decided to drop me from https://codereview.chromium.org/1835753002/ so I never saw ...
4 years, 8 months ago (2016-04-19 00:40:19 UTC) #5
meacer
On 2016/04/19 00:40:19, dcheng wrote: > Sorry, for some reason, Rietveld decided to drop me ...
4 years, 8 months ago (2016-04-19 00:55:30 UTC) #6
dcheng
On 2016/04/19 at 00:55:30, meacer wrote: > On 2016/04/19 00:40:19, dcheng wrote: > > Sorry, ...
4 years, 8 months ago (2016-04-19 01:09:49 UTC) #7
meacer
On 2016/04/19 01:09:49, dcheng wrote: > On 2016/04/19 at 00:55:30, meacer wrote: > > On ...
4 years, 8 months ago (2016-04-19 18:12:20 UTC) #8
meacer
> before didBeginDocument is called Small correction: As seen in patchset #7, this part wasn't ...
4 years, 8 months ago (2016-04-19 23:24:49 UTC) #11
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1859763003/diff/120001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp File third_party/WebKit/Source/core/loader/DocumentLoader.cpp (right): https://codereview.chromium.org/1859763003/diff/120001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp#newcode675 third_party/WebKit/Source/core/loader/DocumentLoader.cpp:675: frame->loader().receivedFirstData(); this is still after didBeginDocument. Why not move ...
4 years, 8 months ago (2016-04-20 14:23:25 UTC) #12
meacer
https://codereview.chromium.org/1859763003/diff/120001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp File third_party/WebKit/Source/core/loader/DocumentLoader.cpp (right): https://codereview.chromium.org/1859763003/diff/120001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp#newcode675 third_party/WebKit/Source/core/loader/DocumentLoader.cpp:675: frame->loader().receivedFirstData(); On 2016/04/20 14:23:25, jochen wrote: > this is ...
4 years, 8 months ago (2016-04-20 23:51:00 UTC) #13
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-21 14:46:37 UTC) #14
meacer
On 2016/04/21 14:46:37, jochen wrote: > lgtm Thanks!
4 years, 8 months ago (2016-04-21 17:19:13 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1859763003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1859763003/180001
4 years, 8 months ago (2016-04-21 17:22:55 UTC) #18
dcheng
Can you update the CL description to describe the WebFrameClient callback order before your changes ...
4 years, 8 months ago (2016-04-21 17:26:48 UTC) #19
meacer
On 2016/04/21 17:26:48, dcheng wrote: > Can you update the CL description to describe the ...
4 years, 8 months ago (2016-04-21 17:46:01 UTC) #22
dcheng
On 2016/04/21 at 17:46:01, meacer wrote: > On 2016/04/21 17:26:48, dcheng wrote: > > Can ...
4 years, 8 months ago (2016-04-21 18:13:30 UTC) #23
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 8 months ago (2016-04-21 18:38:59 UTC) #25
meacer
On 2016/04/21 18:38:59, commit-bot: I haz the power wrote: > Committed patchset #10 (id:180001) Dang, ...
4 years, 8 months ago (2016-04-21 18:43:04 UTC) #26
meacer
On 2016/04/21 18:43:04, Mustafa Emre Acer wrote: > On 2016/04/21 18:38:59, commit-bot: I haz the ...
4 years, 8 months ago (2016-04-21 19:22:54 UTC) #28
dcheng
On 2016/04/21 at 19:22:54, meacer wrote: > On 2016/04/21 18:43:04, Mustafa Emre Acer wrote: > ...
4 years, 8 months ago (2016-04-21 19:35:51 UTC) #29
meacer
On 2016/04/21 19:35:51, dcheng wrote: > On 2016/04/21 at 19:22:54, meacer wrote: > > On ...
4 years, 8 months ago (2016-04-21 19:37:20 UTC) #30
dcheng
On 2016/04/21 at 19:37:20, meacer wrote: > On 2016/04/21 19:35:51, dcheng wrote: > > On ...
4 years, 8 months ago (2016-04-21 19:43:29 UTC) #31
meacer
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/1904183002/ by meacer@chromium.org. ...
4 years, 8 months ago (2016-04-21 19:51:01 UTC) #32
meacer
On 2016/04/21 19:51:01, Mustafa Emre Acer wrote: > A revert of this CL (patchset #10 ...
4 years, 8 months ago (2016-04-21 19:57:54 UTC) #34
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:36:33 UTC) #36
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/3704be79c37e8fb0095c672e138241aa019f9add
Cr-Commit-Position: refs/heads/master@{#388825}

Powered by Google App Engine
This is Rietveld 408576698