REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jul 2017 09:38:52 +0000 (09:38 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jul 2017 09:38:52 +0000 (09:38 +0000)
commit8438cb2615c0dc30c1fbf50eb35aa78ba598d88a
treea18ca7b388c9d4e601f2d7bcdd8f8d4c0185a7c5
parent8f40eecc3d96f21037f29a854f786933fcf9143f
REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests
https://bugs.webkit.org/show_bug.cgi?id=174395

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Covered by existing tests.

Before r219332 the height of the spin button widget was
calculated as the maximum value between the individual button
( the [+] or [-] ) width (33 pixels) and height (16 pixels).
And r219332 caused the height of the widget to be calculated as
the height of the button (16 pixels), which was incorrect as
each button should be first expanded vertically to fit the
preferred size of the widget.

Fix this by making the calculations about the spin button widget
on a new function spinButtonSize() that takes this into account,
and use this values both for adjusting the style of the input
field and the spin button widget itself.

* rendering/RenderThemeGtk.cpp:
(WebCore::spinButtonSize):
(WebCore::RenderThemeGtk::adjustTextFieldStyle):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):

LayoutTests:

* fast/forms/number/number-spinbutton-in-multi-column.html: Instead of assuming that the width will be 100, calculate a -7 offset dinamically.
* platform/gtk/TestExpectations: Remove expected failures now orking.
* platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.png: Rebaseline.
* platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.txt: Rebaseline.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/number/number-spinbutton-in-multi-column.html
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.png
LayoutTests/platform/gtk/fast/forms/number/number-size-spinbutton-nocover-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeGtk.cpp