| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 static_assert(sizeof(LayoutInline) == sizeof(SameSizeAsLayoutInline), "LayoutInl
ine should stay small"); | 53 static_assert(sizeof(LayoutInline) == sizeof(SameSizeAsLayoutInline), "LayoutInl
ine should stay small"); |
| 54 | 54 |
| 55 LayoutInline::LayoutInline(Element* element) | 55 LayoutInline::LayoutInline(Element* element) |
| 56 : LayoutBoxModelObject(element) | 56 : LayoutBoxModelObject(element) |
| 57 { | 57 { |
| 58 setChildrenInline(true); | 58 setChildrenInline(true); |
| 59 } | 59 } |
| 60 | 60 |
| 61 LayoutInline* LayoutInline::createAnonymous(Document* document) | |
| 62 { | |
| 63 LayoutInline* layoutObject = new LayoutInline(nullptr); | |
| 64 layoutObject->setDocumentForAnonymous(document); | |
| 65 return layoutObject; | |
| 66 } | |
| 67 | |
| 68 void LayoutInline::willBeDestroyed() | 61 void LayoutInline::willBeDestroyed() |
| 69 { | 62 { |
| 70 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will | 63 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will |
| 71 // properly dirty line boxes that they are removed from. Effects that do :b
efore/:after only on hover could crash otherwise. | 64 // properly dirty line boxes that they are removed from. Effects that do :b
efore/:after only on hover could crash otherwise. |
| 72 children()->destroyLeftoverChildren(); | 65 children()->destroyLeftoverChildren(); |
| 73 | 66 |
| 74 // Destroy our continuation before anything other than anonymous children. | 67 // Destroy our continuation before anything other than anonymous children. |
| 75 // The reason we don't destroy it before anonymous children is that they may | 68 // The reason we don't destroy it before anonymous children is that they may |
| 76 // have continuations of their own that are anonymous children of our contin
uation. | 69 // have continuations of their own that are anonymous children of our contin
uation. |
| 77 LayoutBoxModelObject* continuation = this->continuation(); | 70 LayoutBoxModelObject* continuation = this->continuation(); |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 | 1353 |
| 1361 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason) const | 1354 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason) const |
| 1362 { | 1355 { |
| 1363 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason); | 1356 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason); |
| 1364 | 1357 |
| 1365 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 1358 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) |
| 1366 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason); | 1359 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason); |
| 1367 } | 1360 } |
| 1368 | 1361 |
| 1369 } // namespace blink | 1362 } // namespace blink |
| OLD | NEW |