Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 | 249 |
| 250 void assertSubtreeClearedPaintInvalidationState() const | 250 void assertSubtreeClearedPaintInvalidationState() const |
| 251 { | 251 { |
| 252 for (const LayoutObject* renderer = this; renderer; renderer = renderer- >nextInPreOrder()) | 252 for (const LayoutObject* renderer = this; renderer; renderer = renderer- >nextInPreOrder()) |
| 253 renderer->assertRendererClearedPaintInvalidationState(); | 253 renderer->assertRendererClearedPaintInvalidationState(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 #endif | 256 #endif |
| 257 | 257 |
| 258 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations. | 258 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations. |
| 259 bool rendererHasNoBoxEffect() const | 259 // FIXME: This is incorrect for document element. Remove this when we enable slimming paint. |
| 260 bool rendererHasNoBoxEffectObsolete() const | |
| 260 { | 261 { |
| 261 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground(); | 262 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground(); |
| 262 } | 263 } |
|
Xianzhu
2015/03/18 22:44:19
Because the current code works well, I don't want
| |
| 263 | 264 |
| 265 // Correct version of !rendererHasNoBoxEffectObsolete(). | |
| 266 bool hasBoxEffect() const | |
| 267 { | |
| 268 return hasBoxDecorationBackground() || style()->hasVisualOverflowingEffe ct(); | |
|
Xianzhu
2015/03/18 22:44:19
hasBoxDecorationBackground() correctly considers t
| |
| 269 } | |
| 270 | |
| 264 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline | 271 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline |
| 265 // children. | 272 // children. |
| 266 virtual LayoutBlock* firstLineBlock() const; | 273 virtual LayoutBlock* firstLineBlock() const; |
| 267 | 274 |
| 268 // Called when an object that was floating or positioned becomes a normal fl ow object | 275 // Called when an object that was floating or positioned becomes a normal fl ow object |
| 269 // again. We have to make sure the render tree updates as needed to accommo date the new | 276 // again. We have to make sure the render tree updates as needed to accommo date the new |
| 270 // normal flow object. | 277 // normal flow object. |
| 271 void handleDynamicFloatPositionChange(); | 278 void handleDynamicFloatPositionChange(); |
| 272 | 279 |
| 273 // LayoutObject tree manipulation | 280 // LayoutObject tree manipulation |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1653 void showTree(const blink::LayoutObject*); | 1660 void showTree(const blink::LayoutObject*); |
| 1654 void showLineTree(const blink::LayoutObject*); | 1661 void showLineTree(const blink::LayoutObject*); |
| 1655 void showLayoutTree(const blink::LayoutObject* object1); | 1662 void showLayoutTree(const blink::LayoutObject* object1); |
| 1656 // We don't make object2 an optional parameter so that showLayoutTree | 1663 // We don't make object2 an optional parameter so that showLayoutTree |
| 1657 // can be called from gdb easily. | 1664 // can be called from gdb easily. |
| 1658 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); | 1665 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); |
| 1659 | 1666 |
| 1660 #endif | 1667 #endif |
| 1661 | 1668 |
| 1662 #endif // LayoutObject_h | 1669 #endif // LayoutObject_h |
| OLD | NEW |