| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 FullDocumentPaintingWithCaret) { | 29 FullDocumentPaintingWithCaret) { |
| 30 setBodyInnerHTML( | 30 setBodyInnerHTML( |
| 31 "<div id='div' contentEditable='true' style='outline:none'>XYZ</div>"); | 31 "<div id='div' contentEditable='true' style='outline:none'>XYZ</div>"); |
| 32 document().page()->focusController().setActive(true); | 32 document().page()->focusController().setActive(true); |
| 33 document().page()->focusController().setFocused(true); | 33 document().page()->focusController().setFocused(true); |
| 34 Element& div = *toElement(document().body()->firstChild()); | 34 Element& div = *toElement(document().body()->firstChild()); |
| 35 InlineTextBox& textInlineBox = | 35 InlineTextBox& textInlineBox = |
| 36 *toLayoutText(div.firstChild()->layoutObject())->firstTextBox(); | 36 *toLayoutText(div.firstChild()->layoutObject())->firstTextBox(); |
| 37 | 37 |
| 38 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 38 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 39 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 39 EXPECT_DISPLAY_LIST( |
| 40 EXPECT_DISPLAY_LIST( | 40 rootPaintController().getDisplayItemList(), 4, |
| 41 rootPaintController().getDisplayItemList(), 4, | 41 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 42 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 42 TestDisplayItem(layoutView(), documentBackgroundType), |
| 43 TestDisplayItem(layoutView(), documentBackgroundType), | 43 TestDisplayItem(textInlineBox, foregroundType), |
| 44 TestDisplayItem(textInlineBox, foregroundType), | 44 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 45 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 46 } else { | |
| 47 EXPECT_DISPLAY_LIST( | |
| 48 rootPaintController().getDisplayItemList(), 6, | |
| 49 TestDisplayItem(layoutView(), | |
| 50 DisplayItem::kClipFrameToVisibleContentRect), | |
| 51 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 52 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 53 TestDisplayItem(textInlineBox, foregroundType), | |
| 54 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 55 TestDisplayItem(layoutView(), | |
| 56 DisplayItem::clipTypeToEndClipType( | |
| 57 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 58 } | |
| 59 } else { | 45 } else { |
| 60 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, | 46 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, |
| 61 TestDisplayItem(layoutView(), documentBackgroundType), | 47 TestDisplayItem(layoutView(), documentBackgroundType), |
| 62 TestDisplayItem(textInlineBox, foregroundType)); | 48 TestDisplayItem(textInlineBox, foregroundType)); |
| 63 } | 49 } |
| 64 | 50 |
| 65 div.focus(); | 51 div.focus(); |
| 66 document().view()->updateAllLifecyclePhases(); | 52 document().view()->updateAllLifecyclePhases(); |
| 67 | 53 |
| 68 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 54 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 69 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 55 EXPECT_DISPLAY_LIST( |
| 70 EXPECT_DISPLAY_LIST( | 56 rootPaintController().getDisplayItemList(), 5, |
| 71 rootPaintController().getDisplayItemList(), 5, | 57 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 72 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 58 TestDisplayItem(layoutView(), documentBackgroundType), |
| 73 TestDisplayItem(layoutView(), documentBackgroundType), | 59 TestDisplayItem(textInlineBox, foregroundType), |
| 74 TestDisplayItem(textInlineBox, foregroundType), | 60 TestDisplayItem( |
| 75 TestDisplayItem(document() | 61 document().frame()->selection().caretDisplayItemClientForTesting(), |
| 76 .frame() | 62 DisplayItem::kCaret), // New! |
| 77 ->selection() | 63 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 78 .caretDisplayItemClientForTesting(), | |
| 79 DisplayItem::kCaret), // New! | |
| 80 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 81 } else { | |
| 82 EXPECT_DISPLAY_LIST( | |
| 83 rootPaintController().getDisplayItemList(), 7, | |
| 84 TestDisplayItem(layoutView(), | |
| 85 DisplayItem::kClipFrameToVisibleContentRect), | |
| 86 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 87 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 88 TestDisplayItem(textInlineBox, foregroundType), | |
| 89 TestDisplayItem(document() | |
| 90 .frame() | |
| 91 ->selection() | |
| 92 .caretDisplayItemClientForTesting(), | |
| 93 DisplayItem::kCaret), // New! | |
| 94 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 95 TestDisplayItem(layoutView(), | |
| 96 DisplayItem::clipTypeToEndClipType( | |
| 97 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 98 } | |
| 99 } else { | 64 } else { |
| 100 EXPECT_DISPLAY_LIST( | 65 EXPECT_DISPLAY_LIST( |
| 101 rootPaintController().getDisplayItemList(), 3, | 66 rootPaintController().getDisplayItemList(), 3, |
| 102 TestDisplayItem(layoutView(), documentBackgroundType), | 67 TestDisplayItem(layoutView(), documentBackgroundType), |
| 103 TestDisplayItem(textInlineBox, foregroundType), | 68 TestDisplayItem(textInlineBox, foregroundType), |
| 104 TestDisplayItem( | 69 TestDisplayItem( |
| 105 document().frame()->selection().caretDisplayItemClientForTesting(), | 70 document().frame()->selection().caretDisplayItemClientForTesting(), |
| 106 DisplayItem::kCaret)); // New! | 71 DisplayItem::kCaret)); // New! |
| 107 } | 72 } |
| 108 } | 73 } |
| 109 | 74 |
| 110 TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { | 75 TEST_P(PaintControllerPaintTestForSlimmingPaintV1AndV2, InlineRelayout) { |
| 111 setBodyInnerHTML( | 76 setBodyInnerHTML( |
| 112 "<div id='div' style='width:100px; height: 200px'>AAAAAAAAAA " | 77 "<div id='div' style='width:100px; height: 200px'>AAAAAAAAAA " |
| 113 "BBBBBBBBBB</div>"); | 78 "BBBBBBBBBB</div>"); |
| 114 Element& div = *toElement(document().body()->firstChild()); | 79 Element& div = *toElement(document().body()->firstChild()); |
| 115 LayoutBlock& divBlock = | 80 LayoutBlock& divBlock = |
| 116 *toLayoutBlock(document().body()->firstChild()->layoutObject()); | 81 *toLayoutBlock(document().body()->firstChild()->layoutObject()); |
| 117 LayoutText& text = *toLayoutText(divBlock.firstChild()); | 82 LayoutText& text = *toLayoutText(divBlock.firstChild()); |
| 118 InlineTextBox& firstTextBox = *text.firstTextBox(); | 83 InlineTextBox& firstTextBox = *text.firstTextBox(); |
| 119 | 84 |
| 120 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 85 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 121 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 86 EXPECT_DISPLAY_LIST( |
| 122 EXPECT_DISPLAY_LIST( | 87 rootPaintController().getDisplayItemList(), 4, |
| 123 rootPaintController().getDisplayItemList(), 4, | 88 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 124 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 89 TestDisplayItem(layoutView(), documentBackgroundType), |
| 125 TestDisplayItem(layoutView(), documentBackgroundType), | 90 TestDisplayItem(firstTextBox, foregroundType), |
| 126 TestDisplayItem(firstTextBox, foregroundType), | 91 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 127 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 128 } else { | |
| 129 EXPECT_DISPLAY_LIST( | |
| 130 rootPaintController().getDisplayItemList(), 6, | |
| 131 TestDisplayItem(layoutView(), | |
| 132 DisplayItem::kClipFrameToVisibleContentRect), | |
| 133 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 134 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 135 TestDisplayItem(firstTextBox, foregroundType), | |
| 136 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 137 TestDisplayItem(layoutView(), | |
| 138 DisplayItem::clipTypeToEndClipType( | |
| 139 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 140 } | |
| 141 } else { | 92 } else { |
| 142 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, | 93 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 2, |
| 143 TestDisplayItem(layoutView(), documentBackgroundType), | 94 TestDisplayItem(layoutView(), documentBackgroundType), |
| 144 TestDisplayItem(firstTextBox, foregroundType)); | 95 TestDisplayItem(firstTextBox, foregroundType)); |
| 145 } | 96 } |
| 146 | 97 |
| 147 div.setAttribute(HTMLNames::styleAttr, "width: 10px; height: 200px"); | 98 div.setAttribute(HTMLNames::styleAttr, "width: 10px; height: 200px"); |
| 148 document().view()->updateAllLifecyclePhases(); | 99 document().view()->updateAllLifecyclePhases(); |
| 149 | 100 |
| 150 LayoutText& newText = *toLayoutText(divBlock.firstChild()); | 101 LayoutText& newText = *toLayoutText(divBlock.firstChild()); |
| 151 InlineTextBox& newFirstTextBox = *newText.firstTextBox(); | 102 InlineTextBox& newFirstTextBox = *newText.firstTextBox(); |
| 152 InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox(); | 103 InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox(); |
| 153 | 104 |
| 154 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 105 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 155 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 106 EXPECT_DISPLAY_LIST( |
| 156 EXPECT_DISPLAY_LIST( | 107 rootPaintController().getDisplayItemList(), 5, |
| 157 rootPaintController().getDisplayItemList(), 5, | 108 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 158 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 109 TestDisplayItem(layoutView(), documentBackgroundType), |
| 159 TestDisplayItem(layoutView(), documentBackgroundType), | 110 TestDisplayItem(newFirstTextBox, foregroundType), |
| 160 TestDisplayItem(newFirstTextBox, foregroundType), | 111 TestDisplayItem(secondTextBox, foregroundType), |
| 161 TestDisplayItem(secondTextBox, foregroundType), | 112 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 162 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 163 } else { | |
| 164 EXPECT_DISPLAY_LIST( | |
| 165 rootPaintController().getDisplayItemList(), 7, | |
| 166 TestDisplayItem(layoutView(), | |
| 167 DisplayItem::kClipFrameToVisibleContentRect), | |
| 168 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 169 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 170 TestDisplayItem(newFirstTextBox, foregroundType), | |
| 171 TestDisplayItem(secondTextBox, foregroundType), | |
| 172 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 173 TestDisplayItem(layoutView(), | |
| 174 DisplayItem::clipTypeToEndClipType( | |
| 175 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 176 } | |
| 177 } else { | 113 } else { |
| 178 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3, | 114 EXPECT_DISPLAY_LIST(rootPaintController().getDisplayItemList(), 3, |
| 179 TestDisplayItem(layoutView(), documentBackgroundType), | 115 TestDisplayItem(layoutView(), documentBackgroundType), |
| 180 TestDisplayItem(newFirstTextBox, foregroundType), | 116 TestDisplayItem(newFirstTextBox, foregroundType), |
| 181 TestDisplayItem(secondTextBox, foregroundType)); | 117 TestDisplayItem(secondTextBox, foregroundType)); |
| 182 } | 118 } |
| 183 } | 119 } |
| 184 | 120 |
| 185 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, ChunkIdClientCacheFlag) { | 121 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, ChunkIdClientCacheFlag) { |
| 186 setBodyInnerHTML( | 122 setBodyInnerHTML( |
| 187 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>" | 123 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>" |
| 188 " <div style='width: 100px; height: 100px; background-color: " | 124 " <div style='width: 100px; height: 100px; background-color: " |
| 189 "blue'></div>" | 125 "blue'></div>" |
| 190 " <div style='width: 100px; height: 100px; background-color: " | 126 " <div style='width: 100px; height: 100px; background-color: " |
| 191 "blue'></div>" | 127 "blue'></div>" |
| 192 "</div>"); | 128 "</div>"); |
| 193 PaintLayer& htmlLayer = | 129 PaintLayer& htmlLayer = |
| 194 *toLayoutBoxModelObject(document().documentElement()->layoutObject()) | 130 *toLayoutBoxModelObject(document().documentElement()->layoutObject()) |
| 195 ->layer(); | 131 ->layer(); |
| 196 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div")); | 132 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div")); |
| 197 LayoutObject& subDiv = *div.firstChild(); | 133 LayoutObject& subDiv = *div.firstChild(); |
| 198 LayoutObject& subDiv2 = *subDiv.nextSibling(); | 134 LayoutObject& subDiv2 = *subDiv.nextSibling(); |
| 199 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 135 EXPECT_DISPLAY_LIST( |
| 200 EXPECT_DISPLAY_LIST( | 136 rootPaintController().getDisplayItemList(), 7, |
| 201 rootPaintController().getDisplayItemList(), 9, | 137 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 202 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 138 TestDisplayItem(layoutView(), documentBackgroundType), |
| 203 TestDisplayItem(layoutView(), documentBackgroundType), | 139 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), |
| 204 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | 140 TestDisplayItem(subDiv, backgroundType), |
| 205 TestDisplayItem(div, DisplayItem::kBeginCompositing), | 141 TestDisplayItem(subDiv2, backgroundType), |
| 206 TestDisplayItem(subDiv, backgroundType), | 142 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 207 TestDisplayItem(subDiv2, backgroundType), | 143 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 208 TestDisplayItem(div, DisplayItem::kEndCompositing), | |
| 209 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | |
| 210 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 211 } else { | |
| 212 EXPECT_DISPLAY_LIST( | |
| 213 rootPaintController().getDisplayItemList(), 11, | |
| 214 TestDisplayItem(layoutView(), | |
| 215 DisplayItem::kClipFrameToVisibleContentRect), | |
| 216 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 217 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 218 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | |
| 219 TestDisplayItem(div, DisplayItem::kBeginCompositing), | |
| 220 TestDisplayItem(subDiv, backgroundType), | |
| 221 TestDisplayItem(subDiv2, backgroundType), | |
| 222 TestDisplayItem(div, DisplayItem::kEndCompositing), | |
| 223 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | |
| 224 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 225 TestDisplayItem(layoutView(), | |
| 226 DisplayItem::clipTypeToEndClipType( | |
| 227 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 228 } | |
| 229 | 144 |
| 230 // Verify that the background does not scroll. | 145 // Verify that the background does not scroll. |
| 231 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; | 146 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; |
| 232 EXPECT_FALSE(backgroundChunk.properties.propertyTreeState.transform() | 147 EXPECT_FALSE(backgroundChunk.properties.propertyTreeState.transform() |
| 233 ->isScrollTranslation()); | 148 ->isScrollTranslation()); |
| 234 | 149 |
| 235 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); | 150 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); |
| 236 EXPECT_EQ(0.5f, effectNode->opacity()); | 151 EXPECT_EQ(0.5f, effectNode->opacity()); |
| 237 | 152 |
| 238 // When RLS is enabled, an additional paint chunk will be created for the | 153 const PaintChunk& chunk = rootPaintController().paintChunks()[1]; |
| 239 // LayoutView's layer. | |
| 240 unsigned divChunkIndex = | |
| 241 RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? 2 : 1; | |
| 242 const PaintChunk& chunk = rootPaintController().paintChunks()[divChunkIndex]; | |
| 243 EXPECT_EQ(*div.layer(), chunk.id->client); | 154 EXPECT_EQ(*div.layer(), chunk.id->client); |
| 244 EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect()); | 155 EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect()); |
| 245 | 156 |
| 246 EXPECT_FALSE(div.layer()->isJustCreated()); | 157 EXPECT_FALSE(div.layer()->isJustCreated()); |
| 247 // Client used by only paint chunks and non-cachaeable display items but not | 158 // Client used by only paint chunks and non-cachaeable display items but not |
| 248 // by any cacheable display items won't be marked as validly cached. | 159 // by any cacheable display items won't be marked as validly cached. |
| 249 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); | 160 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); |
| 250 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); | 161 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); |
| 251 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); | 162 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); |
| 252 } | 163 } |
| 253 | 164 |
| 254 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, CompositingNoFold) { | 165 TEST_P(PaintControllerPaintTestForSlimmingPaintV2, CompositingNoFold) { |
| 255 setBodyInnerHTML( | 166 setBodyInnerHTML( |
| 256 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>" | 167 "<div id='div' style='width: 200px; height: 200px; opacity: 0.5'>" |
| 257 " <div style='width: 100px; height: 100px; background-color: " | 168 " <div style='width: 100px; height: 100px; background-color: " |
| 258 "blue'></div>" | 169 "blue'></div>" |
| 259 "</div>"); | 170 "</div>"); |
| 260 PaintLayer& htmlLayer = | 171 PaintLayer& htmlLayer = |
| 261 *toLayoutBoxModelObject(document().documentElement()->layoutObject()) | 172 *toLayoutBoxModelObject(document().documentElement()->layoutObject()) |
| 262 ->layer(); | 173 ->layer(); |
| 263 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div")); | 174 LayoutBlock& div = *toLayoutBlock(getLayoutObjectByElementId("div")); |
| 264 LayoutObject& subDiv = *div.firstChild(); | 175 LayoutObject& subDiv = *div.firstChild(); |
| 265 | 176 |
| 266 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 177 EXPECT_DISPLAY_LIST( |
| 267 EXPECT_DISPLAY_LIST( | 178 rootPaintController().getDisplayItemList(), 6, |
| 268 rootPaintController().getDisplayItemList(), 8, | 179 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), |
| 269 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | 180 TestDisplayItem(layoutView(), documentBackgroundType), |
| 270 TestDisplayItem(layoutView(), documentBackgroundType), | 181 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), |
| 271 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | 182 TestDisplayItem(subDiv, backgroundType), |
| 272 TestDisplayItem(div, DisplayItem::kBeginCompositing), | 183 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 273 TestDisplayItem(subDiv, backgroundType), | 184 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); |
| 274 TestDisplayItem(div, DisplayItem::kEndCompositing), | |
| 275 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | |
| 276 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence)); | |
| 277 } else { | |
| 278 EXPECT_DISPLAY_LIST( | |
| 279 rootPaintController().getDisplayItemList(), 10, | |
| 280 TestDisplayItem(layoutView(), | |
| 281 DisplayItem::kClipFrameToVisibleContentRect), | |
| 282 TestDisplayItem(*layoutView().layer(), DisplayItem::kSubsequence), | |
| 283 TestDisplayItem(layoutView(), documentBackgroundType), | |
| 284 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | |
| 285 TestDisplayItem(div, DisplayItem::kBeginCompositing), | |
| 286 TestDisplayItem(subDiv, backgroundType), | |
| 287 TestDisplayItem(div, DisplayItem::kEndCompositing), | |
| 288 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | |
| 289 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | |
| 290 TestDisplayItem(layoutView(), | |
| 291 DisplayItem::clipTypeToEndClipType( | |
| 292 DisplayItem::kClipFrameToVisibleContentRect))); | |
| 293 } | |
| 294 } | 185 } |
| 295 | 186 |
| 296 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |