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

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

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 10 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 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 TestDisplayItem(subDiv, backgroundType), 220 TestDisplayItem(subDiv, backgroundType),
221 TestDisplayItem(subDiv2, backgroundType), 221 TestDisplayItem(subDiv2, backgroundType),
222 TestDisplayItem(div, DisplayItem::kEndCompositing), 222 TestDisplayItem(div, DisplayItem::kEndCompositing),
223 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 223 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
224 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), 224 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
225 TestDisplayItem(layoutView(), 225 TestDisplayItem(layoutView(),
226 DisplayItem::clipTypeToEndClipType( 226 DisplayItem::clipTypeToEndClipType(
227 DisplayItem::kClipFrameToVisibleContentRect))); 227 DisplayItem::kClipFrameToVisibleContentRect)));
228 } 228 }
229 229
230 // Verify that the background does not scroll.
230 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; 231 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0];
231 EXPECT_TRUE(backgroundChunk.properties.propertyTreeState.scroll()->isRoot()); 232 EXPECT_FALSE(backgroundChunk.properties.propertyTreeState.transform()
233 ->isScrollTranslation());
232 234
233 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); 235 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect();
234 EXPECT_EQ(0.5f, effectNode->opacity()); 236 EXPECT_EQ(0.5f, effectNode->opacity());
235 237
236 // When RLS is enabled, an additional paint chunk will be created for the 238 // When RLS is enabled, an additional paint chunk will be created for the
237 // LayoutView's layer. 239 // LayoutView's layer.
238 unsigned divChunkIndex = 240 unsigned divChunkIndex =
239 RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? 2 : 1; 241 RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? 2 : 1;
240 const PaintChunk& chunk = rootPaintController().paintChunks()[divChunkIndex]; 242 const PaintChunk& chunk = rootPaintController().paintChunks()[divChunkIndex];
241 EXPECT_EQ(*div.layer(), chunk.id->client); 243 EXPECT_EQ(*div.layer(), chunk.id->client);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 TestDisplayItem(div, DisplayItem::kEndCompositing), 287 TestDisplayItem(div, DisplayItem::kEndCompositing),
286 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 288 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
287 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), 289 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence),
288 TestDisplayItem(layoutView(), 290 TestDisplayItem(layoutView(),
289 DisplayItem::clipTypeToEndClipType( 291 DisplayItem::clipTypeToEndClipType(
290 DisplayItem::kClipFrameToVisibleContentRect))); 292 DisplayItem::kClipFrameToVisibleContentRect)));
291 } 293 }
292 } 294 }
293 295
294 } // namespace blink 296 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698