From 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 7 May 2012 11:21:11 +0200 Subject: Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286) --- Source/WebCore/html/HTMLMapElement.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Source/WebCore/html/HTMLMapElement.cpp') diff --git a/Source/WebCore/html/HTMLMapElement.cpp b/Source/WebCore/html/HTMLMapElement.cpp index 2e467137a..5dc08366a 100644 --- a/Source/WebCore/html/HTMLMapElement.cpp +++ b/Source/WebCore/html/HTMLMapElement.cpp @@ -131,16 +131,18 @@ HTMLCollection* HTMLMapElement::areas() return ensureCachedHTMLCollection(MapAreas); } -void HTMLMapElement::insertedIntoDocument() +Node::InsertionNotificationRequest HTMLMapElement::insertedInto(Node* insertionPoint) { - treeScope()->addImageMap(this); - HTMLElement::insertedIntoDocument(); + if (insertionPoint->inDocument()) + treeScope()->addImageMap(this); + return HTMLElement::insertedInto(insertionPoint); } -void HTMLMapElement::removedFromDocument() +void HTMLMapElement::removedFrom(Node* insertionPoint) { - treeScope()->removeImageMap(this); - HTMLElement::removedFromDocument(); + if (insertionPoint->inDocument()) + treeScope()->removeImageMap(this); + HTMLElement::removedFrom(insertionPoint); } } -- cgit v1.2.1