| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 TestDisplayItem(layoutView(), documentBackgroundType), | 123 TestDisplayItem(layoutView(), documentBackgroundType), |
| 124 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | 124 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), |
| 125 TestDisplayItem(div, DisplayItem::kBeginCompositing), | 125 TestDisplayItem(div, DisplayItem::kBeginCompositing), |
| 126 TestDisplayItem(subDiv, backgroundType), | 126 TestDisplayItem(subDiv, backgroundType), |
| 127 TestDisplayItem(subDiv2, backgroundType), | 127 TestDisplayItem(subDiv2, backgroundType), |
| 128 TestDisplayItem(div, DisplayItem::kEndCompositing), | 128 TestDisplayItem(div, DisplayItem::kEndCompositing), |
| 129 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | 129 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 130 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | 130 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), |
| 131 TestDisplayItem(layoutView(), DisplayItem::clipTypeToEndClipType(Display
Item::kClipFrameToVisibleContentRect))); | 131 TestDisplayItem(layoutView(), DisplayItem::clipTypeToEndClipType(Display
Item::kClipFrameToVisibleContentRect))); |
| 132 | 132 |
| 133 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; |
| 134 EXPECT_TRUE(backgroundChunk.properties.scroll->isRoot()); |
| 135 |
| 133 const EffectPaintPropertyNode* effectNode = div.objectPaintProperties()->eff
ect(); | 136 const EffectPaintPropertyNode* effectNode = div.objectPaintProperties()->eff
ect(); |
| 134 EXPECT_EQ(0.5f, effectNode->opacity()); | 137 EXPECT_EQ(0.5f, effectNode->opacity()); |
| 135 const PaintChunk& chunk = rootPaintController().paintChunks()[2]; | 138 const PaintChunk& chunk = rootPaintController().paintChunks()[1]; |
| 136 EXPECT_EQ(*div.layer(), chunk.id->client); | 139 EXPECT_EQ(*div.layer(), chunk.id->client); |
| 137 EXPECT_EQ(effectNode, chunk.properties.effect.get()); | 140 EXPECT_EQ(effectNode, chunk.properties.effect.get()); |
| 138 | 141 |
| 139 EXPECT_FALSE(div.layer()->isJustCreated()); | 142 EXPECT_FALSE(div.layer()->isJustCreated()); |
| 140 // Client used by only paint chunks and non-cachaeable display items but not
by any | 143 // Client used by only paint chunks and non-cachaeable display items but not
by any |
| 141 // cacheable display items won't be marked as validly cached. | 144 // cacheable display items won't be marked as validly cached. |
| 142 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); | 145 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); |
| 143 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); | 146 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); |
| 144 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); | 147 EXPECT_TRUE(rootPaintController().clientCacheIsValid(subDiv)); |
| 145 } | 148 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 161 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), | 164 TestDisplayItem(htmlLayer, DisplayItem::kSubsequence), |
| 162 // The begin and end compositing display items have been folded into thi
s one. | 165 // The begin and end compositing display items have been folded into thi
s one. |
| 163 TestDisplayItem(subDiv, backgroundType), | 166 TestDisplayItem(subDiv, backgroundType), |
| 164 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | 167 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 165 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | 168 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), |
| 166 TestDisplayItem(layoutView(), DisplayItem::clipTypeToEndClipType(Display
Item::kClipFrameToVisibleContentRect))); | 169 TestDisplayItem(layoutView(), DisplayItem::clipTypeToEndClipType(Display
Item::kClipFrameToVisibleContentRect))); |
| 167 } | 170 } |
| 168 | 171 |
| 169 | 172 |
| 170 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |