Diff
Modified: trunk/LayoutTests/ChangeLog (158084 => 158085)
--- trunk/LayoutTests/ChangeLog 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/LayoutTests/ChangeLog 2013-10-26 15:44:26 UTC (rev 158085)
@@ -1,3 +1,12 @@
+2013-10-26 Antti Koivisto <[email protected]>
+
+ fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only
+ https://bugs.webkit.org/show_bug.cgi?id=123354
+
+ Reviewed by Andreas Kling.
+
+ * TestExpectations: Remove failure expectation
+
2013-10-25 Alexey Proskuryakov <[email protected]>
REGRESSION (r158069): platform/mac/fast/loader/file-url-mimetypes.html
Modified: trunk/LayoutTests/TestExpectations (158084 => 158085)
--- trunk/LayoutTests/TestExpectations 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/LayoutTests/TestExpectations 2013-10-26 15:44:26 UTC (rev 158085)
@@ -75,6 +75,3 @@
webkit.org/b/122679 security/crypto-subtle-gc.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-gc-2.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-gc-3.html [ Skip ]
-
-# hits simple line layout sanity check assert
-webkit.org/b/123354 fast/frames/seamless/seamless-nested-crash.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (158084 => 158085)
--- trunk/Source/WebCore/ChangeLog 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/Source/WebCore/ChangeLog 2013-10-26 15:44:26 UTC (rev 158085)
@@ -1,3 +1,17 @@
+2013-10-26 Antti Koivisto <[email protected]>
+
+ fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only
+ https://bugs.webkit.org/show_bug.cgi?id=123354
+
+ Reviewed by Andreas Kling.
+
+ * rendering/SimpleLineLayout.cpp:
+ (WebCore::SimpleLineLayout::canUseFor):
+
+ Don't enable simple line layout if the primary font is loading. The code expects
+ to use the primary font metrics for all lines but those won't match the fallbacks
+ when font is not loaded.
+
2013-10-26 Carlos Garcia Campos <[email protected]>
[GTK] Deprecate public dispatch_event method in objects implementing EventTarget interface
Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (158084 => 158085)
--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2013-10-26 15:44:26 UTC (rev 158085)
@@ -115,9 +115,9 @@
unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 5 | fontDescription.widthVariant() << 3
| (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
- RefPtr<SimpleFontData>& fontData = m_fontDataTable.add(hashKey, nullptr).iterator->value;
+ RefPtr<SimpleFontData> fontData = m_fontDataTable.add(hashKey, nullptr).iterator->value;
if (fontData)
- return fontData; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.
+ return fontData.release();
// If we are still loading, then we let the system pick a font.
if (isLoaded()) {
@@ -170,13 +170,13 @@
// and the loader may invoke arbitrary delegate or event handler code.
fontSelector->beginLoadingFontSoon(m_font.get());
- // This temporary font is not retained and should not be returned.
- FontCachePurgePreventer fontCachePurgePreventer;
- SimpleFontData* temporaryFont = fontCache()->getNonRetainedLastResortFallbackFont(fontDescription);
- fontData = SimpleFontData::create(temporaryFont->platformData(), true, true);
+ RefPtr<SimpleFontData> fallback = fontSelector->userStandardFont(fontDescription);
+ if (!fallback)
+ fallback = fontCache()->getLastResortFallbackFont(fontDescription);
+ fontData = SimpleFontData::create(fallback->platformData(), /*isCustomFont*/ true, /*isLoading*/ true);
}
- return fontData; // No release, because fontData is a reference to a RefPtr that is held in the m_fontDataTable.
+ return fontData.release();
}
#if ENABLE(SVG_FONTS)
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (158084 => 158085)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2013-10-26 15:44:26 UTC (rev 158085)
@@ -363,7 +363,7 @@
dispatchInvalidationCallbacks();
}
-static PassRefPtr<FontData> fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName)
+static PassRefPtr<SimpleFontData> fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName)
{
if (!document || !document->frame())
return 0;
@@ -391,7 +391,7 @@
if (!genericFamily.isEmpty())
return fontCache()->getCachedFontData(fontDescription, genericFamily);
- return 0;
+ return nullptr;
}
static FontTraitsMask desiredTraitsMaskForComparison;
@@ -476,13 +476,18 @@
return false;
}
+PassRefPtr<SimpleFontData> CSSFontSelector::userStandardFont(const FontDescription& description)
+{
+ return fontDataForGenericFamily(m_document, description, standardFamily);
+}
+
PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDescription, const AtomicString& familyName)
{
if (m_fontFaces.isEmpty()) {
if (familyName.startsWith("-webkit-"))
return fontDataForGenericFamily(m_document, fontDescription, familyName);
if (fontDescription.genericFamily() == FontDescription::StandardFamily && !fontDescription.isSpecifiedFont())
- return fontDataForGenericFamily(m_document, fontDescription, "-webkit-standard");
+ return fontDataForGenericFamily(m_document, fontDescription, standardFamily);
return 0;
}
@@ -492,7 +497,7 @@
// If we were handed a generic family, but there was no match, go ahead and return the correct font based off our
// settings.
if (fontDescription.genericFamily() == FontDescription::StandardFamily && !fontDescription.isSpecifiedFont())
- return fontDataForGenericFamily(m_document, fontDescription, "-webkit-standard");
+ return fontDataForGenericFamily(m_document, fontDescription, standardFamily);
return fontDataForGenericFamily(m_document, fontDescription, familyName);
}
Modified: trunk/Source/WebCore/css/CSSFontSelector.h (158084 => 158085)
--- trunk/Source/WebCore/css/CSSFontSelector.h 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/Source/WebCore/css/CSSFontSelector.h 2013-10-26 15:44:26 UTC (rev 158085)
@@ -60,6 +60,7 @@
virtual size_t fallbackFontDataCount() OVERRIDE;
virtual PassRefPtr<FontData> getFallbackFontData(const FontDescription&, size_t) OVERRIDE;
CSSSegmentedFontFace* getFontFace(const FontDescription&, const AtomicString& family);
+ virtual PassRefPtr<SimpleFontData> userStandardFont(const FontDescription&) OVERRIDE;
virtual bool resolvesFamilyFor(const FontDescription&) const OVERRIDE;
Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (158084 => 158085)
--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp 2013-10-26 15:17:14 UTC (rev 158084)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp 2013-10-26 15:44:26 UTC (rev 158085)
@@ -149,7 +149,10 @@
if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple)
return false;
- auto primaryFontData = style.font().primaryFont();
+ // We assume that all lines have metrics based purely on the primary font.
+ auto& primaryFontData = *style.font().primaryFont();
+ if (primaryFontData.isLoading())
+ return false;
unsigned length = textRenderer.textLength();
unsigned consecutiveSpaceCount = 0;
@@ -157,13 +160,14 @@
// This rejects anything with more than one consecutive whitespace, except at the beginning or end.
// This is because we don't currently do subruns within lines. Fixing this would improve coverage significantly.
UChar character = textRenderer.characterAt(i);
- if (isWhitespace(character))
+ if (isWhitespace(character)) {
++consecutiveSpaceCount;
- else {
- if (consecutiveSpaceCount != i && consecutiveSpaceCount > 1)
- return false;
- consecutiveSpaceCount = 0;
+ continue;
}
+ if (consecutiveSpaceCount != i && consecutiveSpaceCount > 1)
+ return false;
+ consecutiveSpaceCount = 0;
+
// These would be easy to support.
if (character == noBreakSpace)
return false;
@@ -178,7 +182,8 @@
|| direction == U_LEFT_TO_RIGHT_EMBEDDING || direction == U_LEFT_TO_RIGHT_OVERRIDE)
return false;
}
- if (!primaryFontData->glyphForCharacter(character))
+
+ if (!primaryFontData.glyphForCharacter(character))
return false;
}
return true;