Bug 154145

Summary: [CSS Font Loading] Implement CSSFontFace Boilerplate
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, jonlee, koivisto, simon.fraser, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 153346, 153345    
Attachments:
Description Flags
Patch
none
Patch
none
Patch dino: review+

Myles C. Maxfield
Reported 2016-02-11 17:50:11 PST
[CSS Font Loading] Implement CSSFontFace Boilerplate
Attachments
Patch (64.67 KB, patch)
2016-02-11 18:03 PST, Myles C. Maxfield
no flags
Patch (64.80 KB, patch)
2016-02-11 19:22 PST, Myles C. Maxfield
no flags
Patch (76.73 KB, patch)
2016-02-12 13:37 PST, Myles C. Maxfield
dino: review+
Myles C. Maxfield
Comment 1 2016-02-11 18:03:54 PST
Myles C. Maxfield
Comment 2 2016-02-11 19:22:20 PST
Myles C. Maxfield
Comment 3 2016-02-12 01:17:08 PST
Comment on attachment 271122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271122&action=review > Source/WebCore/css/CSSFontFace.cpp:72 > + // if (!success) { Throw a SyntaxError } This can be done by taking an extra ExceptionCode& argument and setting it to SYNTAX_ERR
Antti Koivisto
Comment 4 2016-02-12 07:32:09 PST
Generally I would prefer we took the same approach here as with most of the rest of the CSSOM and separated the internal type (StyleRule, StyleSheetContents,...) and the external CSSOM type (CSSStyleRule, CSSStyleSheet,...). This approach would involve renaming the current CSSFontFace to StyleFontFace or similar and adding a new CSSFontFace type (which calls into StyleFontFace) to provide the public API. Keeping the external and the internal cleanly separated allows more flexibility in defining the internal structures and often leads to cleaner code.
Myles C. Maxfield
Comment 5 2016-02-12 12:42:49 PST
(In reply to comment #4) > Generally I would prefer we took the same approach here as with most of the > rest of the CSSOM and separated the internal type (StyleRule, > StyleSheetContents,...) and the external CSSOM type (CSSStyleRule, > CSSStyleSheet,...). This approach would involve renaming the current > CSSFontFace to StyleFontFace or similar and adding a new CSSFontFace type > (which calls into StyleFontFace) to provide the public API. > > Keeping the external and the internal cleanly separated allows more > flexibility in defining the internal structures and often leads to cleaner > code. This patch is in preparation for implementing a JavaScript API, not a CSSOM API. However, I do agree with you about the distinction between internal and external APIs.
Myles C. Maxfield
Comment 6 2016-02-12 13:37:03 PST
Myles C. Maxfield
Comment 7 2016-02-12 14:22:21 PST
Darin Adler
Comment 8 2016-02-12 14:32:27 PST
Comment on attachment 271211 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271211&action=review > Source/WebCore/css/CSSFontFace.h:106 > + CSSFontFace(bool isLocalFallback); Should mark this explicit.
Note You need to log in before you can comment on or make changes to this bug.