Title: [245354] branches/safari-607-branch/Source/WebCore
- Revision
- 245354
- Author
- [email protected]
- Date
- 2019-05-15 14:45:00 -0700 (Wed, 15 May 2019)
Log Message
Cherry-pick r245190. rdar://problem/50753948
Gracefully handle inaccessible font face data
https://bugs.webkit.org/show_bug.cgi?id=197762
<rdar://problem/50433861>
Reviewed by Per Arne Vollan.
Make sure CSS Font Face handling gracefully recovers from
missing font data.
Test: fast/text/missing-font-crash.html
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoadEventOccurred):
(WebCore::CSSFontFace::timeoutFired):
(WebCore::CSSFontFace::fontLoaded):
(WebCore::CSSFontFace::font):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (245353 => 245354)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-05-15 21:44:58 UTC (rev 245353)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-05-15 21:45:00 UTC (rev 245354)
@@ -1,5 +1,47 @@
2019-05-14 Kocsen Chung <[email protected]>
+ Cherry-pick r245190. rdar://problem/50753948
+
+ Gracefully handle inaccessible font face data
+ https://bugs.webkit.org/show_bug.cgi?id=197762
+ <rdar://problem/50433861>
+
+ Reviewed by Per Arne Vollan.
+
+ Make sure CSS Font Face handling gracefully recovers from
+ missing font data.
+
+ Test: fast/text/missing-font-crash.html
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::fontLoadEventOccurred):
+ (WebCore::CSSFontFace::timeoutFired):
+ (WebCore::CSSFontFace::fontLoaded):
+ (WebCore::CSSFontFace::font):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-10 Brent Fulgham <[email protected]>
+
+ Gracefully handle inaccessible font face data
+ https://bugs.webkit.org/show_bug.cgi?id=197762
+ <rdar://problem/50433861>
+
+ Reviewed by Per Arne Vollan.
+
+ Make sure CSS Font Face handling gracefully recovers from
+ missing font data.
+
+ Test: fast/text/missing-font-crash.html
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::fontLoadEventOccurred):
+ (WebCore::CSSFontFace::timeoutFired):
+ (WebCore::CSSFontFace::fontLoaded):
+ (WebCore::CSSFontFace::font):
+
+2019-05-14 Kocsen Chung <[email protected]>
+
Cherry-pick r245158. rdar://problem/50753914
Do not mix inline and block level boxes.
Modified: branches/safari-607-branch/Source/WebCore/css/CSSFontFace.cpp (245353 => 245354)
--- branches/safari-607-branch/Source/WebCore/css/CSSFontFace.cpp 2019-05-15 21:44:58 UTC (rev 245353)
+++ branches/safari-607-branch/Source/WebCore/css/CSSFontFace.cpp 2019-05-15 21:45:00 UTC (rev 245354)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -473,8 +473,6 @@
void CSSFontFace::fontLoadEventOccurred()
{
- Ref<CSSFontFace> protectedThis(*this);
-
// If the font is already in the cache, CSSFontFaceSource may report it's loaded before it is added here as a source.
// Let's not pump the state machine until we've got all our sources. font() and load() are smart enough to act correctly
// when a source is failed or succeeded before we have asked it to load.
@@ -491,6 +489,8 @@
void CSSFontFace::timeoutFired()
{
+ Ref<CSSFontFace> protectedThis(*this);
+
switch (status()) {
case Status::Loading:
setStatus(Status::TimedOut);
@@ -684,6 +684,8 @@
void CSSFontFace::fontLoaded(CSSFontFaceSource&)
{
+ Ref<CSSFontFace> protectedThis(*this);
+
fontLoadEventOccurred();
}
@@ -783,6 +785,8 @@
if (computeFailureState())
return nullptr;
+ Ref<CSSFontFace> protectedThis(*this);
+
// Our status is derived from the first non-failed source. However, this source may
// return null from font(), which means we need to continue looping through the remainder
// of the sources to try to find a font to use. These subsequent tries should not affect
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes