Empty <button>s should collapse; empty <input type="button"> should not collapse
https://bugs.webkit.org/show_bug.cgi?id=110654

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-02-26
Reviewed by Ojan Vafai.

Source/WebCore:

This patch also fixes other height computation issues with flex boxes
related to scroll bars and hasLineIfEmpty()=true. See below for
details.

Tests: css3/flexbox/button.html
       css3/flexbox/position-absolute-child-with-contenteditable.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock): Add a FIXME to make
border/padding/scrollbar inclusion more consistent with other
renderers.
* rendering/RenderButton.h:
(WebCore::RenderButton::hasLineIfEmpty): We only want a line for
<input type=button|submit|reset>, for consistency with Firefox.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Start out layoutBlock by
setting the logical height to border + padding + scrollbar height to
ensure that we have space for the scrollbar even without children. The
layoutFlexItems change below is not enough because we also need this
when hasLineIfEmpty() is false.
(WebCore::RenderFlexibleBox::layoutFlexItems): Ensure we have a line
when hasLineIfEmpty() is true by calling setLogicalHeight(border+
padding+scrollbar+lineHeight()) if we don't have a flex line.

LayoutTests:

* css3/flexbox/button-expected.png: Added.
* css3/flexbox/button-expected.txt: Added.
* css3/flexbox/button.html: Added.
Test empty buttons, <input type=button>, and buttons with
overflow:scroll;

* css3/flexbox/position-absolute-child-with-contenteditable-expected.html: Added.
* css3/flexbox/position-absolute-child-with-contenteditable.html: Added.
Test flex boxes with hasLineIfEmpty()=true and absolute positioned
children. Uses contenteditable=true to get that effect.

* platform/chromium-linux/css2.1/20110323/replaced-elements-001-expected.png:
* platform/chromium-linux/css2.1/20110323/replaced-elements-001-expected.txt:
* platform/chromium-linux/svg/custom/foreign-object-skew-expected.png:
* platform/chromium-linux/svg/custom/foreign-object-skew-expected.txt:
* platform/chromium-linux/tables/mozilla/bugs/bug92647-2-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug92647-2-expected.txt:
Regenerate test cases that use <input type=button>.

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
Mark tests for rebaselining.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144096 268f45cc-cd09-0410-ab3c-d52691b4dbfc