Changeset 41071 in webkit
- Timestamp:
- Feb 18, 2009 6:04:23 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r41067 r41071 1 2009-02-18 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Brady Eidson. 4 5 - WebCore part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle 6 7 The crash results from re-entry into 8 CSSMutableStyleDeclaration::setCssText, which in turn is caused by 9 the first style change causing a cached image to load from the memory 10 cache, causing load delegate dispatch, and iChat's delegate method 11 calling back into WebKit. 12 13 The workaround is to use defer delegate callbacks for memory cache. In 14 this case, deferring callbacks during image load event dispatch was 15 found to be sufficient. 16 17 The crash is a regression. See also the discussion in 18 <https://bugs.webkit.org/show_bug.cgi?id=22521>. 19 20 * WebCore.base.exp: Added 21 Settings::setNeedsIChatMemoryCacheCallsQuirk(). 22 * dom/Document.cpp: 23 (WebCore::Document::dispatchImageLoadEventsNow): If the quirk is 24 enabled, defer memory cache callbacks during image load event dispatch. 25 * page/Settings.cpp: 26 (WebCore::Settings::Settings): Initialize 27 m_needsIChatMemoryCacheCallsQuirk. 28 (WebCore::Settings::setNeedsIChatMemoryCacheCallsQuirk): Added this 29 setter. 30 * page/Settings.h: 31 (WebCore::Settings::needsIChatMemoryCacheCallsQuirk): Added this getter. 32 1 33 2009-02-18 Adam Roben <aroben@apple.com> 2 34 -
trunk/WebCore/WebCore.base.exp
r41067 r41071 617 617 __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb 618 618 __ZN7WebCore8Settings33setEnforceCSSMIMETypeInStrictModeEb 619 __ZN7WebCore8Settings34setNeedsIChatMemoryCacheCallsQuirkEb 619 620 __ZN7WebCore8Settings35disableRangeMutationForOldAppleMailEb 620 621 __ZN7WebCore8Settings36setOfflineWebApplicationCacheEnabledEb -
trunk/WebCore/dom/Document.cpp
r41047 r41071 2905 2905 if (!m_imageLoadEventDispatchingList.isEmpty()) 2906 2906 return; 2907 2907 #ifdef BUILDING_ON_LEOPARD 2908 bool shouldReenableMemoryCacheClientCalls = false; 2909 if (settings() && settings()->needsIChatMemoryCacheCallsQuirk() && page()->areMemoryCacheClientCallsEnabled()) { 2910 shouldReenableMemoryCacheClientCalls = true; 2911 page()->setMemoryCacheClientCallsEnabled(false); 2912 } 2913 #endif 2908 2914 m_imageLoadEventTimer.stop(); 2909 2915 … … 2916 2922 } 2917 2923 m_imageLoadEventDispatchingList.clear(); 2924 #ifdef BUILDING_ON_LEOPARD 2925 if (shouldReenableMemoryCacheClientCalls && page()) 2926 page()->setMemoryCacheClientCallsEnabled(true); 2927 #endif 2918 2928 } 2919 2929 -
trunk/WebCore/page/Settings.cpp
r40449 r41071 88 88 , m_maximumDecodedImageSize(std::numeric_limits<size_t>::max()) 89 89 , m_allowScriptsToCloseWindows(false) 90 , m_needsIChatMemoryCacheCallsQuirk(false) 90 91 { 91 92 // A Frame may not have been created yet, so we initialize the AtomicString … … 418 419 } 419 420 421 void Settings::setNeedsIChatMemoryCacheCallsQuirk(bool needsIChatMemoryCacheCallsQuirk) 422 { 423 m_needsIChatMemoryCacheCallsQuirk = needsIChatMemoryCacheCallsQuirk; 424 } 425 420 426 } // namespace WebCore -
trunk/WebCore/page/Settings.h
r40449 r41071 205 205 void setAllowScriptsToCloseWindows(bool); 206 206 bool allowScriptsToCloseWindows() const { return m_allowScriptsToCloseWindows; } 207 208 void setNeedsIChatMemoryCacheCallsQuirk(bool); 209 bool needsIChatMemoryCacheCallsQuirk() const { return m_needsIChatMemoryCacheCallsQuirk; } 207 210 208 211 private: … … 259 262 size_t m_maximumDecodedImageSize; 260 263 bool m_allowScriptsToCloseWindows : 1; 264 bool m_needsIChatMemoryCacheCallsQuirk : 1; 261 265 262 266 #if USE(SAFARI_THEME) -
trunk/WebKit/mac/ChangeLog
r41070 r41071 1 2009-02-18 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Brady Eidson. 4 5 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle 6 7 * WebView/WebView.mm: 8 (-[WebView _preferencesChangedNotification:]): Activate the WebCore 9 workaround for this crash in iChat. 10 1 11 2009-02-18 Anders Carlsson <andersca@apple.com> 2 12 -
trunk/WebKit/mac/WebView/WebView.mm
r41067 r41071 1346 1346 settings->setZoomsTextOnly([preferences zoomsTextOnly]); 1347 1347 settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1)); 1348 #ifdef BUILDING_ON_LEOPARD 1349 settings->setNeedsIChatMemoryCacheCallsQuirk([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iChat"]); 1350 #endif 1348 1351 } 1349 1352
Note: See TracChangeset
for help on using the changeset viewer.