Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 392075 [CSS Font Loading] Make FontFaceSet Set-like
Starred by 3 users Project Member Reported by ksakamoto@chromium.org, Jul 8 2014 Back to list
Status: Fixed
Owner:
Closed: Oct 2015
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 432683



Sign in to add a comment
http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
https://dvcs.w3.org/hg/csswg/rev/5d3f09766bba

Currently FontFaceSet implements the following set methods:
  readonly attribute unsigned long size;
  void add(FontFace font);
  boolean has(FontFace font);
  boolean delete(FontFace font);
  void clear();
  void forEach(ForEachCallback cb, optional any thisArg);

The following methods are still missing:
  Iterator entries();
  Iterator keys();
  Iterator values();
  FontFace iterator;

 
Blockedon: chromium:432683
Summary: [CSS Font Loading] Make FontFaceSet Set-like (was: [CSS Font Loading] Add missing set methods to FontFaceSet)
Now the spec says simply:

interface FontFaceSet : EventTarget {
  // FontFaceSet is Set-like!
  setlike<FontFace>;
  ...
}

Setlike/maplike support in Blink IDL is in progress (Issue 432683). We should be able to use it.
Cc: ksakamoto@chromium.org toyoshim@chromium.org
Owner: ----
Status: Available
Owner: toyoshim@chromium.org
Status: Assigned
Let me see this bug to understand font related code.

For now, maplike/setlike are supported by IDL parser, but there are no use case of setlike now.
It will need some code to use setlike. But it still looks like a kind of good-first-bug.
Thanks Toyoshima-san!

FYI, this is an old patch I wrote before Blink IDL supports setlike.
https://codereview.chromium.org/557763003/

Status: Started
Project Member Comment 6 by bugdroid1@chromium.org, Oct 19 2015
Project Member Comment 7 by bugdroid1@chromium.org, Oct 20 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/570fb77ac846fb6f52c67e14245e254d1ae9db43

commit 570fb77ac846fb6f52c67e14245e254d1ae9db43
Author: toyoshim <toyoshim@chromium.org>
Date: Tue Oct 20 01:13:56 2015

CSS Font Loading: drop readonly to use Setlike functionalities

FontFaceSet.idl used readonly setlike<FontFace> to use
existing add(), delete(), and clear() implementations.

This patch drops readonly to use binding scheme to implement
writable Setlike methods.

Note that add() method returns FontFaceSet after this change.

BUG= 392075 

Review URL: https://codereview.chromium.org/1406153003

Cr-Commit-Position: refs/heads/master@{#354947}

[modify] http://crrev.com/570fb77ac846fb6f52c67e14245e254d1ae9db43/third_party/WebKit/LayoutTests/fast/css/fontfaceset-add-remove-expected.txt
[modify] http://crrev.com/570fb77ac846fb6f52c67e14245e254d1ae9db43/third_party/WebKit/LayoutTests/fast/css/fontfaceset-add-remove.html
[delete] http://crrev.com/3bb814794b2509e95944cf36af0cc7538611ae03/third_party/WebKit/LayoutTests/platform/linux/fast/css/fontfaceset-add-remove-expected.txt
[delete] http://crrev.com/3bb814794b2509e95944cf36af0cc7538611ae03/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/fontfaceset-add-remove-expected.txt
[modify] http://crrev.com/570fb77ac846fb6f52c67e14245e254d1ae9db43/third_party/WebKit/Source/core/css/FontFaceSet.cpp
[modify] http://crrev.com/570fb77ac846fb6f52c67e14245e254d1ae9db43/third_party/WebKit/Source/core/css/FontFaceSet.h
[modify] http://crrev.com/570fb77ac846fb6f52c67e14245e254d1ae9db43/third_party/WebKit/Source/core/css/FontFaceSet.idl

Status: Fixed
See https://code.google.com/p/chromium/issues/detail?id=510346 for related behavior changes.
Sign in to add a comment