| OLD | NEW |
| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_TRUE(svgroot->SupportsSubsequenceCaching()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 TEST_P(PaintLayerTest, SubsequenceCachingMuticol) { |
| 333 SetBodyInnerHTML( |
| 334 "<div style='columns: 2'>" |
| 335 " <svg id='svgroot' style='position: relative'></svg>" |
| 336 "</div>"); |
| 337 |
| 338 PaintLayer* svgroot = GetPaintLayerByElementId("svgroot"); |
| 339 EXPECT_FALSE(svgroot->SupportsSubsequenceCaching()); |
| 340 } |
| 341 |
| 332 TEST_P(PaintLayerTest, HasDescendantWithClipPath) { | 342 TEST_P(PaintLayerTest, HasDescendantWithClipPath) { |
| 333 SetBodyInnerHTML( | 343 SetBodyInnerHTML( |
| 334 "<div id='parent' style='position:relative'>" | 344 "<div id='parent' style='position:relative'>" |
| 335 " <div id='clip-path' style='clip-path: circle(50px at 0 100px)'>" | 345 " <div id='clip-path' style='clip-path: circle(50px at 0 100px)'>" |
| 336 " </div>" | 346 " </div>" |
| 337 "</div>"); | 347 "</div>"); |
| 338 PaintLayer* parent = GetPaintLayerByElementId("parent"); | 348 PaintLayer* parent = GetPaintLayerByElementId("parent"); |
| 339 PaintLayer* clip_path = GetPaintLayerByElementId("clip-path"); | 349 PaintLayer* clip_path = GetPaintLayerByElementId("clip-path"); |
| 340 | 350 |
| 341 EXPECT_TRUE(parent->HasDescendantWithClipPath()); | 351 EXPECT_TRUE(parent->HasDescendantWithClipPath()); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 RefPtr<ComputedStyle> old_style = | 1028 RefPtr<ComputedStyle> old_style = |
| 1019 ComputedStyle::Clone(target_object->StyleRef()); | 1029 ComputedStyle::Clone(target_object->StyleRef()); |
| 1020 ComputedStyle* new_style = target_object->MutableStyle(); | 1030 ComputedStyle* new_style = target_object->MutableStyle(); |
| 1021 new_style->SetHasCurrentTransformAnimation(); | 1031 new_style->SetHasCurrentTransformAnimation(); |
| 1022 target_paint_layer->UpdateTransform(old_style.Get(), *new_style); | 1032 target_paint_layer->UpdateTransform(old_style.Get(), *new_style); |
| 1023 | 1033 |
| 1024 EXPECT_NE(nullptr, target_paint_layer->Transform()); | 1034 EXPECT_NE(nullptr, target_paint_layer->Transform()); |
| 1025 } | 1035 } |
| 1026 | 1036 |
| 1027 } // namespace blink | 1037 } // namespace blink |
| OLD | NEW |