~mozillateam/firefox/firefox-beta.xenial

« back to all changes in this revision

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

  • Committer: Rico Tzschichholz
  • Date: 2023-03-27 06:40:47 UTC
  • Revision ID: ricotz@ubuntu.com-20230327064047-wby4xxvgc4z27jh4
* New upstream release from the beta channel (FIREFOX_112_0b7_BUILD1)
* Drop upstreamed or obsolete patches
  - debian/patches/D172126.diff
  - debian/patches/webaudio-armhf-neon-ftbfs.patch
* Bump build-dep to python >= 3.7
  - debian/config/mozconfig.in
  - debian/control{,.in}
* Fix i386 build failure
  - debian/patches/dom-i386-sse2-ftbfs.patch
* Update patches
  - debian/patches/unity-menubar.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
+pref("ui.use_unity_menubar", true);
106
106
+#endif
107
107
 
108
 
 pref("browser.display.force_inline_alttext", false); // true = force ALT text for missing images to be layed out inline
109
 
 // 0 = no external leading,
 
108
 // min font device pixel size at which to turn on high quality
 
109
 pref("browser.display.auto_quality_min_font_size", 20);
110
110
--- a/toolkit/content/xul.css
111
111
+++ b/toolkit/content/xul.css
112
112
@@ -229,6 +229,13 @@ toolbox {
3006
3006
+#endif /* __nsMenuItem_h__ */
3007
3007
--- /dev/null
3008
3008
+++ b/widget/gtk/nsMenuObject.cpp
3009
 
@@ -0,0 +1,664 @@
 
3009
@@ -0,0 +1,653 @@
3010
3010
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3011
3011
+/* vim:expandtab:shiftwidth=4:tabstop=4:
3012
3012
+ */
3091
3091
+    nsMenuObject *mOwner;
3092
3092
+    RefPtr<imgRequestProxy> mImageRequest;
3093
3093
+    nsCOMPtr<nsIURI> mURI;
3094
 
+    nsIntRect mImageRect;
3095
3094
+};
3096
3095
+
3097
3096
+NS_IMPL_ISUPPORTS(nsMenuObjectIconLoader, imgINotificationObserver)
3145
3144
+        return;
3146
3145
+    }
3147
3146
+
3148
 
+    if (!mImageRect.IsEmpty()) {
3149
 
+        img = ImageOps::Clip(img, mImageRect);
3150
 
+    }
3151
 
+
3152
3147
+    int32_t width, height;
3153
3148
+    img->GetWidth(&width);
3154
3149
+    img->GetHeight(&height);
3183
3178
+    dom::Document *doc = mOwner->ContentNode()->OwnerDoc();
3184
3179
+
3185
3180
+    nsCOMPtr<nsIURI> uri;
3186
 
+    nsIntRect imageRect;
3187
3181
+    imgRequestProxy *imageRequest = nullptr;
3188
3182
+
3189
3183
+    nsAutoString uriString;
3206
3200
+        imageRequest = list->mListStyleImage.GetImageRequest();
3207
3201
+        if (imageRequest) {
3208
3202
+            imageRequest->GetURI(getter_AddRefs(uri));
3209
 
+            auto& rect = list->mImageRegion.AsRect();
3210
 
+            imageRect = rect.ToLayoutRect().ToNearestPixels(
3211
 
+                            pc->AppUnitsPerDevPixel());
3212
3203
+        }
3213
3204
+    }
3214
3205
+
3226
3217
+
3227
3218
+    bool same;
3228
3219
+    if (mURI && NS_SUCCEEDED(mURI->Equals(uri, &same)) && same &&
3229
 
+        (!imageRequest || imageRect == mImageRect)) {
 
3220
+        !imageRequest) {
3230
3221
+        return;
3231
3222
+    }
3232
3223
+
3238
3229
+    mURI = uri;
3239
3230
+
3240
3231
+    if (imageRequest) {
3241
 
+        mImageRect = imageRect;
3242
3232
+        imageRequest->Clone(this, nullptr, getter_AddRefs(mImageRequest));
3243
3233
+    } else {
3244
 
+        mImageRect.SetEmpty();
3245
3234
+        nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
3246
3235
+        RefPtr<imgLoader> loader =
3247
3236
+            nsContentUtils::GetImgLoaderForDocument(doc);