| 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/layout/LayoutTestHelper.h" | 5 #include "core/layout/LayoutTestHelper.h" |
| 6 #include "core/layout/LayoutTreeAsText.h" | 6 #include "core/layout/LayoutTreeAsText.h" |
| 7 #include "core/layout/api/LayoutViewItem.h" | 7 #include "core/layout/api/LayoutViewItem.h" |
| 8 #include "core/paint/ObjectPaintProperties.h" | 8 #include "core/paint/ObjectPaintProperties.h" |
| 9 #include "core/paint/PaintPropertyTreePrinter.h" | 9 #include "core/paint/PaintPropertyTreePrinter.h" |
| 10 #include "platform/graphics/paint/GeometryMapper.h" | 10 #include "platform/graphics/paint/GeometryMapper.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 typedef bool TestParamRootLayerScrolling; | 22 typedef bool TestParamRootLayerScrolling; |
| 23 class PrePaintTreeWalkTest | 23 class PrePaintTreeWalkTest |
| 24 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, | 24 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, |
| 25 private ScopedSlimmingPaintV2ForTest, | 25 private ScopedSlimmingPaintV2ForTest, |
| 26 private ScopedRootLayerScrollingForTest, | 26 private ScopedRootLayerScrollingForTest, |
| 27 public RenderingTest { | 27 public RenderingTest { |
| 28 public: | 28 public: |
| 29 PrePaintTreeWalkTest() | 29 PrePaintTreeWalkTest() |
| 30 : ScopedSlimmingPaintV2ForTest(true), | 30 : ScopedSlimmingPaintV2ForTest(true), |
| 31 ScopedRootLayerScrollingForTest(GetParam()), | 31 ScopedRootLayerScrollingForTest(GetParam()), |
| 32 RenderingTest(SingleChildFrameLoaderClient::create()) {} | 32 RenderingTest(EmptyFrameLoaderClient::create()) {} |
| 33 | 33 |
| 34 const TransformPaintPropertyNode* framePreTranslation() { | 34 const TransformPaintPropertyNode* framePreTranslation() { |
| 35 FrameView* frameView = document().view(); | 35 FrameView* frameView = document().view(); |
| 36 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 36 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 37 return frameView->layoutView() | 37 return frameView->layoutView() |
| 38 ->paintProperties() | 38 ->paintProperties() |
| 39 ->paintOffsetTranslation(); | 39 ->paintOffsetTranslation(); |
| 40 } | 40 } |
| 41 return frameView->preTranslation(); | 41 return frameView->preTranslation(); |
| 42 } | 42 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Invalidate the opacity property. | 147 // Invalidate the opacity property. |
| 148 transparentElement->setAttribute(HTMLNames::classAttr, "opacityB"); | 148 transparentElement->setAttribute(HTMLNames::classAttr, "opacityB"); |
| 149 document().view()->updateAllLifecyclePhases(); | 149 document().view()->updateAllLifecyclePhases(); |
| 150 | 150 |
| 151 // The opacity should have changed. | 151 // The opacity should have changed. |
| 152 EXPECT_EQ(0.4f, transparentProperties->effect()->opacity()); | 152 EXPECT_EQ(0.4f, transparentProperties->effect()->opacity()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace blink | 155 } // namespace blink |
| OLD | NEW |