Chromium Code Reviews
Help | Chromium Project | Sign in
(29)

Issue 200923002: Post a microtask to load <img> elements. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year ago by cbiesinger
Modified:
10 months, 2 weeks ago
CC:
blink-reviews, dglazkov+blink, Nate Chapin, adamk+blink_chromium.org, gavinp+loader_chromium.org, rafaelw, Yoav Weiss, pdr
Visibility:
Public.

Description

Post a microtask to load <img> elements. See the "stable state" (step 1) part of the algorithm at http://www.whatwg.org/specs/web-apps/current-work/#the-img-element This is a requirement for <picture>, because we need to wait with loading until we know whether we're in a <picture> element. It also makes it so that the order of setting .src and .crossorigin does not matter. Unfortunately, this means that some exceptions no longer have a stack trace. BUG=341047 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173943

Patch Set 1 #

Patch Set 2 : a few more tests fixeds #

Patch Set 3 : more tests fixed #

Patch Set 4 : some more progress #

Patch Set 5 : now with crashes fixed. 15 failures left #

Patch Set 6 : most tests fixed #

Patch Set 7 : . #

Patch Set 8 : just one test missing #

Patch Set 9 : all tests fixed #

Total comments: 5

Patch Set 10 : some simplification #

Patch Set 11 : / #

Patch Set 12 : isolated world now working #

Patch Set 13 : review comments #

Patch Set 14 : with a test for isolated world csp #

Total comments: 10

Patch Set 15 : split up updateFromElement #

Patch Set 16 : comments fixed #

Patch Set 17 : forgot a git add... #

Patch Set 18 : and now with git cl format #

Total comments: 12

Patch Set 19 : review comments #

Patch Set 20 : review comments (retry) #

Total comments: 10

Patch Set 21 : review comments #

Patch Set 22 : fix last test failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -132 lines) Patch
M LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-change-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/loader/resource-request-callbacks-expected.txt View 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/images/image-with-origin-header.html View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M LayoutTests/http/tests/images/image-with-origin-header-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/inspector/network/network-initiator-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
D LayoutTests/http/tests/inspector/stacktraces/csp-injected-content-warning-contains-stacktrace.html View 1 2 3 4 5 1 chunk +0 lines, -21 lines 0 comments Download
D LayoutTests/http/tests/inspector/stacktraces/csp-injected-content-warning-contains-stacktrace-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -13 lines 0 comments Download
M LayoutTests/http/tests/misc/image-blocked-src-change-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/misc/image-blocked-src-no-change-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/image-blocked-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/xsl-img-blocked-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/cross-origin-createImageBitmap.html View 1 2 3 1 chunk +11 lines, -9 lines 0 comments Download
M LayoutTests/http/tests/security/cross-origin-createImageBitmap-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -20 lines 0 comments Download
M LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -8 lines 0 comments Download
M LayoutTests/http/tests/security/isolatedWorld/events-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-allowed-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-blocked-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_reparenting.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_reparenting-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/permissionclient/image-permissions-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/dom/IncrementLoadEventDelayCount.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +32 lines, -0 lines 0 comments Download
A Source/core/dom/IncrementLoadEventDelayCount.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +29 lines, -0 lines 0 comments Download
M Source/core/loader/ImageLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +24 lines, -2 lines 0 comments Download
M Source/core/loader/ImageLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +123 lines, -13 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 37 (0 generated)
philipj_UTC7
Posting a microtask is not equivalent to awaiting a stable state in the spec, although ...
1 year ago (2014-03-19 03:42:12 UTC) #1
cbiesinger
On 2014/03/19 03:42:12, philipj wrote: > Posting a microtask is not equivalent to awaiting a ...
1 year ago (2014-03-19 18:08:52 UTC) #2
cbiesinger
So there is a problem with tests... LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html and others trigger some loads in an ...
1 year ago (2014-03-19 22:22:59 UTC) #3
philipj_UTC7
On 2014/03/19 18:08:52, cbiesinger wrote: > On 2014/03/19 03:42:12, philipj wrote: > > Posting a ...
1 year ago (2014-03-20 03:07:21 UTC) #4
rafaelw
Sorry guys, I'm not sure I have much guidance here. I'm trying to push for ...
1 year ago (2014-03-24 19:37:23 UTC) #5
cbiesinger
So the final test failure is http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_reparenting.html Now that we're loading the <img> asynchronously, the ...
12 months ago (2014-04-01 22:57:14 UTC) #6
cbiesinger
On 2014/04/01 22:57:14, cbiesinger wrote: > So the final test failure is > http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_reparenting.html > ...
12 months ago (2014-04-01 23:35:27 UTC) #7
cbiesinger
Adam, Eric, this should be ready for review!
12 months ago (2014-04-01 23:38:13 UTC) #8
abarth
not lgtm Please note that stable states and microtask checkpoints are not the same thing. ...
12 months ago (2014-04-01 23:57:14 UTC) #9
abarth
On 2014/04/01 23:57:14, abarth wrote: > Please note that stable states and microtask checkpoints are ...
12 months ago (2014-04-02 00:11:46 UTC) #10
cbiesinger
On 2014/04/02 00:11:46, abarth wrote: > On 2014/04/01 23:57:14, abarth wrote: > > Please note ...
12 months ago (2014-04-02 01:27:08 UTC) #11
abarth
On 2014/04/02 01:27:08, cbiesinger wrote: > OK, so, your point here is that I should ...
12 months ago (2014-04-02 05:43:52 UTC) #12
cbiesinger
Alright. I'm going to revive https://codereview.chromium.org/153813002/, figure out a way to simplify the code here, ...
12 months ago (2014-04-02 17:49:13 UTC) #13
cbiesinger
On 2014/04/02 17:49:13, cbiesinger wrote: > Alright. I'm going to revive https://codereview.chromium.org/153813002/, figure > out ...
12 months ago (2014-04-03 00:26:52 UTC) #14
abarth
On 2014/04/03 00:26:52, cbiesinger wrote: > On 2014/04/02 17:49:13, cbiesinger wrote: > > Alright. I'm ...
12 months ago (2014-04-03 04:59:11 UTC) #15
philipj_UTC7
On 2014/04/03 04:59:11, abarth wrote: > If we're going to have a bunch of work ...
11 months, 4 weeks ago (2014-04-03 19:36:36 UTC) #16
abarth
On 2014/04/03 19:36:36, philipj wrote: > https://codereview.chromium.org/153813002/ was pretty much that, but it's > blocked ...
11 months, 4 weeks ago (2014-04-03 20:53:48 UTC) #17
rafaelw
AFAICT, the need for stable state is exactly the same as the need for microtasks: ...
11 months, 4 weeks ago (2014-04-04 17:58:49 UTC) #18
cbiesinger
The spec issue is resolved (Hixie agreed to merge microtasks and stable states), and this ...
11 months, 1 week ago (2014-04-22 23:46:52 UTC) #19
cbiesinger
OK, I added a test for the correct behavior of isolated world CSPs in bypass-main-world-csp.html. ...
11 months, 1 week ago (2014-04-25 23:33:40 UTC) #20
abarth
https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp#newcode69 Source/core/loader/ImageLoader.cpp:69: m_document->incrementLoadEventDelayCount(); Why is it the task's job to increment ...
11 months, 1 week ago (2014-04-25 23:59:43 UTC) #21
cbiesinger
https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp#newcode69 Source/core/loader/ImageLoader.cpp:69: m_document->incrementLoadEventDelayCount(); On 2014/04/25 23:59:44, abarth wrote: > Why is ...
11 months ago (2014-05-01 00:09:07 UTC) #22
abarth
On 2014/05/01 00:09:07, cbiesinger wrote: > https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp > File Source/core/loader/ImageLoader.cpp (right): > > https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp#newcode69 > ...
11 months ago (2014-05-01 00:58:16 UTC) #23
cbiesinger
On 2014/05/01 00:58:16, abarth wrote: > On 2014/05/01 00:09:07, cbiesinger wrote: > > > https://codereview.chromium.org/200923002/diff/240001/Source/core/loader/ImageLoader.cpp ...
11 months ago (2014-05-01 01:27:33 UTC) #24
cbiesinger
Comments fixed, including removing the nullcheck for frame.
11 months ago (2014-05-01 23:14:50 UTC) #25
abarth
https://codereview.chromium.org/200923002/diff/290036/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/200923002/diff/290036/Source/core/loader/ImageLoader.cpp#newcode274 Source/core/loader/ImageLoader.cpp:274: return; Do we need to do this check both ...
11 months ago (2014-05-02 17:04:58 UTC) #26
cbiesinger
Comments fixed, but now I'm tracking down a strange SVG test failure... https://codereview.chromium.org/200923002/diff/290036/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp ...
11 months ago (2014-05-02 23:24:03 UTC) #27
abarth
LGTM! https://codereview.chromium.org/200923002/diff/340001/Source/core/dom/IncrementLoadEventDelayCount.h File Source/core/dom/IncrementLoadEventDelayCount.h (right): https://codereview.chromium.org/200923002/diff/340001/Source/core/dom/IncrementLoadEventDelayCount.h#newcode17 Source/core/dom/IncrementLoadEventDelayCount.h:17: class IncrementLoadEventDelayCount { It would be nice to ...
11 months ago (2014-05-03 01:22:31 UTC) #28
Erik Dahlström
https://codereview.chromium.org/200923002/diff/340001/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/200923002/diff/340001/Source/core/loader/ImageLoader.cpp#newcode316 Source/core/loader/ImageLoader.cpp:316: if (!attr.isNull() && !stripLeadingAndTrailingHTMLSpaces(attr).isEmpty()) { technically this may not ...
10 months, 4 weeks ago (2014-05-05 08:41:00 UTC) #29
cbiesinger
Thanks for the lgtm! Uploaded with minor changes. I'll submit as soon as I figure ...
10 months, 3 weeks ago (2014-05-05 22:39:29 UTC) #30
cbiesinger
Adam - I would like to fix the remaining test failure (svg/wicd/test-rightsizing-{a,b}.xhtml) by adding an ...
10 months, 3 weeks ago (2014-05-12 01:59:23 UTC) #31
abarth
lgtm
10 months, 3 weeks ago (2014-05-12 04:33:25 UTC) #32
Erik Dahlström
On 2014/05/12 01:59:23, cbiesinger wrote: > Adam - I would like to fix the remaining ...
10 months, 3 weeks ago (2014-05-12 07:44:29 UTC) #33
cbiesinger
On 2014/05/12 07:44:29, Erik Dahlström wrote: > On 2014/05/12 01:59:23, cbiesinger wrote: > > Adam ...
10 months, 2 weeks ago (2014-05-13 07:42:59 UTC) #34
cbiesinger
The CQ bit was checked by cbiesinger@chromium.org
10 months, 2 weeks ago (2014-05-13 07:43:07 UTC) #35
I haz the power (commit-bot)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbiesinger@chromium.org/200923002/380001
10 months, 2 weeks ago (2014-05-13 07:43:22 UTC) #36
I haz the power (commit-bot)
10 months, 2 weeks ago (2014-05-13 08:58:24 UTC) #37
Message was sent while issue was closed.
Change committed as 173943
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ecdb341-tainted