| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layout/compositing/CompositedLayerMapping.h" | 5 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.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/api/LayoutViewItem.h" | 10 #include "core/layout/api/LayoutViewItem.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 IntRect previousInterestRect(const GraphicsLayer* graphicsLayer) | 43 IntRect previousInterestRect(const GraphicsLayer* graphicsLayer) |
| 44 { | 44 { |
| 45 return graphicsLayer->m_previousInterestRect; | 45 return graphicsLayer->m_previousInterestRect; |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void SetUp() override | 49 void SetUp() override |
| 50 { | 50 { |
| 51 RenderingTest::SetUp(); | 51 RenderingTest::SetUp(); |
| 52 enableCompositing(); | 52 enableCompositing(); |
| 53 GraphicsLayer::setDrawDebugRedFillForTesting(false); | |
| 54 } | 53 } |
| 55 | 54 |
| 56 void TearDown() override | 55 void TearDown() override |
| 57 { | 56 { |
| 58 GraphicsLayer::setDrawDebugRedFillForTesting(true); | |
| 59 RenderingTest::TearDown(); | 57 RenderingTest::TearDown(); |
| 60 } | 58 } |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 #define EXPECT_RECT_EQ(expected, actual) \ | 61 #define EXPECT_RECT_EQ(expected, actual) \ |
| 64 do { \ | 62 do { \ |
| 65 const IntRect& actualRect = actual; \ | 63 const IntRect& actualRect = actual; \ |
| 66 EXPECT_EQ(expected.x(), actualRect.x()); \ | 64 EXPECT_EQ(expected.x(), actualRect.x()); \ |
| 67 EXPECT_EQ(expected.y(), actualRect.y()); \ | 65 EXPECT_EQ(expected.y(), actualRect.y()); \ |
| 68 EXPECT_EQ(expected.width(), actualRect.width()); \ | 66 EXPECT_EQ(expected.width(), actualRect.width()); \ |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 negativeCompositedChild->parentNode()->removeChild(negativeCompositedChild); | 618 negativeCompositedChild->parentNode()->removeChild(negativeCompositedChild); |
| 621 document().view()->updateAllLifecyclePhases(); | 619 document().view()->updateAllLifecyclePhases(); |
| 622 | 620 |
| 623 mapping = toLayoutBlock(getLayoutObjectByElementId("container"))->layer()->c
ompositedLayerMapping(); | 621 mapping = toLayoutBlock(getLayoutObjectByElementId("container"))->layer()->c
ompositedLayerMapping(); |
| 624 ASSERT_TRUE(mapping->scrollingContentsLayer()); | 622 ASSERT_TRUE(mapping->scrollingContentsLayer()); |
| 625 EXPECT_EQ(static_cast<GraphicsLayerPaintingPhase>(GraphicsLayerPaintOverflow
Contents | GraphicsLayerPaintCompositedScroll | GraphicsLayerPaintForeground), m
apping->scrollingContentsLayer()->paintingPhase()); | 623 EXPECT_EQ(static_cast<GraphicsLayerPaintingPhase>(GraphicsLayerPaintOverflow
Contents | GraphicsLayerPaintCompositedScroll | GraphicsLayerPaintForeground), m
apping->scrollingContentsLayer()->paintingPhase()); |
| 626 EXPECT_FALSE(mapping->foregroundLayer()); | 624 EXPECT_FALSE(mapping->foregroundLayer()); |
| 627 } | 625 } |
| 628 | 626 |
| 629 } // namespace blink | 627 } // namespace blink |
| OLD | NEW |