Changeset 41096 in webkit


Ignore:
Timestamp:
Feb 19, 2009 5:41:55 PM (15 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Sam Weinig.

Undo the iChat-specific quirk added in
<http://trac.webkit.org/changeset/41071>. Instead, always suspend memory
cache client callbacks during attach() and recalcStyle().

  • WebCore.base.exp: Removed Settings::setNeedsIChatMemoryCacheCallsQuirk().
  • dom/ContainerNode.cpp: (WebCore::ContainerNode::suspendPostAttachCallbacks): Disable memory cache client callbacks and remember to enable them afterwards if needed. (WebCore::ContainerNode::resumePostAttachCallbacks): Re-enable memory cache client callbacks if they were disabled in suspendPostAttachCallbacks(). (WebCore::ContainerNode::attach): Use suspendPostAttachCallbacks() and resumePostAttachCallbacks().
  • dom/ContainerNode.h: Made suspendPostAttachCallbacks() and resumePostAttachCallbacks() non-static.
  • dom/Document.cpp: (WebCore::Document::dispatchImageLoadEventsNow): Reverted iChat-specific workaround.
  • page/Settings.cpp: Removed m_needsIChatMemoryCacheCallsQuirk and related code. (WebCore::Settings::Settings):
  • page/Settings.h:

WebKit/mac:

Reviewed by Sam Weinig.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r41095 r41096  
     12009-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
    1322009-02-19  Holger Hans Peter Freyther  <zecke@selfish.org>
    233
  • trunk/WebCore/WebCore.base.exp

    r41071 r41096  
    617617__ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
    618618__ZN7WebCore8Settings33setEnforceCSSMIMETypeInStrictModeEb
    619 __ZN7WebCore8Settings34setNeedsIChatMemoryCacheCallsQuirkEb
    620619__ZN7WebCore8Settings35disableRangeMutationForOldAppleMailEb
    621620__ZN7WebCore8Settings36setOfflineWebApplicationCacheEnabledEb
  • trunk/WebCore/dom/ContainerNode.cpp

    r40991 r41096  
    3333#include "InlineTextBox.h"
    3434#include "MutationEvent.h"
     35#include "Page.h"
    3536#include "RenderTheme.h"
    3637#include "RootInlineBox.h"
     
    4344
    4445typedef Vector<std::pair<NodeCallback, RefPtr<Node> > > NodeCallbackQueue;
    45 static NodeCallbackQueue* s_postAttachCallbackQueue = 0;
    46 
    47 static size_t s_attachDepth = 0;
     46static NodeCallbackQueue* s_postAttachCallbackQueue;
     47
     48static size_t s_attachDepth;
     49static bool s_shouldReEnableMemoryCacheCallsAfterAttach;
    4850
    4951void ContainerNode::removeAllChildren()
     
    533535void ContainerNode::suspendPostAttachCallbacks()
    534536{
     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    }
    535546    ++s_attachDepth;
    536547}
     
    538549void ContainerNode::resumePostAttachCallbacks()
    539550{
    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    }
    542560    --s_attachDepth;
    543561}
     
    567585void ContainerNode::attach()
    568586{
    569     ++s_attachDepth;
     587    suspendPostAttachCallbacks();
    570588
    571589    for (Node* child = m_firstChild; child; child = child->nextSibling())
     
    573591    Node::attach();
    574592
    575     if (s_attachDepth == 1 && s_postAttachCallbackQueue)
    576         dispatchPostAttachCallbacks();
    577     --s_attachDepth;
     593    resumePostAttachCallbacks();
    578594}
    579595
  • trunk/WebCore/dom/ContainerNode.h

    r40675 r41096  
    7676protected:
    7777    static void queuePostAttachCallback(NodeCallback, Node*);
    78     static void suspendPostAttachCallbacks();
    79     static void resumePostAttachCallbacks();
     78    void suspendPostAttachCallbacks();
     79    void resumePostAttachCallbacks();
    8080
    8181    template<class GenericNode, class GenericNodeContainer>
  • trunk/WebCore/dom/Document.cpp

    r41080 r41096  
    29042904    if (!m_imageLoadEventDispatchingList.isEmpty())
    29052905        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
    29132907    m_imageLoadEventTimer.stop();
    29142908
     
    29212915    }
    29222916    m_imageLoadEventDispatchingList.clear();
    2923 #ifdef BUILDING_ON_LEOPARD
    2924     if (shouldReenableMemoryCacheClientCalls && page())
    2925         page()->setMemoryCacheClientCallsEnabled(true);
    2926 #endif
    29272917}
    29282918
  • trunk/WebCore/page/Settings.cpp

    r41071 r41096  
    8888    , m_maximumDecodedImageSize(std::numeric_limits<size_t>::max())
    8989    , m_allowScriptsToCloseWindows(false)
    90     , m_needsIChatMemoryCacheCallsQuirk(false)
    9190{
    9291    // A Frame may not have been created yet, so we initialize the AtomicString
     
    419418}
    420419
    421 void Settings::setNeedsIChatMemoryCacheCallsQuirk(bool needsIChatMemoryCacheCallsQuirk)
    422 {
    423     m_needsIChatMemoryCacheCallsQuirk = needsIChatMemoryCacheCallsQuirk;
    424 }
    425 
    426420} // namespace WebCore
  • trunk/WebCore/page/Settings.h

    r41071 r41096  
    205205        void setAllowScriptsToCloseWindows(bool);
    206206        bool allowScriptsToCloseWindows() const { return m_allowScriptsToCloseWindows; }
    207 
    208         void setNeedsIChatMemoryCacheCallsQuirk(bool);
    209         bool needsIChatMemoryCacheCallsQuirk() const { return m_needsIChatMemoryCacheCallsQuirk; }
    210207
    211208    private:
     
    262259        size_t m_maximumDecodedImageSize;
    263260        bool m_allowScriptsToCloseWindows : 1;
    264         bool m_needsIChatMemoryCacheCallsQuirk : 1;
    265261
    266262#if USE(SAFARI_THEME)
  • trunk/WebKit/mac/ChangeLog

    r41071 r41096  
     12009-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
    1122009-02-18  Dan Bernstein  <mitz@apple.com>
    213
  • trunk/WebKit/mac/WebView/WebView.mm

    r41071 r41096  
    13461346    settings->setZoomsTextOnly([preferences zoomsTextOnly]);
    13471347    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
    13511348}
    13521349
Note: See TracChangeset for help on using the changeset viewer.