Modified: trunk/Source/WebCore/ChangeLog (125255 => 125256)
--- trunk/Source/WebCore/ChangeLog 2012-08-10 07:28:44 UTC (rev 125255)
+++ trunk/Source/WebCore/ChangeLog 2012-08-10 07:34:26 UTC (rev 125256)
@@ -1,3 +1,28 @@
+2012-08-10 Tony Chang <[email protected]>
+
+ Remove unused isFlexingChildren and make m_flexingChildren a local variable
+ https://bugs.webkit.org/show_bug.cgi?id=93689
+
+ Reviewed by Ojan Vafai.
+
+ isFlexingChildren() is never called, so we can remove it.
+
+ m_flexingChildren is now only used locally, so remove the member variable and use a local variable.
+
+ No new tests, this is just a refactoring.
+
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): Make flexingChildren a local.
+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Make flexingChildren a local.
+ (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): No need to set m_flexingChildren since it's not used
+ outside of RenderDeprecatedFlexibleBox.
+ * rendering/RenderDeprecatedFlexibleBox.h:
+ (RenderDeprecatedFlexibleBox): Remove m_flexingChildren and don't bit pack the remaining bool since it doesn't
+ do anything for 1 bool.
+ * rendering/RenderObject.h:
+
2012-08-10 Sam D <[email protected]>
Web Inspector: Search matches count view is flaky.
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (125255 => 125256)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2012-08-10 07:28:44 UTC (rev 125255)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2012-08-10 07:34:26 UTC (rev 125256)
@@ -122,7 +122,7 @@
: RenderBlock(node)
{
setChildrenInline(false); // All of our children must be block-level
- m_flexingChildren = m_stretchingChildren = false;
+ m_stretchingChildren = false;
}
RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox()
@@ -258,7 +258,7 @@
setHeight(0);
- m_flexingChildren = m_stretchingChildren = false;
+ m_stretchingChildren = false;
initMaxMarginValues();
@@ -352,7 +352,7 @@
FlexBoxIterator iterator(this);
unsigned int highestFlexGroup = 0;
unsigned int lowestFlexGroup = 0;
- bool haveFlex = false;
+ bool haveFlex = false, flexingChildren = false;
gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, lowestFlexGroup, haveFlex);
RenderBlock::startDelayUpdateScrollInfo();
@@ -486,7 +486,7 @@
remainingSpace = borderLeft() + paddingLeft() + contentWidth() - xPos;
m_stretchingChildren = false;
- if (m_flexingChildren)
+ if (flexingChildren)
haveFlex = false; // We're done.
else if (haveFlex) {
// We have some flexible objects. See if we need to grow/shrink them at all.
@@ -538,7 +538,7 @@
LayoutUnit spaceAdd = LayoutUnit(spaceAvailableThisPass * (child->style()->boxFlex() / totalFlex));
if (spaceAdd) {
child->setOverrideLogicalContentWidth(child->overrideLogicalContentWidth() + spaceAdd);
- m_flexingChildren = true;
+ flexingChildren = true;
relayoutChildren = true;
}
@@ -555,7 +555,7 @@
for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) {
if (allowedChildFlex(child, expanding, i)) {
child->setOverrideLogicalContentWidth(child->overrideLogicalContentWidth() + spaceAdd);
- m_flexingChildren = true;
+ flexingChildren = true;
relayoutChildren = true;
remainingSpace -= spaceAdd;
groupRemainingSpace -= spaceAdd;
@@ -566,13 +566,11 @@
}
// We didn't find any children that could grow.
- if (haveFlex && !m_flexingChildren)
+ if (haveFlex && !flexingChildren)
haveFlex = false;
}
} while (haveFlex);
- m_flexingChildren = false;
-
RenderBlock::finishDelayUpdateScrollInfo();
if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->boxPack() != Start)
@@ -641,7 +639,7 @@
FlexBoxIterator iterator(this);
unsigned int highestFlexGroup = 0;
unsigned int lowestFlexGroup = 0;
- bool haveFlex = false;
+ bool haveFlex = false, flexingChildren = false;
gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, lowestFlexGroup, haveFlex);
// We confine the line clamp ugliness to vertical flexible boxes (thus keeping it out of
@@ -742,7 +740,7 @@
remainingSpace = borderTop() + paddingTop() + contentHeight() - yPos;
- if (m_flexingChildren)
+ if (flexingChildren)
haveFlex = false; // We're done.
else if (haveFlex) {
// We have some flexible objects. See if we need to grow/shrink them at all.
@@ -791,7 +789,7 @@
LayoutUnit spaceAdd = static_cast<LayoutUnit>(spaceAvailableThisPass * (child->style()->boxFlex() / totalFlex));
if (spaceAdd) {
child->setOverrideLogicalContentHeight(child->overrideLogicalContentHeight() + spaceAdd);
- m_flexingChildren = true;
+ flexingChildren = true;
relayoutChildren = true;
}
@@ -808,7 +806,7 @@
for (RenderBox* child = iterator.first(); child && groupRemainingSpace; child = iterator.next()) {
if (allowedChildFlex(child, expanding, i)) {
child->setOverrideLogicalContentHeight(child->overrideLogicalContentHeight() + spaceAdd);
- m_flexingChildren = true;
+ flexingChildren = true;
relayoutChildren = true;
remainingSpace -= spaceAdd;
groupRemainingSpace -= spaceAdd;
@@ -819,7 +817,7 @@
}
// We didn't find any children that could grow.
- if (haveFlex && !m_flexingChildren)
+ if (haveFlex && !flexingChildren)
haveFlex = false;
}
} while (haveFlex);
@@ -922,9 +920,7 @@
child->setChildNeedsLayout(true, MarkOnlyThis);
child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddingHeight());
- m_flexingChildren = true;
child->layoutIfNeeded();
- m_flexingChildren = false;
child->clearOverrideSize();
// FIXME: For now don't support RTL.
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h (125255 => 125256)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h 2012-08-10 07:28:44 UTC (rev 125255)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h 2012-08-10 07:34:26 UTC (rev 125256)
@@ -49,7 +49,6 @@
virtual bool avoidsFloats() const { return true; }
virtual bool isDeprecatedFlexibleBox() const { return true; }
- virtual bool isFlexingChildren() const { return m_flexingChildren; }
virtual bool isStretchingChildren() const { return m_stretchingChildren; }
void placeChild(RenderBox* child, const LayoutPoint& location);
@@ -61,8 +60,7 @@
bool isVertical() const { return style()->boxOrient() == VERTICAL; }
bool isHorizontal() const { return style()->boxOrient() == HORIZONTAL; }
- bool m_flexingChildren : 1;
- bool m_stretchingChildren : 1;
+ bool m_stretchingChildren;
private:
void applyLineClamp(FlexBoxIterator&, bool relayoutChildren);
Modified: trunk/Source/WebCore/rendering/RenderObject.h (125255 => 125256)
--- trunk/Source/WebCore/rendering/RenderObject.h 2012-08-10 07:28:44 UTC (rev 125255)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2012-08-10 07:34:26 UTC (rev 125256)
@@ -851,7 +851,6 @@
// Virtual function helpers for the deprecated Flexible Box Layout (display: -webkit-box).
virtual bool isDeprecatedFlexibleBox() const { return false; }
- virtual bool isFlexingChildren() const { return false; }
virtual bool isStretchingChildren() const { return false; }
// Virtual function helper for the new FlexibleBox Layout (display: -webkit-flex).