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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2619393002: Rewrite how paint properties are built with bg:fixed main thread scrolling (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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/paint/PaintPropertyTreeBuilderTest.h" 5 #include "core/paint/PaintPropertyTreeBuilderTest.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "core/layout/LayoutTreeAsText.h" 8 #include "core/layout/LayoutTreeAsText.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintPropertyTreePrinter.h" 10 #include "core/paint/PaintPropertyTreePrinter.h"
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 " .forceScroll {" 2866 " .forceScroll {"
2867 " height: 4000px;" 2867 " height: 4000px;"
2868 " }" 2868 " }"
2869 "</style>" 2869 "</style>"
2870 "<div id='overflow'>" 2870 "<div id='overflow'>"
2871 " <div class='backgroundAttachmentFixed'></div>" 2871 " <div class='backgroundAttachmentFixed'></div>"
2872 "</div>" 2872 "</div>"
2873 "<div class='forceScroll'></div>"); 2873 "<div class='forceScroll'></div>");
2874 Element* overflow = document().getElementById("overflow"); 2874 Element* overflow = document().getElementById("overflow");
2875 EXPECT_TRUE(frameScroll()->hasBackgroundAttachmentFixedDescendants()); 2875 EXPECT_TRUE(frameScroll()->hasBackgroundAttachmentFixedDescendants());
2876 EXPECT_TRUE(overflow->layoutObject() 2876 // No scroll node is needed.
2877 ->paintProperties() 2877 EXPECT_EQ(overflow->layoutObject()->paintProperties()->scroll(), nullptr);
2878 ->scroll()
2879 ->hasBackgroundAttachmentFixedDescendants());
2880 } 2878 }
2881 2879
2882 TEST_P(PaintPropertyTreeBuilderTest, PaintOffsetsUnderMultiColumn) { 2880 TEST_P(PaintPropertyTreeBuilderTest, PaintOffsetsUnderMultiColumn) {
2883 setBodyInnerHTML( 2881 setBodyInnerHTML(
2884 "<style>" 2882 "<style>"
2885 " body { margin: 0; }" 2883 " body { margin: 0; }"
2886 " .space { height: 30px; }" 2884 " .space { height: 30px; }"
2887 " .abs { position: absolute; width: 20px; height: 20px; }" 2885 " .abs { position: absolute; width: 20px; height: 20px; }"
2888 "</style>" 2886 "</style>"
2889 "<div style='columns:2; width: 200px; column-gap: 0'>" 2887 "<div style='columns:2; width: 200px; column-gap: 0'>"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 3142
3145 LayoutObject* target = getLayoutObjectByElementId("target"); 3143 LayoutObject* target = getLayoutObjectByElementId("target");
3146 const auto* localBorderBoxProperties = 3144 const auto* localBorderBoxProperties =
3147 target->paintProperties()->localBorderBoxProperties(); 3145 target->paintProperties()->localBorderBoxProperties();
3148 ASSERT_TRUE(localBorderBoxProperties); 3146 ASSERT_TRUE(localBorderBoxProperties);
3149 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset()); 3147 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset());
3150 EXPECT_EQ(effect, localBorderBoxProperties->effect()); 3148 EXPECT_EQ(effect, localBorderBoxProperties->effect());
3151 } 3149 }
3152 3150
3153 } // namespace blink 3151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698