OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/layout/LayoutTestHelper.h" |
| 6 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
| 7 #include "platform/testing/UnitTestHelpers.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class TransformPaintPropertyNode; |
| 13 class ClipPaintPropertyNode; |
| 14 class ScrollPaintPropertyNode; |
| 15 class LayoutPoint; |
| 16 |
| 17 typedef bool TestParamRootLayerScrolling; |
| 18 class PaintPropertyTreeBuilderTest |
| 19 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, |
| 20 private ScopedSlimmingPaintV2ForTest, |
| 21 private ScopedRootLayerScrollingForTest, |
| 22 public RenderingTest { |
| 23 public: |
| 24 PaintPropertyTreeBuilderTest() |
| 25 : ScopedSlimmingPaintV2ForTest(true), |
| 26 ScopedRootLayerScrollingForTest(GetParam()), |
| 27 RenderingTest(SingleChildFrameLoaderClient::create()) {} |
| 28 |
| 29 protected: |
| 30 void loadTestData(const char* fileName); |
| 31 |
| 32 // The following helpers return paint property nodes associated with the main |
| 33 // FrameView, accounting for differences from the RootLayerScrolls setting. |
| 34 const TransformPaintPropertyNode* framePreTranslation(); |
| 35 const TransformPaintPropertyNode* frameScrollTranslation(); |
| 36 const ClipPaintPropertyNode* frameContentClip(); |
| 37 const ScrollPaintPropertyNode* frameScroll(FrameView* = nullptr); |
| 38 |
| 39 // Return the local border box's paint offset. For more details, see |
| 40 // ObjectPaintProperties::localBorderBoxProperties(). |
| 41 LayoutPoint paintOffset(const LayoutObject*); |
| 42 |
| 43 private: |
| 44 void SetUp() override; |
| 45 void TearDown() override; |
| 46 }; |
| 47 |
| 48 } // namespace blink |
OLD | NEW |