[webkit-reviews] review requested: [Bug 130572] Operator stretching: expose a math data API : [Attachment 228073] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 28 11:56:51 PDT 2014


Frédéric Wang <fred.wang at free.fr> has asked  for review:
Bug 130572: Operator stretching: expose a math data API
https://bugs.webkit.org/show_bug.cgi?id=130572

Attachment 228073: Patch
https://bugs.webkit.org/attachment.cgi?id=228073&action=review

------- Additional Comments from Frédéric Wang <fred.wang at free.fr>
So the new assertion was

ASSERT(!lookupForWriting(Extractor::extract(entry)).second)

which is, IIUC, that the entry already exists in the hash table.

I now realize that what FontCache does for vertical data is very weird: it uses
the hash() of the FontPlatformData as a key for the hash table (and so of
course this key is itself hashed again!). So two fonts with different Open Type
tables are likely to get the same key...

Open Type tables are encoded in the font file, so they should really be per
FontPlatformData and I'm even assuming per SimpleFontData (unless two
SimpleFontData's can share the same FontPlatformData). So I'm not really sure
it is relevant to use a cache for the Open Type tables.

Also, there are not many fonts with Open Type MATH tables and the math data are
likely to only be used in the MathML code. So trying to initialize the data
only the first time the mathData() is called is probably a better strategy.

In this patch, I've removed the cache and moved the initialization to
mathData().


More information about the webkit-reviews mailing list