WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 51812
[GTK] Port buttons painting to GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=51812
Summary
[GTK] Port buttons painting to GtkStyleContext
Carlos Garcia Campos
Reported
2011-01-03 02:55:24 PST
This depends on
bug #51764
since the patch for stock icons contains the initial GtkStyleContext port
Attachments
Paint buttons with GtkStyleContext API
(6.45 KB, patch)
2011-01-03 03:00 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Update patch to current git master and fix some minor issues
(6.50 KB, patch)
2011-01-05 04:43 PST
,
Carlos Garcia Campos
mrobinson
: review-
Details
Formatted Diff
Diff
Updated patch using adjustRepaintRect()
(8.17 KB, patch)
2011-01-07 06:30 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2011-01-03 03:00:23 PST
Created
attachment 77800
[details]
Paint buttons with GtkStyleContext API
Carlos Garcia Campos
Comment 2
2011-01-05 04:43:20 PST
Created
attachment 77988
[details]
Update patch to current git master and fix some minor issues
Martin Robinson
Comment 3
2011-01-05 12:29:02 PST
Comment on
attachment 77988
[details]
Update patch to current git master and fix some minor issues I think we should use adjustRepaintRect to paint exterior focus outside of the actual button rect. This will prevent a large exterior focus from shrinking the button rect.
Carlos Garcia Campos
Comment 4
2011-01-07 06:30:38 PST
Created
attachment 78227
[details]
Updated patch using adjustRepaintRect()
Martin Robinson
Comment 5
2011-01-07 09:45:21 PST
Comment on
attachment 78227
[details]
Updated patch using adjustRepaintRect() View in context:
https://bugs.webkit.org/attachment.cgi?id=78227&action=review
Looks great! Please make the following minor adjustments before landing.
> WebCore/platform/gtk/RenderThemeGtk3.cpp:115 > + GtkStyleContext* context;
Please initialize this to zero.
> WebCore/platform/gtk/RenderThemeGtk3.cpp:135 > + adjustRectForFocus(context, rect);
Please ASSERT(context); here just for correctness sake.
> WebCore/platform/gtk/RenderThemeGtk3.cpp:226 > + gboolean interiorFocus; > + gtk_style_context_get_style(context, "interior-focus", &interiorFocus, NULL);
This is only used inside the if (isFocused(...)) block, so it makes sense to move it there.
> WebCore/platform/gtk/RenderThemeGtk3.cpp:274 > + buttonRect.move(borderWidth.left + focusPad, borderWidth.top + focusPad); > + buttonRect.setWidth(buttonRect.width() - (2 * focusPad + borderWidth.left + borderWidth.right)); > + buttonRect.setHeight(buttonRect.height() - (2 * focusPad + borderWidth.top + borderWidth.bottom));
Instead of setting this piecewise, I think it makes more sense to set it all at once: buttonRect = IntRect(borderWidth.left + focusPad, borderWidth.top + focusPad. buttonRect.width() - (2 * focusPad + borderWidth.left + borderWidth.right), buttonRect.height() - (2 * focusPad + borderWidth.top + borderWidth.bottom));
Carlos Garcia Campos
Comment 6
2011-01-07 10:58:58 PST
Committed
r75255
: <
http://trac.webkit.org/changeset/75255
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug