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

Issue 196383035: Fix promise resolution of FontFaceSet#load() (Closed)

Created:
6 years, 9 months ago by Kunihiko Sakamoto
Modified:
6 years, 9 months ago
Reviewers:
haraken, dglazkov, yhirano
CC:
blink-reviews, Nils Barth (inactive), rune+blink, kojih, arv+blink, jsbell+bindings_chromium.org, rwlbuis, sof, kouhei+bindings_chromium.org, ed+blinkwatch_opera.com, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears, haraken, Nate Chapin, Inactive
Visibility:
Public.

Description

Fix promise resolution of FontFaceSet#load() This patch changes the promise resolution logic of FontFaceSet#load() to match the spec [1], in the following ways: 1. Rejects the promise with SyntaxError if the font argument fails to parse. 2. Otherwise, the promise should be resolved in the same way as Promise.all() called with all of the results of FontFace#load() of the matching font faces, i.e. 2.1. Resolves the promise with an array of the matching font faces when all the fonts are loaded, or 2.2. Rejects the promise with the rejection value of the first failed font face. The new ScriptPromiseResolver Vector overloads need NoInline version of v8Array, since existing v8Array() uses toV8 inside and hence requires generated headers (see crbug.com/321569 for details of a similar issue). [1] http://dev.w3.org/csswg/css-font-loading/#font-face-set-load TEST=fast/css/fontfaceset-load.html BUG=53213 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169611

Patch Set 1 : #

Total comments: 7

Patch Set 2 : naming #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -83 lines) Patch
A LayoutTests/fast/css/fontfaceset-load.html View 1 chunk +63 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/fontfaceset-load-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseResolver.h View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/css/CSSSegmentedFontFace.h View 2 chunks +1 line, -9 lines 0 comments Download
M Source/core/css/CSSSegmentedFontFace.cpp View 2 chunks +4 lines, -24 lines 0 comments Download
M Source/core/css/FontFace.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
M Source/core/css/FontFace.cpp View 1 2 chunks +39 lines, -12 lines 0 comments Download
M Source/core/css/FontFaceSet.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/FontFaceSet.cpp View 1 2 chunks +47 lines, -36 lines 0 comments Download
M Source/core/css/FontFaceSet.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
Kunihiko Sakamoto
dglazkov@ for css/ haraken@ for bindings/ Could you take a look?
6 years, 9 months ago (2014-03-19 08:12:11 UTC) #1
haraken
https://codereview.chromium.org/196383035/diff/20001/Source/bindings/v8/V8Binding.h File Source/bindings/v8/V8Binding.h (right): https://codereview.chromium.org/196383035/diff/20001/Source/bindings/v8/V8Binding.h#newcode296 Source/bindings/v8/V8Binding.h:296: v8::Handle<v8::Value> v8ArrayNoInline(const Vector<T, inlineCapacity>& iterator, v8::Isolate* isolate) I don't ...
6 years, 9 months ago (2014-03-19 08:31:57 UTC) #2
yhirano
lgtm for ScriptPromiseResolver while I'm not sure whether you should implement the HeapVector overload.
6 years, 9 months ago (2014-03-19 09:09:57 UTC) #3
Kunihiko Sakamoto
https://codereview.chromium.org/196383035/diff/20001/Source/bindings/v8/V8Binding.h File Source/bindings/v8/V8Binding.h (right): https://codereview.chromium.org/196383035/diff/20001/Source/bindings/v8/V8Binding.h#newcode296 Source/bindings/v8/V8Binding.h:296: v8::Handle<v8::Value> v8ArrayNoInline(const Vector<T, inlineCapacity>& iterator, v8::Isolate* isolate) On 2014/03/19 ...
6 years, 9 months ago (2014-03-19 09:12:17 UTC) #4
haraken
LGTM for bindings/. I'm not really happy about the toV8Inline family but I cannot come ...
6 years, 9 months ago (2014-03-19 09:33:40 UTC) #5
dglazkov
lgtm. I made naming suggestions, but feel free to ignore them. https://codereview.chromium.org/196383035/diff/20001/Source/core/css/FontFace.cpp File Source/core/css/FontFace.cpp (right): ...
6 years, 9 months ago (2014-03-19 15:42:34 UTC) #6
Kunihiko Sakamoto
Thanks for the suggestions! https://codereview.chromium.org/196383035/diff/20001/Source/core/css/FontFace.cpp File Source/core/css/FontFace.cpp (right): https://codereview.chromium.org/196383035/diff/20001/Source/core/css/FontFace.cpp#newcode395 Source/core/css/FontFace.cpp:395: ScriptPromise FontFace::load(ExecutionContext* context) On 2014/03/19 ...
6 years, 9 months ago (2014-03-20 01:06:31 UTC) #7
Kunihiko Sakamoto
The CQ bit was checked by ksakamoto@chromium.org
6 years, 9 months ago (2014-03-20 01:08:25 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/196383035/40001
6 years, 9 months ago (2014-03-20 01:08:30 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 01:59:14 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-20 01:59:15 UTC) #11
Kunihiko Sakamoto
The CQ bit was checked by ksakamoto@chromium.org
6 years, 9 months ago (2014-03-20 02:29:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/196383035/40001
6 years, 9 months ago (2014-03-20 02:29:20 UTC) #13
commit-bot: I haz the power
6 years, 9 months ago (2014-03-20 04:04:19 UTC) #14
Message was sent while issue was closed.
Change committed as 169611

Powered by Google App Engine
This is Rietveld 408576698