Changeset 202945 in webkit


Ignore:
Timestamp:
Jul 7, 2016 4:34:09 PM (8 years ago)
Author:
fred.wang@free.fr
Message:

[Font Loading] The callback passed to document.fonts.ready should always be called
https://bugs.webkit.org/show_bug.cgi?id=158884

Reviewed by Dean Jackson.

Source/WebCore:

The boolean was simply not being reset when loads start.

Test: fast/text/font-face-set-ready-fire.html

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::startedLoading):

  • css/FontFaceSet.h:

LayoutTests:

  • fast/text/font-face-set-ready-fire-expected.txt: Added.
  • fast/text/font-face-set-ready-fire.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202944 r202945  
     12016-07-07  Myles C. Maxfield  <mmaxfield@apple.com> and Frédéric Wang  <fred.wang@free.fr>
     2
     3        [Font Loading] The callback passed to document.fonts.ready should always be called
     4        https://bugs.webkit.org/show_bug.cgi?id=158884
     5
     6        Reviewed by Dean Jackson.
     7
     8        * fast/text/font-face-set-ready-fire-expected.txt: Added.
     9        * fast/text/font-face-set-ready-fire.html: Added.
     10
    1112016-07-07  Andy Estes  <aestes@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r202944 r202945  
     12016-07-07  Myles C. Maxfield  <mmaxfield@apple.com> and Frédéric Wang  <fred.wang@free.fr>
     2
     3        [Font Loading] The callback passed to document.fonts.ready should always be called
     4        https://bugs.webkit.org/show_bug.cgi?id=158884
     5
     6        Reviewed by Dean Jackson.
     7
     8        The boolean was simply not being reset when loads start.
     9
     10        Test: fast/text/font-face-set-ready-fire.html
     11
     12        * css/FontFaceSet.cpp:
     13        (WebCore::FontFaceSet::startedLoading):
     14        * css/FontFaceSet.h:
     15
    1162016-07-07  Andy Estes  <aestes@apple.com>
    217
  • trunk/Source/WebCore/css/FontFaceSet.cpp

    r202307 r202945  
    198198{
    199199    // FIXME: Fire a "loading" event asynchronously.
     200    m_isReady = false;
    200201}
    201202
  • trunk/Source/WebCore/css/FontFaceSet.h

    r202307 r202945  
    112112    HashMap<RefPtr<CSSFontFace>, Vector<Ref<PendingPromise>>> m_pendingPromises;
    113113    Optional<ReadyPromise> m_promise;
    114     bool m_isReady { false };
     114    bool m_isReady { true };
    115115};
    116116
Note: See TracChangeset for help on using the changeset viewer.