| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 hasSelfPaintingLayer() || hasBoxDecorationBackground() || | 188 hasSelfPaintingLayer() || hasBoxDecorationBackground() || |
| 189 newStyle.hasPadding() || newStyle.hasMargin() || newStyle.hasOutline(); | 189 newStyle.hasPadding() || newStyle.hasMargin() || newStyle.hasOutline(); |
| 190 if (oldStyle && alwaysCreateLineBoxesNew) { | 190 if (oldStyle && alwaysCreateLineBoxesNew) { |
| 191 dirtyLineBoxes(false); | 191 dirtyLineBoxes(false); |
| 192 setNeedsLayoutAndFullPaintInvalidation( | 192 setNeedsLayoutAndFullPaintInvalidation( |
| 193 LayoutInvalidationReason::StyleChange); | 193 LayoutInvalidationReason::StyleChange); |
| 194 } | 194 } |
| 195 setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew); | 195 setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew); |
| 196 } | 196 } |
| 197 | 197 |
| 198 // If we are changing to/from static, we need to reposition |
| 199 // out-of-flow positioned descendants. |
| 200 if (oldStyle && oldStyle->position() != newStyle.position() && |
| 201 (newStyle.position() == StaticPosition || |
| 202 oldStyle->position() == StaticPosition)) { |
| 203 LayoutBlock* absContainingBlock = nullptr; |
| 204 if (oldStyle->position() == StaticPosition) { |
| 205 absContainingBlock = containingBlockForAbsolutePosition(); |
| 206 } else { |
| 207 // When position was not static, containingBlockForAbsolutePosition |
| 208 // for our children is our existing containingBlock. |
| 209 absContainingBlock = containingBlock(); |
| 210 } |
| 211 if (absContainingBlock) |
| 212 absContainingBlock->removePositionedObjects(this, NewContainingBlock); |
| 213 } |
| 214 |
| 198 propagateStyleToAnonymousChildren(); | 215 propagateStyleToAnonymousChildren(); |
| 199 } | 216 } |
| 200 | 217 |
| 201 static inline bool fontDifferenceRequiresLineBox( | 218 static inline bool fontDifferenceRequiresLineBox( |
| 202 const ComputedStyle& style, | 219 const ComputedStyle& style, |
| 203 const ComputedStyle& parentStyle) { | 220 const ComputedStyle& parentStyle) { |
| 204 const SimpleFontData* font = style.font().primaryFont(); | 221 const SimpleFontData* font = style.font().primaryFont(); |
| 205 const SimpleFontData* parentFont = parentStyle.font().primaryFont(); | 222 const SimpleFontData* parentFont = parentStyle.font().primaryFont(); |
| 206 | 223 |
| 207 return (font && parentFont && | 224 return (font && parentFont && |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1519 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1503 } | 1520 } |
| 1504 | 1521 |
| 1505 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1522 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1506 LayoutRect LayoutInline::debugRect() const { | 1523 LayoutRect LayoutInline::debugRect() const { |
| 1507 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1524 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1508 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1525 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1509 } | 1526 } |
| 1510 | 1527 |
| 1511 } // namespace blink | 1528 } // namespace blink |
| OLD | NEW |