| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 355 } |
| 356 | 356 |
| 357 void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) { | 357 void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) { |
| 358 ASSERT(child->isAnonymousBlock()); | 358 ASSERT(child->isAnonymousBlock()); |
| 359 ASSERT(!child->childrenInline()); | 359 ASSERT(!child->childrenInline()); |
| 360 ASSERT(child->parent() == this); | 360 ASSERT(child->parent() == this); |
| 361 | 361 |
| 362 if (child->continuation()) | 362 if (child->continuation()) |
| 363 return; | 363 return; |
| 364 | 364 |
| 365 if (isFieldset()) | |
| 366 return; | |
| 367 | |
| 368 // Promote all the leftover anonymous block's children (to become children of | 365 // Promote all the leftover anonymous block's children (to become children of |
| 369 // this block instead). We still want to keep the leftover block in the tree | 366 // this block instead). We still want to keep the leftover block in the tree |
| 370 // for a moment, for notification purposes done further below (flow threads | 367 // for a moment, for notification purposes done further below (flow threads |
| 371 // and grids). | 368 // and grids). |
| 372 child->moveAllChildrenTo(this, child->nextSibling()); | 369 child->moveAllChildrenTo(this, child->nextSibling()); |
| 373 | 370 |
| 374 // Remove all the information in the flow thread associated with the leftover | 371 // Remove all the information in the flow thread associated with the leftover |
| 375 // anonymous block. | 372 // anonymous block. |
| 376 child->removeFromLayoutFlowThread(); | 373 child->removeFromLayoutFlowThread(); |
| 377 | 374 |
| (...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1983 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( | 1980 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay( |
| 1984 const LayoutObject* parent, | 1981 const LayoutObject* parent, |
| 1985 EDisplay display) { | 1982 EDisplay display) { |
| 1986 // FIXME: Do we need to convert all our inline displays to block-type in the | 1983 // FIXME: Do we need to convert all our inline displays to block-type in the |
| 1987 // anonymous logic ? | 1984 // anonymous logic ? |
| 1988 EDisplay newDisplay; | 1985 EDisplay newDisplay; |
| 1989 LayoutBlock* newBox = nullptr; | 1986 LayoutBlock* newBox = nullptr; |
| 1990 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { | 1987 if (display == EDisplay::Flex || display == EDisplay::InlineFlex) { |
| 1991 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); | 1988 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); |
| 1992 newDisplay = EDisplay::Flex; | 1989 newDisplay = EDisplay::Flex; |
| 1993 } else if (display == EDisplay::Grid || display == EDisplay::InlineGrid) { | |
| 1994 newBox = LayoutGrid::createAnonymous(&parent->document()); | |
| 1995 newDisplay = EDisplay::Grid; | |
| 1996 } else { | 1990 } else { |
| 1997 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); | 1991 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); |
| 1998 newDisplay = EDisplay::Block; | 1992 newDisplay = EDisplay::Block; |
| 1999 } | 1993 } |
| 2000 | 1994 |
| 2001 RefPtr<ComputedStyle> newStyle = | 1995 RefPtr<ComputedStyle> newStyle = |
| 2002 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), | 1996 ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), |
| 2003 newDisplay); | 1997 newDisplay); |
| 2004 parent->updateAnonymousChildStyle(*newBox, *newStyle); | 1998 parent->updateAnonymousChildStyle(*newBox, *newStyle); |
| 2005 newBox->setStyle(newStyle.release()); | 1999 newBox->setStyle(newStyle.release()); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 } | 2198 } |
| 2205 | 2199 |
| 2206 return availableHeight; | 2200 return availableHeight; |
| 2207 } | 2201 } |
| 2208 | 2202 |
| 2209 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2203 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2210 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2204 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2211 } | 2205 } |
| 2212 | 2206 |
| 2213 } // namespace blink | 2207 } // namespace blink |
| OLD | NEW |