Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Sep 2012 19:49:34 +0000 (19:49 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Sep 2012 19:49:34 +0000 (19:49 +0000)
commitf5e40fb5999184b11d8e874a750e434e8a8e2ec3
tree1eb6c83d43b91cabe42fffaa15730d65f13aa9f2
parent6eba3e8e98ac289c93f7d81a750502e34b58ea26
Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent
https://bugs.webkit.org/show_bug.cgi?id=96676

Reviewed by Eric Seidel.

There was computeAvailableFreeSpace() and lineBreakLength() shared some very similar code.
Merge this code into mainAxisContentExtent().

No new tests, this is just a refactor.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent): Take contentLogicalHeight as a parameter,
which is needed when determining the logical height.
(WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Use mainAxisContentExtent() and inline.
(WebCore::RenderFlexibleBox::computeNextFlexLine): Use mainAxisContentExtent().
* rendering/RenderFlexibleBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h