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

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

Issue 2573883002: Refactor PaintChunkProperties to use PropertyTreeState (Closed)
Patch Set: none 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 TestDisplayItem(subDiv, backgroundType), 196 TestDisplayItem(subDiv, backgroundType),
197 TestDisplayItem(subDiv2, backgroundType), 197 TestDisplayItem(subDiv2, backgroundType),
198 TestDisplayItem(div, DisplayItem::kEndCompositing), 198 TestDisplayItem(div, DisplayItem::kEndCompositing),
199 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 199 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
200 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), 200 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
201 TestDisplayItem(layoutView(), 201 TestDisplayItem(layoutView(),
202 DisplayItem::clipTypeToEndClipType( 202 DisplayItem::clipTypeToEndClipType(
203 DisplayItem::kClipFrameToVisibleContentRect))); 203 DisplayItem::kClipFrameToVisibleContentRect)));
204 204
205 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; 205 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0];
206 EXPECT_TRUE(backgroundChunk.properties.scroll->isRoot()); 206 EXPECT_TRUE(backgroundChunk.properties.propertyTreeState.scroll()->isRoot());
207 207
208 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); 208 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect();
209 EXPECT_EQ(0.5f, effectNode->opacity()); 209 EXPECT_EQ(0.5f, effectNode->opacity());
210 const PaintChunk& chunk = rootPaintController().paintChunks()[1]; 210 const PaintChunk& chunk = rootPaintController().paintChunks()[1];
211 EXPECT_EQ(*div.layer(), chunk.id->client); 211 EXPECT_EQ(*div.layer(), chunk.id->client);
212 EXPECT_EQ(effectNode, chunk.properties.effect.get()); 212 EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect());
213 213
214 EXPECT_FALSE(div.layer()->isJustCreated()); 214 EXPECT_FALSE(div.layer()->isJustCreated());
215 // Client used by only paint chunks and non-cachaeable display items but not 215 // Client used by only paint chunks and non-cachaeable display items but not
216 // by any cacheable display items won't be marked as validly cached. 216 // by any cacheable display items won't be marked as validly cached.
217 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); 217 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer()));
218 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); 218 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div));
219 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); 219 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv));
220 } 220 }
221 221
222 TEST_F(PaintControllerPaintTestForSlimmingPaintV2, CompositingFold) { 222 TEST_F(PaintControllerPaintTestForSlimmingPaintV2, CompositingFold) {
(...skipping 19 matching lines...) Expand all
242 // one. 242 // one.
243 TestDisplayItem(subDiv, backgroundType), 243 TestDisplayItem(subDiv, backgroundType),
244 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 244 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
245 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), 245 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
246 TestDisplayItem(layoutView(), 246 TestDisplayItem(layoutView(),
247 DisplayItem::clipTypeToEndClipType( 247 DisplayItem::clipTypeToEndClipType(
248 DisplayItem::kClipFrameToVisibleContentRect))); 248 DisplayItem::kClipFrameToVisibleContentRect)));
249 } 249 }
250 250
251 } // namespace blink 251 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FramePainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698