Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2150003005: Add grid/flex layout support for <fieldset> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add grid/flex layout support for <fieldset> Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 } 1729 }
1730 1730
1731 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay(const LayoutObject * parent, EDisplay display) 1731 LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay(const LayoutObject * parent, EDisplay display)
1732 { 1732 {
1733 // FIXME: Do we need to convert all our inline displays to block-type in the anonymous logic ? 1733 // FIXME: Do we need to convert all our inline displays to block-type in the anonymous logic ?
1734 EDisplay newDisplay; 1734 EDisplay newDisplay;
1735 LayoutBlock* newBox = nullptr; 1735 LayoutBlock* newBox = nullptr;
1736 if (display == FLEX || display == INLINE_FLEX) { 1736 if (display == FLEX || display == INLINE_FLEX) {
1737 newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); 1737 newBox = LayoutFlexibleBox::createAnonymous(&parent->document());
1738 newDisplay = FLEX; 1738 newDisplay = FLEX;
1739 } else if (display == GRID || display == INLINE_GRID) {
1740 newBox = LayoutGrid::createAnonymous(&parent->document());
1741 newDisplay = GRID;
1739 } else { 1742 } else {
1740 newBox = LayoutBlockFlow::createAnonymous(&parent->document()); 1743 newBox = LayoutBlockFlow::createAnonymous(&parent->document());
1741 newDisplay = BLOCK; 1744 newDisplay = BLOCK;
1742 } 1745 }
1743 1746
1744 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), newDisplay); 1747 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), newDisplay);
1745 parent->updateAnonymousChildStyle(*newBox, *newStyle); 1748 parent->updateAnonymousChildStyle(*newBox, *newStyle);
1746 newBox->setStyle(newStyle.release()); 1749 newBox->setStyle(newStyle.release());
1747 return newBox; 1750 return newBox;
1748 } 1751 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) { 1870 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) {
1868 LayoutBox* currBox = *it; 1871 LayoutBox* currBox = *it;
1869 ASSERT(!currBox->needsLayout()); 1872 ASSERT(!currBox->needsLayout());
1870 } 1873 }
1871 } 1874 }
1872 } 1875 }
1873 1876
1874 #endif 1877 #endif
1875 1878
1876 } // namespace blink 1879 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698