https://bugs.webkit.org/show_bug.cgi?id=97486
Reviewed by Ojan Vafai.
More work for bug 96804. This is just a refactoring.
No new tests, behavior should be the same as before.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
(WebCore):
* rendering/RenderMultiColumnFlowThread.h:
(RenderMultiColumnFlowThread):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129427
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-09-24 Tony Chang <tony@chromium.org>
+
+ Replace 2 uses of updateLogicalHeight with computeLogicalHeight
+ https://bugs.webkit.org/show_bug.cgi?id=97486
+
+ Reviewed by Ojan Vafai.
+
+ More work for bug 96804. This is just a refactoring.
+
+ No new tests, behavior should be the same as before.
+
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::computeLogicalHeight):
+ * rendering/RenderFlowThread.h:
+ * rendering/RenderMultiColumnFlowThread.cpp:
+ (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
+ (WebCore):
+ * rendering/RenderMultiColumnFlowThread.h:
+ (RenderMultiColumnFlowThread):
+
2012-09-21 Kenneth Russell <kbr@google.com>
[V8] ArrayBuffer code should not pass a negative length to SetIndexedPropertiesToExternalArrayData()
}
}
-void RenderFlowThread::updateLogicalHeight()
+void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
{
- LayoutUnit logicalHeight = 0;
+ computedValues.m_position = logicalTop;
+ computedValues.m_extent = 0;
- for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
+ for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
if (!region->isValid())
continue;
ASSERT(!region->needsLayout());
- logicalHeight += region->logicalHeightOfAllFlowThreadContent();
+ computedValues.m_extent += region->logicalHeightOfAllFlowThreadContent();
}
-
- setLogicalHeight(logicalHeight);
}
void RenderFlowThread::paintFlowThreadPortionInRegion(PaintInfo& paintInfo, RenderRegion* region, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const LayoutPoint& paintOffset) const
const RenderRegionList& renderRegionList() const { return m_regionList; }
virtual void updateLogicalWidth() OVERRIDE;
- virtual void updateLogicalHeight() OVERRIDE;
+ virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
void paintFlowThreadPortionInRegion(PaintInfo&, RenderRegion*, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const LayoutPoint&) const;
bool hitTestFlowThreadPortionInRegion(RenderRegion*, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset) const;
return "RenderMultiColumnFlowThread";
}
+void RenderMultiColumnFlowThread::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
+{
+ // We simply remain at our intrinsic height.
+ computedValues.m_extent = logicalHeight;
+ computedValues.m_position = logicalTop;
+}
+
}
private:
virtual const char* renderName() const OVERRIDE;
- virtual void updateLogicalHeight() OVERRIDE { } // We simply remain at our intrinsic height.
+ virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
};
} // namespace WebCore