Title: [248224] releases/WebKitGTK/webkit-2.24/Source/WebCore
- Revision
- 248224
- Author
- [email protected]
- Date
- 2019-08-03 20:22:50 -0700 (Sat, 03 Aug 2019)
Log Message
Merge r245190 - 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):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (248223 => 248224)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-08-04 03:22:48 UTC (rev 248223)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-08-04 03:22:50 UTC (rev 248224)
@@ -1,3 +1,22 @@
+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-09 Zalan Bujtas <[email protected]>
Do not mix inline and block level boxes.
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSFontFace.cpp (248223 => 248224)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSFontFace.cpp 2019-08-04 03:22:48 UTC (rev 248223)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSFontFace.cpp 2019-08-04 03:22:50 UTC (rev 248224)
@@ -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