Commit c3853eca authored by tony@chromium.org's avatar tony@chromium.org
Browse files

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cd57a712
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()
......@@ -222,19 +222,18 @@ void RenderFlowThread::updateLogicalWidth()
}
}
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
......
......@@ -74,7 +74,7 @@ public:
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;
......
......@@ -42,4 +42,11 @@ const char* RenderMultiColumnFlowThread::renderName() 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;
}
}
......@@ -39,7 +39,7 @@ public:
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment