Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2330863003: Switch to null root property tree nodes [spv2] (Closed)
Patch Set: Rebase from space Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index 9b0078b2988c83d2c87d32eee6253cc5e495c07c..36182d86daa3912dca86d41f1dd73e4e2b0d5bff 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -40,29 +40,6 @@ public:
setBodyInnerHTML(String(inputBuffer->data(), inputBuffer->size()));
}
- const TransformPaintPropertyNode* rootTransform()
- {
- FrameView* frameView = document().view();
- if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
- return frameView->layoutView()->objectPaintProperties()->paintOffsetTranslation();
- return frameView->rootTransform();
- }
-
- const ClipPaintPropertyNode* rootClip()
- {
- if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
- return document().view()->layoutView()->objectPaintProperties()->localBorderBoxProperties()->geometryPropertyTreeState.clip.get();
- return document().view()->rootClip();
- }
-
- const ScrollPaintPropertyNode* rootScroll()
- {
- FrameView* frameView = document().view();
- if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
- return frameView->layoutView()->objectPaintProperties()->scroll();
- return frameView->rootScroll();
- }
-
const TransformPaintPropertyNode* framePreTranslation()
{
FrameView* frameView = document().view();
@@ -170,7 +147,7 @@ TEST_P(PaintPropertyTreeBuilderTest, FixedPosition)
EXPECT_EQ(frameContentClip(), target1Properties->overflowClip()->parent());
// target1 should not have it's own scroll node and instead should inherit positionedScroll's.
const ObjectPaintProperties* positionedScrollProperties = positionedScroll->layoutObject()->objectPaintProperties();
- EXPECT_EQ(rootScroll(), positionedScrollProperties->scroll()->parent());
+ EXPECT_EQ(nullptr, positionedScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -3), positionedScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
EXPECT_EQ(nullptr, target1Properties->scroll());
@@ -189,7 +166,7 @@ TEST_P(PaintPropertyTreeBuilderTest, FixedPosition)
EXPECT_EQ(scrollerProperties->overflowClip(), target2Properties->overflowClip()->parent());
// target2 should not have it's own scroll node and instead should inherit transformedScroll's.
const ObjectPaintProperties* transformedScrollProperties = transformedScroll->layoutObject()->objectPaintProperties();
- EXPECT_EQ(rootScroll(), transformedScrollProperties->scroll()->parent());
+ EXPECT_EQ(nullptr, transformedScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -5), transformedScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
EXPECT_EQ(nullptr, target2Properties->scroll());
@@ -255,15 +232,12 @@ TEST_P(PaintPropertyTreeBuilderTest, FrameScrollingTraditional)
frameView->updateAllLifecyclePhases();
EXPECT_EQ(TransformationMatrix(), framePreTranslation()->matrix());
if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
- EXPECT_EQ(rootTransform(), framePreTranslation()->parent());
- EXPECT_EQ(nullptr, rootTransform()->parent());
+ EXPECT_EQ(nullptr, framePreTranslation()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -100), frameScrollTranslation()->matrix());
EXPECT_EQ(framePreTranslation(), frameScrollTranslation()->parent());
EXPECT_EQ(framePreTranslation(), frameContentClip()->localTransformSpace());
EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect());
- EXPECT_EQ(rootClip(), frameContentClip()->parent());
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
- EXPECT_EQ(nullptr, rootClip()->parent());
+ EXPECT_EQ(nullptr, frameContentClip()->parent());
LayoutViewItem layoutViewItem = document().layoutViewItem();
const ObjectPaintProperties* layoutViewProperties = layoutViewItem.objectPaintProperties();
@@ -283,7 +257,7 @@ TEST_P(PaintPropertyTreeBuilderTest, Perspective)
EXPECT_EQ(TransformationMatrix().applyPerspective(100), perspectiveProperties->perspective()->matrix());
// The perspective origin is the center of the border box plus accumulated paint offset.
EXPECT_EQ(FloatPoint3D(250, 250, 0), perspectiveProperties->perspective()->origin());
- EXPECT_EQ(frameScrollTranslation(), perspectiveProperties->perspective()->parent());
+ EXPECT_EQ(framePreTranslation(), perspectiveProperties->perspective()->parent());
// Adding perspective doesn't clear paint offset. The paint offset will be passed down to children.
Element* inner = document().getElementById("inner");
@@ -317,7 +291,7 @@ TEST_P(PaintPropertyTreeBuilderTest, RelativePositionInline)
Element* inlineBlock = document().getElementById("inline-block");
const ObjectPaintProperties* inlineBlockProperties = inlineBlock->layoutObject()->objectPaintProperties();
EXPECT_EQ(TransformationMatrix().translate(135, 490), inlineBlockProperties->paintOffsetTranslation()->matrix());
- EXPECT_EQ(frameScrollTranslation(), inlineBlockProperties->paintOffsetTranslation()->parent());
+ EXPECT_EQ(framePreTranslation(), inlineBlockProperties->paintOffsetTranslation()->parent());
CHECK_EXACT_VISUAL_RECT(LayoutRect(135, 490, 10, 20), inlineBlock->layoutObject(), document().view()->layoutView());
}
@@ -341,7 +315,7 @@ TEST_P(PaintPropertyTreeBuilderTest, NestedOpacityEffect)
const ObjectPaintProperties* childWithOpacityProperties = childWithOpacity->objectPaintProperties();
EXPECT_EQ(0.5f, childWithOpacityProperties->effect()->opacity());
// childWithOpacity is the root effect node.
- EXPECT_NE(nullptr, childWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, childWithOpacityProperties->effect()->parent());
CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 50, 60), childWithOpacity, document().view()->layoutView());
LayoutObject* grandChildWithoutOpacity = document().getElementById("grandChildWithoutOpacity")->layoutObject();
@@ -367,7 +341,7 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodeDoesNotAffectEffectNodes)
LayoutObject* nodeWithOpacity = document().getElementById("nodeWithOpacity")->layoutObject();
const ObjectPaintProperties* nodeWithOpacityProperties = nodeWithOpacity->objectPaintProperties();
EXPECT_EQ(0.6f, nodeWithOpacityProperties->effect()->opacity());
- EXPECT_NE(nullptr, nodeWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, nodeWithOpacityProperties->effect()->parent());
EXPECT_EQ(nullptr, nodeWithOpacityProperties->transform());
CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 60), nodeWithOpacity, document().view()->layoutView());
@@ -397,7 +371,7 @@ TEST_P(PaintPropertyTreeBuilderTest, EffectNodesAcrossStackingContext)
LayoutObject* nodeWithOpacity = document().getElementById("nodeWithOpacity")->layoutObject();
const ObjectPaintProperties* nodeWithOpacityProperties = nodeWithOpacity->objectPaintProperties();
EXPECT_EQ(0.6f, nodeWithOpacityProperties->effect()->opacity());
- EXPECT_NE(nullptr, nodeWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, nodeWithOpacityProperties->effect()->parent());
EXPECT_EQ(nullptr, nodeWithOpacityProperties->transform());
CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 100, 200), nodeWithOpacity, document().view()->layoutView());
@@ -431,7 +405,7 @@ TEST_P(PaintPropertyTreeBuilderTest, EffectNodesInSVG)
LayoutObject* groupWithOpacity = document().getElementById("groupWithOpacity")->layoutObject();
const ObjectPaintProperties* groupWithOpacityProperties = groupWithOpacity->objectPaintProperties();
EXPECT_EQ(0.6f, groupWithOpacityProperties->effect()->opacity());
- EXPECT_NE(nullptr, groupWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, groupWithOpacityProperties->effect()->parent());
LayoutObject& rectWithoutOpacity = *document().getElementById("rectWithoutOpacity")->layoutObject();
const ObjectPaintProperties* rectWithoutOpacityProperties = rectWithoutOpacity.objectPaintProperties();
@@ -467,7 +441,7 @@ TEST_P(PaintPropertyTreeBuilderTest, EffectNodesAcrossHTMLSVGBoundary)
LayoutObject& divWithOpacity = *document().getElementById("divWithOpacity")->layoutObject();
const ObjectPaintProperties* divWithOpacityProperties = divWithOpacity.objectPaintProperties();
EXPECT_EQ(0.2f, divWithOpacityProperties->effect()->opacity());
- EXPECT_NE(nullptr, divWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, divWithOpacityProperties->effect()->parent());
LayoutObject& svgRootWithOpacity = *document().getElementById("svgRootWithOpacity")->layoutObject();
const ObjectPaintProperties* svgRootWithOpacityProperties = svgRootWithOpacity.objectPaintProperties();
@@ -494,7 +468,7 @@ TEST_P(PaintPropertyTreeBuilderTest, EffectNodesAcrossSVGHTMLBoundary)
LayoutObject& svgRootWithOpacity = *document().getElementById("svgRootWithOpacity")->layoutObject();
const ObjectPaintProperties* svgRootWithOpacityProperties = svgRootWithOpacity.objectPaintProperties();
EXPECT_EQ(0.3f, svgRootWithOpacityProperties->effect()->opacity());
- EXPECT_NE(nullptr, svgRootWithOpacityProperties->effect()->parent());
+ EXPECT_EQ(nullptr, svgRootWithOpacityProperties->effect()->parent());
LayoutObject& foreignObjectWithOpacity = *document().getElementById("foreignObjectWithOpacity")->layoutObject();
const ObjectPaintProperties* foreignObjectWithOpacityProperties = foreignObjectWithOpacity.objectPaintProperties();
@@ -536,7 +510,7 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodesInSVG)
EXPECT_EQ(FloatPoint3D(50, 50, 0), svgRootWith3dTransformProperties->transform()->origin());
EXPECT_EQ(svgRootWith3dTransformProperties->paintOffsetTranslation(), svgRootWith3dTransformProperties->transform()->parent());
EXPECT_EQ(TransformationMatrix().translate(70, 25), svgRootWith3dTransformProperties->paintOffsetTranslation()->matrix());
- EXPECT_EQ(frameScrollTranslation(), svgRootWith3dTransformProperties->paintOffsetTranslation()->parent());
+ EXPECT_EQ(framePreTranslation(), svgRootWith3dTransformProperties->paintOffsetTranslation()->parent());
LayoutObject& rectWith2dTransform = *document().getElementById("rectWith2dTransform")->layoutObject();
const ObjectPaintProperties* rectWith2dTransformProperties = rectWith2dTransform.objectPaintProperties();
@@ -593,7 +567,7 @@ TEST_P(PaintPropertyTreeBuilderTest, SVGRootPaintOffsetTransformNode)
// Ensure that a paint offset transform is not unnecessarily emitted.
EXPECT_EQ(nullptr, svgProperties->paintOffsetTranslation());
EXPECT_EQ(TransformationMatrix().translate(50, 25), svgProperties->svgLocalToBorderBoxTransform()->matrix());
- EXPECT_EQ(frameScrollTranslation(), svgProperties->svgLocalToBorderBoxTransform()->parent());
+ EXPECT_EQ(framePreTranslation(), svgProperties->svgLocalToBorderBoxTransform()->parent());
}
TEST_P(PaintPropertyTreeBuilderTest, SVGRootLocalToBorderBoxTransformNode)
@@ -718,7 +692,7 @@ TEST_P(PaintPropertyTreeBuilderTest, ControlClip)
LayoutObject& button = *document().getElementById("button")->layoutObject();
const ObjectPaintProperties* buttonProperties = button.objectPaintProperties();
- EXPECT_EQ(frameScrollTranslation(), buttonProperties->overflowClip()->localTransformSpace());
+ EXPECT_EQ(framePreTranslation(), buttonProperties->overflowClip()->localTransformSpace());
EXPECT_EQ(FloatRoundedRect(5, 5, 335, 113), buttonProperties->overflowClip()->clipRect());
EXPECT_EQ(frameContentClip(), buttonProperties->overflowClip()->parent());
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 345, 123), &button, document().view()->layoutView());
@@ -746,12 +720,12 @@ TEST_P(PaintPropertyTreeBuilderTest, BorderRadiusClip)
LayoutObject& div = *document().getElementById("div")->layoutObject();
const ObjectPaintProperties* divProperties = div.objectPaintProperties();
- EXPECT_EQ(frameScrollTranslation(), divProperties->overflowClip()->localTransformSpace());
+ EXPECT_EQ(framePreTranslation(), divProperties->overflowClip()->localTransformSpace());
// The overflow clip rect includes only the padding box.
// padding box = border box(500+60+50, 400+45+55) - border outset(60+50, 45+55) - scrollbars(15, 15)
EXPECT_EQ(FloatRoundedRect(60, 45, 500, 400), divProperties->overflowClip()->clipRect());
const ClipPaintPropertyNode* borderRadiusClip = divProperties->overflowClip()->parent();
- EXPECT_EQ(frameScrollTranslation(), borderRadiusClip->localTransformSpace());
+ EXPECT_EQ(framePreTranslation(), borderRadiusClip->localTransformSpace());
// The border radius clip is the area enclosed by inner border edge, including the scrollbars.
// As the border-radius is specified in outer radius, the inner radius is calculated by:
// inner radius = max(outer radius - border width, 0)
@@ -878,7 +852,7 @@ TEST_P(PaintPropertyTreeBuilderTest, TreeContextClipByNonStackingContext)
EXPECT_EQ(scrollerProperties->overflowClip(), childProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
EXPECT_EQ(scrollerProperties->scrollTranslation(), childProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
- EXPECT_NE(nullptr, childProperties->localBorderBoxProperties()->geometryPropertyTreeState.effect);
+ EXPECT_EQ(nullptr, childProperties->localBorderBoxProperties()->geometryPropertyTreeState.effect);
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 400, 300), scroller, frameView->layoutView());
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 100, 200), child, frameView->layoutView());
}
@@ -947,7 +921,7 @@ TEST_P(PaintPropertyTreeBuilderTest, TableCellLayoutLocation)
const ObjectPaintProperties* targetProperties = target.objectPaintProperties();
EXPECT_EQ(LayoutPoint(170, 170), targetProperties->localBorderBoxProperties()->paintOffset);
- EXPECT_EQ(frameScrollTranslation(), targetProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), targetProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
CHECK_EXACT_VISUAL_RECT(LayoutRect(170, 170, 100, 100), &target, document().view()->layoutView());
}
@@ -982,7 +956,7 @@ TEST_P(PaintPropertyTreeBuilderTest, CSSClipFixedPositionDescendant)
LayoutObject& clip = *document().getElementById("clip")->layoutObject();
const ObjectPaintProperties* clipProperties = clip.objectPaintProperties();
EXPECT_EQ(frameContentClip(), clipProperties->cssClip()->parent());
- EXPECT_EQ(frameScrollTranslation(), clipProperties->cssClip()->localTransformSpace());
+ EXPECT_EQ(framePreTranslation(), clipProperties->cssClip()->localTransformSpace());
EXPECT_EQ(FloatRoundedRect(FloatRect(absoluteClipRect)), clipProperties->cssClip()->clipRect());
CHECK_VISUAL_RECT(absoluteClipRect, &clip, document().view()->layoutView(),
// TODO(crbug.com/599939): mapToVisualRectInAncestorSpace() doesn't apply css clip on the object itself.
@@ -1030,7 +1004,7 @@ TEST_P(PaintPropertyTreeBuilderTest, CSSClipAbsPositionDescendant)
LayoutObject* clip = document().getElementById("clip")->layoutObject();
const ObjectPaintProperties* clipProperties = clip->objectPaintProperties();
EXPECT_EQ(frameContentClip(), clipProperties->cssClip()->parent());
- EXPECT_EQ(frameScrollTranslation(), clipProperties->cssClip()->localTransformSpace());
+ EXPECT_EQ(framePreTranslation(), clipProperties->cssClip()->localTransformSpace());
EXPECT_EQ(FloatRoundedRect(FloatRect(absoluteClipRect)), clipProperties->cssClip()->clipRect());
CHECK_VISUAL_RECT(absoluteClipRect, clip, document().view()->layoutView(),
// TODO(crbug.com/599939): mapToVisualRectInAncestorSpace() doesn't apply css clip on the object itself.
@@ -1039,7 +1013,7 @@ TEST_P(PaintPropertyTreeBuilderTest, CSSClipAbsPositionDescendant)
LayoutObject* absolute = document().getElementById("absolute")->layoutObject();
const ObjectPaintProperties* absPosProperties = absolute->objectPaintProperties();
EXPECT_EQ(clipProperties->cssClip(), absPosProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
- EXPECT_EQ(framePreTranslation(), absPosProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform->parent());
+ EXPECT_EQ(nullptr, absPosProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform->parent());
EXPECT_EQ(LayoutPoint(123, 456), absPosProperties->localBorderBoxProperties()->paintOffset);
CHECK_VISUAL_RECT(LayoutRect(), absolute, document().view()->layoutView(),
// TODO(crbug.com/599939): CSS clip of fixed-position descendants is broken in mapToVisualRectInAncestorSpace().
@@ -1084,7 +1058,7 @@ TEST_P(PaintPropertyTreeBuilderTest, CSSClipFixedPositionDescendantNonShared)
LayoutObject& overflow = *document().getElementById("overflow")->layoutObject();
const ObjectPaintProperties* overflowProperties = overflow.objectPaintProperties();
EXPECT_EQ(frameContentClip(), overflowProperties->overflowClip()->parent());
- EXPECT_EQ(frameScrollTranslation(), overflowProperties->scrollTranslation()->parent());
+ EXPECT_EQ(framePreTranslation(), overflowProperties->scrollTranslation()->parent());
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 50, 50), &overflow, document().view()->layoutView());
LayoutObject* clip = document().getElementById("clip")->layoutObject();
@@ -1648,18 +1622,18 @@ TEST_P(PaintPropertyTreeBuilderTest, OverflowClipContentsProperties)
LayoutObject* child = document().getElementById("child")->layoutObject();
const ObjectPaintProperties* childProperties = child->objectPaintProperties();
- EXPECT_EQ(frameScrollTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
EXPECT_EQ(frameContentClip(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
GeometryPropertyTreeState contentsProperties;
clipProperties->getContentsProperties(contentsProperties);
- EXPECT_EQ(frameScrollTranslation(), contentsProperties.transform);
+ EXPECT_EQ(framePreTranslation(), contentsProperties.transform);
EXPECT_EQ(clipProperties->overflowClip(), contentsProperties.clip);
- EXPECT_EQ(frameScrollTranslation(), childProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), childProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
EXPECT_EQ(clipProperties->overflowClip(), childProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
- EXPECT_NE(nullptr, childProperties->localBorderBoxProperties()->geometryPropertyTreeState.effect);
+ EXPECT_EQ(nullptr, childProperties->localBorderBoxProperties()->geometryPropertyTreeState.effect);
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 500, 600), child, clipper);
}
@@ -1684,7 +1658,7 @@ TEST_P(PaintPropertyTreeBuilderTest, OverflowScrollContentsProperties)
LayoutObject* child = document().getElementById("child")->layoutObject();
const ObjectPaintProperties* childProperties = child->objectPaintProperties();
- EXPECT_EQ(frameScrollTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
EXPECT_EQ(frameContentClip(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
GeometryPropertyTreeState contentsProperties;
@@ -1714,13 +1688,13 @@ TEST_P(PaintPropertyTreeBuilderTest, CssClipContentsProperties)
const ObjectPaintProperties* clipProperties = clipper->objectPaintProperties();
LayoutObject* child = document().getElementById("child")->layoutObject();
- EXPECT_EQ(frameScrollTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
// CSS clip on an element causes it to clip itself, not just descendants.
EXPECT_EQ(clipProperties->cssClip(), clipProperties->localBorderBoxProperties()->geometryPropertyTreeState.clip);
GeometryPropertyTreeState contentsProperties;
clipProperties->getContentsProperties(contentsProperties);
- EXPECT_EQ(frameScrollTranslation(), contentsProperties.transform);
+ EXPECT_EQ(framePreTranslation(), contentsProperties.transform);
EXPECT_EQ(clipProperties->cssClip(), contentsProperties.clip);
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 500, 600), child, clipper);
@@ -1747,7 +1721,7 @@ TEST_P(PaintPropertyTreeBuilderTest, SvgLocalToBorderBoxTransformContentsPropert
LayoutObject& svgWithViewBox = *document().getElementById("svgWithViewBox")->layoutObject();
const ObjectPaintProperties* svgWithViewBoxProperties = svgWithViewBox.objectPaintProperties();
- EXPECT_EQ(frameScrollTranslation(), svgWithViewBoxProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
+ EXPECT_EQ(framePreTranslation(), svgWithViewBoxProperties->localBorderBoxProperties()->geometryPropertyTreeState.transform);
GeometryPropertyTreeState contentsProperties;
svgWithViewBoxProperties->getContentsProperties(contentsProperties);
@@ -1781,7 +1755,7 @@ TEST_P(PaintPropertyTreeBuilderTest, OverflowHiddenScrollProperties)
const ObjectPaintProperties* overflowHiddenScrollProperties = overflowHidden->layoutObject()->objectPaintProperties();
// Because the frameView is does not scroll, overflowHidden's scroll should be under the root.
- EXPECT_EQ(rootScroll(), overflowHiddenScrollProperties->scroll()->parent());
+ EXPECT_EQ(nullptr, overflowHiddenScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -37), overflowHiddenScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
// This should match the overflow's dimensions.
EXPECT_EQ(IntSize(5, 3), overflowHiddenScrollProperties->scroll()->clip());
@@ -1829,8 +1803,8 @@ TEST_P(PaintPropertyTreeBuilderTest, NestedScrollProperties)
document().view()->updateAllLifecyclePhases();
const ObjectPaintProperties* overflowAScrollProperties = overflowA->layoutObject()->objectPaintProperties();
- // Because the frameView is does not scroll, overflowA's scroll should be under the root.
- EXPECT_EQ(rootScroll(), overflowAScrollProperties->scroll()->parent());
+ // Because the frameView is does not scroll, overflowA's scroll should be a root node.
+ EXPECT_EQ(nullptr, overflowAScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -37), overflowAScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
EXPECT_EQ(IntSize(5, 3), overflowAScrollProperties->scroll()->clip());
// 107 is the forceScroll element plus the height of the overflow scroll child (overflowB).
@@ -1919,8 +1893,8 @@ TEST_P(PaintPropertyTreeBuilderTest, PositionedScrollerIsNotNested)
EXPECT_EQ(IntSize(9, 4000), absposOverflowScrollProperties->scroll()->bounds());
const ObjectPaintProperties* fixedOverflowScrollProperties = fixedOverflow->layoutObject()->objectPaintProperties();
- // The fixed position overflow scroll node is parented under the root, not the dom-order parent or frame's scroll.
- EXPECT_EQ(rootScroll(), fixedOverflowScrollProperties->scroll()->parent());
+ // The fixed position overflow scroll node is a root node, not a child of the dom-order parent or the frame's scroll.
+ EXPECT_EQ(nullptr, fixedOverflowScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -43), fixedOverflowScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
EXPECT_EQ(IntSize(13, 11), fixedOverflowScrollProperties->scroll()->clip());
EXPECT_EQ(IntSize(13, 4000), fixedOverflowScrollProperties->scroll()->bounds());
@@ -1968,8 +1942,8 @@ TEST_P(PaintPropertyTreeBuilderTest, NestedPositionedScrollProperties)
document().view()->updateAllLifecyclePhases();
const ObjectPaintProperties* overflowAScrollProperties = overflowA->layoutObject()->objectPaintProperties();
- // Because the frameView is does not scroll, overflowA's scroll should be under the root.
- EXPECT_EQ(rootScroll(), overflowAScrollProperties->scroll()->parent());
+ // Because the frameView is does not scroll, overflowA's scroll should be a root node.
+ EXPECT_EQ(nullptr, overflowAScrollProperties->scroll()->parent());
EXPECT_EQ(TransformationMatrix().translate(0, -37), overflowAScrollProperties->scroll()->scrollOffsetTranslation()->matrix());
EXPECT_EQ(IntSize(20, 20), overflowAScrollProperties->scroll()->clip());
// 100 is the forceScroll element's height because the overflow child does not contribute to the height.

Powered by Google App Engine
This is Rietveld 408576698