2011-01-21 Martin Robinson <mrobinson@igalia.com>
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 21:33:07 +0000 (21:33 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 21:33:07 +0000 (21:33 +0000)
commiteb5b66547447aa90520b8faf008b7ff01ec105e7
tree2830bbc039fd467f380aa8377213c403d3b28b64
parentfc500b10577cf8f0eba27cd0c4513280aaa2d36f
2011-01-21  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] Menulist text often collides with separator
        https://bugs.webkit.org/show_bug.cgi?id=51155

        Rebaseline tests that have different affected by the metrics of
        the menulist.

        * platform/gtk/fast/forms/001-expected.checksum:
        * platform/gtk/fast/forms/001-expected.png:
        * platform/gtk/fast/forms/001-expected.txt:
        * platform/gtk/fast/forms/003-expected.checksum:
        * platform/gtk/fast/forms/003-expected.png:
        * platform/gtk/fast/forms/003-expected.txt:
        * platform/gtk/fast/forms/004-expected.checksum:
        * platform/gtk/fast/forms/004-expected.png:
        * platform/gtk/fast/forms/004-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label01-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label01-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label01-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label02-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label02-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label02-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label03-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label03-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label03-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label04-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label04-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label04-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label06-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label06-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label06-expected.txt:
        * platform/gtk/fast/forms/HTMLOptionElement_label07-expected.checksum:
        * platform/gtk/fast/forms/HTMLOptionElement_label07-expected.png:
        * platform/gtk/fast/forms/HTMLOptionElement_label07-expected.txt:
        * platform/gtk/fast/forms/control-clip-overflow-expected.checksum:
        * platform/gtk/fast/forms/control-clip-overflow-expected.png:
        * platform/gtk/fast/forms/control-clip-overflow-expected.txt:
        * platform/gtk/fast/forms/control-restrict-line-height-expected.checksum:
        * platform/gtk/fast/forms/control-restrict-line-height-expected.png:
        * platform/gtk/fast/forms/control-restrict-line-height-expected.txt:
        * platform/gtk/fast/forms/disabled-select-change-index-expected.checksum:
        * platform/gtk/fast/forms/disabled-select-change-index-expected.png:
        * platform/gtk/fast/forms/disabled-select-change-index-expected.txt:
        * platform/gtk/fast/forms/form-element-geometry-expected.checksum:
        * platform/gtk/fast/forms/form-element-geometry-expected.png:
        * platform/gtk/fast/forms/form-element-geometry-expected.txt:
        * platform/gtk/fast/forms/input-file-re-render-expected.checksum: Added.
        * platform/gtk/fast/forms/input-file-re-render-expected.png: Added.
        * platform/gtk/fast/forms/menulist-deselect-update-expected.checksum:
        * platform/gtk/fast/forms/menulist-deselect-update-expected.png:
        * platform/gtk/fast/forms/menulist-deselect-update-expected.txt:
        * platform/gtk/fast/forms/menulist-narrow-width-expected.checksum:
        * platform/gtk/fast/forms/menulist-narrow-width-expected.png:
        * platform/gtk/fast/forms/menulist-narrow-width-expected.txt:
        * platform/gtk/fast/forms/menulist-no-overflow-expected.checksum:
        * platform/gtk/fast/forms/menulist-no-overflow-expected.png:
        * platform/gtk/fast/forms/menulist-no-overflow-expected.txt:
        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum:
        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.png:
        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt:
        * platform/gtk/fast/forms/menulist-separator-painting-expected.checksum:
        * platform/gtk/fast/forms/menulist-separator-painting-expected.png:
        * platform/gtk/fast/forms/menulist-separator-painting-expected.txt:
        * platform/gtk/fast/forms/menulist-style-color-expected.checksum:
        * platform/gtk/fast/forms/menulist-style-color-expected.png:
        * platform/gtk/fast/forms/menulist-style-color-expected.txt:
        * platform/gtk/fast/forms/menulist-width-change-expected.checksum:
        * platform/gtk/fast/forms/menulist-width-change-expected.png:
        * platform/gtk/fast/forms/menulist-width-change-expected.txt:
        * platform/gtk/fast/forms/option-script-expected.checksum:
        * platform/gtk/fast/forms/option-script-expected.png:
        * platform/gtk/fast/forms/option-script-expected.txt:
        * platform/gtk/fast/forms/option-strip-whitespace-expected.checksum:
        * platform/gtk/fast/forms/option-strip-whitespace-expected.png:
        * platform/gtk/fast/forms/option-strip-whitespace-expected.txt:
        * platform/gtk/fast/forms/option-text-clip-expected.checksum:
        * platform/gtk/fast/forms/option-text-clip-expected.png:
        * platform/gtk/fast/forms/option-text-clip-expected.txt:
        * platform/gtk/fast/forms/select-align-expected.checksum:
        * platform/gtk/fast/forms/select-align-expected.png:
        * platform/gtk/fast/forms/select-align-expected.txt:
        * platform/gtk/fast/forms/select-baseline-expected.checksum:
        * platform/gtk/fast/forms/select-baseline-expected.png:
        * platform/gtk/fast/forms/select-baseline-expected.txt:
        * platform/gtk/fast/forms/select-change-listbox-to-popup-expected.checksum:
        * platform/gtk/fast/forms/select-change-listbox-to-popup-expected.png:
        * platform/gtk/fast/forms/select-change-listbox-to-popup-expected.txt:
        * platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.checksum:
        * platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.png:
        * platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.txt:
        * platform/gtk/fast/forms/select-disabled-appearance-expected.checksum:
        * platform/gtk/fast/forms/select-disabled-appearance-expected.png:
        * platform/gtk/fast/forms/select-disabled-appearance-expected.txt:
        * platform/gtk/fast/forms/select-initial-position-expected.checksum:
        * platform/gtk/fast/forms/select-initial-position-expected.png:
        * platform/gtk/fast/forms/select-initial-position-expected.txt:
        * platform/gtk/fast/forms/select-selected-expected.checksum:
        * platform/gtk/fast/forms/select-selected-expected.png:
        * platform/gtk/fast/forms/select-selected-expected.txt:
        * platform/gtk/fast/forms/select-size-expected.checksum:
        * platform/gtk/fast/forms/select-size-expected.png:
        * platform/gtk/fast/forms/select-size-expected.txt:
        * platform/gtk/fast/forms/select-style-expected.checksum:
        * platform/gtk/fast/forms/select-style-expected.png:
        * platform/gtk/fast/forms/select-style-expected.txt:
        * platform/gtk/fast/forms/select-visual-hebrew-expected.checksum:
        * platform/gtk/fast/forms/select-visual-hebrew-expected.png:
        * platform/gtk/fast/forms/select-visual-hebrew-expected.txt:
        * platform/gtk/fast/forms/select-writing-direction-natural-expected.checksum:
        * platform/gtk/fast/forms/select-writing-direction-natural-expected.png:
        * platform/gtk/fast/forms/select-writing-direction-natural-expected.txt:
        * platform/gtk/fast/forms/stuff-on-my-optgroup-expected.checksum:
        * platform/gtk/fast/forms/stuff-on-my-optgroup-expected.png:
        * platform/gtk/fast/forms/stuff-on-my-optgroup-expected.txt:
2011-01-21  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] Menulist text often collides with separator
        https://bugs.webkit.org/show_bug.cgi?id=51155

        Move menulist rendering to RenderThemeGtk and correct padding code
        for separators in menulists.

        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::RenderThemeGtk): Initialize new widget members.
        (WebCore::RenderThemeGtk::getComboBoxSeparatorWidth): Added.
        (WebCore::RenderThemeGtk::comboBoxArrowSize): Added.
        (WebCore::getButtonInnerBorder): Added.
        (WebCore::RenderThemeGtk::getComboBoxPadding): Do this manually instead of using
        Mozilla code.
        (WebCore::RenderThemeGtk::paintMenuList): Ditto.
        (WebCore::setupWidget): Abstracted this part of the setupWidgetAndAddToContainer
        out to handle child widgets of comboboxes.
        (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Abstracted out setupWidget.
        (WebCore::RenderThemeGtk::gtkContainer): Added.
        (WebCore::getGtkComboBoxButton): Added.
        (WebCore::getGtkComboBoxPieces): Added.
        (WebCore::RenderThemeGtk::gtkComboBox): Call setupWidget here.
        (WebCore::RenderThemeGtk::refreshComboBoxChildren): Added.
        (WebCore::RenderThemeGtk::gtkComboBoxButton): Added.
        (WebCore::RenderThemeGtk::gtkComboBoxArrow): Added.
        (WebCore::RenderThemeGtk::gtkComboBoxSeparator): Added.
        * platform/gtk/RenderThemeGtk.h: Added new members and methods.
        * platform/gtk/WidgetRenderingContext.h: Added new members and methods.
        * platform/gtk/WidgetRenderingContextGtk2.cpp:
        (WebCore::WidgetRenderingContext::gtkPaintArrow):
        (WebCore::WidgetRenderingContext::gtkPaintVLine):
        * platform/gtk/WidgetRenderingContextGtk3.cpp:
        (WebCore::WidgetRenderingContext::gtkPaintArrow):
        (WebCore::WidgetRenderingContext::gtkPaintVLine):
        * platform/gtk/gtk2drawing.c: Removed code for drawing menulists and buttons.
        (moz_gtk_init):
        (moz_gtk_get_widget_border):
        (moz_gtk_widget_paint):
        * platform/gtk/gtk3drawing.c:
        (moz_gtk_init):
        (moz_gtk_get_widget_border):
        (moz_gtk_widget_paint):
        * platform/gtk/gtkdrawing.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
116 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/fast/forms/001-expected.checksum
LayoutTests/platform/gtk/fast/forms/001-expected.png
LayoutTests/platform/gtk/fast/forms/001-expected.txt
LayoutTests/platform/gtk/fast/forms/003-expected.checksum
LayoutTests/platform/gtk/fast/forms/003-expected.png
LayoutTests/platform/gtk/fast/forms/003-expected.txt
LayoutTests/platform/gtk/fast/forms/004-expected.checksum
LayoutTests/platform/gtk/fast/forms/004-expected.png
LayoutTests/platform/gtk/fast/forms/004-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label01-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label01-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label01-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label02-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label02-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label02-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label03-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label03-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label03-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label04-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label04-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label04-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label06-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label06-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label06-expected.txt
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label07-expected.checksum
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label07-expected.png
LayoutTests/platform/gtk/fast/forms/HTMLOptionElement_label07-expected.txt
LayoutTests/platform/gtk/fast/forms/control-clip-overflow-expected.checksum
LayoutTests/platform/gtk/fast/forms/control-clip-overflow-expected.png
LayoutTests/platform/gtk/fast/forms/control-clip-overflow-expected.txt
LayoutTests/platform/gtk/fast/forms/control-restrict-line-height-expected.checksum
LayoutTests/platform/gtk/fast/forms/control-restrict-line-height-expected.png
LayoutTests/platform/gtk/fast/forms/control-restrict-line-height-expected.txt
LayoutTests/platform/gtk/fast/forms/disabled-select-change-index-expected.checksum
LayoutTests/platform/gtk/fast/forms/disabled-select-change-index-expected.png
LayoutTests/platform/gtk/fast/forms/disabled-select-change-index-expected.txt
LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.checksum
LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.png
LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.txt
LayoutTests/platform/gtk/fast/forms/input-file-re-render-expected.checksum [new file with mode: 0644]
LayoutTests/platform/gtk/fast/forms/input-file-re-render-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.txt
LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.checksum
LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.png
LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.txt
LayoutTests/platform/gtk/fast/forms/option-script-expected.checksum
LayoutTests/platform/gtk/fast/forms/option-script-expected.png
LayoutTests/platform/gtk/fast/forms/option-script-expected.txt
LayoutTests/platform/gtk/fast/forms/option-strip-whitespace-expected.checksum
LayoutTests/platform/gtk/fast/forms/option-strip-whitespace-expected.png
LayoutTests/platform/gtk/fast/forms/option-strip-whitespace-expected.txt
LayoutTests/platform/gtk/fast/forms/option-text-clip-expected.checksum
LayoutTests/platform/gtk/fast/forms/option-text-clip-expected.png
LayoutTests/platform/gtk/fast/forms/option-text-clip-expected.txt
LayoutTests/platform/gtk/fast/forms/select-align-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-align-expected.png
LayoutTests/platform/gtk/fast/forms/select-align-expected.txt
LayoutTests/platform/gtk/fast/forms/select-baseline-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-baseline-expected.png
LayoutTests/platform/gtk/fast/forms/select-baseline-expected.txt
LayoutTests/platform/gtk/fast/forms/select-change-listbox-to-popup-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-change-listbox-to-popup-expected.png
LayoutTests/platform/gtk/fast/forms/select-change-listbox-to-popup-expected.txt
LayoutTests/platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.png
LayoutTests/platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.txt
LayoutTests/platform/gtk/fast/forms/select-disabled-appearance-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-disabled-appearance-expected.png
LayoutTests/platform/gtk/fast/forms/select-disabled-appearance-expected.txt
LayoutTests/platform/gtk/fast/forms/select-initial-position-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-initial-position-expected.png
LayoutTests/platform/gtk/fast/forms/select-initial-position-expected.txt
LayoutTests/platform/gtk/fast/forms/select-selected-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-selected-expected.png
LayoutTests/platform/gtk/fast/forms/select-selected-expected.txt
LayoutTests/platform/gtk/fast/forms/select-size-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-size-expected.png
LayoutTests/platform/gtk/fast/forms/select-size-expected.txt
LayoutTests/platform/gtk/fast/forms/select-style-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-style-expected.png
LayoutTests/platform/gtk/fast/forms/select-style-expected.txt
LayoutTests/platform/gtk/fast/forms/select-visual-hebrew-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-visual-hebrew-expected.png
LayoutTests/platform/gtk/fast/forms/select-visual-hebrew-expected.txt
LayoutTests/platform/gtk/fast/forms/select-writing-direction-natural-expected.checksum
LayoutTests/platform/gtk/fast/forms/select-writing-direction-natural-expected.png
LayoutTests/platform/gtk/fast/forms/select-writing-direction-natural-expected.txt
LayoutTests/platform/gtk/fast/forms/stuff-on-my-optgroup-expected.checksum
LayoutTests/platform/gtk/fast/forms/stuff-on-my-optgroup-expected.png
LayoutTests/platform/gtk/fast/forms/stuff-on-my-optgroup-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.h
Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
Source/WebCore/platform/gtk/WidgetRenderingContext.cpp
Source/WebCore/platform/gtk/WidgetRenderingContext.h
Source/WebCore/platform/gtk/gtk2drawing.c
Source/WebCore/platform/gtk/gtkdrawing.h