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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerTest.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintLayer.h" 5 #include "core/paint/PaintLayer.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 EXPECT_TRUE(grandchild1->SupportsSubsequenceCaching()); 319 EXPECT_TRUE(grandchild1->SupportsSubsequenceCaching());
320 } 320 }
321 321
322 TEST_P(PaintLayerTest, SubsequenceCachingSVGRoot) { 322 TEST_P(PaintLayerTest, SubsequenceCachingSVGRoot) {
323 SetBodyInnerHTML( 323 SetBodyInnerHTML(
324 "<div id='parent' style='position: relative'>" 324 "<div id='parent' style='position: relative'>"
325 " <svg id='svgroot' style='position: relative'></svg>" 325 " <svg id='svgroot' style='position: relative'></svg>"
326 "</div>"); 326 "</div>");
327 327
328 PaintLayer* svgroot = GetPaintLayerByElementId("svgroot"); 328 PaintLayer* svgroot = GetPaintLayerByElementId("svgroot");
329 EXPECT_TRUE(svgroot->SupportsSubsequenceCaching()); 329 EXPECT_FALSE(svgroot->SupportsSubsequenceCaching());
330 } 330 }
331 331
332 TEST_P(PaintLayerTest, SubsequenceCachingMuticol) { 332 TEST_P(PaintLayerTest, SubsequenceCachingMuticol) {
333 SetBodyInnerHTML( 333 SetBodyInnerHTML(
334 "<div style='columns: 2'>" 334 "<div style='columns: 2'>"
335 " <svg id='svgroot' style='position: relative'></svg>" 335 " <svg id='svgroot' style='position: relative'></svg>"
336 "</div>"); 336 "</div>");
337 337
338 PaintLayer* svgroot = GetPaintLayerByElementId("svgroot"); 338 PaintLayer* svgroot = GetPaintLayerByElementId("svgroot");
339 EXPECT_FALSE(svgroot->SupportsSubsequenceCaching()); 339 EXPECT_FALSE(svgroot->SupportsSubsequenceCaching());
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 RefPtr<ComputedStyle> old_style = 1028 RefPtr<ComputedStyle> old_style =
1029 ComputedStyle::Clone(target_object->StyleRef()); 1029 ComputedStyle::Clone(target_object->StyleRef());
1030 ComputedStyle* new_style = target_object->MutableStyle(); 1030 ComputedStyle* new_style = target_object->MutableStyle();
1031 new_style->SetHasCurrentTransformAnimation(); 1031 new_style->SetHasCurrentTransformAnimation();
1032 target_paint_layer->UpdateTransform(old_style.Get(), *new_style); 1032 target_paint_layer->UpdateTransform(old_style.Get(), *new_style);
1033 1033
1034 EXPECT_NE(nullptr, target_paint_layer->Transform()); 1034 EXPECT_NE(nullptr, target_paint_layer->Transform());
1035 } 1035 }
1036 1036
1037 } // namespace blink 1037 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698