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

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

Issue 2580143003: [SPv2] Disable CompositingRecorder collapsing for SPv2 (Closed)
Patch Set: update layout test expectations Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/PaintControllerPaintTest.h" 5 #include "core/paint/PaintControllerPaintTest.h"
6 6
7 #include "core/editing/FrameCaret.h" 7 #include "core/editing/FrameCaret.h"
8 #include "core/editing/FrameSelection.h" 8 #include "core/editing/FrameSelection.h"
9 #include "core/layout/LayoutText.h" 9 #include "core/layout/LayoutText.h"
10 #include "core/layout/line/InlineTextBox.h" 10 #include "core/layout/line/InlineTextBox.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect()); 235 EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect());
236 236
237 EXPECT_FALSE(div.layer()->isJustCreated()); 237 EXPECT_FALSE(div.layer()->isJustCreated());
238 // Client used by only paint chunks and non-cachaeable display items but not 238 // Client used by only paint chunks and non-cachaeable display items but not
239 // by any cacheable display items won't be marked as validly cached. 239 // by any cacheable display items won't be marked as validly cached.
240 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); 240 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer()));
241 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); 241 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div));
242 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); 242 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv));
243 } 243 }
244 244
245 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, CompositingFold) { 245 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, CompositingNoFold) {
246 setBodyInnerHTML( 246 setBodyInnerHTML(
247 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>" 247 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>"
248 " <div style='width: 100px; height: 100px; background-color: " 248 " <div style='width: 100px; height: 100px; background-color: "
249 "blue'></div>" 249 "blue'></div>"
250 "</div>"); 250 "</div>");
251 PaintLayer& htmlLayer = 251 PaintLayer& htmlLayer =
252 *toLayoutBoxModelObject(document().documentElement()->layoutObject()) 252 *toLayoutBoxModelObject(document().documentElement()->layoutObject())
253 ->layer(); 253 ->layer();
254 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div")); 254 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div"));
255 LayoutObject& subDiv = *div.firstChild(); 255 LayoutObject& subDiv = *div.firstChild();
256 256
257 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 257 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
258 EXPECT_DISPLAY_LIST( 258 EXPECT_DISPLAY_LIST(
259 rootPaintController().getDisplayItemList(), 6, 259 rootPaintController().getDisplayItemList(), 8,
260 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), 260 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
261 TestDisplayItem(layoutView(), documentBackgroundType), 261 TestDisplayItem(layoutView(), documentBackgroundType),
262 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), 262 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
263 // The begin and end compositing display items have been folded into 263 TestDisplayItem(div, DisplayItem::kBeginCompositing),
264 // this
265 // one.
266 TestDisplayItem(subDiv, backgroundType), 264 TestDisplayItem(subDiv, backgroundType),
265 TestDisplayItem(div, DisplayItem::kEndCompositing),
267 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 266 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
268 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); 267 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence));
269 } else { 268 } else {
270 EXPECT_DISPLAY_LIST( 269 EXPECT_DISPLAY_LIST(
271 rootPaintController().getDisplayItemList(), 8, 270 rootPaintController().getDisplayItemList(), 10,
272 TestDisplayItem(layoutView(), 271 TestDisplayItem(layoutView(),
273 DisplayItem::kClipFrameToVisibleContentRect), 272 DisplayItem::kClipFrameToVisibleContentRect),
274 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), 273 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence),
275 TestDisplayItem(layoutView(), documentBackgroundType), 274 TestDisplayItem(layoutView(), documentBackgroundType),
276 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), 275 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
277 // The begin and end compositing display items have been folded into 276 TestDisplayItem(div, DisplayItem::kBeginCompositing),
278 // this
279 // one.
280 TestDisplayItem(subDiv, backgroundType), 277 TestDisplayItem(subDiv, backgroundType),
278 TestDisplayItem(div, DisplayItem::kEndCompositing),
281 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 279 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
282 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), 280 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
283 TestDisplayItem(layoutView(), 281 TestDisplayItem(layoutView(),
284 DisplayItem::clipTypeToEndClipType( 282 DisplayItem::clipTypeToEndClipType(
285 DisplayItem::kClipFrameToVisibleContentRect))); 283 DisplayItem::kClipFrameToVisibleContentRect)));
286 } 284 }
287 } 285 }
288 286
289 } // namespace blink 287 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698