Title: [131351] trunk/Source/WebCore
- Revision
- 131351
- Author
- t...@chromium.org
- Date
- 2012-10-15 13:54:50 -0700 (Mon, 15 Oct 2012)
Log Message
Add computeLogicalHeight override methods to RenderView and RenderMultiColumnSet
https://bugs.webkit.org/show_bug.cgi?id=99348
Reviewed by Ojan Vafai.
Add computeLogicalHeight to the last 2 RenderBoxes that override the method.
I'm unable to remove RenderMultiColumnSet::updateLogicalHeight and make the method
non-virtual since it sets ComputedColumnHeight. I'd like to remove this
eventually.
No new tests, this is just a code refactor.
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::updateLogicalHeight): Set computedColumnHeight.
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
(WebCore):
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
* rendering/RenderView.cpp:
(WebCore::RenderView::computeLogicalHeight):
* rendering/RenderView.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131350 => 131351)
--- trunk/Source/WebCore/ChangeLog 2012-10-15 20:51:36 UTC (rev 131350)
+++ trunk/Source/WebCore/ChangeLog 2012-10-15 20:54:50 UTC (rev 131351)
@@ -1,3 +1,27 @@
+2012-10-15 Tony Chang <t...@chromium.org>
+
+ Add computeLogicalHeight override methods to RenderView and RenderMultiColumnSet
+ https://bugs.webkit.org/show_bug.cgi?id=99348
+
+ Reviewed by Ojan Vafai.
+
+ Add computeLogicalHeight to the last 2 RenderBoxes that override the method.
+ I'm unable to remove RenderMultiColumnSet::updateLogicalHeight and make the method
+ non-virtual since it sets ComputedColumnHeight. I'd like to remove this
+ eventually.
+
+ No new tests, this is just a code refactor.
+
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::updateLogicalHeight): Set computedColumnHeight.
+ (WebCore::RenderMultiColumnSet::computeLogicalHeight):
+ (WebCore):
+ * rendering/RenderMultiColumnSet.h:
+ (RenderMultiColumnSet):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::computeLogicalHeight):
+ * rendering/RenderView.h:
+
2012-10-15 Eunmi Lee <eunmi15....@samsung.com>
[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (131350 => 131351)
--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2012-10-15 20:51:36 UTC (rev 131350)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2012-10-15 20:54:50 UTC (rev 131351)
@@ -66,14 +66,23 @@
void RenderMultiColumnSet::updateLogicalHeight()
{
+ // FIXME: This is the only class that overrides updateLogicalHeight. If we didn't have to set computedColumnHeight,
+ // we could remove this and make updateLogicalHeight non-virtual. https://bugs.webkit.org/show_bug.cgi?id=96804
// Make sure our column height is up to date.
- RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
- setComputedColumnHeight(parentBlock->columnHeight()); // FIXME: Once we make more than one column set, this will become variable.
+ LogicalExtentComputedValues computedValues;
+ computeLogicalHeight(0, 0, computedValues);
+ setComputedColumnHeight(computedValues.m_extent); // FIXME: Once we make more than one column set, this will become variable.
// Our logical height is always just the height of our columns.
setLogicalHeight(computedColumnHeight());
}
+void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit, LogicalExtentComputedValues& computedValues) const
+{
+ RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
+ computedValues.m_extent = parentBlock->columnHeight();
+}
+
LayoutUnit RenderMultiColumnSet::columnGap() const
{
if (style()->hasNormalColumnGap())
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.h (131350 => 131351)
--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.h 2012-10-15 20:51:36 UTC (rev 131350)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.h 2012-10-15 20:54:50 UTC (rev 131351)
@@ -64,6 +64,7 @@
private:
virtual void updateLogicalWidth() OVERRIDE;
virtual void updateLogicalHeight() OVERRIDE;
+ virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
virtual void paintReplaced(PaintInfo&, const LayoutPoint& paintOffset) OVERRIDE;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (131350 => 131351)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2012-10-15 20:51:36 UTC (rev 131350)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2012-10-15 20:54:50 UTC (rev 131351)
@@ -101,10 +101,9 @@
return inside;
}
-void RenderView::updateLogicalHeight()
+void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
{
- if (!shouldUsePrintingLayout() && m_frameView)
- setLogicalHeight(viewLogicalHeight());
+ computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? LayoutUnit(viewLogicalHeight()) : logicalHeight;
}
void RenderView::updateLogicalWidth()
Modified: trunk/Source/WebCore/rendering/RenderView.h (131350 => 131351)
--- trunk/Source/WebCore/rendering/RenderView.h 2012-10-15 20:51:36 UTC (rev 131350)
+++ trunk/Source/WebCore/rendering/RenderView.h 2012-10-15 20:54:50 UTC (rev 131351)
@@ -60,7 +60,7 @@
virtual void layout() OVERRIDE;
virtual void updateLogicalWidth() OVERRIDE;
- virtual void updateLogicalHeight() OVERRIDE;
+ virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
// FIXME: This override is not needed and should be removed
// it only exists to make computePreferredLogicalWidths public.
virtual void computePreferredLogicalWidths() OVERRIDE;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes