Changeset 63719 in webkit


Ignore:
Timestamp:
Jul 19, 2010 10:10:08 PM (14 years ago)
Author:
yuzo@google.com
Message:

2010-07-15 Yuzo Fujishima <yuzo@google.com>

Reviewed by Dan Bernstein.

Fix for Bug 42342 - Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
https://bugs.webkit.org/show_bug.cgi?id=42342

  • fast/css/font-face-download-error-expected.txt: Added.
  • fast/css/font-face-download-error.html: Added.

2010-07-15 Yuzo Fujishima <yuzo@google.com>

Reviewed by Dan Bernstein.

Fix for Bug 42342 - Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
https://bugs.webkit.org/show_bug.cgi?id=42342

Test: fast/css/font-face-download-error.html

  • css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::isValid): Valid if at least one font face is valid. (WebCore::CSSSegmentedFontFace::getFontData): Check validity for each font face.
  • css/CSSSegmentedFontFace.h: Make isValid private.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63715 r63719  
     12010-07-15  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix for Bug 42342 - Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
     6        https://bugs.webkit.org/show_bug.cgi?id=42342
     7
     8        * fast/css/font-face-download-error-expected.txt: Added.
     9        * fast/css/font-face-download-error.html: Added.
     10
    1112010-07-19  Anders Carlsson  <andersca@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r63718 r63719  
     12010-07-15  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix for Bug 42342 - Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
     6        https://bugs.webkit.org/show_bug.cgi?id=42342
     7
     8        Test: fast/css/font-face-download-error.html
     9
     10        * css/CSSSegmentedFontFace.cpp:
     11        (WebCore::CSSSegmentedFontFace::isValid): Valid if at least one font
     12        face is valid.
     13        (WebCore::CSSSegmentedFontFace::getFontData): Check validity for each
     14        font face.
     15        * css/CSSSegmentedFontFace.h: Make isValid private.
     16
    1172010-07-19  Kent Tamura  <tkent@chromium.org>
    218
  • trunk/WebCore/css/CSSSegmentedFontFace.cpp

    r63510 r63719  
    6262bool CSSSegmentedFontFace::isValid() const
    6363{
     64    // Valid if at least one font face is valid.
    6465    unsigned size = m_fontFaces.size();
    6566    for (unsigned i = 0; i < size; i++) {
    66         if (!m_fontFaces[i]->isValid())
    67             return false;
     67        if (m_fontFaces[i]->isValid())
     68            return true;
    6869    }
    69     return true;
     70    return false;
    7071}
    7172
     
    9899    unsigned size = m_fontFaces.size();
    99100    for (unsigned i = 0; i < size; i++) {
     101        if (!m_fontFaces[i]->isValid())
     102            continue;
    100103        FontTraitsMask traitsMask = m_fontFaces[i]->traitsMask();
    101104        bool syntheticBold = !(traitsMask & (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask)) && (desiredTraitsMask & (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask));
  • trunk/WebCore/css/CSSSegmentedFontFace.h

    r63510 r63719  
    4646    ~CSSSegmentedFontFace();
    4747
    48     bool isValid() const;
    4948    CSSFontSelector* fontSelector() const { return m_fontSelector; }
    5049
     
    5958
    6059    void pruneTable();
     60    bool isValid() const;
    6161
    6262    CSSFontSelector* m_fontSelector;
Note: See TracChangeset for help on using the changeset viewer.