Closed Bug 1289763 Opened 8 years ago Closed 8 years ago

Move gImageMenuItemWidget/gCheckMenuItemWidget to WidgetCache

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- affected
firefox51 --- fixed

People

(Reporter: stransky, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1288413 +++

Let's move other widgets to WidgetCache and use them in other widget code.
Attached patch patchSplinter Review
There's a patch for it. I used a similar mechanism as for plain radio/checkboxes, the menuitem container has _CONTAINER widget ID now.

There are not NS_THEME_CHECKMENUITEM_CONTAINER/NS_THEME_RADIOMENUITEM_CONTAINER classes so the _CONTAINER widgets are used only internally and are not exported by nsNativeThemeGTK::GetGtkWidgetAndState().

We also need render frame/background on 3.20.
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fcb85a74898c
Attachment #8775533 - Flags: review?(andrew)
No longer blocks: 1290048
Comment on attachment 8775533 [details] [diff] [review]
patch

Review of attachment 8775533 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me! Just one question;

::: widget/gtk/WidgetStyleCache.cpp
@@ +533,5 @@
> +      break;
> +    case MOZ_GTK_CHECKMENUITEM:
> +      style = CreateChildCSSNode(GTK_STYLE_CLASS_CHECK,
> +                                 MOZ_GTK_CHECKMENUITEM_CONTAINER);
> +      break;

GTK docs say the "radio" and "check" subnodes should have either the ".left" or ".right" style class. Should we set these?
Attachment #8775533 - Flags: review?(andrew) → review+
(In reply to Andrew Comminos [:acomminos] from comment #2)
> Comment on attachment 8775533 [details] [diff] [review]
> patch
> 
> Review of attachment 8775533 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good to me! Just one question;
> 
> ::: widget/gtk/WidgetStyleCache.cpp
> @@ +533,5 @@
> > +      break;
> > +    case MOZ_GTK_CHECKMENUITEM:
> > +      style = CreateChildCSSNode(GTK_STYLE_CLASS_CHECK,
> > +                                 MOZ_GTK_CHECKMENUITEM_CONTAINER);
> > +      break;
> 
> GTK docs say the "radio" and "check" subnodes should have either the ".left"
> or ".right" style class. Should we set these?

That's derived from widget direction in gtk_check_menu_item_direction_changed() so we don't need to set it by extra class.
Note: This patch needs Bug 1289764 landed before this one.
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/42ddeb0cbb27
Move gImageMenuItemWidget/gCheckMenuItemWidget to WidgetCache, r=acomminos
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/42ddeb0cbb27
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: