[Webkit-unassigned] [Bug 182359] New: document.fonts.delete() and document.fonts.has() erroneously report false sometimes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 31 16:25:33 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182359

            Bug ID: 182359
           Summary: document.fonts.delete() and document.fonts.has()
                    erroneously report false sometimes
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mmaxfield at apple.com
                CC: mmaxfield at apple.com

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!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180201/bdeab5d7/attachment.html>


More information about the webkit-unassigned mailing list