Changeset 158085 in webkit
- Timestamp:
- Oct 26, 2013 8:44:26 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r158078 r158085 1 2013-10-26 Antti Koivisto <antti@apple.com> 2 3 fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only 4 https://bugs.webkit.org/show_bug.cgi?id=123354 5 6 Reviewed by Andreas Kling. 7 8 * TestExpectations: Remove failure expectation 9 1 10 2013-10-25 Alexey Proskuryakov <ap@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r158031 r158085 76 76 webkit.org/b/122679 security/crypto-subtle-gc-2.html [ Skip ] 77 77 webkit.org/b/122679 security/crypto-subtle-gc-3.html [ Skip ] 78 79 # hits simple line layout sanity check assert80 webkit.org/b/123354 fast/frames/seamless/seamless-nested-crash.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r158083 r158085 1 2013-10-26 Antti Koivisto <antti@apple.com> 2 3 fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only 4 https://bugs.webkit.org/show_bug.cgi?id=123354 5 6 Reviewed by Andreas Kling. 7 8 * rendering/SimpleLineLayout.cpp: 9 (WebCore::SimpleLineLayout::canUseFor): 10 11 Don't enable simple line layout if the primary font is loading. The code expects 12 to use the primary font metrics for all lines but those won't match the fallbacks 13 when font is not loaded. 14 1 15 2013-10-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebCore/css/CSSFontFaceSource.cpp
r157924 r158085 116 116 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0); 117 117 118 RefPtr<SimpleFontData> &fontData = m_fontDataTable.add(hashKey, nullptr).iterator->value;118 RefPtr<SimpleFontData> fontData = m_fontDataTable.add(hashKey, nullptr).iterator->value; 119 119 if (fontData) 120 return fontData ; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.120 return fontData.release(); 121 121 122 122 // If we are still loading, then we let the system pick a font. … … 171 171 fontSelector->beginLoadingFontSoon(m_font.get()); 172 172 173 // This temporary font is not retained and should not be returned.174 FontCachePurgePreventer fontCachePurgePreventer;175 SimpleFontData* temporaryFont = fontCache()->getNonRetainedLastResortFallbackFont(fontDescription);176 fontData = SimpleFontData::create( temporaryFont->platformData(), true,true);173 RefPtr<SimpleFontData> fallback = fontSelector->userStandardFont(fontDescription); 174 if (!fallback) 175 fallback = fontCache()->getLastResortFallbackFont(fontDescription); 176 fontData = SimpleFontData::create(fallback->platformData(), /*isCustomFont*/ true, /*isLoading*/ true); 177 177 } 178 178 179 return fontData ; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.179 return fontData.release(); 180 180 } 181 181 -
trunk/Source/WebCore/css/CSSFontSelector.cpp
r157971 r158085 364 364 } 365 365 366 static PassRefPtr< FontData> fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName)366 static PassRefPtr<SimpleFontData> fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName) 367 367 { 368 368 if (!document || !document->frame()) … … 392 392 return fontCache()->getCachedFontData(fontDescription, genericFamily); 393 393 394 return 0;394 return nullptr; 395 395 } 396 396 … … 477 477 } 478 478 479 PassRefPtr<SimpleFontData> CSSFontSelector::userStandardFont(const FontDescription& description) 480 { 481 return fontDataForGenericFamily(m_document, description, standardFamily); 482 } 483 479 484 PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDescription, const AtomicString& familyName) 480 485 { … … 483 488 return fontDataForGenericFamily(m_document, fontDescription, familyName); 484 489 if (fontDescription.genericFamily() == FontDescription::StandardFamily && !fontDescription.isSpecifiedFont()) 485 return fontDataForGenericFamily(m_document, fontDescription, "-webkit-standard");490 return fontDataForGenericFamily(m_document, fontDescription, standardFamily); 486 491 return 0; 487 492 } … … 493 498 // settings. 494 499 if (fontDescription.genericFamily() == FontDescription::StandardFamily && !fontDescription.isSpecifiedFont()) 495 return fontDataForGenericFamily(m_document, fontDescription, "-webkit-standard");500 return fontDataForGenericFamily(m_document, fontDescription, standardFamily); 496 501 return fontDataForGenericFamily(m_document, fontDescription, familyName); 497 502 } -
trunk/Source/WebCore/css/CSSFontSelector.h
r157653 r158085 61 61 virtual PassRefPtr<FontData> getFallbackFontData(const FontDescription&, size_t) OVERRIDE; 62 62 CSSSegmentedFontFace* getFontFace(const FontDescription&, const AtomicString& family); 63 virtual PassRefPtr<SimpleFontData> userStandardFont(const FontDescription&) OVERRIDE; 63 64 64 65 virtual bool resolvesFamilyFor(const FontDescription&) const OVERRIDE; -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r158012 r158085 150 150 return false; 151 151 152 auto primaryFontData = style.font().primaryFont(); 152 // We assume that all lines have metrics based purely on the primary font. 153 auto& primaryFontData = *style.font().primaryFont(); 154 if (primaryFontData.isLoading()) 155 return false; 153 156 154 157 unsigned length = textRenderer.textLength(); … … 158 161 // This is because we don't currently do subruns within lines. Fixing this would improve coverage significantly. 159 162 UChar character = textRenderer.characterAt(i); 160 if (isWhitespace(character)) 163 if (isWhitespace(character)) { 161 164 ++consecutiveSpaceCount; 162 else { 163 if (consecutiveSpaceCount != i && consecutiveSpaceCount > 1) 164 return false; 165 consecutiveSpaceCount = 0; 165 continue; 166 166 } 167 if (consecutiveSpaceCount != i && consecutiveSpaceCount > 1) 168 return false; 169 consecutiveSpaceCount = 0; 170 167 171 // These would be easy to support. 168 172 if (character == noBreakSpace) … … 179 183 return false; 180 184 } 181 if (!primaryFontData->glyphForCharacter(character)) 185 186 if (!primaryFontData.glyphForCharacter(character)) 182 187 return false; 183 188 }
Note: See TracChangeset
for help on using the changeset viewer.