Bug 47836 - [GTK] Move input type=range rendering to RenderThemeGtk
Summary: [GTK] Move input type=range rendering to RenderThemeGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Martin Robinson
URL:
Keywords: Gtk
Depends on: 40139
Blocks: 48486
  Show dependency treegraph
 
Reported: 2010-10-18 10:46 PDT by Martin Robinson
Modified: 2010-12-15 11:19 PST (History)
4 users (show)

See Also:


Attachments
Patch for this issue (31.86 KB, patch)
2010-10-18 11:00 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch fixing several issues and updated to ToT (32.81 KB, patch)
2010-10-27 17:00 PDT, Martin Robinson
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2010-10-18 10:46:11 PDT
This will be the first in a series of patches which move support for rendering widgets out of gtk2drawing.c and into RenderThemeGtk.
Comment 1 Martin Robinson 2010-10-18 11:00:18 PDT
Created attachment 71059 [details]
Patch for this issue
Comment 2 Martin Robinson 2010-10-27 17:00:12 PDT
Created attachment 72116 [details]
Patch fixing several issues and updated to ToT
Comment 3 Gustavo Noronha (kov) 2010-12-06 05:17:31 PST
Comment on attachment 72116 [details]
Patch fixing several issues and updated to ToT

View in context: https://bugs.webkit.org/attachment.cgi?id=72116&action=review

> WebCore/platform/gtk/RenderThemeGtk.cpp:548
> +        shrink.setWidth(gtk_widget_get_style(widget)->ythickness);

Looks like we want xthickness here.

> WebCore/platform/gtk/RenderThemeGtk.cpp:618
> +        GtkWidget* widget = part == SliderThumbHorizontalPart ? gtkHScale() : gtkVScale();
> +        int length = 0, width = 0;
> +        gtk_widget_style_get(widget,
> +                             "slider_length", &length,
> +                             "slider_width", &width,
> +                             NULL);
> +        o->style()->setWidth(Length(length, Fixed));
> +        o->style()->setHeight(Length(width, Fixed));

This is very unintuitive. Is really height? Is it always height, or just when it's an horizontal slider? Looking at GTK+'s code, it looks like width is height when horizontal and width for real when vertical, and WebCore's style seems to be saner, and always treat width as width, so I think this is wrong.

r=me with those two fixed =)
Comment 4 Eric Seidel (no email) 2010-12-14 15:14:36 PST
Attachment 72116 [details] was posted by a committer and has review+, assigning to Martin Robinson for commit.
Comment 5 Martin Robinson 2010-12-15 11:19:20 PST
Committed r74129: <http://trac.webkit.org/changeset/74129>