Title: [112610] branches/chromium/1025/Source/WebCore/svg/SVGTRefElement.cpp
- Revision
- 112610
- Author
- [email protected]
- Date
- 2012-03-29 16:46:02 -0700 (Thu, 29 Mar 2012)
Log Message
Merge 111556
BUG=118593
Review URL: https://chromiumcodereview.appspot.com/9937002
Modified Paths
Diff
Modified: branches/chromium/1025/Source/WebCore/svg/SVGTRefElement.cpp (112609 => 112610)
--- branches/chromium/1025/Source/WebCore/svg/SVGTRefElement.cpp 2012-03-29 23:45:21 UTC (rev 112609)
+++ branches/chromium/1025/Source/WebCore/svg/SVGTRefElement.cpp 2012-03-29 23:46:02 UTC (rev 112610)
@@ -227,6 +227,10 @@
// Remove any existing event listener.
clearEventListener();
+ // If we're not yet in a document, this function will be called again from insertedIntoDocument().
+ if (!inDocument())
+ return;
+
String id;
Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id);
if (!target) {
@@ -241,10 +245,6 @@
updateReferencedText();
- // We should not add the event listener if we are not in document yet.
- if (!inDocument())
- return;
-
m_eventListener = SubtreeModificationEventListener::create(this, id);
ASSERT(target->parentNode());
target->parentNode()->addEventListener(eventNames().DOMSubtreeModifiedEvent, m_eventListener.get(), false);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes