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

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

Issue 2464823003: Refactor LayoutView paint offset updates out of FrameView update code (Closed)
Patch Set: Remove unnecessary forward decl Created 4 years, 1 month 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 e564d06dddeee4741123a7214405e3f6cc125b4d..014176b063880c6506854cfb3b56fec773fd08ab 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -241,11 +241,8 @@ TEST_P(PaintPropertyTreeBuilderTest, PositionAndScroll) {
EXPECT_EQ(FloatRoundedRect(120, 340, 413, 317),
scrollerProperties->overflowClip()->clipRect());
EXPECT_EQ(frameContentClip(), scrollerProperties->overflowClip()->parent());
- // http://crbug.com/638415
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
- CHECK_EXACT_VISUAL_RECT(LayoutRect(120, 340, 413, 317),
- scroller->layoutObject(), frameView->layoutView());
- }
+ CHECK_EXACT_VISUAL_RECT(LayoutRect(120, 340, 413, 317),
+ scroller->layoutObject(), frameView->layoutView());
// The relative-positioned element should have accumulated box offset (exclude
// scrolling), and should be affected by ancestor scroll transforms.
@@ -279,11 +276,8 @@ TEST_P(PaintPropertyTreeBuilderTest, PositionAndScroll) {
EXPECT_EQ(FloatRoundedRect(0, 0, 300, 400),
absPosProperties->overflowClip()->clipRect());
EXPECT_EQ(frameContentClip(), absPosProperties->overflowClip()->parent());
- // http://crbug.com/638415
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
CHECK_EXACT_VISUAL_RECT(LayoutRect(123, 456, 300, 400),
absPos->layoutObject(), frameView->layoutView());
- }
}
TEST_P(PaintPropertyTreeBuilderTest, FrameScrollingTraditional) {
@@ -303,16 +297,13 @@ TEST_P(PaintPropertyTreeBuilderTest, FrameScrollingTraditional) {
EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect());
EXPECT_TRUE(frameContentClip()->parent()->isRoot());
- LayoutViewItem layoutViewItem = document().layoutViewItem();
- const ObjectPaintProperties* layoutViewProperties =
- layoutViewItem.paintProperties();
- // http://crbug.com/638415
if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
- EXPECT_EQ(nullptr, layoutViewProperties->scrollTranslation());
- CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000),
- document().body()->layoutObject(),
- frameView->layoutView());
+ const auto* viewProperties = frameView->layoutView()->paintProperties();
+ EXPECT_EQ(nullptr, viewProperties->scrollTranslation());
}
+ CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000),
+ document().body()->layoutObject(),
+ frameView->layoutView());
}
TEST_P(PaintPropertyTreeBuilderTest, Perspective) {
@@ -359,12 +350,9 @@ TEST_P(PaintPropertyTreeBuilderTest, Transform) {
transformProperties->paintOffsetTranslation()->matrix());
EXPECT_EQ(frameScrollTranslation(),
transformProperties->paintOffsetTranslation()->parent());
- // http://crbug.com/638415
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
CHECK_EXACT_VISUAL_RECT(LayoutRect(173, 556, 400, 300),
transform->layoutObject(),
document().view()->layoutView());
- }
}
TEST_P(PaintPropertyTreeBuilderTest, RelativePositionInline) {
@@ -991,11 +979,8 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodesAcrossSubframes) {
divWithTransform->paintProperties();
EXPECT_EQ(TransformationMatrix().translate3d(1, 2, 3),
divWithTransformProperties->transform()->matrix());
- // http://crbug.com/638415
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
CHECK_EXACT_VISUAL_RECT(LayoutRect(1, 2, 800, 164), divWithTransform,
frameView->layoutView());
- }
LayoutObject* innerDivWithTransform =
frameDocument.getElementById("transform")->layoutObject();
@@ -1084,11 +1069,8 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformNodesInTransformedSubframes) {
document().getElementById("divWithTransform")->layoutObject();
EXPECT_EQ(divWithTransformTransform,
divWithTransform->paintProperties()->transform());
- // http://crbug.com/638415
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
CHECK_EXACT_VISUAL_RECT(LayoutRect(1, 2, 800, 248), divWithTransform,
frameView->layoutView());
- }
}
TEST_P(PaintPropertyTreeBuilderTest, TreeContextClipByNonStackingContext) {
@@ -1155,10 +1137,8 @@ TEST_P(PaintPropertyTreeBuilderTest,
EXPECT_EQ(
scrollerProperties->effect(),
childProperties->localBorderBoxProperties()->propertyTreeState.effect());
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 800, 10000), &scroller,
document().view()->layoutView());
- }
CHECK_EXACT_VISUAL_RECT(LayoutRect(0, 0, 100, 200), &child,
document().view()->layoutView());
}

Powered by Google App Engine
This is Rietveld 408576698