Changeset 90773 in webkit
- Timestamp:
- Jul 11, 2011 12:02:17 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90769 r90773 1 2011-07-11 Tony Chang <tony@chromium.org> 2 3 rename RenderObject::isFlexibleBox to isDeprecatedFlexibleBox 4 https://bugs.webkit.org/show_bug.cgi?id=64217 5 6 Reviewed by Ojan Vafai. 7 8 This is to make way for the new flexbox needing a similar method. 9 RenderObject also has isFlexingChildren() and isStretchingChildren(), 10 but we may be able to use those for the new flexbox as well so I 11 didn't rename them. 12 13 No new tests, just refactoring. 14 15 * rendering/RenderBlock.cpp: 16 (WebCore::RenderBlock::removeChild): 17 (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): 18 (WebCore::shouldCheckLines): 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): 21 (WebCore::RenderBox::computeLogicalWidth): 22 (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): 23 (WebCore::RenderBox::computeLogicalHeight): 24 * rendering/RenderDeprecatedFlexibleBox.cpp: 25 (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): 26 * rendering/RenderDeprecatedFlexibleBox.h: 27 (WebCore::RenderDeprecatedFlexibleBox::isDeprecatedFlexibleBox): 28 * rendering/RenderObject.h: 29 (WebCore::RenderObject::isDeprecatedFlexibleBox): 30 1 31 2011-07-11 Nate Chapin <japhet@chromium.org> 2 32 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r90698 r90773 1046 1046 1047 1047 RenderObject* child = prev ? prev : next; 1048 if (canMergeAnonymousBlocks && child && !child->previousSibling() && !child->nextSibling() && !is FlexibleBox()) {1048 if (canMergeAnonymousBlocks && child && !child->previousSibling() && !child->nextSibling() && !isDeprecatedFlexibleBox()) { 1049 1049 // The removal has knocked us down to containing only a single anonymous 1050 1050 // box. We can go ahead and pull the content right back up into our … … 1453 1453 bool RenderBlock::expandsToEncloseOverhangingFloats() const 1454 1454 { 1455 return isInlineBlockOrInlineTable() || isFloatingOrPositioned() || hasOverflowClip() || (parent() && parent()->is FlexibleBox())1455 return isInlineBlockOrInlineTable() || isFloatingOrPositioned() || hasOverflowClip() || (parent() && parent()->isDeprecatedFlexibleBox()) 1456 1456 || hasColumns() || isTableCell() || isFieldset() || isWritingModeRoot() || isRoot(); 1457 1457 } … … 5509 5509 return !obj->isFloatingOrPositioned() && !obj->isRunIn() && 5510 5510 obj->isBlockFlow() && obj->style()->height().isAuto() && 5511 (!obj->is FlexibleBox() || obj->style()->boxOrient() == VERTICAL);5511 (!obj->isDeprecatedFlexibleBox() || obj->style()->boxOrient() == VERTICAL); 5512 5512 } 5513 5513 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r90734 r90773 228 228 if (parentBlock) { 229 229 RenderObject* parent = parentBlock->parent(); 230 if (parent && parent->is FlexibleBox())230 if (parent && parent->isDeprecatedFlexibleBox()) 231 231 parentBlock = toRenderBlock(parent); 232 232 … … 1550 1550 // https://bugs.webkit.org/show_bug.cgi?id=46418 1551 1551 if (hasOverrideSize() && parent()->style()->boxOrient() == HORIZONTAL 1552 && parent()->is FlexibleBox() && parent()->isFlexingChildren()) {1552 && parent()->isDeprecatedFlexibleBox() && parent()->isFlexingChildren()) { 1553 1553 setLogicalWidth(overrideWidth()); 1554 1554 return; … … 1557 1557 // FIXME: Account for block-flow in flexible boxes. 1558 1558 // https://bugs.webkit.org/show_bug.cgi?id=46418 1559 bool inVerticalBox = parent()->is FlexibleBox() && (parent()->style()->boxOrient() == VERTICAL);1559 bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style()->boxOrient() == VERTICAL); 1560 1560 bool stretching = (parent()->style()->boxAlign() == BSTRETCH); 1561 1561 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || !stretching); … … 1617 1617 1618 1618 if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLogicalWidth != (logicalWidth() + marginStart() + marginEnd()) 1619 && !isFloating() && !isInline() && !cb->is FlexibleBox())1619 && !isFloating() && !isInline() && !cb->isDeprecatedFlexibleBox()) 1620 1620 cb->setMarginEndForChild(this, containerLogicalWidth - logicalWidth() - cb->marginStartForChild(this)); 1621 1621 } … … 1676 1676 // FIXME: Think about block-flow here. 1677 1677 // https://bugs.webkit.org/show_bug.cgi?id=46473 1678 if (parent()->is FlexibleBox()1678 if (parent()->isDeprecatedFlexibleBox() 1679 1679 && (parent()->style()->boxOrient() == HORIZONTAL || parent()->style()->boxAlign() != BSTRETCH)) 1680 1680 return true; … … 1685 1685 // FIXME: Think about block-flow here. 1686 1686 // https://bugs.webkit.org/show_bug.cgi?id=46473 1687 if (logicalWidth.type() == Auto && !(parent()->is FlexibleBox() && parent()->style()->boxOrient() == VERTICAL && parent()->style()->boxAlign() == BSTRETCH) && node() && (node()->hasTagName(inputTag) || node()->hasTagName(selectTag) || node()->hasTagName(buttonTag) || node()->hasTagName(textareaTag) || node()->hasTagName(legendTag)))1687 if (logicalWidth.type() == Auto && !(parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == VERTICAL && parent()->style()->boxAlign() == BSTRETCH) && node() && (node()->hasTagName(inputTag) || node()->hasTagName(selectTag) || node()->hasTagName(buttonTag) || node()->hasTagName(textareaTag) || node()->hasTagName(legendTag))) 1688 1688 return true; 1689 1689 … … 1754 1754 // FIXME: Account for block-flow in flexible boxes. 1755 1755 // https://bugs.webkit.org/show_bug.cgi?id=46418 1756 bool inHorizontalBox = parent()->is FlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL;1756 bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL; 1757 1757 bool stretching = parent()->style()->boxAlign() == BSTRETCH; 1758 1758 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBox || !stretching); … … 1763 1763 // FIXME: Account for block-flow in flexible boxes. 1764 1764 // https://bugs.webkit.org/show_bug.cgi?id=46418 1765 if (hasOverrideSize() && parent()->is FlexibleBox() && parent()->style()->boxOrient() == VERTICAL1765 if (hasOverrideSize() && parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == VERTICAL 1766 1766 && parent()->isFlexingChildren()) 1767 1767 h = Length(overrideHeight() - borderAndPaddingLogicalHeight(), Fixed); … … 1776 1776 // FIXME: Account for block-flow in flexible boxes. 1777 1777 // https://bugs.webkit.org/show_bug.cgi?id=46418 1778 if (h.isAuto() && parent()->is FlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL1778 if (h.isAuto() && parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL 1779 1779 && parent()->isStretchingChildren()) { 1780 1780 h = Length(parentBox()->contentLogicalHeight() - marginBefore() - marginAfter() - borderAndPaddingLogicalHeight(), Fixed); -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r90668 r90773 217 217 218 218 if (previousSize != size() 219 || (parent()->is FlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL219 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL 220 220 && parent()->style()->boxAlign() == BSTRETCH)) 221 221 relayoutChildren = true; -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
r88952 r90773 47 47 virtual bool avoidsFloats() const { return true; } 48 48 49 virtual bool is FlexibleBox() const { return true; }49 virtual bool isDeprecatedFlexibleBox() const { return true; } 50 50 virtual bool isFlexingChildren() const { return m_flexingChildren; } 51 51 virtual bool isStretchingChildren() const { return m_stretchingChildren; } -
trunk/Source/WebCore/rendering/RenderObject.h
r90734 r90773 740 740 virtual void destroy(); 741 741 742 // Virtual function helpers for CSS3 Flexible Box Layout743 virtual bool is FlexibleBox() const { return false; }742 // Virtual function helpers for the deprecated Flexible Box Layout (display: -webkit-box) 743 virtual bool isDeprecatedFlexibleBox() const { return false; } 744 744 virtual bool isFlexingChildren() const { return false; } 745 745 virtual bool isStretchingChildren() const { return false; }
Note: See TracChangeset
for help on using the changeset viewer.