Bug 153345 - [Font Loading] Implement FontFace JavaScript object
Summary: [Font Loading] Implement FontFace JavaScript object
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: WebExposed
: 136505 (view as bug list)
Depends on: 154145
Blocks: 153346
  Show dependency treegraph
 
Reported: 2016-01-22 00:41 PST by Myles C. Maxfield
Modified: 2016-02-15 15:39 PST (History)
8 users (show)

See Also:


Attachments
WIP (39.74 KB, patch)
2016-01-22 00:46 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (776.75 KB, application/zip)
2016-01-22 01:40 PST, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (850.58 KB, application/zip)
2016-01-22 01:46 PST, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.01 MB, application/zip)
2016-01-22 02:40 PST, Build Bot
no flags Details
WIP (35.83 KB, patch)
2016-01-22 13:47 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (783.95 KB, application/zip)
2016-01-22 14:42 PST, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (819.67 KB, application/zip)
2016-01-22 14:44 PST, Build Bot
no flags Details
WIP (52.88 KB, patch)
2016-01-22 14:53 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (58.77 KB, patch)
2016-01-22 20:58 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (59.91 KB, patch)
2016-01-22 23:01 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (85.68 KB, patch)
2016-01-23 21:14 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (280.24 KB, patch)
2016-01-26 23:26 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (292.04 KB, patch)
2016-01-27 17:13 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (170.67 KB, patch)
2016-01-27 22:36 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (170.23 KB, patch)
2016-01-27 22:45 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (143.68 KB, patch)
2016-01-28 00:17 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (142.38 KB, patch)
2016-01-28 00:44 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (142.91 KB, patch)
2016-01-28 00:46 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (143.10 KB, patch)
2016-01-28 13:55 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (143.17 KB, patch)
2016-02-01 13:03 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Applied on top of attachment 269993 (143.17 KB, patch)
2016-02-02 01:08 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (60.77 KB, patch)
2016-02-12 17:59 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (72.69 KB, patch)
2016-02-13 00:12 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (72.74 KB, patch)
2016-02-13 10:59 PST, Myles C. Maxfield
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2016-01-22 00:41:37 PST
[Font Loading] Implement FontFace JavaScript object
Comment 1 Myles C. Maxfield 2016-01-22 00:46:28 PST
Created attachment 269556 [details]
WIP
Comment 2 Build Bot 2016-01-22 01:40:41 PST
Comment on attachment 269556 [details]
WIP

Attachment 269556 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/724740

New failing tests:
js/dom/global-constructors-attributes.html
Comment 3 Build Bot 2016-01-22 01:40:43 PST
Created attachment 269557 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-01-22 01:46:14 PST
Comment on attachment 269556 [details]
WIP

Attachment 269556 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/724735

New failing tests:
js/dom/global-constructors-attributes.html
Comment 5 Build Bot 2016-01-22 01:46:16 PST
Created attachment 269559 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-01-22 02:40:27 PST
Comment on attachment 269556 [details]
WIP

Attachment 269556 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/724896

New failing tests:
js/dom/global-constructors-attributes.html
Comment 7 Build Bot 2016-01-22 02:40:29 PST
Created attachment 269566 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 8 Myles C. Maxfield 2016-01-22 13:47:25 PST
Created attachment 269602 [details]
WIP
Comment 9 Myles C. Maxfield 2016-01-22 13:51:51 PST
*** Bug 136505 has been marked as a duplicate of this bug. ***
Comment 10 Build Bot 2016-01-22 14:42:53 PST
Comment on attachment 269602 [details]
WIP

Attachment 269602 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/726847

New failing tests:
js/dom/global-constructors-attributes.html
Comment 11 Build Bot 2016-01-22 14:42:56 PST
Created attachment 269610 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 12 Build Bot 2016-01-22 14:44:35 PST
Comment on attachment 269602 [details]
WIP

Attachment 269602 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/726834

New failing tests:
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html
js/dom/global-constructors-attributes.html
Comment 13 Build Bot 2016-01-22 14:44:38 PST
Created attachment 269611 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 14 Myles C. Maxfield 2016-01-22 14:53:15 PST
Created attachment 269613 [details]
WIP
Comment 15 Myles C. Maxfield 2016-01-22 20:58:02 PST
Created attachment 269637 [details]
WIP
Comment 16 Myles C. Maxfield 2016-01-22 23:01:46 PST
Created attachment 269656 [details]
WIP
Comment 17 Myles C. Maxfield 2016-01-22 23:12:55 PST
I need to make sure:

1. Calling load() multiple times has the correct semantics
2. The promise callbacks are correctly asynchronous/synchronous.
Comment 18 Myles C. Maxfield 2016-01-22 23:13:35 PST
(In reply to comment #17)
> I need to make sure:
> 
> 1. Calling load() multiple times has the correct semantics
In particular, if you change some state in the FontFace between successive calls to load().
> 2. The promise callbacks are correctly asynchronous/synchronous.
Comment 19 Myles C. Maxfield 2016-01-22 23:30:35 PST
(In reply to comment #18)
> (In reply to comment #17)
> > I need to make sure:
> > 
> > 1. Calling load() multiple times has the correct semantics
> In particular, if you change some state in the FontFace between successive
> calls to load().
The spec says that only the first load has any effect. Subsequent loads do nothing.
> > 2. The promise callbacks are correctly asynchronous/synchronous.
Comment 20 Myles C. Maxfield 2016-01-22 23:34:57 PST
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > I need to make sure:
> > > 
> > > 1. Calling load() multiple times has the correct semantics
> > In particular, if you change some state in the FontFace between successive
> > calls to load().
> The spec says that only the first load has any effect. Subsequent loads do
> nothing.
> > > 2. The promise callbacks are correctly asynchronous/synchronous.
The callbacks are correctly asynchronous.
Comment 21 Myles C. Maxfield 2016-01-22 23:36:30 PST
It would also be good to make sure that, if the font is in the cache, that the status gets updated synchronously after load().
Comment 22 Myles C. Maxfield 2016-01-23 21:14:53 PST
Created attachment 269681 [details]
WIP
Comment 23 Myles C. Maxfield 2016-01-26 23:26:20 PST
Created attachment 269984 [details]
WIP
Comment 24 Myles C. Maxfield 2016-01-27 17:13:28 PST
Created attachment 270066 [details]
WIP
Comment 25 Myles C. Maxfield 2016-01-27 22:36:00 PST
Created attachment 270094 [details]
Applied on top of attachment 269993 [details]
Comment 26 Myles C. Maxfield 2016-01-27 22:45:59 PST
Created attachment 270095 [details]
Applied on top of attachment 269993 [details]
Comment 27 Myles C. Maxfield 2016-01-28 00:17:49 PST
Created attachment 270099 [details]
Applied on top of attachment 269993 [details]
Comment 28 Myles C. Maxfield 2016-01-28 00:44:29 PST
Created attachment 270100 [details]
Applied on top of attachment 269993 [details]
Comment 29 Myles C. Maxfield 2016-01-28 00:46:56 PST
Created attachment 270101 [details]
Applied on top of attachment 269993 [details]
Comment 30 Myles C. Maxfield 2016-01-28 12:54:31 PST
function clearFontSelector() {
    document.getElementById("styleElement").setAttribute("media", "print");
}
Comment 31 Myles C. Maxfield 2016-01-28 13:55:14 PST
Created attachment 270144 [details]
Applied on top of attachment 269993 [details]
Comment 32 Myles C. Maxfield 2016-01-28 13:55:48 PST
Attachment 270144 [details] passes all the tests on my machine.
Comment 33 Myles C. Maxfield 2016-02-01 13:03:37 PST
Created attachment 270414 [details]
Applied on top of attachment 269993 [details]
Comment 34 Myles C. Maxfield 2016-02-01 15:33:14 PST
The spec says that immediate fonts should start loading immediately, and if they fail, they should fail with a SyntaxError (not a NetworkError).
Comment 35 Myles C. Maxfield 2016-02-01 15:53:11 PST
We need to absolutize relative CSS values (like "bolder")
Comment 36 Myles C. Maxfield 2016-02-02 01:08:49 PST
Created attachment 270478 [details]
Applied on top of attachment 269993 [details]
Comment 37 Myles C. Maxfield 2016-02-12 17:59:17 PST
Created attachment 271254 [details]
WIP
Comment 38 Myles C. Maxfield 2016-02-13 00:12:32 PST
Created attachment 271275 [details]
Patch
Comment 39 Myles C. Maxfield 2016-02-13 10:59:41 PST
Created attachment 271292 [details]
Patch
Comment 40 Antti Koivisto 2016-02-15 09:42:05 PST
Comment on attachment 271292 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=271292&action=review

r=me, looks good.

> Source/WebCore/css/CSSUnicodeRangeValue.cpp:36
>  String CSSUnicodeRangeValue::customCSSText() const
>  {
> -    String result;
> -    // FIXME: Implement.
> -    return result;
> +    return String::format("U+%x-%x", m_from, m_to);
>  }

The ChangeLog should explain these unicode-range related changes. Do they really belong to this patch?
Comment 41 Myles C. Maxfield 2016-02-15 15:39:04 PST
Committed r196604: <http://trac.webkit.org/changeset/196604>