Changeset 71772 in webkit


Ignore:
Timestamp:
Nov 10, 2010 2:44:23 PM (13 years ago)
Author:
mdelaney@apple.com
Message:

2010-11-10 Matthew Delaney <mdelaney@apple.com>

Reviewed by Darin Adler.

Crash in documentWillBecomeInactive() when closing window with Reader showing content with SVG
https://bugs.webkit.org/show_bug.cgi?id=49084

Manual test added.

  • manual-tests/svg-deep-clone-to-new-doc.html: Added manual test for reproducing bug since an automated version proved to be a bit tough to craft up.
  • svg/SVGSVGElement.cpp: Added in necessary document ownership transfer calls.
  • svg/SVGSVGElement.h:
Location:
trunk/WebCore
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r71771 r71772  
     12010-11-10  Matthew Delaney  <mdelaney@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Crash in documentWillBecomeInactive() when closing window with Reader showing content with SVG
     6        https://bugs.webkit.org/show_bug.cgi?id=49084
     7
     8        Manual test added.
     9
     10        * manual-tests/svg-deep-clone-to-new-doc.html: Added manual test for reproducing bug since an automated version proved to be a bit tough to craft up.
     11        * svg/SVGSVGElement.cpp: Added in necessary document ownership transfer calls.
     12        * svg/SVGSVGElement.h:
     13
    1142010-11-10  Pavel Feldman  <pfeldman@chromium.org>
    215
  • trunk/WebCore/svg/SVGSVGElement.cpp

    r71512 r71772  
    9090    // see ContainerNode::removeAllChildren, called by its destructor.
    9191    document()->accessSVGExtensions()->removeTimeContainer(this);
     92}
     93
     94void SVGSVGElement::willMoveToNewOwnerDocument()
     95{
     96    document()->unregisterForDocumentActivationCallbacks(this);
     97    SVGStyledLocatableElement::willMoveToNewOwnerDocument();
     98}
     99
     100void SVGSVGElement::didMoveToNewOwnerDocument()
     101{
     102    document()->registerForDocumentActivationCallbacks(this);
     103    SVGStyledLocatableElement::didMoveToNewOwnerDocument();
    92104}
    93105
  • trunk/WebCore/svg/SVGSVGElement.h

    r71512 r71772  
    122122        Element* getElementById(const AtomicString&) const;
    123123
     124    protected:
     125        virtual void willMoveToNewOwnerDocument();
     126        virtual void didMoveToNewOwnerDocument();
     127
    124128    private:
    125129        SVGSVGElement(const QualifiedName&, Document*);
Note: See TracChangeset for help on using the changeset viewer.