Changeset 41096 in webkit
- Timestamp:
- Feb 19, 2009, 5:41:55 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r41095 r41096 1 2009-02-19 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 - WebCore part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027 6 Do not send loader callbacks during CSS styling 7 8 Undo the iChat-specific quirk added in 9 <http://trac.webkit.org/changeset/41071>. Instead, always suspend memory 10 cache client callbacks during attach() and recalcStyle(). 11 12 * WebCore.base.exp: Removed 13 Settings::setNeedsIChatMemoryCacheCallsQuirk(). 14 * dom/ContainerNode.cpp: 15 (WebCore::ContainerNode::suspendPostAttachCallbacks): Disable memory 16 cache client callbacks and remember to enable them afterwards if needed. 17 (WebCore::ContainerNode::resumePostAttachCallbacks): Re-enable memory 18 cache client callbacks if they were disabled in 19 suspendPostAttachCallbacks(). 20 (WebCore::ContainerNode::attach): Use suspendPostAttachCallbacks() and 21 resumePostAttachCallbacks(). 22 * dom/ContainerNode.h: Made suspendPostAttachCallbacks() 23 and resumePostAttachCallbacks() non-static. 24 * dom/Document.cpp: 25 (WebCore::Document::dispatchImageLoadEventsNow): Reverted iChat-specific 26 workaround. 27 * page/Settings.cpp: Removed m_needsIChatMemoryCacheCallsQuirk and 28 related code. 29 (WebCore::Settings::Settings): 30 * page/Settings.h: 31 1 32 2009-02-19 Holger Hans Peter Freyther <zecke@selfish.org> 2 33 -
trunk/WebCore/WebCore.base.exp
r41071 r41096 617 617 __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb 618 618 __ZN7WebCore8Settings33setEnforceCSSMIMETypeInStrictModeEb 619 __ZN7WebCore8Settings34setNeedsIChatMemoryCacheCallsQuirkEb620 619 __ZN7WebCore8Settings35disableRangeMutationForOldAppleMailEb 621 620 __ZN7WebCore8Settings36setOfflineWebApplicationCacheEnabledEb -
trunk/WebCore/dom/ContainerNode.cpp
r40991 r41096 33 33 #include "InlineTextBox.h" 34 34 #include "MutationEvent.h" 35 #include "Page.h" 35 36 #include "RenderTheme.h" 36 37 #include "RootInlineBox.h" … … 43 44 44 45 typedef Vector<std::pair<NodeCallback, RefPtr<Node> > > NodeCallbackQueue; 45 static NodeCallbackQueue* s_postAttachCallbackQueue = 0; 46 47 static size_t s_attachDepth = 0; 46 static NodeCallbackQueue* s_postAttachCallbackQueue; 47 48 static size_t s_attachDepth; 49 static bool s_shouldReEnableMemoryCacheCallsAfterAttach; 48 50 49 51 void ContainerNode::removeAllChildren() … … 533 535 void ContainerNode::suspendPostAttachCallbacks() 534 536 { 537 if (!s_attachDepth) { 538 ASSERT(!s_shouldReEnableMemoryCacheCallsAfterAttach); 539 if (Page* page = document()->page()) { 540 if (page->areMemoryCacheClientCallsEnabled()) { 541 page->setMemoryCacheClientCallsEnabled(false); 542 s_shouldReEnableMemoryCacheCallsAfterAttach = true; 543 } 544 } 545 } 535 546 ++s_attachDepth; 536 547 } … … 538 549 void ContainerNode::resumePostAttachCallbacks() 539 550 { 540 if (s_attachDepth == 1 && s_postAttachCallbackQueue) 541 dispatchPostAttachCallbacks(); 551 if (s_attachDepth == 1) { 552 if (s_postAttachCallbackQueue) 553 dispatchPostAttachCallbacks(); 554 if (s_shouldReEnableMemoryCacheCallsAfterAttach) { 555 s_shouldReEnableMemoryCacheCallsAfterAttach = false; 556 if (Page* page = document()->page()) 557 page->setMemoryCacheClientCallsEnabled(true); 558 } 559 } 542 560 --s_attachDepth; 543 561 } … … 567 585 void ContainerNode::attach() 568 586 { 569 ++s_attachDepth;587 suspendPostAttachCallbacks(); 570 588 571 589 for (Node* child = m_firstChild; child; child = child->nextSibling()) … … 573 591 Node::attach(); 574 592 575 if (s_attachDepth == 1 && s_postAttachCallbackQueue) 576 dispatchPostAttachCallbacks(); 577 --s_attachDepth; 593 resumePostAttachCallbacks(); 578 594 } 579 595 -
trunk/WebCore/dom/ContainerNode.h
r40675 r41096 76 76 protected: 77 77 static void queuePostAttachCallback(NodeCallback, Node*); 78 staticvoid suspendPostAttachCallbacks();79 staticvoid resumePostAttachCallbacks();78 void suspendPostAttachCallbacks(); 79 void resumePostAttachCallbacks(); 80 80 81 81 template<class GenericNode, class GenericNodeContainer> -
trunk/WebCore/dom/Document.cpp
r41080 r41096 2904 2904 if (!m_imageLoadEventDispatchingList.isEmpty()) 2905 2905 return; 2906 #ifdef BUILDING_ON_LEOPARD 2907 bool shouldReenableMemoryCacheClientCalls = false; 2908 if (settings() && settings()->needsIChatMemoryCacheCallsQuirk() && page()->areMemoryCacheClientCallsEnabled()) { 2909 shouldReenableMemoryCacheClientCalls = true; 2910 page()->setMemoryCacheClientCallsEnabled(false); 2911 } 2912 #endif 2906 2913 2907 m_imageLoadEventTimer.stop(); 2914 2908 … … 2921 2915 } 2922 2916 m_imageLoadEventDispatchingList.clear(); 2923 #ifdef BUILDING_ON_LEOPARD2924 if (shouldReenableMemoryCacheClientCalls && page())2925 page()->setMemoryCacheClientCallsEnabled(true);2926 #endif2927 2917 } 2928 2918 -
trunk/WebCore/page/Settings.cpp
r41071 r41096 88 88 , m_maximumDecodedImageSize(std::numeric_limits<size_t>::max()) 89 89 , m_allowScriptsToCloseWindows(false) 90 , m_needsIChatMemoryCacheCallsQuirk(false)91 90 { 92 91 // A Frame may not have been created yet, so we initialize the AtomicString … … 419 418 } 420 419 421 void Settings::setNeedsIChatMemoryCacheCallsQuirk(bool needsIChatMemoryCacheCallsQuirk)422 {423 m_needsIChatMemoryCacheCallsQuirk = needsIChatMemoryCacheCallsQuirk;424 }425 426 420 } // namespace WebCore -
trunk/WebCore/page/Settings.h
r41071 r41096 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; }210 207 211 208 private: … … 262 259 size_t m_maximumDecodedImageSize; 263 260 bool m_allowScriptsToCloseWindows : 1; 264 bool m_needsIChatMemoryCacheCallsQuirk : 1;265 261 266 262 #if USE(SAFARI_THEME) -
trunk/WebKit/mac/ChangeLog
r41071 r41096 1 2009-02-19 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027 6 Do not send loader callbacks during CSS styling 7 8 * WebView/WebView.mm: 9 (-[WebView _preferencesChangedNotification:]): Reverted the 10 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>. 11 1 12 2009-02-18 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/WebKit/mac/WebView/WebView.mm
r41071 r41096 1346 1346 settings->setZoomsTextOnly([preferences zoomsTextOnly]); 1347 1347 settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1)); 1348 #ifdef BUILDING_ON_LEOPARD1349 settings->setNeedsIChatMemoryCacheCallsQuirk([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iChat"]);1350 #endif1351 1348 } 1352 1349
Note:
See TracChangeset
for help on using the changeset viewer.