Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(2)

Issue 2610593002: Make CSSFontFace::setLoadStatus post a task (Closed)

Created:
10 months, 2 weeks ago by adithyas
Modified:
10 months, 1 week ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CSSFontFace::setLoadStatus post a task Setting the load status to LOADED results in the promise associated with the FontFace "loaded" property being resolved synchronously. The promise is resolved with a loaded FontFace object. This could result in script being executed in a forbidden scope. Posting a task when the status is ERROR/LOADED prevents the promise from being resolved inside a forbidden scope and matches the spec ("When the load operation completes, successfully or not, queue a task to run the following steps synchronously", see https://drafts.csswg.org/css-font-loading/#font-face-load). BUG=663476 Review-Url: https://codereview.chromium.org/2610593002 Cr-Commit-Position: refs/heads/master@{#443596} Committed: https://chromium.googlesource.com/chromium/src/+/76b781d16735162ce3304f95c2749742185e12f1

Patch Set 1 #

Patch Set 2 : Fix affected layout test #

Patch Set 3 : Rebase #

Patch Set 4 : Keep track of load status in CSSFontFace #

Patch Set 5 : Rebase #

Patch Set 6 : Trying again #

Patch Set 7 : Change loading logic for fonts from array buffers #

Total comments: 4

Patch Set 8 : Revert changes to CSSFontFace and post task in FontFace #

Total comments: 8

Patch Set 9 : Run callbacks in a task #

Total comments: 2

Patch Set 10 : Add comment #

Messages

Total messages: 51 (35 generated)
adithyas
ksakamoto@: This patch tries to fix potential script execution inside a script forbidden scope caused ...
10 months, 2 weeks ago (2017-01-05 18:37:32 UTC) #24
jbroman
one nit; leaving the CSSFontFace details to ksakamoto https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/CSSFontFace.cpp File third_party/WebKit/Source/core/css/CSSFontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/CSSFontFace.cpp#newcode192 third_party/WebKit/Source/core/css/CSSFontFace.cpp:192: if ...
10 months, 2 weeks ago (2017-01-05 20:01:08 UTC) #27
Kunihiko Sakamoto
https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode353 third_party/WebKit/Source/core/css/FontFace.cpp:353: if (m_status == Loaded || m_status == Error) { ...
10 months, 2 weeks ago (2017-01-06 07:05:47 UTC) #28
adithyas
https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode353 third_party/WebKit/Source/core/css/FontFace.cpp:353: if (m_status == Loaded || m_status == Error) { ...
10 months, 2 weeks ago (2017-01-06 14:56:13 UTC) #29
Kunihiko Sakamoto
https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/120001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode353 third_party/WebKit/Source/core/css/FontFace.cpp:353: if (m_status == Loaded || m_status == Error) { ...
10 months, 1 week ago (2017-01-10 06:02:12 UTC) #34
adithyas
https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode364 third_party/WebKit/Source/core/css/FontFace.cpp:364: m_loadedProperty->reject(m_error.get()); On 2017/01/10 at 06:02:12, Kunihiko Sakamoto wrote: > ...
10 months, 1 week ago (2017-01-10 17:52:46 UTC) #35
Kunihiko Sakamoto
https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode364 third_party/WebKit/Source/core/css/FontFace.cpp:364: m_loadedProperty->reject(m_error.get()); On 2017/01/10 17:52:46, adithyas wrote: > On 2017/01/10 ...
10 months, 1 week ago (2017-01-11 05:25:45 UTC) #36
adithyas
https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/140001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode364 third_party/WebKit/Source/core/css/FontFace.cpp:364: m_loadedProperty->reject(m_error.get()); On 2017/01/11 at 05:25:45, Kunihiko Sakamoto wrote: > ...
10 months, 1 week ago (2017-01-11 17:59:39 UTC) #37
Kunihiko Sakamoto
lgtm Thank you for the fix!
10 months, 1 week ago (2017-01-12 02:06:43 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2610593002/160001
10 months, 1 week ago (2017-01-12 18:08:51 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/340800)
10 months, 1 week ago (2017-01-12 18:18:09 UTC) #42
jbroman
lgtm https://codereview.chromium.org/2610593002/diff/160001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/160001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode357 third_party/WebKit/Source/core/css/FontFace.cpp:357: if (m_status == Loaded) { Would you mind ...
10 months, 1 week ago (2017-01-12 18:40:46 UTC) #43
adithyas
https://codereview.chromium.org/2610593002/diff/160001/third_party/WebKit/Source/core/css/FontFace.cpp File third_party/WebKit/Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/2610593002/diff/160001/third_party/WebKit/Source/core/css/FontFace.cpp#newcode357 third_party/WebKit/Source/core/css/FontFace.cpp:357: if (m_status == Loaded) { On 2017/01/12 at 18:40:46, ...
10 months, 1 week ago (2017-01-13 16:08:39 UTC) #44
jbroman
lgtm
10 months, 1 week ago (2017-01-13 16:14:37 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2610593002/180001
10 months, 1 week ago (2017-01-13 16:17:23 UTC) #48
commit-bot: I haz the power
10 months, 1 week ago (2017-01-13 17:37:30 UTC) #51
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/76b781d16735162ce3304f95c274...

Powered by Google App Engine
This is Rietveld efc10ee0f