Changeset 91710 in webkit


Ignore:
Timestamp:
Jul 25, 2011 3:23:50 PM (13 years ago)
Author:
mitz@apple.com
Message:

Reverted r91699 due to
<http://webkit.org/b/65134> REGRESSION: r91699 broke some font tests (image+text)

Many tests relied on font loading occurring synchronously in the cached and local cases.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource):
(WebCore::CSSFontFaceSource::~CSSFontFaceSource):
(WebCore::CSSFontFaceSource::getFontData):

  • css/CSSFontFaceSource.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91707 r91710  
     12011-07-25  Dan Bernstein  <mitz@apple.com>
     2
     3        Reverted r91699 due to
     4        <http://webkit.org/b/65134> REGRESSION: r91699 broke some font tests (image+text)
     5
     6        Many tests relied on font loading occurring synchronously in the cached and local cases.
     7
     8        * css/CSSFontFaceSource.cpp:
     9        (WebCore::CSSFontFaceSource::CSSFontFaceSource):
     10        (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
     11        (WebCore::CSSFontFaceSource::getFontData):
     12        * css/CSSFontFaceSource.h:
     13
    1142011-06-07  Martin Robinson  <mrobinson@igalia.com>
    215
  • trunk/Source/WebCore/css/CSSFontFaceSource.cpp

    r91699 r91710  
    5151    , m_font(font)
    5252    , m_face(0)
    53     , m_startLoadingTimer(this, &CSSFontFaceSource::startLoadingTimerFired)
    5453#if ENABLE(SVG_FONTS)
    5554    , m_hasExternalSVGFont(false)
     
    6261CSSFontFaceSource::~CSSFontFaceSource()
    6362{
    64     m_startLoadingTimer.stop();
    6563    if (m_font)
    6664        m_font->removeClient(this);
     
    175173        }
    176174    } else {
    177         // Kick off the load now. Do it on a zero-delay timer rather than synchronously, because we may be in
    178         // the middle of layout, and the loader may invoke aribtrary delegate or event handler code.
    179         m_fontSelector = fontSelector;
    180         if (!m_startLoadingTimer.isActive())
    181             m_startLoadingTimer.startOneShot(0);
    182 
     175        // Kick off the load now.
     176        if (CachedResourceLoader* cachedResourceLoader = fontSelector->cachedResourceLoader())
     177            m_font->beginLoadIfNeeded(cachedResourceLoader);
    183178        // FIXME: m_string is a URL so it makes no sense to pass it as a family name.
    184179        SimpleFontData* tempData = fontCache()->getCachedFontData(fontDescription, m_string);
     
    195190}
    196191
    197 void CSSFontFaceSource::startLoadingTimerFired(Timer<WebCore::CSSFontFaceSource>*)
    198 {
    199     ASSERT(m_font);
    200     ASSERT(m_fontSelector);
    201 
    202     if (CachedResourceLoader* cachedResourceLoader = m_fontSelector->cachedResourceLoader())
    203         m_font->beginLoadIfNeeded(cachedResourceLoader);
    204 
    205     m_fontSelector = nullptr;
    206 }
    207 
    208192#if ENABLE(SVG_FONTS)
    209193SVGFontFaceElement* CSSFontFaceSource::svgFontFaceElement() const
  • trunk/Source/WebCore/css/CSSFontFaceSource.h

    r91699 r91710  
    2929#include "CachedResourceClient.h"
    3030#include "CachedResourceHandle.h"
    31 #include "Timer.h"
    3231#include <wtf/HashMap.h>
    3332#include <wtf/text/AtomicString.h>
     
    7271
    7372private:
    74     void startLoadingTimerFired(Timer<CSSFontFaceSource>*);
    75 
    7673    AtomicString m_string; // URI for remote, built-in font name for local.
    7774    CachedResourceHandle<CachedFont> m_font; // For remote fonts, a pointer to our cached resource.
    7875    CSSFontFace* m_face; // Our owning font face.
    7976    HashMap<unsigned, SimpleFontData*> m_fontDataTable; // The hash key is composed of size synthetic styles.
    80 
    81     Timer<CSSFontFaceSource> m_startLoadingTimer;
    82     RefPtr<CSSFontSelector> m_fontSelector;
    8377
    8478#if ENABLE(SVG_FONTS)
Note: See TracChangeset for help on using the changeset viewer.