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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: 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 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/PaintLayerPainter.h" 5 #include "core/paint/PaintLayerPainter.h"
6 6
7 #include "core/layout/LayoutBoxModelObject.h" 7 #include "core/layout/LayoutBoxModelObject.h"
8 #include "core/layout/compositing/CompositedLayerMapping.h" 8 #include "core/layout/compositing/CompositedLayerMapping.h"
9 #include "core/paint/PaintControllerPaintTest.h" 9 #include "core/paint/PaintControllerPaintTest.h"
10 #include "platform/graphics/GraphicsContext.h" 10 #include "platform/graphics/GraphicsContext.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } else { 261 } else {
262 EXPECT_DISPLAY_LIST( 262 EXPECT_DISPLAY_LIST(
263 rootPaintController().getDisplayItemList(), 10, 263 rootPaintController().getDisplayItemList(), 10,
264 TestDisplayItem(layoutView(), documentBackgroundType), 264 TestDisplayItem(layoutView(), documentBackgroundType),
265 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), 265 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
266 TestDisplayItem(svgLayer, DisplayItem::kSubsequence), 266 TestDisplayItem(svgLayer, DisplayItem::kSubsequence),
267 TestDisplayItem(svg, DisplayItem::kClipLayerForeground), 267 TestDisplayItem(svg, DisplayItem::kClipLayerForeground),
268 TestDisplayItem(svg, DisplayItem::kBeginTransform), 268 TestDisplayItem(svg, DisplayItem::kBeginTransform),
269 TestDisplayItem(rect, foregroundType), 269 TestDisplayItem(rect, foregroundType),
270 TestDisplayItem(svg, DisplayItem::kEndTransform), 270 TestDisplayItem(svg, DisplayItem::kEndTransform),
271 TestDisplayItem(svg, DisplayItem::clipTypeToEndClipType( 271 TestDisplayItem(svg,
272 DisplayItem::kClipLayerForeground)), 272 DisplayItem::clipTypeToEndClipType(
273 DisplayItem::kClipLayerForeground)),
273 TestDisplayItem(svgLayer, DisplayItem::kEndSubsequence), 274 TestDisplayItem(svgLayer, DisplayItem::kEndSubsequence),
274 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence)); 275 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence));
275 } 276 }
276 277
277 // Change the color of the div. This should not invalidate the subsequence 278 // Change the color of the div. This should not invalidate the subsequence
278 // for the SVG root. 279 // for the SVG root.
279 toHTMLElement(div.node()) 280 toHTMLElement(div.node())
280 ->setAttribute(HTMLNames::styleAttr, 281 ->setAttribute(HTMLNames::styleAttr,
281 "position: relative; width: 50x; height: 50px; " 282 "position: relative; width: 50x; height: 50px; "
282 "background-color: green"); 283 "background-color: green");
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } else { 331 } else {
331 EXPECT_DISPLAY_LIST( 332 EXPECT_DISPLAY_LIST(
332 rootPaintController().getDisplayItemList(), 11, 333 rootPaintController().getDisplayItemList(), 11,
333 TestDisplayItem(layoutView(), documentBackgroundType), 334 TestDisplayItem(layoutView(), documentBackgroundType),
334 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), 335 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence),
335 TestDisplayItem(svgLayer, DisplayItem::kSubsequence), 336 TestDisplayItem(svgLayer, DisplayItem::kSubsequence),
336 TestDisplayItem(svg, DisplayItem::kClipLayerForeground), 337 TestDisplayItem(svg, DisplayItem::kClipLayerForeground),
337 TestDisplayItem(svg, DisplayItem::kBeginTransform), 338 TestDisplayItem(svg, DisplayItem::kBeginTransform),
338 TestDisplayItem(rect, foregroundType), 339 TestDisplayItem(rect, foregroundType),
339 TestDisplayItem(svg, DisplayItem::kEndTransform), 340 TestDisplayItem(svg, DisplayItem::kEndTransform),
340 TestDisplayItem(svg, DisplayItem::clipTypeToEndClipType( 341 TestDisplayItem(svg,
341 DisplayItem::kClipLayerForeground)), 342 DisplayItem::clipTypeToEndClipType(
343 DisplayItem::kClipLayerForeground)),
342 TestDisplayItem(svgLayer, DisplayItem::kEndSubsequence), 344 TestDisplayItem(svgLayer, DisplayItem::kEndSubsequence),
343 TestDisplayItem(div, backgroundType), 345 TestDisplayItem(div, backgroundType),
344 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), 346 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence),
345 TestDisplayItem(layoutView(), 347 TestDisplayItem(layoutView(),
346 DisplayItem::clipTypeToEndClipType( 348 DisplayItem::clipTypeToEndClipType(
347 DisplayItem::kClipFrameToVisibleContentRect))); 349 DisplayItem::kClipFrameToVisibleContentRect)));
348 } 350 }
349 } 351 }
350 352
351 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange) { 353 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange) {
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 "<div id='target'>x</div></div>"); 1101 "<div id='target'>x</div></div>");
1100 PaintLayer* targetLayer = 1102 PaintLayer* targetLayer =
1101 toLayoutBox(getLayoutObjectByElementId("target"))->layer(); 1103 toLayoutBox(getLayoutObjectByElementId("target"))->layer();
1102 PaintLayerPaintingInfo paintingInfo(nullptr, LayoutRect(), 1104 PaintLayerPaintingInfo paintingInfo(nullptr, LayoutRect(),
1103 GlobalPaintNormalPhase, LayoutSize()); 1105 GlobalPaintNormalPhase, LayoutSize());
1104 EXPECT_FALSE( 1106 EXPECT_FALSE(
1105 PaintLayerPainter(*targetLayer).paintedOutputInvisible(paintingInfo)); 1107 PaintLayerPainter(*targetLayer).paintedOutputInvisible(paintingInfo));
1106 } 1108 }
1107 1109
1108 } // namespace blink 1110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698