| 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 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 350 } |
| 351 | 351 |
| 352 void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) { | 352 void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) { |
| 353 ASSERT(child->isAnonymousBlock()); | 353 ASSERT(child->isAnonymousBlock()); |
| 354 ASSERT(!child->childrenInline()); | 354 ASSERT(!child->childrenInline()); |
| 355 ASSERT(child->parent() == this); | 355 ASSERT(child->parent() == this); |
| 356 | 356 |
| 357 if (child->continuation()) | 357 if (child->continuation()) |
| 358 return; | 358 return; |
| 359 | 359 |
| 360 if (isFieldset()) | |
| 361 return; | |
| 362 | |
| 363 // Promote all the leftover anonymous block's children (to become children of | 360 // Promote all the leftover anonymous block's children (to become children of |
| 364 // this block instead). We still want to keep the leftover block in the tree | 361 // this block instead). We still want to keep the leftover block in the tree |
| 365 // for a moment, for notification purposes done further below (flow threads | 362 // for a moment, for notification purposes done further below (flow threads |
| 366 // and grids). | 363 // and grids). |
| 367 child->moveAllChildrenTo(this, child->nextSibling()); | 364 child->moveAllChildrenTo(this, child->nextSibling()); |
| 368 | 365 |
| 369 // Remove all the information in the flow thread associated with the leftover | 366 // Remove all the information in the flow thread associated with the leftover |
| 370 // anonymous block. | 367 // anonymous block. |
| 371 child->removeFromLayoutFlowThread(); | 368 child->removeFromLayoutFlowThread(); |
| 372 | 369 |
| (...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( | 1983 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( |
| 1987 const LayoutObject* parent, | 1984 const LayoutObject* parent, |
| 1988 EDisplay display) { | 1985 EDisplay display) { |
| 1989 // FIXME: Do we need to convert all our inline displays to block-type in the | 1986 // FIXME: Do we need to convert all our inline displays to block-type in the |
| 1990 // anonymous logic ? | 1987 // anonymous logic ? |
| 1991 EDisplay newDisplay; | 1988 EDisplay newDisplay; |
| 1992 LayoutBlock* newBox = nullptr; | 1989 LayoutBlock* newBox = nullptr; |
| 1993 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { | 1990 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { |
| 1994 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); | 1991 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); |
| 1995 newDisplay = EDisplay::Flex; | 1992 newDisplay = EDisplay::Flex; |
| 1996 } else if (display == EDisplay::Grid || display == EDisplay::InlineGrid) { | |
| 1997 newBox = LayoutGrid::createAnonymous(&parent->document()); | |
| 1998 newDisplay = EDisplay::Grid; | |
| 1999 } else { | 1993 } else { |
| 2000 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); | 1994 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); |
| 2001 newDisplay = EDisplay::Block; | 1995 newDisplay = EDisplay::Block; |
| 2002 } | 1996 } |
| 2003 | 1997 |
| 2004 RefPtr<ComputedStyle> newStyle = | 1998 RefPtr<ComputedStyle> newStyle = |
| 2005 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), | 1999 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), |
| 2006 newDisplay); | 2000 newDisplay); |
| 2007 parent->updateAnonymousChildStyle(*newBox, *newStyle); | 2001 parent->updateAnonymousChildStyle(*newBox, *newStyle); |
| 2008 newBox->setStyle(newStyle.release()); | 2002 newBox->setStyle(newStyle.release()); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2207 } | 2201 } |
| 2208 | 2202 |
| 2209 return availableHeight; | 2203 return availableHeight; |
| 2210 } | 2204 } |
| 2211 | 2205 |
| 2212 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2206 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2213 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2207 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2214 } | 2208 } |
| 2215 | 2209 |
| 2216 } // namespace blink | 2210 } // namespace blink |
| OLD | NEW |