| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 TestDisplayItem(div, DisplayItem::kEndCompositing), | 159 TestDisplayItem(div, DisplayItem::kEndCompositing), |
| 160 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | 160 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 161 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | 161 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), |
| 162 TestDisplayItem(layoutView(), | 162 TestDisplayItem(layoutView(), |
| 163 DisplayItem::clipTypeToEndClipType( | 163 DisplayItem::clipTypeToEndClipType( |
| 164 DisplayItem::kClipFrameToVisibleContentRect))); | 164 DisplayItem::kClipFrameToVisibleContentRect))); |
| 165 | 165 |
| 166 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; | 166 const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; |
| 167 EXPECT_TRUE(backgroundChunk.properties.scroll->isRoot()); | 167 EXPECT_TRUE(backgroundChunk.properties.scroll->isRoot()); |
| 168 | 168 |
| 169 const EffectPaintPropertyNode* effectNode = | 169 const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); |
| 170 div.objectPaintProperties()->effect(); | |
| 171 EXPECT_EQ(0.5f, effectNode->opacity()); | 170 EXPECT_EQ(0.5f, effectNode->opacity()); |
| 172 const PaintChunk& chunk = rootPaintController().paintChunks()[1]; | 171 const PaintChunk& chunk = rootPaintController().paintChunks()[1]; |
| 173 EXPECT_EQ(*div.layer(), chunk.id->client); | 172 EXPECT_EQ(*div.layer(), chunk.id->client); |
| 174 EXPECT_EQ(effectNode, chunk.properties.effect.get()); | 173 EXPECT_EQ(effectNode, chunk.properties.effect.get()); |
| 175 | 174 |
| 176 EXPECT_FALSE(div.layer()->isJustCreated()); | 175 EXPECT_FALSE(div.layer()->isJustCreated()); |
| 177 // Client used by only paint chunks and non-cachaeable display items but not | 176 // Client used by only paint chunks and non-cachaeable display items but not |
| 178 // by any cacheable display items won't be marked as validly cached. | 177 // by any cacheable display items won't be marked as validly cached. |
| 179 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); | 178 EXPECT_FALSE(rootPaintController().clientCacheIsValid(*div.layer())); |
| 180 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); | 179 EXPECT_FALSE(rootPaintController().clientCacheIsValid(div)); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 204 // one. | 203 // one. |
| 205 TestDisplayItem(subDiv, backgroundType), | 204 TestDisplayItem(subDiv, backgroundType), |
| 206 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), | 205 TestDisplayItem(htmlLayer, DisplayItem::kEndSubsequence), |
| 207 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), | 206 TestDisplayItem(*layoutView().layer(), DisplayItem::kEndSubsequence), |
| 208 TestDisplayItem(layoutView(), | 207 TestDisplayItem(layoutView(), |
| 209 DisplayItem::clipTypeToEndClipType( | 208 DisplayItem::clipTypeToEndClipType( |
| 210 DisplayItem::kClipFrameToVisibleContentRect))); | 209 DisplayItem::kClipFrameToVisibleContentRect))); |
| 211 } | 210 } |
| 212 | 211 |
| 213 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |