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

Unified Diff: core/css/FontFaceSet.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/css/FontFaceDescriptors.idl ('k') | core/css/FontFaceSetForEachCallback.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/css/FontFaceSet.idl
diff --git a/core/css/FontFaceSet.idl b/core/css/FontFaceSet.idl
index 31ae4fc8d0cc9d2c446b0967cc8dbe1a3f4a72ee..50525e52f7b144de4d347bc4a3ab92f7f084668c 100644
--- a/core/css/FontFaceSet.idl
+++ b/core/css/FontFaceSet.idl
@@ -28,28 +28,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
+
enum FontFaceSetLoadStatus { "loading", "loaded" };
+// TODO(philipj): This interface should be [Exposed=Window,Worker] and should
+// have a constructor, and thus not have [NoInterfaceObject].
[
ActiveDOMObject,
SetWrapperReferenceFrom=document,
NoInterfaceObject,
] interface FontFaceSet : EventTarget {
+ // TODO(ksakamoto): Make FontFaceSet Set-like. crbug.com/392075
+ // setlike<FontFace>;
+ void forEach(FontFaceSetForEachCallback callback, optional any thisArg);
+ [RaisesException] boolean has(FontFace fontFace);
+ readonly attribute unsigned long size;
+ // TODO(philipj): add() should return the FontFaceSet.
+ [RaisesException] void add(FontFace fontFace);
+ [RaisesException, ImplementedAs=remove] boolean delete(FontFace fontFace);
+ void clear();
+ // events for when loading state changes
attribute EventHandler onloading;
attribute EventHandler onloadingdone;
attribute EventHandler onloadingerror;
+ // check and start loads if appropriate
+ // and fulfill promise when all loads complete
+ [CallWith=ScriptState] Promise<sequence<FontFace>> load(DOMString font, optional DOMString text = " ");
+
+ // return whether all fonts in the fontlist are loaded
+ // (does not initiate load if not available)
[RaisesException] boolean check(DOMString font, optional DOMString text = " ");
- [CallWith=ScriptState] Promise load(DOMString font, optional DOMString text = " ");
- [MeasureAs=FontFaceSetReady, CallWith=ScriptState] Promise ready();
- [RaisesException] void add(FontFace fontFace);
- void clear();
- [RaisesException, ImplementedAs=remove] boolean delete(FontFace fontFace);
- void forEach(FontFaceSetForEachCallback callback, optional any thisArg);
- [RaisesException] boolean has(FontFace fontFace);
+ // async notification that font loading and layout operations are done
+ [CallWith=ScriptState] readonly attribute Promise<FontFaceSet> ready;
- readonly attribute unsigned long size;
+ // loading state, "loading" while one or more fonts loading, "loaded" otherwise
readonly attribute FontFaceSetLoadStatus status;
};
« no previous file with comments | « core/css/FontFaceDescriptors.idl ('k') | core/css/FontFaceSetForEachCallback.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698