Changeset 245354 in webkit
- Timestamp:
- May 15, 2019, 2:45:00 PM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSFontFace.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebCore/ChangeLog
r245353 r245354 1 2019-05-14 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245190. rdar://problem/50753948 4 5 Gracefully handle inaccessible font face data 6 https://bugs.webkit.org/show_bug.cgi?id=197762 7 <rdar://problem/50433861> 8 9 Reviewed by Per Arne Vollan. 10 11 Make sure CSS Font Face handling gracefully recovers from 12 missing font data. 13 14 Test: fast/text/missing-font-crash.html 15 16 * css/CSSFontFace.cpp: 17 (WebCore::CSSFontFace::fontLoadEventOccurred): 18 (WebCore::CSSFontFace::timeoutFired): 19 (WebCore::CSSFontFace::fontLoaded): 20 (WebCore::CSSFontFace::font): 21 22 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245190 268f45cc-cd09-0410-ab3c-d52691b4dbfc 23 24 2019-05-10 Brent Fulgham <bfulgham@apple.com> 25 26 Gracefully handle inaccessible font face data 27 https://bugs.webkit.org/show_bug.cgi?id=197762 28 <rdar://problem/50433861> 29 30 Reviewed by Per Arne Vollan. 31 32 Make sure CSS Font Face handling gracefully recovers from 33 missing font data. 34 35 Test: fast/text/missing-font-crash.html 36 37 * css/CSSFontFace.cpp: 38 (WebCore::CSSFontFace::fontLoadEventOccurred): 39 (WebCore::CSSFontFace::timeoutFired): 40 (WebCore::CSSFontFace::fontLoaded): 41 (WebCore::CSSFontFace::font): 42 1 43 2019-05-14 Kocsen Chung <kocsen_chung@apple.com> 2 44 -
branches/safari-607-branch/Source/WebCore/css/CSSFontFace.cpp
r239461 r245354 1 1 /* 2 * Copyright (C) 2007 , 2008, 2011, 2013Apple Inc. All rights reserved.2 * Copyright (C) 2007-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 474 474 void CSSFontFace::fontLoadEventOccurred() 475 475 { 476 Ref<CSSFontFace> protectedThis(*this);477 478 476 // If the font is already in the cache, CSSFontFaceSource may report it's loaded before it is added here as a source. 479 477 // Let's not pump the state machine until we've got all our sources. font() and load() are smart enough to act correctly … … 492 490 void CSSFontFace::timeoutFired() 493 491 { 492 Ref<CSSFontFace> protectedThis(*this); 493 494 494 switch (status()) { 495 495 case Status::Loading: … … 685 685 void CSSFontFace::fontLoaded(CSSFontFaceSource&) 686 686 { 687 Ref<CSSFontFace> protectedThis(*this); 688 687 689 fontLoadEventOccurred(); 688 690 } … … 784 786 return nullptr; 785 787 788 Ref<CSSFontFace> protectedThis(*this); 789 786 790 // Our status is derived from the first non-failed source. However, this source may 787 791 // return null from font(), which means we need to continue looping through the remainder
Note:
See TracChangeset
for help on using the changeset viewer.