-
mrobinson@webkit.org authored
Reviewed by Gustavo Noronha Silva. [GTK] Move toggle button rendering out of gtk2drawing.c https://bugs.webkit.org/show_bug.cgi?id=52258 Updated results. The metrics of checkboxes and radio buttons have changed, because the focus rect is no longer considered to be part of the button. * platform/gtk/fast/css/non-standard-checkbox-size-expected.txt * platform/gtk/fast/forms/001-expected.txt: * platform/gtk/fast/forms/basic-inputs-expected.txt: * platform/gtk/fast/forms/box-shadow-override-expected.txt: * platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt: * platform/gtk/fast/forms/file-input-disabled-expected.txt: * platform/gtk/fast/forms/form-element-geometry-expected.txt: * platform/gtk/fast/forms/formmove-expected.txt: * platform/gtk/fast/forms/formmove2-expected.txt: * platform/gtk/fast/forms/indeterminate-expected.txt: * platform/gtk/fast/forms/input-appearance-height-expected.txt: * platform/gtk/fast/forms/input-value-expected.txt: * platform/gtk/fast/forms/radio-attr-order-expected.txt: * platform/gtk/fast/forms/radio-nested-labels-expected.txt: * platform/gtk/fast/forms/radio_checked-expected.txt: * platform/gtk/fast/forms/radio_checked_dynamic-expected.txt: 2011-01-11 Martin Robinson <mrobinson@igalia.com> Reviewed by Gustavo Noronha Silva. [GTK] Move toggle button rendering out of gtk2drawing.c https://bugs.webkit.org/show_bug.cgi?id=52258 * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::platformInit): Initialize new button members. (WebCore::adjustRectForFocus): Added this function which inflates a rect based on a widget's exterior focus. (WebCore::RenderThemeGtk::adjustRepaintRect): Account for exterior focus. (WebCore::setToggleSize): Only listen to indicator-size to properly size checkboxes and radio buttons. (WebCore::RenderThemeGtk::setCheckboxSize): Call new setToggleSize properly. (WebCore::paintToggle): Added. (WebCore::RenderThemeGtk::paintCheckbox): Call paintToggle. (WebCore::RenderThemeGtk::setRadioSize): Call new setToggleSize properly. (WebCore::RenderThemeGtk::paintRadio): Call paintToggle. (WebCore::RenderThemeGtk::gtkRadioButton): Added. (WebCore::RenderThemeGtk::gtkCheckButton): Added. * platform/gtk/WidgetRenderingContext.cpp: (WebCore::WidgetRenderingContext::WidgetRenderingContext): Use a static extra space variable. This is good enough for all themes that I've tested and prevents having to pass information from RenderThemeGtk about every single type of widget. (WebCore::WidgetRenderingContext::gtkPaintFocus): Use the paintRect to draw instead of m_paintRect. This is important when we're painting something that isn't the size of the total rect. (WebCore::WidgetRenderingContext::gtkPaintCheck): Added. (WebCore::WidgetRenderingContext::gtkPaintOption): Added. * platform/gtk/WidgetRenderingContext.h: Updated to reflect new methods. * platform/gtk/gtkdrawing.h: Remove newly unused code. * platform/gtk/gtk2drawing.c: Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bf39f739