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

Issue 14852011: Implement document.currentScript (Closed)

Created:
7 years, 7 months ago by arv (Not doing code reviews)
Modified:
7 years, 6 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Implement document.currentScript http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-currentscript document.currentScript reflects the script that is currently being executed. BUG=240876 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152230

Patch Set 1 #

Total comments: 2

Patch Set 2 : tests #

Total comments: 3

Patch Set 3 : Use a stack to handle nested script execution #

Patch Set 4 : Fix assert and expand test a bit #

Patch Set 5 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -2 lines) Patch
A LayoutTests/fast/dom/Document/document-current-script.html View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/document-current-script-async.html View 1 1 chunk +49 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/Document/document-current-script-async-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/dom/Document/document-current-script-expected.txt View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/resources/log-current-script.js View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/resources/log-current-script-b.js View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/resources/log-current-script-d.js View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/resources/log-current-script-f.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M Source/core/dom/Document.idl View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/ScriptElement.cpp View 1 2 3 4 3 chunks +15 lines, -1 line 2 comments Download

Messages

Total messages: 16 (0 generated)
arv (Not doing code reviews)
needs tests
7 years, 7 months ago (2013-05-14 22:36:07 UTC) #1
esprehn
YAY, this looks great. Is that the only entry point to script? I thought there ...
7 years, 7 months ago (2013-05-14 22:50:09 UTC) #2
dglazkov
Don't forget a test :)
7 years, 7 months ago (2013-05-14 22:52:32 UTC) #3
arv (Not doing code reviews)
Ready for review now
7 years, 7 months ago (2013-05-15 15:55:07 UTC) #4
esprehn
You have some left over code in setCurrentScript. Also what happens when you appendChild() a ...
7 years, 7 months ago (2013-05-15 16:08:16 UTC) #5
arv (Not doing code reviews)
https://codereview.chromium.org/14852011/diff/7001/Source/core/dom/ScriptElement.cpp File Source/core/dom/ScriptElement.cpp (right): https://codereview.chromium.org/14852011/diff/7001/Source/core/dom/ScriptElement.cpp#newcode324 Source/core/dom/ScriptElement.cpp:324: document->clearCurrentScript(); On 2013/05/15 16:08:16, esprehn wrote: > You're sure ...
7 years, 7 months ago (2013-05-15 16:18:11 UTC) #6
arv (Not doing code reviews)
PTAL Thanks for catching the nested script case.
7 years, 7 months ago (2013-05-15 16:56:24 UTC) #7
esprehn
On 2013/05/15 16:56:24, arv wrote: > PTAL > > Thanks for catching the nested script ...
7 years, 7 months ago (2013-05-23 17:49:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arv@chromium.org/14852011/14001
7 years, 7 months ago (2013-05-23 17:49:51 UTC) #9
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=7039
7 years, 7 months ago (2013-05-23 19:25:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arv@chromium.org/14852011/14001
7 years, 7 months ago (2013-05-23 19:27:07 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=7073
7 years, 7 months ago (2013-05-23 21:21:47 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arv@chromium.org/14852011/36001
7 years, 6 months ago (2013-06-11 16:01:48 UTC) #13
commit-bot: I haz the power
Change committed as 152230
7 years, 6 months ago (2013-06-11 17:25:27 UTC) #14
abarth-chromium
https://chromiumcodereview.appspot.com/14852011/diff/36001/Source/core/dom/ScriptElement.cpp File Source/core/dom/ScriptElement.cpp (right): https://chromiumcodereview.appspot.com/14852011/diff/36001/Source/core/dom/ScriptElement.cpp#newcode280 Source/core/dom/ScriptElement.cpp:280: return element->isHTMLElement() && element->hasTagName(HTMLNames::scriptTag); The isHTMLElement check isn't redundant ...
7 years, 6 months ago (2013-06-11 17:45:20 UTC) #15
arv (Not doing code reviews)
7 years, 6 months ago (2013-06-11 18:12:58 UTC) #16
Message was sent while issue was closed.
Adam, please take a look at https://codereview.chromium.org/16682004/

Powered by Google App Engine
This is Rietveld 408576698