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

Issue 774033002: Run Microtasks before dispatching onload (Closed)

Created:
6 years ago by kouhei (in TOK)
Modified:
5 years, 11 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Run Microtasks before dispatching onload Element.registerElement runs "element upgrade algorithm" and expects to resolve unknown tags in "upgrade candidates map" synchronously. http://w3c.github.io/webcomponents/spec/custom/index.html#appendix-a However, in current Blink, adding a new unknown element to "upgrade candidates map" is done asynchronously by scheduling a CustomElementMicrotaskResolutionStep to microtask queue. This means that Element.registerElement called from “onload” event handler may not resolve the unknown tags as they are not yet in the “upgrade candidates map”. This CL workaround the issue by explicitly emptying the microtask queue before running onload handler. http/tests/inspector/network/network-initiator.html is rebaselined. - The image resource load is scheduled on a microtask. (See r173943) - This CL introduces additional microtask checkpoint at <iframe> load. TEST=LayoutTests/imported/web-platform-tests/custom-elements, LayoutTests/svg/dom/custom-elements.html BUG=421300, 425790 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187949

Patch Set 1 #

Patch Set 2 : update comment #

Patch Set 3 : empty only custom element microtask run queue #

Patch Set 4 : rebased PS2 #

Total comments: 2

Patch Set 5 : add comment #

Total comments: 4

Patch Set 6 : shorten comments per suggestion #

Patch Set 7 : add rebaseline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M LayoutTests/http/tests/inspector/network/network-initiator-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 3 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 33 (8 generated)
kouhei (in TOK)
Would you take a look?
6 years ago (2014-12-03 01:42:36 UTC) #2
kouhei (in TOK)
friendly ping
6 years ago (2014-12-04 08:01:14 UTC) #3
hayato
I'm afraid that I am not a good reviewer for this. I don't have any ...
6 years ago (2014-12-04 08:11:54 UTC) #4
kouhei (in TOK)
morrita: Sorry to bother you. Would you mind taking a look?
6 years ago (2014-12-05 04:00:47 UTC) #6
Hajime Morrita
What I was told is that adding random microtask invocation generally isn't a good idea. ...
6 years ago (2014-12-05 18:29:56 UTC) #8
kouhei (in TOK)
6 years ago (2014-12-08 16:29:48 UTC) #10
dominicc (has gone to gerrit)
The HTML spec or maybe DOM spec should be definitive on whether we *must* run ...
6 years ago (2014-12-09 02:19:21 UTC) #11
kouhei (in TOK)
On 2014/12/09 02:19:21, dominicc wrote: > The HTML spec or maybe DOM spec should be ...
6 years ago (2014-12-15 05:56:50 UTC) #12
kouhei (in TOK)
Updated description and uploaded new patch. I talked offline with dominicc, and we found that ...
6 years ago (2014-12-15 09:02:39 UTC) #13
kouhei (in TOK)
friendly ping :) I just re-read http://crbug.com/425790 and realized that the LayoutTests are hitting the ...
6 years ago (2014-12-17 09:26:26 UTC) #14
dominicc (has gone to gerrit)
One comment inline. I have a question about this--why did this work in the past, ...
6 years ago (2014-12-17 14:30:50 UTC) #15
dominicc (has gone to gerrit)
https://codereview.chromium.org/774033002/diff/60001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/774033002/diff/60001/Source/core/dom/Document.cpp#newcode4631 Source/core/dom/Document.cpp:4631: // Empty microtask queue to ensure custom element is ...
6 years ago (2014-12-17 14:31:03 UTC) #16
kouhei (in TOK)
> I have a question about this--why did this work in the past, This *worked* ...
6 years ago (2014-12-18 05:33:55 UTC) #17
kouhei (in TOK)
friendly ping
5 years, 11 months ago (2015-01-05 02:57:27 UTC) #18
dominicc (has gone to gerrit)
On 2015/01/05 at 02:57:27, kouhei wrote: > friendly ping LGTM, modulo tightening the comment up ...
5 years, 11 months ago (2015-01-05 07:28:54 UTC) #19
dominicc (has gone to gerrit)
(Actually publish the comments.) https://codereview.chromium.org/774033002/diff/80001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/774033002/diff/80001/Source/core/dom/Document.cpp#newcode4621 Source/core/dom/Document.cpp:4621: // FIXME: DOMContentLoaded should be ...
5 years, 11 months ago (2015-01-05 07:29:39 UTC) #20
kouhei (in TOK)
Thanks! Shortened FIXME comment per suggestion. https://codereview.chromium.org/774033002/diff/80001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/774033002/diff/80001/Source/core/dom/Document.cpp#newcode4621 Source/core/dom/Document.cpp:4621: // FIXME: DOMContentLoaded ...
5 years, 11 months ago (2015-01-06 01:37:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/774033002/100001
5 years, 11 months ago (2015-01-06 01:38:07 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/40924)
5 years, 11 months ago (2015-01-06 03:00:20 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/774033002/120001
5 years, 11 months ago (2015-01-07 01:25:27 UTC) #27
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=187949
5 years, 11 months ago (2015-01-07 05:26:12 UTC) #28
adamk
Sorry for the late comment, but I just saw this go by: why is there ...
5 years, 11 months ago (2015-01-07 16:50:32 UTC) #30
kouhei (in TOK)
On 2015/01/07 16:50:32, adamk wrote: > Sorry for the late comment, but I just saw ...
5 years, 11 months ago (2015-01-09 04:58:27 UTC) #31
blink-reviews
Which CL? It points to this CL. I thought that there were existing tests for ...
5 years, 11 months ago (2015-01-09 05:08:54 UTC) #32
kouhei (in TOK)
5 years, 11 months ago (2015-01-09 05:14:55 UTC) #33
Message was sent while issue was closed.
On 2015/01/09 05:08:54, blink-reviews wrote:
> Which CL? It points to this CL.
> 
> I thought that there were existing tests for this; that this was unbreaking
> something?

Sorry, the correct URL is https://codereview.chromium.org/839673004/

The existing tests rely on this event invocation order, but there were no test
which explicitly check the ordering.

Powered by Google App Engine
This is Rietveld 408576698