Title: [187662] branches/safari-601.1-branch
- Revision
- 187662
- Author
- [email protected]
- Date
- 2015-07-31 11:19:29 -0700 (Fri, 31 Jul 2015)
Log Message
Merged r187525. rdar://problem/22022011
Modified Paths
Added Paths
Diff
Modified: branches/safari-601.1-branch/LayoutTests/ChangeLog (187661 => 187662)
--- branches/safari-601.1-branch/LayoutTests/ChangeLog 2015-07-31 18:10:17 UTC (rev 187661)
+++ branches/safari-601.1-branch/LayoutTests/ChangeLog 2015-07-31 18:19:29 UTC (rev 187662)
@@ -1,5 +1,20 @@
2015-07-31 Lucas Forschler <[email protected]>
+ Merge r187525
+
+ 2015-07-28 Myles C. Maxfield <[email protected]>
+
+ [iOS] Crash when encountering characters whose natural font is one we can't look up
+ https://bugs.webkit.org/show_bug.cgi?id=147377
+ <rdar://problem/22022011>
+
+ Reviewed by Simon Fraser.
+
+ * fast/text/crash-complex-unknown-font-expected.html: Added.
+ * fast/text/crash-complex-unknown-font.html: Added.
+
+2015-07-31 Lucas Forschler <[email protected]>
+
Merge r187523
2015-07-28 Chris Dumez <[email protected]>
Copied: branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font-expected.html (from rev 187525, trunk/LayoutTests/fast/text/crash-complex-unknown-font-expected.html) (0 => 187662)
--- branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font-expected.html (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font-expected.html 2015-07-31 18:19:29 UTC (rev 187662)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+Test successful (no crash)
+</body>
+</html>
Copied: branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font.html (from rev 187525, trunk/LayoutTests/fast/text/crash-complex-unknown-font.html) (0 => 187662)
--- branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font.html (rev 0)
+++ branches/safari-601.1-branch/LayoutTests/fast/text/crash-complex-unknown-font.html 2015-07-31 18:19:29 UTC (rev 187662)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+window.setTimeout(function() {
+ document.getElementById("replaceme").textContent = "Test successful (no crash)";
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 0);
+</script>
+</head>
+<body>
+<div id="replaceme">‸्ट</div>
+</body>
+</html>
Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (187661 => 187662)
--- branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-07-31 18:10:17 UTC (rev 187661)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-07-31 18:19:29 UTC (rev 187662)
@@ -1,5 +1,31 @@
2015-07-31 Lucas Forschler <[email protected]>
+ Merge r187525
+
+ 2015-07-28 Myles C. Maxfield <[email protected]>
+
+ [iOS] Crash when encountering characters whose natural font is one we can't look up
+ https://bugs.webkit.org/show_bug.cgi?id=147377
+ <rdar://problem/22022011>
+
+ Reviewed by Simon Fraser.
+
+ These characters hit the complex text code path, where CoreText picks fonts
+ to use for each character. We then try to map these CoreText fonts back to
+ our own Font objects, and we assume (on iOS) that our own font search will
+ always return something.
+
+ On OS X, we do not have such an assumption, and we handle the case where it
+ does not hold. This method works on iOS as well, so the solution is to just
+ perform it on both OSes.
+
+ Test: fast/text/crash-complex-unknown-font.html
+
+ * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+
+2015-07-31 Lucas Forschler <[email protected]>
+
Merge r187522
2015-07-28 Said Abou-Hallawa <[email protected]>
Modified: branches/safari-601.1-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (187661 => 187662)
--- branches/safari-601.1-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2015-07-31 18:10:17 UTC (rev 187661)
+++ branches/safari-601.1-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm 2015-07-31 18:19:29 UTC (rev 187662)
@@ -282,17 +282,12 @@
}
auto& fontCache = FontCache::singleton();
runFont = fontCache.fontForFamily(m_font.fontDescription(), fontName.get(), false).get();
-#if !PLATFORM(IOS)
- // Core Text may have used a font that is not known to NSFontManager. In that case, fall back on
- // using the font as returned, even though it may not have the best NSFontRenderingMode.
+ // Core Text may have used a font that our font lookup path cannot find. In that case, fall back on
+ // using the font as returned.
if (!runFont) {
FontPlatformData runFontPlatformData(runCTFont, CTFontGetSize(runCTFont));
runFont = fontCache.fontForPlatformData(runFontPlatformData).ptr();
}
-#else
- // FIXME: Just assert for now, until we can devise a better fix that works with iOS.
- ASSERT(runFont);
-#endif
}
if (m_fallbackFonts && runFont != &m_font.primaryFont())
m_fallbackFonts->add(runFont);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes