~jbicha/firefox/update-dependencies

« back to all changes in this revision

Viewing changes to debian/patches/unity-menubar.patch

  • Committer: Chris Coulson
  • Date: 2017-09-18 21:13:57 UTC
  • Revision ID: chris.coulson@canonical.com-20170918211357-ez19vr8bw3kt5wfo
Update unity-menubar.patch for Stylo, nsAdoptedCString removal, and
imgRequestProxy, nsITimer and mozilla::Runnable changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# HG changeset patch
2
 
# User Chris Coulson <chrisccoulson@ubuntu.com>
3
 
# Date 1493156926 -3600
4
 
#      Tue Apr 25 22:48:46 2017 +0100
5
 
# Node ID 1118c162780db83e59e47be621c5360099df1d46
6
 
# Parent  3f0c8da53c5cb015933b10b52ded3f30432b378a
7
 
Add Unity menubar support
8
 
 
 
1
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
9
2
--- a/browser/base/content/browser-menubar.inc
10
3
+++ b/browser/base/content/browser-menubar.inc
11
4
@@ -5,7 +5,11 @@
20
13
                                   this.setAttribute('openedwithkey',
21
14
                                                     event.target.parentNode.openedWithKey);"
22
15
                 style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
 
16
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
23
17
--- a/browser/base/content/browser.js
24
18
+++ b/browser/base/content/browser.js
25
 
@@ -5249,6 +5249,8 @@
 
19
@@ -5389,6 +5389,8 @@ function getTogglableToolbars() {
26
20
   let toolbarNodes = Array.slice(gNavToolbox.childNodes);
27
21
   toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
28
22
   toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname"));
31
25
   return toolbarNodes;
32
26
 }
33
27
 
 
28
diff --git a/browser/components/places/content/places.xul b/browser/components/places/content/places.xul
34
29
--- a/browser/components/places/content/places.xul
35
30
+++ b/browser/components/places/content/places.xul
36
31
@@ -155,7 +155,7 @@
42
37
         <menu accesskey="&organize.accesskey;" class="menu-iconic"
43
38
 #endif
44
39
               id="organizeButton" label="&organize.label;"
 
40
diff --git a/layout/build/moz.build b/layout/build/moz.build
45
41
--- a/layout/build/moz.build
46
42
+++ b/layout/build/moz.build
47
 
@@ -74,6 +74,10 @@
 
43
@@ -74,6 +74,10 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'an
48
44
         '/dom/system',
49
45
         '/dom/system/android',
50
46
     ]
55
51
 
56
52
 if CONFIG['MOZ_WEBSPEECH']:
57
53
     LOCAL_INCLUDES += [
 
54
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
58
55
--- a/layout/build/nsLayoutStatics.cpp
59
56
+++ b/layout/build/nsLayoutStatics.cpp
60
 
@@ -129,6 +129,10 @@
 
57
@@ -125,6 +125,10 @@
61
58
 #include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
62
59
 #include "mozilla/dom/U2FTokenManager.h"
63
60
 
68
65
 using namespace mozilla;
69
66
 using namespace mozilla::net;
70
67
 using namespace mozilla::dom;
71
 
@@ -161,6 +165,9 @@
 
68
@@ -157,6 +161,9 @@ nsLayoutStatics::Initialize()
72
69
   nsTextServicesDocument::RegisterAtoms();
73
70
   nsHTMLTags::RegisterAtoms();
74
71
   nsRDFAtoms::RegisterAtoms();
78
75
 
79
76
   NS_SealStaticAtomTable();
80
77
 
 
78
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
81
79
--- a/modules/libpref/init/all.js
82
80
+++ b/modules/libpref/init/all.js
83
 
@@ -237,6 +237,9 @@
 
81
@@ -230,6 +230,9 @@ pref("dom.script_loader.bytecode_cache.s
84
82
 pref("browser.sessionhistory.max_total_viewers", -1);
85
83
 
86
84
 pref("ui.use_native_colors", true);
90
88
 pref("ui.click_hold_context_menus", false);
91
89
 // Duration of timeout of incremental search in menus (ms).  0 means infinite.
92
90
 pref("ui.menu.incremental_search.timeout", 1000);
 
91
diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.xml
93
92
--- a/toolkit/content/widgets/popup.xml
94
93
+++ b/toolkit/content/widgets/popup.xml
95
94
@@ -27,8 +27,14 @@
109
108
 
110
109
       <property name="triggerNode" readonly="true"
111
110
                 onget="return this.popupBoxObject.triggerNode"/>
 
111
diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
112
112
--- a/toolkit/content/xul.css
113
113
+++ b/toolkit/content/xul.css
114
 
@@ -321,6 +321,18 @@
 
114
@@ -319,6 +319,18 @@ toolbar[type="menubar"][autohide="true"]
115
115
 }
116
116
 %endif
117
117
 
130
130
 toolbarseparator {
131
131
   -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
132
132
 }
 
133
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
133
134
--- a/widget/gtk/moz.build
134
135
+++ b/widget/gtk/moz.build
135
 
@@ -33,10 +33,18 @@
 
136
@@ -33,10 +33,18 @@ UNIFIED_SOURCES += [
136
137
     'nsAppShell.cpp',
137
138
     'nsBidiKeyboard.cpp',
138
139
     'nsColorPicker.cpp',
151
152
     'nsNativeThemeGTK.cpp',
152
153
     'nsSound.cpp',
153
154
     'nsToolkit.cpp',
154
 
@@ -48,6 +56,8 @@
 
155
@@ -48,6 +56,8 @@ UNIFIED_SOURCES += [
155
156
 ]
156
157
 
157
158
 SOURCES += [
160
161
     'nsWindow.cpp', # conflicts with X11 headers
161
162
 ]
162
163
 
163
 
@@ -112,6 +122,7 @@
 
164
@@ -112,6 +122,7 @@ FINAL_LIBRARY = 'xul'
164
165
 
165
166
 LOCAL_INCLUDES += [
166
167
     '/layout/generic',
168
169
     '/layout/xul',
169
170
     '/other-licenses/atk-1.0',
170
171
     '/widget',
 
172
diff --git a/widget/gtk/nsDbusmenu.cpp b/widget/gtk/nsDbusmenu.cpp
 
173
new file mode 100644
171
174
--- /dev/null
172
175
+++ b/widget/gtk/nsDbusmenu.cpp
173
176
@@ -0,0 +1,63 @@
234
237
+
235
238
+    return NS_OK;
236
239
+}
 
240
diff --git a/widget/gtk/nsDbusmenu.h b/widget/gtk/nsDbusmenu.h
 
241
new file mode 100644
237
242
--- /dev/null
238
243
+++ b/widget/gtk/nsDbusmenu.h
239
244
@@ -0,0 +1,101 @@
338
343
+#define dbusmenu_menuitem_property_set_shortcut nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_shortcut
339
344
+
340
345
+#endif /* __nsDbusmenu_h__ */
 
346
diff --git a/widget/gtk/nsMenu.cpp b/widget/gtk/nsMenu.cpp
 
347
new file mode 100644
341
348
--- /dev/null
342
349
+++ b/widget/gtk/nsMenu.cpp
343
 
@@ -0,0 +1,842 @@
 
350
@@ -0,0 +1,856 @@
344
351
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
345
352
+/* vim:expandtab:shiftwidth=4:tabstop=4:
346
353
+ */
352
359
+
353
360
+#include "mozilla/dom/Element.h"
354
361
+#include "mozilla/Assertions.h"
 
362
+#include "mozilla/EventDispatcher.h"
 
363
+#include "mozilla/GeckoStyleContext.h"
355
364
+#include "mozilla/GuardObjects.h"
356
365
+#include "mozilla/MouseEvents.h"
357
366
+#include "mozilla/Move.h"
 
367
+#include "mozilla/ServoStyleContext.h"
 
368
+#include "mozilla/ServoStyleSet.h"
 
369
+#include "mozilla/ServoTypes.h"
358
370
+#include "mozilla/StyleSetHandleInlines.h"
359
371
+#include "nsAutoPtr.h"
360
372
+#include "nsBindingManager.h"
393
405
+                               nsIContent *aContainer,
394
406
+                               nsIContent *aChild,
395
407
+                               nsIContent *aPrevSibling) :
 
408
+        Runnable("nsMenuContentInsertedEvent"),
396
409
+        mWeakMenu(aMenu),
397
410
+        mContainer(aContainer),
398
411
+        mChild(aChild),
424
437
+    nsMenuContentRemovedEvent(nsMenu *aMenu,
425
438
+                              nsIContent *aContainer,
426
439
+                              nsIContent *aChild) :
 
440
+        Runnable("nsMenuContentRemovedEvent"),
427
441
+        mWeakMenu(aMenu),
428
442
+        mContainer(aContainer),
429
443
+        mChild(aChild) { }
454
468
+    }
455
469
+
456
470
+    WidgetMouseEvent event(true, aMsg, nullptr, WidgetMouseEvent::eReal);
457
 
+    aTarget->DispatchDOMEvent(&event, nullptr, nullptr, nullptr);
 
471
+    EventDispatcher::Dispatch(aTarget, nullptr, &event);
458
472
+}
459
473
+
460
474
+static void
466
480
+        return;
467
481
+    }
468
482
+
469
 
+    RefPtr<nsStyleContext> sc =
470
 
+        shell->StyleSet()->AsGecko()->ResolveStyleFor(aContent->AsElement(),
471
 
+                                                      nullptr);
 
483
+    RefPtr<nsStyleContext> sc;
 
484
+    if (shell->StyleSet()->IsGecko()) {
 
485
+        shell->StyleSet()->AsGecko()->ResolveStyleFor(aContent->AsElement(), nullptr);
 
486
+    } else {
 
487
+        shell->StyleSet()->AsServo()->ResolveStyleFor(aContent->AsElement(),
 
488
+                                                      nullptr,
 
489
+                                                      LazyComputeBehavior::Allow);
 
490
+    }
 
491
+
472
492
+    if (!sc) {
473
493
+        return;
474
494
+    }
1143
1163
+        return;
1144
1164
+    }
1145
1165
+
1146
 
+    if (NS_FAILED(mOpenDelayTimer->InitWithFuncCallback(DoOpenCallback,
1147
 
+                                                        this,
1148
 
+                                                        100,
1149
 
+                                                        nsITimer::TYPE_ONE_SHOT))) {
 
1166
+    if (NS_FAILED(mOpenDelayTimer->InitWithNamedFuncCallback(DoOpenCallback,
 
1167
+                                                             this,
 
1168
+                                                             100,
 
1169
+                                                             nsITimer::TYPE_ONE_SHOT,
 
1170
+                                                             "nsMenu::DoOpenCallback"))) {
1150
1171
+        mOpenDelayTimer = nullptr;
1151
1172
+    }
1152
1173
+}
1183
1204
+    ContentNode()->UnsetAttr(kNameSpaceID_None, nsGkAtoms::open, true);
1184
1205
+}
1185
1206
+
 
1207
diff --git a/widget/gtk/nsMenu.h b/widget/gtk/nsMenu.h
 
1208
new file mode 100644
1186
1209
--- /dev/null
1187
1210
+++ b/widget/gtk/nsMenu.h
1188
1211
@@ -0,0 +1,124 @@
1310
1333
+};
1311
1334
+
1312
1335
+#endif /* __nsMenu_h__ */
 
1336
diff --git a/widget/gtk/nsMenuBar.cpp b/widget/gtk/nsMenuBar.cpp
 
1337
new file mode 100644
1313
1338
--- /dev/null
1314
1339
+++ b/widget/gtk/nsMenuBar.cpp
1315
 
@@ -0,0 +1,572 @@
 
1340
@@ -0,0 +1,576 @@
1316
1341
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1317
1342
+/* vim:expandtab:shiftwidth=4:tabstop=4:
1318
1343
+ */
1370
1395
+    nsMenuBarContentInsertedEvent(nsMenuBar *aMenuBar,
1371
1396
+                                  nsIContent *aChild,
1372
1397
+                                  nsIContent *aPrevSibling) :
 
1398
+        Runnable("nsMenuBarContentInsertedEvent"),
1373
1399
+        mWeakMenuBar(aMenuBar),
1374
1400
+        mChild(aChild),
1375
1401
+        mPrevSibling(aPrevSibling) { }
1397
1423
+public:
1398
1424
+    nsMenuBarContentRemovedEvent(nsMenuBar *aMenuBar,
1399
1425
+                                 nsIContent *aChild) :
 
1426
+        Runnable("nsMenuBarContentRemovedEvent"),
1400
1427
+        mWeakMenuBar(aMenuBar),
1401
1428
+        mChild(aChild) { }
1402
1429
+
1825
1852
+    return static_cast<uint32_t>(GDK_WINDOW_XID(gtk_widget_get_window(mTopLevel)));
1826
1853
+}
1827
1854
+
1828
 
+nsAdoptingCString
 
1855
+nsCString
1829
1856
+nsMenuBar::ObjectPath() const
1830
1857
+{
1831
1858
+    gchar *tmp;
1832
1859
+    g_object_get(mServer, DBUSMENU_SERVER_PROP_DBUS_OBJECT, &tmp, NULL);
1833
 
+    nsAdoptingCString result(tmp);
 
1860
+
 
1861
+    nsCString result;
 
1862
+    result.Adopt(tmp);
1834
1863
+
1835
1864
+    return result;
1836
1865
+}
1885
1914
+    DocListener()->Stop();
1886
1915
+    DisconnectDocumentEventListeners();
1887
1916
+}
 
1917
diff --git a/widget/gtk/nsMenuBar.h b/widget/gtk/nsMenuBar.h
 
1918
new file mode 100644
1888
1919
--- /dev/null
1889
1920
+++ b/widget/gtk/nsMenuBar.h
1890
1921
@@ -0,0 +1,107 @@
1939
1970
+    uint32_t WindowId() const;
1940
1971
+
1941
1972
+    // Get the object path for this menubar
1942
 
+    nsAdoptingCString ObjectPath() const;
 
1973
+    nsCString ObjectPath() const;
1943
1974
+
1944
1975
+    // Get the top-level GtkWindow handle
1945
1976
+    GtkWidget* TopLevelWindow() { return mTopLevel; }
1995
2026
+};
1996
2027
+
1997
2028
+#endif /* __nsMenuBar_h__ */
 
2029
diff --git a/widget/gtk/nsMenuContainer.cpp b/widget/gtk/nsMenuContainer.cpp
 
2030
new file mode 100644
1998
2031
--- /dev/null
1999
2032
+++ b/widget/gtk/nsMenuContainer.cpp
2000
2033
@@ -0,0 +1,172 @@
2170
2203
+
2171
2204
+    return aContent;
2172
2205
+}
 
2206
diff --git a/widget/gtk/nsMenuContainer.h b/widget/gtk/nsMenuContainer.h
 
2207
new file mode 100644
2173
2208
--- /dev/null
2174
2209
+++ b/widget/gtk/nsMenuContainer.h
2175
2210
@@ -0,0 +1,70 @@
2243
2278
+};
2244
2279
+
2245
2280
+#endif /* __nsMenuContainer_h__ */
 
2281
diff --git a/widget/gtk/nsMenuItem.cpp b/widget/gtk/nsMenuItem.cpp
 
2282
new file mode 100644
2246
2283
--- /dev/null
2247
2284
+++ b/widget/gtk/nsMenuItem.cpp
2248
 
@@ -0,0 +1,736 @@
 
2285
@@ -0,0 +1,737 @@
2249
2286
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2250
2287
+/* vim:expandtab:shiftwidth=4:tabstop=4:
2251
2288
+ */
2555
2592
+    }
2556
2593
+
2557
2594
+    nsMenuItemUncheckSiblingsRunnable(nsMenuItem *aMenuItem) :
 
2595
+        Runnable("nsMenuItemUncheckSiblingsRunnable"),
2558
2596
+        mMenuItem(aMenuItem) { };
2559
2597
+
2560
2598
+private:
2609
2647
+        if (command) {
2610
2648
+            command->InitCommandEvent(NS_LITERAL_STRING("command"),
2611
2649
+                                      true, true, doc->GetInnerWindow(), 0,
2612
 
+                                      false, false, false, false, nullptr);
 
2650
+                                      false, false, false, false, nullptr, 0);
2613
2651
+
2614
2652
+            event->SetTrusted(true);
2615
2653
+            bool dummy;
2982
3020
+{
2983
3021
+    return eType_MenuItem;
2984
3022
+}
 
3023
diff --git a/widget/gtk/nsMenuItem.h b/widget/gtk/nsMenuItem.h
 
3024
new file mode 100644
2985
3025
--- /dev/null
2986
3026
+++ b/widget/gtk/nsMenuItem.h
2987
3027
@@ -0,0 +1,81 @@
3066
3106
+};
3067
3107
+
3068
3108
+#endif /* __nsMenuItem_h__ */
 
3109
diff --git a/widget/gtk/nsMenuObject.cpp b/widget/gtk/nsMenuObject.cpp
 
3110
new file mode 100644
3069
3111
--- /dev/null
3070
3112
+++ b/widget/gtk/nsMenuObject.cpp
3071
 
@@ -0,0 +1,665 @@
 
3113
@@ -0,0 +1,666 @@
3072
3114
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3073
3115
+/* vim:expandtab:shiftwidth=4:tabstop=4:
3074
3116
+ */
3300
3342
+
3301
3343
+    if (imageRequest) {
3302
3344
+        mImageRect = imageRect;
3303
 
+        imageRequest->Clone(this, getter_AddRefs(mImageRequest));
 
3345
+        imageRequest->Clone(this, nullptr, getter_AddRefs(mImageRequest));
3304
3346
+    } else {
3305
3347
+        mImageRect.SetEmpty();
3306
3348
+        nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
3353
3395
+{
3354
3396
+    static char16_t sBuf[4] = { 0, 0, 0, 0 };
3355
3397
+    if (!sBuf[0]) {
3356
 
+        nsAdoptingString ellipsis = Preferences::GetLocalizedString("intl.ellipsis");
 
3398
+        nsString ellipsis;
 
3399
+        Preferences::GetLocalizedString("intl.ellipsis", ellipsis);
3357
3400
+        if (!ellipsis.IsEmpty()) {
3358
3401
+            uint32_t l = ellipsis.Length();
3359
 
+            const nsAdoptingString::char_type *c = ellipsis.BeginReading();
 
3402
+            const nsString::char_type *c = ellipsis.BeginReading();
3360
3403
+            uint32_t i = 0;
3361
3404
+            while (i < 3 && i < l) {
3362
3405
+                sBuf[i++] = *(c++);
3734
3777
+        weak = weak->mPrev;
3735
3778
+    }
3736
3779
+}
 
3780
diff --git a/widget/gtk/nsMenuObject.h b/widget/gtk/nsMenuObject.h
 
3781
new file mode 100644
3737
3782
--- /dev/null
3738
3783
+++ b/widget/gtk/nsMenuObject.h
3739
3784
@@ -0,0 +1,170 @@
3907
3952
+};
3908
3953
+
3909
3954
+#endif /* __nsMenuObject_h__ */
 
3955
diff --git a/widget/gtk/nsMenuSeparator.cpp b/widget/gtk/nsMenuSeparator.cpp
 
3956
new file mode 100644
3910
3957
--- /dev/null
3911
3958
+++ b/widget/gtk/nsMenuSeparator.cpp
3912
3959
@@ -0,0 +1,85 @@
3995
4042
+{
3996
4043
+    return eType_MenuItem;
3997
4044
+}
 
4045
diff --git a/widget/gtk/nsMenuSeparator.h b/widget/gtk/nsMenuSeparator.h
 
4046
new file mode 100644
3998
4047
--- /dev/null
3999
4048
+++ b/widget/gtk/nsMenuSeparator.h
4000
4049
@@ -0,0 +1,37 @@
4035
4084
+};
4036
4085
+
4037
4086
+#endif /* __nsMenuSeparator_h__ */
 
4087
diff --git a/widget/gtk/nsNativeMenuAtomList.h b/widget/gtk/nsNativeMenuAtomList.h
 
4088
new file mode 100644
4038
4089
--- /dev/null
4039
4090
+++ b/widget/gtk/nsNativeMenuAtomList.h
4040
4091
@@ -0,0 +1,12 @@
4050
4101
+WIDGET_ATOM2(_moz_nativemenupopupstate, "_moz-nativemenupopupstate")
4051
4102
+WIDGET_ATOM(openedwithkey)
4052
4103
+WIDGET_ATOM(shellshowingmenubar)
 
4104
diff --git a/widget/gtk/nsNativeMenuAtoms.cpp b/widget/gtk/nsNativeMenuAtoms.cpp
 
4105
new file mode 100644
4053
4106
--- /dev/null
4054
4107
+++ b/widget/gtk/nsNativeMenuAtoms.cpp
4055
4108
@@ -0,0 +1,39 @@
4092
4145
+{
4093
4146
+    NS_RegisterStaticAtoms(gAtoms);
4094
4147
+}
 
4148
diff --git a/widget/gtk/nsNativeMenuAtoms.h b/widget/gtk/nsNativeMenuAtoms.h
 
4149
new file mode 100644
4095
4150
--- /dev/null
4096
4151
+++ b/widget/gtk/nsNativeMenuAtoms.h
4097
4152
@@ -0,0 +1,27 @@
4122
4177
+};
4123
4178
+
4124
4179
+#endif /* __nsNativeMenuAtoms_h__ */
 
4180
diff --git a/widget/gtk/nsNativeMenuDocListener.cpp b/widget/gtk/nsNativeMenuDocListener.cpp
 
4181
new file mode 100644
4125
4182
--- /dev/null
4126
4183
+++ b/widget/gtk/nsNativeMenuDocListener.cpp
4127
4184
@@ -0,0 +1,350 @@
4475
4532
+    CancelFlush(this);
4476
4533
+    mPendingMutations.Clear();
4477
4534
+}
 
4535
diff --git a/widget/gtk/nsNativeMenuDocListener.h b/widget/gtk/nsNativeMenuDocListener.h
 
4536
new file mode 100644
4478
4537
--- /dev/null
4479
4538
+++ b/widget/gtk/nsNativeMenuDocListener.h
4480
4539
@@ -0,0 +1,152 @@
4630
4689
+};
4631
4690
+
4632
4691
+#endif /* __nsNativeMenuDocListener_h__ */
 
4692
diff --git a/widget/gtk/nsNativeMenuService.cpp b/widget/gtk/nsNativeMenuService.cpp
 
4693
new file mode 100644
4633
4694
--- /dev/null
4634
4695
+++ b/widget/gtk/nsNativeMenuService.cpp
4635
4696
@@ -0,0 +1,508 @@
4899
4960
+    }
4900
4961
+
4901
4962
+    uint32_t xid = aMenuBar->WindowId();
4902
 
+    nsAdoptingCString path = aMenuBar->ObjectPath();
 
4963
+    nsCString path = aMenuBar->ObjectPath();
4903
4964
+    if (xid == 0 || path.IsEmpty()) {
4904
4965
+        NS_WARNING("Menubar has invalid XID or object path");
4905
4966
+        return;
5141
5202
+        g_object_unref(cancellable);
5142
5203
+    }
5143
5204
+}
 
5205
diff --git a/widget/gtk/nsNativeMenuService.h b/widget/gtk/nsNativeMenuService.h
 
5206
new file mode 100644
5144
5207
--- /dev/null
5145
5208
+++ b/widget/gtk/nsNativeMenuService.h
5146
5209
@@ -0,0 +1,84 @@
5228
5291
+};
5229
5292
+
5230
5293
+#endif /* __nsNativeMenuService_h__ */
 
5294
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
5231
5295
--- a/widget/gtk/nsNativeThemeGTK.cpp
5232
5296
+++ b/widget/gtk/nsNativeThemeGTK.cpp
5233
 
@@ -52,6 +52,7 @@
 
5297
@@ -51,6 +51,7 @@
5234
5298
 
5235
5299
 using namespace mozilla;
5236
5300
 using namespace mozilla::gfx;
5238
5302
 
5239
5303
 NS_IMPL_ISUPPORTS_INHERITED(nsNativeThemeGTK, nsNativeTheme, nsITheme,
5240
5304
                                                              nsIObserver)
 
5305
diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
5241
5306
--- a/widget/gtk/nsWidgetFactory.cpp
5242
5307
+++ b/widget/gtk/nsWidgetFactory.cpp
5243
 
@@ -48,6 +48,8 @@
 
5308
@@ -49,6 +49,8 @@
5244
5309
 #include "GfxInfoX11.h"
5245
5310
 #endif
5246
5311
 
5249
5314
 #include "nsNativeThemeGTK.h"
5250
5315
 
5251
5316
 #include "nsIComponentRegistrar.h"
5252
 
@@ -124,6 +126,9 @@
 
5317
@@ -123,6 +125,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxI
5253
5318
 }
5254
5319
 #endif
5255
5320
 
5259
5324
 #ifdef NS_PRINTING
5260
5325
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
5261
5326
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsGTK, Init)
5262
 
@@ -226,6 +231,7 @@
 
5327
@@ -247,6 +252,7 @@ NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_C
5263
5328
 NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID);
5264
5329
 NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
5265
5330
 #endif
5267
5332
 
5268
5333
 
5269
5334
 static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
5270
 
@@ -261,6 +267,7 @@
 
5335
@@ -282,6 +288,7 @@ static const mozilla::Module::CIDEntry k
5271
5336
     { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor },
5272
5337
     { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor },
5273
5338
 #endif
5275
5340
     { nullptr }
5276
5341
 };
5277
5342
 
5278
 
@@ -298,6 +305,7 @@
 
5343
@@ -319,6 +326,7 @@ static const mozilla::Module::ContractID
5279
5344
     { "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID },
5280
5345
     { "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID },
5281
5346
 #endif
5283
5348
     { nullptr }
5284
5349
 };
5285
5350
 
 
5351
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
5286
5352
--- a/widget/gtk/nsWindow.cpp
5287
5353
+++ b/widget/gtk/nsWindow.cpp
5288
 
@@ -67,6 +67,7 @@
 
5354
@@ -72,6 +72,7 @@
5289
5355
 
5290
5356
 #include "mozilla/Assertions.h"
5291
5357
 #include "mozilla/Likely.h"
5293
5359
 #include "mozilla/Preferences.h"
5294
5360
 #include "nsIPrefService.h"
5295
5361
 #include "nsIGConfService.h"
5296
 
@@ -5059,6 +5060,11 @@
 
5362
@@ -5091,6 +5092,11 @@ nsWindow::HideWindowChrome(bool aShouldH
5297
5363
 #endif /* MOZ_X11 */
5298
5364
 }
5299
5365
 
5305
5371
 bool
5306
5372
 nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY,
5307
5373
                          bool aIsWheel, bool aAlwaysRollup)
 
5374
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
5308
5375
--- a/widget/gtk/nsWindow.h
5309
5376
+++ b/widget/gtk/nsWindow.h
5310
 
@@ -35,6 +35,8 @@
 
5377
@@ -36,6 +36,8 @@
5311
5378
 
5312
5379
 #include "IMContextWrapper.h"
5313
5380
 
5316
5383
 #undef LOG
5317
5384
 #ifdef MOZ_LOGGING
5318
5385
 
5319
 
@@ -161,6 +163,8 @@
 
5386
@@ -159,6 +161,8 @@ public:
5320
5387
                                       nsIScreen* aTargetScreen = nullptr) override;
5321
5388
     virtual void       HideWindowChrome(bool aShouldHide) override;
5322
5389
 
5325
5392
     /**
5326
5393
      * GetLastUserInputTime returns a timestamp for the most recent user input
5327
5394
      * event.  This is intended for pointer grab requests (including drags).
5328
 
@@ -565,6 +569,8 @@
 
5395
@@ -567,6 +571,8 @@ private:
5329
5396
     RefPtr<mozilla::widget::IMContextWrapper> mIMContext;
5330
5397
 
5331
5398
     mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter;
5333
5400
+    mozilla::UniquePtr<nsMenuBar> mMenuBar;
5334
5401
 };
5335
5402
 
5336
 
 class nsChildWindow : public nsWindow {
 
5403
 #endif /* __nsWindow_h__ */
 
5404
diff --git a/widget/moz.build b/widget/moz.build
5337
5405
--- a/widget/moz.build
5338
5406
+++ b/widget/moz.build
5339
 
@@ -63,9 +63,9 @@
 
5407
@@ -63,9 +63,9 @@ elif toolkit == 'cocoa':
5340
5408
         'nsISystemStatusBar.idl',
5341
5409
         'nsITaskbarProgress.idl',
5342
5410
     ]
5349
5417
 
5350
5418
 TEST_DIRS += ['tests']
5351
5419
 
 
5420
diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow.cpp
5352
5421
--- a/xpfe/appshell/nsWebShellWindow.cpp
5353
5422
+++ b/xpfe/appshell/nsWebShellWindow.cpp
5354
 
@@ -74,7 +74,7 @@
 
5423
@@ -75,7 +75,7 @@
5355
5424
 
5356
5425
 #include "gfxPlatform.h"
5357
5426