Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: Source/core/svg/SVGDocumentExtensions.cpp

Issue 134263003: Followup fixes for bug 332066. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/svg/custom/loadevents-async-expected.txt ('k') | Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements() 113 void SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements()
114 { 114 {
115 Vector<RefPtr<SVGSVGElement> > timeContainers; 115 Vector<RefPtr<SVGSVGElement> > timeContainers;
116 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end()) ; 116 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end()) ;
117 117
118 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); 118 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end();
119 for (Vector<RefPtr<SVGSVGElement> >::iterator it = timeContainers.begin(); i t != end; ++it) { 119 for (Vector<RefPtr<SVGSVGElement> >::iterator it = timeContainers.begin(); i t != end; ++it) {
120 SVGSVGElement* outerSVG = (*it).get(); 120 SVGSVGElement* outerSVG = (*it).get();
121 if (!outerSVG->isOutermostSVGSVGElement()) 121 if (!outerSVG->isOutermostSVGSVGElement())
122 continue; 122 continue;
123 outerSVG->sendSVGLoadEventIfPossible(); 123
124 // don't dispatch the load event document is not wellformed (for XML/sta ndalone svg)
125 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu ment())
126 outerSVG->sendSVGLoadEventIfPossible();
124 } 127 }
125 } 128 }
126 129
127 static void reportMessage(Document* document, MessageLevel level, const String& message) 130 static void reportMessage(Document* document, MessageLevel level, const String& message)
128 { 131 {
129 if (document->frame()) 132 if (document->frame())
130 document->addConsoleMessage(RenderingMessageSource, level, message); 133 document->addConsoleMessage(RenderingMessageSource, level, message);
131 } 134 }
132 135
133 void SVGDocumentExtensions::reportWarning(const String& message) 136 void SVGDocumentExtensions::reportWarning(const String& message)
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 410 }
408 411
409 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele ment) 412 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele ment)
410 { 413 {
411 ASSERT(m_svgFontFaceElements.contains(element)); 414 ASSERT(m_svgFontFaceElements.contains(element));
412 m_svgFontFaceElements.remove(element); 415 m_svgFontFaceElements.remove(element);
413 } 416 }
414 #endif 417 #endif
415 418
416 } 419 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/loadevents-async-expected.txt ('k') | Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698