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

Issue 672843002: Delay dispatching DOMContentLoaded event to next event loop.

Created:
6 years, 1 month ago by kouhei (in TOK)
Modified:
6 years, 1 month ago
Reviewers:
haraken, adamk, eseidel
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Delay dispatching DOMContentLoaded event to next event loop. Before this CL, DOMContentLoaded was triggered synchronously after parsing has finished. This behavior doesn't follow the HTML spec. 12.2.6 The end. Step 4: https://html.spec.whatwg.org/multipage/syntax.html#the-end This CL makes Blink follow the HTML spec by having Document::finishedParsing() defer dispatching DOMContentLoaded by using a oneshot timer. BUG=425790

Patch Set 1 #

Patch Set 2 : test passes / content_shell explodes #

Patch Set 3 : 8% of LayoutTest fails #

Patch Set 4 : hmm #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -8 lines) Patch
M Source/core/dom/Document.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 chunks +22 lines, -8 lines 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
kouhei (in TOK)
PTAL. A problem with this patch is that js-test.js uses DOMContentLoaded to output "PASS successfullyParsed ...
6 years, 1 month ago (2014-10-23 10:58:05 UTC) #2
eseidel
6 years, 1 month ago (2014-10-23 15:50:39 UTC) #3

          

Powered by Google App Engine
This is Rietveld 408576698