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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp

Issue 2889783003: Only allow subsequence caching for SVG documents, not inline SVG. (Closed)
Patch Set: Merge branch 'master' into fixsvg Created 3 years, 7 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 | « third_party/WebKit/Source/core/svg/graphics/SVGImage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp
index 9c71221fac1a3d5aa5bb0af66424176cce78fdb3..900a5747676d225f9b6190a939c8b8eb3cac9808 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp
@@ -4,6 +4,9 @@
#include "core/svg/graphics/SVGImage.h"
+#include "core/frame/FrameView.h"
+#include "core/layout/LayoutView.h"
+#include "core/paint/PaintLayer.h"
#include "core/svg/graphics/SVGImageChromeClient.h"
#include "platform/SharedBuffer.h"
#include "platform/Timer.h"
@@ -145,4 +148,17 @@ TEST_F(SVGImageTest, ResetAnimation) {
EXPECT_TRUE(timer->IsActive());
}
+TEST_F(SVGImageTest, SupportsSubsequenceCaching) {
+ const bool kShouldPause = true;
+ Load(kAnimatedDocument, kShouldPause);
+ PumpFrame();
+ LocalFrame* local_frame =
+ ToLocalFrame(GetImage().GetPageForTesting()->MainFrame());
+ EXPECT_TRUE(local_frame->GetDocument()->IsSVGDocument());
+ LayoutObject* svg_root = local_frame->View()->GetLayoutView()->FirstChild();
+ EXPECT_TRUE(svg_root->IsSVGRoot());
+ EXPECT_TRUE(
+ ToLayoutBoxModelObject(svg_root)->Layer()->SupportsSubsequenceCaching());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698