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

Unified Diff: Source/core/testing/Internals.cpp

Issue 1220053003: Disentangle filter content recording state from FilterData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGImageElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 2edf34baabdeda4d3e90aa95a84ddd64560e6f56..9169dd89ec6d1691d33541d9a07fcff7313b8cab 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -117,6 +117,7 @@
#include "core/paint/DeprecatedPaintLayer.h"
#include "core/plugins/testing/DictionaryPluginPlaceholder.h"
#include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
+#include "core/svg/SVGImageElement.h"
#include "core/testing/DictionaryTest.h"
#include "core/testing/GCObservation.h"
#include "core/testing/InternalRuntimeFlags.h"
@@ -485,12 +486,16 @@ void Internals::advanceTimeForImage(Element* image, double deltaTimeInSeconds, E
return;
}
- if (!isHTMLImageElement(*image)) {
+ ImageResource* resource = nullptr;
+ if (isHTMLImageElement(*image)) {
+ resource = toHTMLImageElement(*image).cachedImage();
+ } else if (isSVGImageElement(*image)) {
+ resource = toSVGImageElement(*image).cachedImage();
+ } else {
exceptionState.throwDOMException(InvalidAccessError, "The element provided is not a image element.");
return;
}
- ImageResource* resource = toHTMLImageElement(*image).cachedImage();
if (!resource || !resource->hasImage()) {
exceptionState.throwDOMException(InvalidAccessError, "The image resource is not available.");
return;
« no previous file with comments | « Source/core/svg/SVGImageElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698