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

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

Issue 2439113003: Fix the bug that negative outline-offset is covered up by composited (Closed)
Patch Set: Rename decorationLayer to decorationOutlineLayer 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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/PaintLayerScrollableArea.h" 5 #include "core/paint/PaintLayerScrollableArea.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/paint/PaintLayer.h" 10 #include "core/paint/PaintLayer.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller12")); 138 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller12"));
139 139
140 // #scroller13 cannot paint background into scrolling contents layer because 140 // #scroller13 cannot paint background into scrolling contents layer because
141 // it has a custom scrollbar which the background may need to draw under. 141 // it has a custom scrollbar which the background may need to draw under.
142 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller13")); 142 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller13"));
143 143
144 // #scroller14 can paint background into scrolling contents layer because the 144 // #scroller14 can paint background into scrolling contents layer because the
145 // outline is drawn outside the padding box. 145 // outline is drawn outside the padding box.
146 EXPECT_TRUE(canPaintBackgroundOntoScrollingContentsLayer("scroller14")); 146 EXPECT_TRUE(canPaintBackgroundOntoScrollingContentsLayer("scroller14"));
147 147
148 // #scroller15 cannot paint background into scrolling contents layer because 148 // #scroller15 can paint background into scrolling contents layer because
149 // the outline is drawn inside the padding box. 149 // the outline is drawn into the decoration layer which will not be covered
150 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller15")); 150 // up.
151 EXPECT_TRUE(canPaintBackgroundOntoScrollingContentsLayer("scroller15"));
151 152
152 // #scroller16 cannot paint background into scrolling contents layer because 153 // #scroller16 cannot paint background into scrolling contents layer because
153 // the scroller has a clip which would not be respected by the scrolling 154 // the scroller has a clip which would not be respected by the scrolling
154 // contents layer. 155 // contents layer.
155 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller16")); 156 EXPECT_FALSE(canPaintBackgroundOntoScrollingContentsLayer("scroller16"));
156 } 157 }
157 158
158 TEST_F(PaintLayerScrollableAreaTest, OpaqueLayersPromoted) { 159 TEST_F(PaintLayerScrollableAreaTest, OpaqueLayersPromoted) {
159 RuntimeEnabledFeatures::setCompositeOpaqueScrollersEnabled(true); 160 RuntimeEnabledFeatures::setCompositeOpaqueScrollersEnabled(true);
160 161
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 ASSERT_TRUE(blackLayer); 401 ASSERT_TRUE(blackLayer);
401 402
402 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeDark, 403 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeDark,
403 noneLayer->getScrollableArea()->getScrollbarOverlayColorTheme()); 404 noneLayer->getScrollableArea()->getScrollbarOverlayColorTheme());
404 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeDark, 405 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeDark,
405 whiteLayer->getScrollableArea()->getScrollbarOverlayColorTheme()); 406 whiteLayer->getScrollableArea()->getScrollbarOverlayColorTheme());
406 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeLight, 407 ASSERT_EQ(ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeLight,
407 blackLayer->getScrollableArea()->getScrollbarOverlayColorTheme()); 408 blackLayer->getScrollableArea()->getScrollbarOverlayColorTheme());
408 } 409 }
409 } 410 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698