| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 " <div id=div style='position: absolute; left: 5.6px; top: 7.3px'>" | 1683 " <div id=div style='position: absolute; left: 5.6px; top: 7.3px'>" |
| 1684 " </div>" | 1684 " </div>" |
| 1685 " </foreignObject>" | 1685 " </foreignObject>" |
| 1686 "</svg>"); | 1686 "</svg>"); |
| 1687 | 1687 |
| 1688 const auto* svgProperties = | 1688 const auto* svgProperties = |
| 1689 getLayoutObjectByElementId("svg")->paintProperties(); | 1689 getLayoutObjectByElementId("svg")->paintProperties(); |
| 1690 EXPECT_EQ(nullptr, svgProperties->paintOffsetTranslation()); | 1690 EXPECT_EQ(nullptr, svgProperties->paintOffsetTranslation()); |
| 1691 EXPECT_EQ(LayoutPoint(LayoutUnit(8.6), LayoutUnit(8.3)), | 1691 EXPECT_EQ(LayoutPoint(LayoutUnit(8.6), LayoutUnit(8.3)), |
| 1692 svgProperties->localBorderBoxProperties()->paintOffset); | 1692 svgProperties->localBorderBoxProperties()->paintOffset); |
| 1693 // Paint offset of SVGRoot be baked into svgLocalToBorderBoxTransform after | 1693 // Paint offset of SVGRoot is baked into svgLocalToBorderBoxTransform after |
| 1694 // snapped to pixels. | 1694 // snapped to pixels. |
| 1695 EXPECT_EQ(TransformationMatrix().translate(9, 8), | 1695 EXPECT_EQ(TransformationMatrix().translate(9, 8), |
| 1696 svgProperties->svgLocalToBorderBoxTransform()->matrix()); | 1696 svgProperties->svgLocalToBorderBoxTransform()->matrix()); |
| 1697 | 1697 |
| 1698 const auto* foreignObject = | 1698 const auto* foreignObject = |
| 1699 toLayoutBox(getLayoutObjectByElementId("foreign")); | 1699 toLayoutBox(getLayoutObjectByElementId("foreign")); |
| 1700 const auto* foreignObjectProperties = foreignObject->paintProperties(); | 1700 const auto* foreignObjectProperties = foreignObject->paintProperties(); |
| 1701 // The offset of foreign object should be snapped to pixels before applying | 1701 // The offset of foreign object should be snapped to pixels before applying |
| 1702 // the local transforms. | 1702 // the local transforms. |
| 1703 EXPECT_EQ(TransformationMatrix().translate(1.5, 1.5).scale(2).translate(4, 5), | 1703 EXPECT_EQ(TransformationMatrix().translate(1.5, 1.5).scale(2).translate(4, 5), |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2887 EXPECT_EQ(framePreTranslation(), | 2887 EXPECT_EQ(framePreTranslation(), |
| 2888 childProperties->paintOffsetTranslation()->parent()); | 2888 childProperties->paintOffsetTranslation()->parent()); |
| 2889 EXPECT_EQ(childProperties->paintOffsetTranslation(), | 2889 EXPECT_EQ(childProperties->paintOffsetTranslation(), |
| 2890 childPaintState.transform()); | 2890 childPaintState.transform()); |
| 2891 // This will change once we added clip expansion node. | 2891 // This will change once we added clip expansion node. |
| 2892 EXPECT_EQ(filterProperties->effect()->outputClip(), childPaintState.clip()); | 2892 EXPECT_EQ(filterProperties->effect()->outputClip(), childPaintState.clip()); |
| 2893 EXPECT_EQ(filterProperties->effect(), childPaintState.effect()); | 2893 EXPECT_EQ(filterProperties->effect(), childPaintState.effect()); |
| 2894 } | 2894 } |
| 2895 | 2895 |
| 2896 } // namespace blink | 2896 } // namespace blink |
| OLD | NEW |