Bug 182359 - document.fonts.delete() and document.fonts.has() erroneously report false sometimes
Summary: document.fonts.delete() and document.fonts.has() erroneously report false som...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-31 16:25 PST by Myles C. Maxfield
Modified: 2018-01-31 16:26 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2018-01-31 16:25:33 PST
Equality for FontFace objects is tricky, and we don't get it right.

We can't do a pointer equality on FontFace objects, because if the last JS reference to that object goes away, the object can be garbage collected. The underlying CSSFontFace object only has a weak reference to it's owning FontFace (because the FontFace has a strong reference to the underlying CSSFontFace object).

However, we can't do pointer equality on CSSFontFace objects, because we may at any time cause the CSSFontSelector might rebuild (::buildStarted() / ::buildCompleted()) at any point, which will recreate all the CSSFontFace objects (and attempt to make the old FontFace objects adopt the new CSSFontFace objects).

Instead, we must go deeper!
Comment 1 Radar WebKit Bug Importer 2018-01-31 16:26:48 PST
<rdar://problem/37092374>