| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 SlimmingPaintAndRootLayerScrolling foo[] = { | 29 SlimmingPaintAndRootLayerScrolling foo[] = { |
| 30 SlimmingPaintAndRootLayerScrolling(false, false), | 30 SlimmingPaintAndRootLayerScrolling(false, false), |
| 31 SlimmingPaintAndRootLayerScrolling(true, false), | 31 SlimmingPaintAndRootLayerScrolling(true, false), |
| 32 SlimmingPaintAndRootLayerScrolling(false, true), | 32 SlimmingPaintAndRootLayerScrolling(false, true), |
| 33 SlimmingPaintAndRootLayerScrolling(true, true)}; | 33 SlimmingPaintAndRootLayerScrolling(true, true)}; |
| 34 | 34 |
| 35 INSTANTIATE_TEST_CASE_P(All, PaintLayerTest, ::testing::ValuesIn(foo)); | 35 INSTANTIATE_TEST_CASE_P(All, PaintLayerTest, ::testing::ValuesIn(foo)); |
| 36 | 36 |
| 37 TEST_P(PaintLayerTest, CompositedBoundsAbsPosGrandchild) { | 37 TEST_P(PaintLayerTest, CompositedBoundsAbsPosGrandchild) { |
| 38 // TODO(chrishtr): fix this test for SPv2 | |
| 39 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | |
| 40 return; | |
| 41 | |
| 42 setBodyInnerHTML( | 38 setBodyInnerHTML( |
| 43 " <div id='parent'><div id='absposparent'><div id='absposchild'>" | 39 " <div id='parent'><div id='absposparent'><div id='absposchild'>" |
| 44 " </div></div></div>" | 40 " </div></div></div>" |
| 45 "<style>" | 41 "<style>" |
| 46 " #parent { position: absolute; z-index: 0; overflow: hidden;" | 42 " #parent { position: absolute; z-index: 0; overflow: hidden;" |
| 47 " background: lightgray; width: 150px; height: 150px;" | 43 " background: lightgray; width: 150px; height: 150px;" |
| 48 " will-change: transform; }" | 44 " will-change: transform; }" |
| 49 " #absposparent { position: absolute; z-index: 0; }" | 45 " #absposparent { position: absolute; z-index: 0; }" |
| 50 " #absposchild { position: absolute; top: 0px; left: 0px; height: 200px;" | 46 " #absposchild { position: absolute; top: 0px; left: 0px; height: 200px;" |
| 51 " width: 200px; background: lightblue; }</style>"); | 47 " width: 200px; background: lightblue; }</style>"); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 506 |
| 511 PaintLayer* target = | 507 PaintLayer* target = |
| 512 toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer(); | 508 toLayoutBoxModelObject(getLayoutObjectByElementId("target"))->layer(); |
| 513 PaintLayer* containingBlock = | 509 PaintLayer* containingBlock = |
| 514 toLayoutBoxModelObject(getLayoutObjectByElementId("containingBlock")) | 510 toLayoutBoxModelObject(getLayoutObjectByElementId("containingBlock")) |
| 515 ->layer(); | 511 ->layer(); |
| 516 EXPECT_EQ(containingBlock, target->compositingContainer()); | 512 EXPECT_EQ(containingBlock, target->compositingContainer()); |
| 517 } | 513 } |
| 518 | 514 |
| 519 } // namespace blink | 515 } // namespace blink |
| OLD | NEW |