Make computeBlockDirectionMargins const
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Sep 2012 01:00:10 +0000 (01:00 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Sep 2012 01:00:10 +0000 (01:00 +0000)
commit7bd0828ad11ccd726edc7d59ea6cbcba22586456
tree35a7f425b5a87c6acb53beb750661515beff885d
parentd521fdaa8a38f4cfbd81fa68cf35110a184ceaac
Make computeBlockDirectionMargins const
https://bugs.webkit.org/show_bug.cgi?id=95595

Reviewed by Ojan Vafai.

This is a step in making computeLogicalHeight const.
Refactor RenderBox::computeBlockDirectionMargins and make it const.
Add a helper method computeAndSetBlockDirectionMargins for the callers outside of
computeLogicalHeight that are calling this.

No new tests, this is already covered by tests in fast/writing-mode and fast/multicol.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginBeforeEstimateForChild): Switch to computeAndSetBlockDirectionMargins
(WebCore::RenderBlock::layoutBlockChild): Switch to computeAndSetBlockDirectionMargins
(WebCore::RenderBlock::insertFloatingObject): Switch to computeAndSetBlockDirectionMargins
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight): Use const version and fill in a MarginValues struct (to be merged in the next patch).
(WebCore::RenderBox::computeBlockDirectionMargins): Pass in out params.
(WebCore):
(WebCore::RenderBox::computeAndSetBlockDirectionMargins): Does the same as the old computeBlockDirectionMargins.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): Switch to computeAndSetBlockDirectionMargins
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Switch to computeAndSetBlockDirectionMargins
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout): Switch to computeAndSetBlockDirectionMargins

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderTableRow.cpp