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

Issue 1814853003: Track whether an element was inserted via document.write (Closed)

Created:
4 years, 9 months ago by Charlie Harrison
Modified:
4 years, 8 months ago
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

Track whether an element was inserted via document.write This patch adds a member to ScriptLoader which tracks whether elements are created via a call to document.write. These scripts are going to be parser blocking. The plan is to use this data for metrics tracking, as well as driving a prediction service which will learn to preload these scripts when we load their initiator. BUG=594159 Committed: https://crrev.com/93bafc396d0c61800ad30d8dc569539ca3de7bd9 Cr-Commit-Position: refs/heads/master@{#385218}

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : use constructionContextFlags #

Patch Set 4 : rebase on #384935 #

Total comments: 3

Patch Set 5 : back to ps2 with some changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -13 lines) Patch
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLScriptElement.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLScriptElement.cpp View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp View 1 2 3 4 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 26 (8 generated)
Charlie Harrison
PTAL. If there's a better way to do this, please let me know. Right now ...
4 years, 9 months ago (2016-03-17 19:42:43 UTC) #3
kouhei (in TOK)
https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode89 third_party/WebKit/Source/core/dom/ScriptLoader.h:89: bool createdDuringDocumentWrite() { return m_createdDuringDocumentWrite; } Optional Nit: wasCreatedDuringDocumentWrite()? ...
4 years, 9 months ago (2016-03-18 02:24:27 UTC) #4
Charlie Harrison
https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode89 third_party/WebKit/Source/core/dom/ScriptLoader.h:89: bool createdDuringDocumentWrite() { return m_createdDuringDocumentWrite; } On 2016/03/18 at ...
4 years, 9 months ago (2016-03-18 14:10:47 UTC) #5
kouhei (in TOK)
https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/html/HTMLScriptElement.h File third_party/WebKit/Source/core/html/HTMLScriptElement.h (right): https://codereview.chromium.org/1814853003/diff/20001/third_party/WebKit/Source/core/html/HTMLScriptElement.h#newcode37 third_party/WebKit/Source/core/html/HTMLScriptElement.h:37: static PassRefPtrWillBeRawPtr<HTMLScriptElement> create(Document&, bool wasInsertedByParser, bool alreadyStarted = false, ...
4 years, 9 months ago (2016-03-22 04:18:39 UTC) #6
Charlie Harrison
I'm putting this on hold while a design from shivanisha@ is formulating. This change may ...
4 years, 8 months ago (2016-03-31 13:52:46 UTC) #7
Charlie Harrison
PTAL. bmcquade@ decided we'd like to incorporate this data into the new DocumentParserTiming class.
4 years, 8 months ago (2016-04-04 18:01:33 UTC) #9
Bryan McQuade
On 2016/04/04 at 18:01:33, csharrison wrote: > PTAL. bmcquade@ decided we'd like to incorporate this ...
4 years, 8 months ago (2016-04-04 21:20:25 UTC) #10
Bryan McQuade
LGTM https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp File third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp (right): https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp#newcode662 third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp:662: // TODO(csharrison): This logic only works if the ...
4 years, 8 months ago (2016-04-04 21:43:57 UTC) #12
kouhei (in TOK)
https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode40 third_party/WebKit/Source/core/dom/ScriptLoader.h:40: enum ElementConstructionContextFlags { Thanks for this change! Would you ...
4 years, 8 months ago (2016-04-05 13:20:46 UTC) #13
Charlie Harrison
On 2016/04/05 13:20:46, kouhei wrote: > https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.h > File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): > > https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode40 > ...
4 years, 8 months ago (2016-04-05 15:05:56 UTC) #14
Bryan McQuade
On 2016/04/05 at 15:05:56, csharrison wrote: > On 2016/04/05 13:20:46, kouhei wrote: > > https://codereview.chromium.org/1814853003/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.h ...
4 years, 8 months ago (2016-04-05 15:07:18 UTC) #15
kouhei (in TOK)
On 2016/04/05 15:07:18, Bryan McQuade wrote: > On 2016/04/05 at 15:05:56, csharrison wrote: > > ...
4 years, 8 months ago (2016-04-05 15:28:59 UTC) #16
Bryan McQuade
On 2016/04/05 at 15:28:59, kouhei wrote: > On 2016/04/05 15:07:18, Bryan McQuade wrote: > > ...
4 years, 8 months ago (2016-04-05 16:13:47 UTC) #17
Charlie Harrison
Done.
4 years, 8 months ago (2016-04-05 16:53:09 UTC) #18
Bryan McQuade
lgtm
4 years, 8 months ago (2016-04-05 16:56:47 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814853003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814853003/80001
4 years, 8 months ago (2016-04-05 17:04:11 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 8 months ago (2016-04-05 18:00:43 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 18:01:56 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/93bafc396d0c61800ad30d8dc569539ca3de7bd9
Cr-Commit-Position: refs/heads/master@{#385218}

Powered by Google App Engine
This is Rietveld 408576698