Implement border/padding helpers

RESOLVED FIXED in Firefox 58

Status

()

enhancement
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: stransky, Assigned: stransky)

Tracking

(Blocks 1 bug)

Trunk
mozilla58
Points:
---

Firefox Tracking Flags

(firefox57 wontfix, firefox58 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
Add MOZ_GTK_HEADER_BAR* widgets tp moz_gtk_get_widget_border()
(Assignee)

Updated

2 years ago
Summary: Implement moz_gtk_get_widget_border() for MOZ_GTK_HEADER_BAR* widgets → Use border helpers for MOZ_GTK_HEADER_BAR* widgets at moz_gtk_get_widget_border()
(Assignee)

Comment 1

2 years ago
We actually have the border/padding getters here so let's commit the helpers at least.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 4

2 years ago
mozreview-review
Comment on attachment 8921040 [details]
Bug 1410885 - Implement border/padding helpers,

https://reviewboard.mozilla.org/r/192000/#review197212

r+ with that fixed.

::: widget/gtk/gtk3drawing.cpp:57
(Diff revision 1)
> +static void moz_gtk_add_margin_border_padding(GtkStyleContext *style,
> +                                              gint* left, gint* top,
> +                                              gint* right, gint* bottom);
> +static void moz_gtk_add_border_padding(GtkStyleContext *style,
> +                                       gint* left, gint* top,
> +                                       gint* right, gint* bottom);

Instead of using declaration please move the implementation here.

::: widget/gtk/gtk3drawing.cpp:2208
(Diff revision 1)
>  
>              *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w));
> -            moz_gtk_add_style_border(style,
> +            moz_gtk_add_border_padding(style,
> -                                     left, top, right, bottom);
> -            moz_gtk_add_style_padding(style,
> -                                      left, top, right, bottom);
> +                                       left, top, right, bottom);

nit: when touching this, this can stay on the same line with moz_gtk_add_border_padding. It's still in the 80 chars per line.

Comment 5

2 years ago
mozreview-review
Comment on attachment 8921041 [details]
Bug 1410885 - Use helpers for MOZ_GTK_HEADER_BAR* widgets,

https://reviewboard.mozilla.org/r/192002/#review197230
Attachment #8921041 - Flags: review?(jhorak) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed
(Assignee)

Updated

2 years ago
Keywords: checkin-needed
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8921041 - Attachment is obsolete: true
(Assignee)

Updated

2 years ago
Summary: Use border helpers for MOZ_GTK_HEADER_BAR* widgets at moz_gtk_get_widget_border() → Implement border/padding helpers

Comment 7

2 years ago
mozreview-review
Comment on attachment 8921040 [details]
Bug 1410885 - Implement border/padding helpers,

https://reviewboard.mozilla.org/r/192000/#review198138

Thank you!
Attachment #8921040 - Flags: review?(jhorak) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 8

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/89dfd44fcfd4
Implement border/padding helpers, r=jhorak
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/89dfd44fcfd4
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.