1. 17 Jun, 2009 3 commits
    • levin@chromium.org's avatar
      WebCore: · 4a0090f7
      levin@chromium.org authored
      2009-06-16  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test: scrollbars/scrollbar-crash-on-refresh.html
      
              * dom/Document.cpp:
              (WebCore::Document::detach):
              Gives the FrameView a change to do any necessary cleanup on
              Document::detach() which is where the renderArena gets detroyed.
              * page/FrameView.cpp:
              (WebCore::FrameView::detachCustomScrollbars):
              Gets rid of any custom scrollbars (if the docment supplied them).
              * page/FrameView.h:
              * platform/Scrollbar.h:
              (WebCore::Scrollbar::isCustomScrollbar):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::destroy):
              Removed the check for document()->frame().  If frame() is 0 in this code,
              then the call to animation() is also incorrect (since it does document()->frame()->animation()).
              * rendering/RenderScrollbar.h:
              (WebCore::RenderScrollbar::isCustomScrollbar):
      
      LayoutTests:
      
      2009-06-16  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test that refreshing an iframe with custom scrollbars works without crashing.
      
              * scrollbars/resources/page-with-custom-scrollbars.html: Added.
              * scrollbars/scrollbar-crash-on-refresh-expected.txt: Added.
              * scrollbars/scrollbar-crash-on-refresh.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a0090f7
    • bweinstein@apple.com's avatar
      2009-06-16 Brian Weinstein <bweinstein@apple.com> · 579abbb5
      bweinstein@apple.com authored
              Reviewed by Adele Peterson.
      
              Fix of <rdar://6967547> Ctrl-C copies null value erasing text in clipboard in Safari.
              This patch kept the way events were firing as they were before, and Windows events are
              consistent with Mac.       
      
              * editing/Editor.cpp:
              (WebCore::Editor::tryDHTMLCopy): Added check for canCopy() before clearing PasteBoard
              (WebCore::Editor::tryDHTMLCut): Added check for canCut() before clearing PasteBoard
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      579abbb5
    • antti@apple.com's avatar
      2009-06-16 Antti Koivisto <antti@apple.com> · 317d75c6
      antti@apple.com authored
              Reviewed by Brady Eidson.
      
              <rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient + 53
              
              When revalidating a resource, calling addClient() on one client might cause another to get removed.
              
              - made CachedResource::addClient() non-virtual and added virtual didAddClient()
              - in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first
              - check if the client is still in the set before invoking didAddClient() for it
              
              No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that
              reference each other via @imports and reloading.
      
              * WebCore.base.exp:
              * loader/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::didAddClient):
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::didAddClient):
              * loader/CachedFont.h:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::didAddClient):
              * loader/CachedImage.h:
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::addClient):
              (WebCore::CachedResource::addClientToSet):
              (WebCore::CachedResource::switchClientsToRevalidatedResource):
              * loader/CachedResource.h:
              * loader/CachedScript.cpp:
              (WebCore::CachedScript::didAddClient):
              * loader/CachedScript.h:
              * loader/CachedXSLStyleSheet.cpp:
              (WebCore::CachedXSLStyleSheet::didAddClient):
              * loader/CachedXSLStyleSheet.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      317d75c6
  2. 16 Jun, 2009 37 commits