mirror of
https://abf.rosa.ru/djam/firefox-esr91.git
synced 2025-02-24 17:42:59 +00:00
commit
da1ddf5b01
11 changed files with 82 additions and 1142 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
|||
sources:
|
||||
firefox-48.0.2.source.tar.xz: 75c36b8d2e4d25e0cbcc5e1ee7ed02b7e17ade8e
|
||||
firefox-49.0.2.source.tar.xz: 52d527f06c522c95e2fcf4008dce1a9913379aaf
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# HG changeset patch
|
||||
# Parent 07e419c2bbc63c486d25fd8ce117abd10e9ebdba
|
||||
# Parent 2704257a50b4ff60fa43eca8d4a547c6d70bb30e
|
||||
|
||||
diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/browser/base/content/browser-kde.xul
|
||||
@@ -0,0 +1,1174 @@
|
||||
@@ -0,0 +1,1179 @@
|
||||
+#filter substitution
|
||||
+<?xml version="1.0"?>
|
||||
+# -*- Mode: HTML -*-
|
||||
|
@ -16,6 +16,7 @@ new file mode 100644
|
|||
+
|
||||
+<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
+<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
+<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
|
||||
+<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?>
|
||||
+<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
|
||||
+<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
|
||||
|
@ -296,18 +297,6 @@ new file mode 100644
|
|||
+ noautofocus="true"
|
||||
+ position="topcenter topright"/>
|
||||
+
|
||||
+ <panel id="loop-notification-panel"
|
||||
+ class="loop-panel social-panel"
|
||||
+ type="arrow"
|
||||
+ hidden="true"
|
||||
+ noautofocus="true"/>
|
||||
+
|
||||
+ <panel id="loop-panel"
|
||||
+ class="loop-panel social-panel"
|
||||
+ type="arrow"
|
||||
+ orient="horizontal"
|
||||
+ hidden="true"/>
|
||||
+
|
||||
+ <menupopup id="toolbar-context-menu"
|
||||
+ onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
|
||||
+ <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
|
@ -388,7 +377,28 @@ new file mode 100644
|
|||
+#include browser-context.inc
|
||||
+ </menupopup>
|
||||
+
|
||||
+ <menupopup id="placesContext"/>
|
||||
+ <menupopup id="placesContext">
|
||||
+ <menuseparator id="placesContext_recentlyBookmarkedSeparator"
|
||||
+ ignoreitem="true"
|
||||
+ ordinal="2"
|
||||
+ hidden="true"/>
|
||||
+ <menuitem id="placesContext_hideRecentlyBookmarked"
|
||||
+ label="&hideRecentlyBookmarked.label;"
|
||||
+ accesskey="&hideRecentlyBookmarked.accesskey;"
|
||||
+ oncommand="BookmarkingUI.hideRecentlyBookmarked();"
|
||||
+ closemenu="single"
|
||||
+ ignoreitem="true"
|
||||
+ ordinal="2"
|
||||
+ hidden="true"/>
|
||||
+ <menuitem id="placesContext_showRecentlyBookmarked"
|
||||
+ label="&showRecentlyBookmarked.label;"
|
||||
+ accesskey="&showRecentlyBookmarked.accesskey;"
|
||||
+ oncommand="BookmarkingUI.showRecentlyBookmarked();"
|
||||
+ closemenu="single"
|
||||
+ ignoreitem="true"
|
||||
+ ordinal="2"
|
||||
+ hidden="true"/>
|
||||
+ </menupopup>
|
||||
+
|
||||
+ <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
|
||||
+ <hbox>
|
||||
|
@ -404,21 +414,6 @@ new file mode 100644
|
|||
+ </hbox>
|
||||
+ </panel>
|
||||
+
|
||||
+ <!-- Sync Panel -->
|
||||
+ <panel id="sync-start-panel" class="sync-panel" type="arrow" hidden="true"
|
||||
+ noautofocus="true" onclick="this.hidePopup();"
|
||||
+ flip="slide">
|
||||
+ <hbox class="sync-panel-outer">
|
||||
+ <image class="sync-panel-icon"/>
|
||||
+ <vbox class="sync-panel-inner">
|
||||
+ <description id="sync-start-panel-title"
|
||||
+ value="&syncStartPanel2.heading;"/>
|
||||
+ <description id="sync-start-panel-subtitle"
|
||||
+ value="&syncStartPanel2.subTitle;"/>
|
||||
+ </vbox>
|
||||
+ </hbox>
|
||||
+ </panel>
|
||||
+
|
||||
+ <!-- Bookmarks and history tooltip -->
|
||||
+ <tooltip id="bhTooltip"/>
|
||||
+
|
||||
|
@ -634,7 +629,12 @@ new file mode 100644
|
|||
+ key="key_undoCloseTab"
|
||||
+ label="&undoCloseTab.label;"
|
||||
+ observes="History:UndoCloseTab"/>
|
||||
+ <menuseparator id="alltabs-popup-separator"/>
|
||||
+ <menuseparator id="alltabs-popup-separator-1"/>
|
||||
+ <menu id="alltabs_containersTab"
|
||||
+ label="&newUserContext.label;">
|
||||
+ <menupopup id="alltabs_containersMenuTab" />
|
||||
+ </menu>
|
||||
+ <menuseparator id="alltabs-popup-separator-2"/>
|
||||
+ </menupopup>
|
||||
+ </toolbarbutton>
|
||||
+
|
||||
|
@ -718,41 +718,41 @@ new file mode 100644
|
|||
+ <box id="notification-popup-box" hidden="true" align="center">
|
||||
+ <image id="default-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ aria-label="&urlbar.defaultNotificationAnchor.label;"/>
|
||||
+ <image id="geo-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button"
|
||||
+ aria-label="&urlbar.geolocationNotificationAnchor.label;"/>
|
||||
+ <image id="addons-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
|
||||
+ aria-label="&urlbar.addonsNotificationAnchor.label;"/>
|
||||
+ <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
|
||||
+ aria-label="&urlbar.indexedDBNotificationAnchor.label;"/>
|
||||
+ <image id="login-fill-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="login-fill-notification-icon" class="notification-anchor-icon login-icon" role="button"
|
||||
+ aria-label="&urlbar.loginFillNotificationAnchor.label;"/>
|
||||
+ <image id="password-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
|
||||
+ aria-label="&urlbar.passwordNotificationAnchor.label;"/>
|
||||
+ <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button"
|
||||
+ aria-label="&urlbar.pluginsNotificationAnchor.label;"/>
|
||||
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon web-notifications-icon" role="button"
|
||||
+ aria-label="&urlbar.webNotsNotificationAnchor3.label;"/>
|
||||
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
|
||||
+ aria-label="&urlbar.webRTCShareDevicesNotificationAnchor.label;"/>
|
||||
+ <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon camera-icon in-use" role="button"
|
||||
+ aria-label="&urlbar.webRTCSharingDevicesNotificationAnchor.label;"/>
|
||||
+ <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button"
|
||||
+ aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/>
|
||||
+ <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon microphone-icon in-use" role="button"
|
||||
+ aria-label="&urlbar.webRTCSharingMicrophoneNotificationAnchor.label;"/>
|
||||
+ <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button"
|
||||
+ aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/>
|
||||
+ <image id="webRTC-sharingScreen-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="webRTC-sharingScreen-notification-icon" class="notification-anchor-icon screen-icon in-use" role="button"
|
||||
+ aria-label="&urlbar.webRTCSharingScreenNotificationAnchor.label;"/>
|
||||
+ <image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="pointerLock-notification-icon" class="notification-anchor-icon pointer-icon" role="button"
|
||||
+ aria-label="&urlbar.pointerLockNotificationAnchor.label;"/>
|
||||
+ <image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button"
|
||||
+ aria-label="&urlbar.servicesNotificationAnchor.label;"/>
|
||||
+ <image id="translate-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button"
|
||||
+ aria-label="&urlbar.translateNotificationAnchor.label;"/>
|
||||
+ <image id="translated-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button"
|
||||
+ aria-label="&urlbar.translatedNotificationAnchor.label;"/>
|
||||
+ <image id="eme-notification-icon" class="notification-anchor-icon" role="button"
|
||||
+ <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button"
|
||||
+ aria-label="&urlbar.emeNotificationAnchor.label;"/>
|
||||
+ </box>
|
||||
+ <!-- Use onclick instead of normal popup= syntax since the popup
|
||||
|
@ -789,7 +789,7 @@ new file mode 100644
|
|||
+ hidden="true"
|
||||
+ onclick="ReaderParent.buttonClick(event);"/>
|
||||
+ </hbox>
|
||||
+ <hbox id="userContext-icons">
|
||||
+ <hbox id="userContext-icons" hidden="true">
|
||||
+ <label id="userContext-label"/>
|
||||
+ <image id="userContext-indicator"/>
|
||||
+ </hbox>
|
||||
|
@ -856,6 +856,11 @@ new file mode 100644
|
|||
+ command="Browser:ShowAllBookmarks"
|
||||
+ key="manBookmarkKb"/>
|
||||
+ <menuseparator/>
|
||||
+ <menuitem label="&recentBookmarks.label;"
|
||||
+ id="BMB_recentBookmarks"
|
||||
+ disabled="true"
|
||||
+ class="menuitem-iconic subviewbutton"/>
|
||||
+ <menuseparator/>
|
||||
+ <menu id="BMB_bookmarksToolbar"
|
||||
+ class="menu-iconic bookmark-item subviewbutton"
|
||||
+ label="&personalbarCmd.label;"
|
||||
|
@ -1288,7 +1293,7 @@ diff --git a/browser/components/preferences/in-content/main.js b/browser/compone
|
|||
// when the user will select the default. We refresh here periodically
|
||||
// in case the default changes. On other Windows OS's defaults can also
|
||||
// be set while the prefs are open.
|
||||
@@ -736,16 +742,27 @@ var gMainPane = {
|
||||
@@ -730,16 +736,27 @@ var gMainPane = {
|
||||
let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
|
||||
alwaysCheckPref.value = true;
|
||||
|
||||
|
@ -1631,7 +1636,7 @@ new file mode 100644
|
|||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -689,16 +689,17 @@
|
||||
@@ -676,16 +676,17 @@
|
||||
@RESPATH@/greprefs.js
|
||||
@RESPATH@/defaults/autoconfig/prefcalls.js
|
||||
@RESPATH@/browser/defaults/permissions
|
||||
|
@ -1643,9 +1648,9 @@ diff --git a/browser/installer/package-manifest.in b/browser/installer/package-m
|
|||
+@BINPATH@/defaults/pref/kde.js
|
||||
|
||||
; Services (gre) prefs
|
||||
#ifdef MOZ_SERVICES_NOTIFICATIONS
|
||||
@RESPATH@/defaults/pref/services-notifications.js
|
||||
#endif
|
||||
@RESPATH@/defaults/pref/services-sync.js
|
||||
|
||||
; [Layout Engine Resources]
|
||||
; Style Sheets, Graphics and other Resources used by the layout engine.
|
||||
@RESPATH@/res/EditorOverride.css
|
||||
@RESPATH@/res/contenteditable.css
|
11
firefox.spec
11
firefox.spec
|
@ -7,7 +7,7 @@
|
|||
# This also means only STABLE upstream releases, NO betas.
|
||||
# This is a discussed topic. Please, do not flame it again.
|
||||
|
||||
%define major 48.0.2
|
||||
%define major 49.0.2
|
||||
%define ff_epoch 0
|
||||
# (tpg) set version HERE !!!
|
||||
%define realver %{major}
|
||||
|
@ -39,20 +39,20 @@ Url: http://www.mozilla.com/firefox/
|
|||
%if 0%{?prel}
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.xz
|
||||
%else
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.xz
|
||||
# Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.xz
|
||||
Source0: https://archive.mozilla.org/pub/firefox/releases/%{realver}/source/%{name}-%{realver}.source.tar.xz
|
||||
%endif
|
||||
Source4: %{name}.desktop
|
||||
Source9: kde.js
|
||||
Source1000: README.urpmi
|
||||
# Patches for kde integration of FF
|
||||
Patch11: firefox-48-kde.patch
|
||||
Patch12: mozilla-48-kde.patch
|
||||
Patch11: firefox-49-kde.patch
|
||||
Patch12: mozilla-49-kde.patch
|
||||
#Patch13: mozilla-kde-background.patch
|
||||
Patch34: xulrunner_nojit.patch
|
||||
Patch35: firefox-37-build-with-time-independent-uuids.patch
|
||||
Patch36: firefox-38.0-enable-NTLMv1.patch
|
||||
Patch42: mozilla-42.0-libproxy.patch
|
||||
Patch44: mozilla-1282843.patch
|
||||
|
||||
# Fedora specific patches
|
||||
# Unable to install addons from https pages
|
||||
|
@ -179,7 +179,6 @@ Files and macros mainly for building Firefox extensions.
|
|||
%patch35 -p1
|
||||
%patch36 -p1
|
||||
#patch42 -p1
|
||||
%patch44 -p1
|
||||
|
||||
# Fedora patches
|
||||
%patch204 -p2 -b .966424
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
# HG changeset patch
|
||||
# Parent 3a4bfa5d2d026f7d3fbfd0f87663b87b5caa9344
|
||||
# User Petr Jasicek <pjasicek@redhat.com>
|
||||
Bug 1160154 - Decrease padding between icons in the personal toolbar with Gtk3 by using "image-button" css style class. r=karlt
|
||||
|
||||
diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c
|
||||
--- a/widget/gtk/gtk3drawing.c
|
||||
+++ b/widget/gtk/gtk3drawing.c
|
||||
@@ -2629,26 +2629,35 @@ moz_gtk_get_widget_border(GtkThemeWidget
|
||||
gboolean inhtml)
|
||||
{
|
||||
GtkWidget* w;
|
||||
GtkStyleContext* style;
|
||||
*left = *top = *right = *bottom = 0;
|
||||
|
||||
switch (widget) {
|
||||
case MOZ_GTK_BUTTON:
|
||||
+ case MOZ_GTK_TOOLBAR_BUTTON:
|
||||
{
|
||||
ensure_button_widget();
|
||||
style = gtk_widget_get_style_context(gButtonWidget);
|
||||
|
||||
*left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget));
|
||||
|
||||
/* Don't add this padding in HTML, otherwise the buttons will
|
||||
become too big and stuff the layout. */
|
||||
if (!inhtml) {
|
||||
+ if (widget == MOZ_GTK_TOOLBAR_BUTTON) {
|
||||
+ gtk_style_context_save(style);
|
||||
+ gtk_style_context_add_class(style, "image-button");
|
||||
+ }
|
||||
+
|
||||
moz_gtk_add_style_padding(style, left, top, right, bottom);
|
||||
+
|
||||
+ if (widget == MOZ_GTK_TOOLBAR_BUTTON)
|
||||
+ gtk_style_context_restore(style);
|
||||
}
|
||||
|
||||
moz_gtk_add_style_border(style, left, top, right, bottom);
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
case MOZ_GTK_ENTRY:
|
||||
{
|
||||
ensure_entry_widget();
|
||||
@@ -3081,16 +3090,17 @@ moz_gtk_widget_paint(GtkThemeWidgetType
|
||||
GtkTextDirection direction)
|
||||
{
|
||||
/* A workaround for https://bugzilla.gnome.org/show_bug.cgi?id=694086
|
||||
*/
|
||||
cairo_new_path(cr);
|
||||
|
||||
switch (widget) {
|
||||
case MOZ_GTK_BUTTON:
|
||||
+ case MOZ_GTK_TOOLBAR_BUTTON:
|
||||
if (state->depressed) {
|
||||
ensure_toggle_button_widget();
|
||||
return moz_gtk_button_paint(cr, rect, state,
|
||||
(GtkReliefStyle) flags,
|
||||
gToggleButtonWidget, direction);
|
||||
}
|
||||
ensure_button_widget();
|
||||
return moz_gtk_button_paint(cr, rect, state,
|
||||
diff --git a/widget/gtk/gtkdrawing.h b/widget/gtk/gtkdrawing.h
|
||||
--- a/widget/gtk/gtkdrawing.h
|
||||
+++ b/widget/gtk/gtkdrawing.h
|
||||
@@ -84,16 +84,18 @@ typedef gint (*style_prop_t)(GtkStyle*,
|
||||
/*** checkbox/radio flags ***/
|
||||
#define MOZ_GTK_WIDGET_CHECKED 1
|
||||
#define MOZ_GTK_WIDGET_INCONSISTENT (1 << 1)
|
||||
|
||||
/*** widget type constants ***/
|
||||
typedef enum {
|
||||
/* Paints a GtkButton. flags is a GtkReliefStyle. */
|
||||
MOZ_GTK_BUTTON,
|
||||
+ /* Paints a button with image and no text */
|
||||
+ MOZ_GTK_TOOLBAR_BUTTON,
|
||||
/* Paints a GtkCheckButton. flags is a boolean, 1=checked, 0=not checked. */
|
||||
MOZ_GTK_CHECKBUTTON,
|
||||
/* Paints a GtkRadioButton. flags is a boolean, 1=checked, 0=not checked. */
|
||||
MOZ_GTK_RADIOBUTTON,
|
||||
/**
|
||||
* Paints the button of a GtkScrollbar. flags is a GtkArrowType giving
|
||||
* the arrow direction.
|
||||
*/
|
||||
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
|
||||
--- a/widget/gtk/nsNativeThemeGTK.cpp
|
||||
+++ b/widget/gtk/nsNativeThemeGTK.cpp
|
||||
@@ -386,21 +386,25 @@ nsNativeThemeGTK::GetGtkWidgetAndState(u
|
||||
*aWidgetFlags = CheckBooleanAttr(aFrame, nsGkAtoms::parentfocused);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (aWidgetType) {
|
||||
case NS_THEME_BUTTON:
|
||||
+ if (aWidgetFlags)
|
||||
+ *aWidgetFlags = GTK_RELIEF_NORMAL;
|
||||
+ aGtkWidgetType = MOZ_GTK_BUTTON;
|
||||
+ break;
|
||||
case NS_THEME_TOOLBAR_BUTTON:
|
||||
case NS_THEME_TOOLBAR_DUAL_BUTTON:
|
||||
if (aWidgetFlags)
|
||||
- *aWidgetFlags = (aWidgetType == NS_THEME_BUTTON) ? GTK_RELIEF_NORMAL : GTK_RELIEF_NONE;
|
||||
- aGtkWidgetType = MOZ_GTK_BUTTON;
|
||||
+ *aWidgetFlags = GTK_RELIEF_NONE;
|
||||
+ aGtkWidgetType = MOZ_GTK_TOOLBAR_BUTTON;
|
||||
break;
|
||||
case NS_THEME_FOCUS_OUTLINE:
|
||||
aGtkWidgetType = MOZ_GTK_ENTRY;
|
||||
break;
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO:
|
||||
aGtkWidgetType = (aWidgetType == NS_THEME_RADIO) ? MOZ_GTK_RADIOBUTTON : MOZ_GTK_CHECKBUTTON;
|
||||
break;
|
|
@ -1,50 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Andrew Comminos <acomminos@mozilla.com>
|
||||
|
||||
Bug 1180971 - Fix X11 SHM invalidation regions on HiDPI with GTK3. r=karlt
|
||||
|
||||
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
|
||||
index 19b634e..064116c 100644
|
||||
--- a/widget/gtk/nsWindow.cpp
|
||||
+++ b/widget/gtk/nsWindow.cpp
|
||||
@@ -2264,17 +2264,17 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
|
||||
ctx->SetPattern(pattern);
|
||||
ctx->Paint();
|
||||
}
|
||||
}
|
||||
}
|
||||
# ifdef MOZ_HAVE_SHMIMAGE
|
||||
if (mShmImage && MOZ_LIKELY(!mIsDestroyed)) {
|
||||
- mShmImage->Put(mGdkWindow, exposeRegion);
|
||||
+ mShmImage->Put(mGdkWindow, region);
|
||||
}
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
#endif // MOZ_X11
|
||||
|
||||
listener->DidPaintWindow();
|
||||
|
||||
// Synchronously flush any new dirty areas
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
@@ -6173,21 +6173,16 @@ nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, nsIntRegion& aInvali
|
||||
if (!mGdkWindow || mIsFullyObscured || !mHasMappedToplevel || mIsDestroyed ||
|
||||
!mShmImage)
|
||||
return;
|
||||
|
||||
if (mThebesSurface) {
|
||||
aInvalidRegion.AndWith(nsIntRect(nsIntPoint(0, 0), mThebesSurface->GetSize()));
|
||||
}
|
||||
|
||||
- gint scale = GdkScaleFactor();
|
||||
- if (scale != 1) {
|
||||
- aInvalidRegion.ScaleInverseRoundOut(scale, scale);
|
||||
- }
|
||||
-
|
||||
mShmImage->Put(mGdkWindow, aInvalidRegion);
|
||||
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
#endif // MOZ_X11
|
||||
}
|
||||
|
||||
// return the gfxASurface for rendering to this widget
|
||||
gfxASurface*
|
|
@ -1,33 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Lee Salzman <lsalzman@mozilla.com>
|
||||
# Date 1438873323 14400
|
||||
# Thu Aug 06 11:02:03 2015 -0400
|
||||
# Node ID 9ad90210cc51eb61d21230086b9acf5c8003aea0
|
||||
# Parent abc56d57f6e1aebade48949fb557d26eae555df8
|
||||
fix race condition in gtk window EndRemoteDrawingInRegion
|
||||
|
||||
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
|
||||
--- a/widget/gtk/nsWindow.cpp
|
||||
+++ b/widget/gtk/nsWindow.cpp
|
||||
@@ -6203,19 +6203,19 @@ nsWindow::StartRemoteDrawing()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::EndRemoteDrawingInRegion(DrawTarget* aDrawTarget, nsIntRegion& aInvalidRegion)
|
||||
{
|
||||
#ifdef MOZ_X11
|
||||
# ifdef MOZ_HAVE_SHMIMAGE
|
||||
- if (!mGdkWindow || mIsFullyObscured || !mHasMappedToplevel || mIsDestroyed ||
|
||||
- !mShmImage)
|
||||
+ if (!mGdkWindow || !mShmImage) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (mThebesSurface) {
|
||||
aInvalidRegion.AndWith(nsIntRect(nsIntPoint(0, 0), mThebesSurface->GetSize()));
|
||||
}
|
||||
|
||||
mShmImage->Put(mGdkWindow, aInvalidRegion);
|
||||
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
|
@ -1,115 +0,0 @@
|
|||
# HG changeset patch
|
||||
# Parent 8cba870a352ca71b53cebee7688847756eb3f5f7
|
||||
# User Petr Jasicek <pjasicek@redhat.com>
|
||||
Bug 1192243 - Fix Gtk3 crash reporter's ScrolledWindow and width. r=karlt
|
||||
|
||||
diff --git a/toolkit/crashreporter/client/crashreporter_linux.cpp b/toolkit/crashreporter/client/crashreporter_linux.cpp
|
||||
--- a/toolkit/crashreporter/client/crashreporter_linux.cpp
|
||||
+++ b/toolkit/crashreporter/client/crashreporter_linux.cpp
|
||||
@@ -9,16 +9,18 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#include "crashreporter.h"
|
||||
#include "crashreporter_gtk_common.h"
|
||||
|
||||
+#define LABEL_MAX_CHAR_WIDTH 48
|
||||
+
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
using namespace CrashReporter;
|
||||
|
||||
static GtkWidget* gViewReportButton = 0;
|
||||
static GtkWidget* gCommentTextLabel = 0;
|
||||
static GtkWidget* gCommentText = 0;
|
||||
@@ -178,19 +180,22 @@ static void ViewReportClicked(GtkButton*
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_OK,
|
||||
GTK_RESPONSE_OK,
|
||||
nullptr));
|
||||
|
||||
GtkWidget* scrolled = gtk_scrolled_window_new(0, 0);
|
||||
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(dialog)), scrolled);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
|
||||
- GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
|
||||
GTK_SHADOW_IN);
|
||||
+#if (MOZ_WIDGET_GTK >= 3)
|
||||
+ gtk_widget_set_vexpand(scrolled, TRUE);
|
||||
+#endif
|
||||
|
||||
GtkWidget* viewReportTextView = gtk_text_view_new();
|
||||
gtk_container_add(GTK_CONTAINER(scrolled), viewReportTextView);
|
||||
gtk_text_view_set_editable(GTK_TEXT_VIEW(viewReportTextView), FALSE);
|
||||
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(viewReportTextView),
|
||||
GTK_WRAP_WORD);
|
||||
gtk_widget_set_size_request(GTK_WIDGET(viewReportTextView), -1, 100);
|
||||
|
||||
@@ -407,17 +412,21 @@ bool UIShowCrashUI(const StringTable& fi
|
||||
gStrings[ST_CRASHREPORTERHEADER].c_str());
|
||||
gtk_label_set_markup(GTK_LABEL(titleLabel), markup);
|
||||
g_free(markup);
|
||||
|
||||
GtkWidget* descriptionLabel =
|
||||
gtk_label_new(gStrings[ST_CRASHREPORTERDESCRIPTION].c_str());
|
||||
gtk_box_pack_start(GTK_BOX(vbox), descriptionLabel, TRUE, TRUE, 0);
|
||||
// force the label to line wrap
|
||||
+#if (MOZ_WIDGET_GTK == 2)
|
||||
gtk_widget_set_size_request(descriptionLabel, 400, -1);
|
||||
+#else
|
||||
+ gtk_label_set_max_width_chars(GTK_LABEL(descriptionLabel), LABEL_MAX_CHAR_WIDTH);
|
||||
+#endif
|
||||
gtk_label_set_line_wrap(GTK_LABEL(descriptionLabel), TRUE);
|
||||
gtk_label_set_selectable(GTK_LABEL(descriptionLabel), TRUE);
|
||||
gtk_misc_set_alignment(GTK_MISC(descriptionLabel), 0, 0.5);
|
||||
|
||||
// this is honestly how they suggest you indent a section
|
||||
GtkWidget* indentBox = gtk_hbox_new(FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), indentBox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(indentBox), gtk_label_new(""), FALSE, FALSE, 6);
|
||||
@@ -451,16 +460,19 @@ bool UIShowCrashUI(const StringTable& fi
|
||||
g_signal_connect(gViewReportButton, "clicked", G_CALLBACK(ViewReportClicked), 0);
|
||||
|
||||
GtkWidget* scrolled = gtk_scrolled_window_new(0, 0);
|
||||
gtk_container_add(GTK_CONTAINER(innerVBox), scrolled);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
|
||||
GTK_SHADOW_IN);
|
||||
+#if (MOZ_WIDGET_GTK >= 3)
|
||||
+ gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scrolled), 100);
|
||||
+#endif
|
||||
|
||||
gCommentTextLabel = gtk_label_new(gStrings[ST_COMMENTGRAYTEXT].c_str());
|
||||
gCommentText = gtk_text_view_new();
|
||||
gtk_label_set_mnemonic_widget(GTK_LABEL(gCommentTextLabel), gCommentText);
|
||||
gtk_text_view_set_accepts_tab(GTK_TEXT_VIEW(gCommentText), FALSE);
|
||||
g_signal_connect(gCommentText, "focus-in-event", G_CALLBACK(CommentFocusChange), 0);
|
||||
g_signal_connect(gCommentText, "focus-out-event", G_CALLBACK(CommentFocusChange), 0);
|
||||
|
||||
@@ -509,17 +521,21 @@ bool UIShowCrashUI(const StringTable& fi
|
||||
g_free(dir);
|
||||
gThrobber = gtk_image_new_from_file(path);
|
||||
gtk_box_pack_start(GTK_BOX(progressBox), gThrobber, FALSE, FALSE, 0);
|
||||
|
||||
gProgressLabel =
|
||||
gtk_label_new(gStrings[ST_REPORTPRESUBMIT].c_str());
|
||||
gtk_box_pack_start(GTK_BOX(progressBox), gProgressLabel, TRUE, TRUE, 0);
|
||||
// force the label to line wrap
|
||||
+#if (MOZ_WIDGET_GTK == 2)
|
||||
gtk_widget_set_size_request(gProgressLabel, 400, -1);
|
||||
+#else
|
||||
+ gtk_label_set_max_width_chars(GTK_LABEL(gProgressLabel), LABEL_MAX_CHAR_WIDTH);
|
||||
+#endif
|
||||
gtk_label_set_line_wrap(GTK_LABEL(gProgressLabel), TRUE);
|
||||
|
||||
GtkWidget* buttonBox = gtk_hbutton_box_new();
|
||||
gtk_box_pack_end(GTK_BOX(vbox), buttonBox, FALSE, FALSE, 0);
|
||||
gtk_box_set_spacing(GTK_BOX(buttonBox), 6);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END);
|
||||
|
||||
gCloseButton =
|
|
@ -1,587 +0,0 @@
|
|||
diff -up mozilla-release/gfx/layers/basic/BasicCompositor.cpp.1205045 mozilla-release/gfx/layers/basic/BasicCompositor.cpp
|
||||
--- mozilla-release/gfx/layers/basic/BasicCompositor.cpp.1205045 2015-09-18 00:13:31.000000000 +0200
|
||||
+++ mozilla-release/gfx/layers/basic/BasicCompositor.cpp 2015-09-22 12:57:51.047938671 +0200
|
||||
@@ -509,11 +509,11 @@ BasicCompositor::BeginFrame(const nsIntR
|
||||
}
|
||||
|
||||
if (mTarget) {
|
||||
- // If we have a copy target, then we don't have a widget-provided mDrawTarget (currently). Create a dummy
|
||||
+ // If we have a copy target, then we don't have a widget-provided mDrawTarget (currently). Use a dummy
|
||||
// placeholder so that CreateRenderTarget() works.
|
||||
- mDrawTarget = gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(IntSize(1,1), SurfaceFormat::B8G8R8A8);
|
||||
+ mDrawTarget = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
|
||||
} else {
|
||||
- mDrawTarget = mWidget->StartRemoteDrawing();
|
||||
+ mDrawTarget = mWidget->StartRemoteDrawingInRegion(mInvalidRegion);
|
||||
}
|
||||
if (!mDrawTarget) {
|
||||
return;
|
||||
diff -up mozilla-release/widget/gtk/nsWindow.cpp.1205045 mozilla-release/widget/gtk/nsWindow.cpp
|
||||
--- mozilla-release/widget/gtk/nsWindow.cpp.1205045 2015-09-22 12:57:51.043938667 +0200
|
||||
+++ mozilla-release/widget/gtk/nsWindow.cpp 2015-09-22 12:57:51.049938673 +0200
|
||||
@@ -351,6 +351,11 @@ nsWindow::nsWindow()
|
||||
|
||||
#ifdef MOZ_X11
|
||||
mOldFocusWindow = 0;
|
||||
+
|
||||
+ mXDisplay = nullptr;
|
||||
+ mXWindow = None;
|
||||
+ mXVisual = nullptr;
|
||||
+ mXDepth = 0;
|
||||
#endif /* MOZ_X11 */
|
||||
mPluginType = PluginType_NONE;
|
||||
|
||||
@@ -649,10 +654,6 @@ nsWindow::Destroy(void)
|
||||
gPluginFocusWindow->LoseNonXEmbedPluginFocus();
|
||||
}
|
||||
#endif /* MOZ_X11 && MOZ_WIDGET_GTK2 */
|
||||
-
|
||||
- // Destroy thebes surface now. Badness can happen if we destroy
|
||||
- // the surface after its X Window.
|
||||
- mThebesSurface = nullptr;
|
||||
|
||||
GtkWidget *owningWidget = GetMozContainerWidget();
|
||||
if (mShell) {
|
||||
@@ -2069,7 +2070,13 @@ ExtractExposeRegion(nsIntRegion& aRegion
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gboolean
|
||||
-nsWindow::OnExposeEvent(GdkEventExpose *aEvent)
|
||||
+nsWindow::
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+Event(GdkEventExpose *aEvent)
|
||||
#else
|
||||
gboolean
|
||||
nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
@@ -2191,7 +2198,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- RefPtr<DrawTarget> dt = StartRemoteDrawing();
|
||||
+ RefPtr<DrawTarget> dt = GetDrawTarget(region);
|
||||
if(!dt) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2269,8 +2276,8 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
}
|
||||
}
|
||||
# ifdef MOZ_HAVE_SHMIMAGE
|
||||
- if (mShmImage && MOZ_LIKELY(!mIsDestroyed)) {
|
||||
- mShmImage->Put(mGdkWindow, region);
|
||||
+ if (mShmImage && MOZ_LIKELY(!mIsDestroyed)) {
|
||||
+ mShmImage->Put(mXDisplay, mXWindow, region);
|
||||
}
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
#endif // MOZ_X11
|
||||
@@ -3818,9 +3825,12 @@ nsWindow::Create(nsIWidget *aPare
|
||||
|
||||
#ifdef MOZ_X11
|
||||
if (mGdkWindow) {
|
||||
- // force creation of native window via internal call to gdk_window_ensure_native
|
||||
- // in case it was not created already
|
||||
- gdk_x11_window_get_xid(mGdkWindow);
|
||||
+ mXDisplay = GDK_WINDOW_XDISPLAY(mGdkWindow);
|
||||
+ mXWindow = gdk_x11_window_get_xid(mGdkWindow);
|
||||
+
|
||||
+ GdkVisual* gdkVisual = gdk_window_get_visual(mGdkWindow);
|
||||
+ mXVisual = gdk_x11_visual_get_xvisual(gdkVisual);
|
||||
+ mXDepth = gdk_visual_get_depth(gdkVisual);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6155,31 +6165,42 @@ nsWindow::GetSurfaceForGdkDrawable(GdkDr
|
||||
#endif
|
||||
|
||||
TemporaryRef<DrawTarget>
|
||||
-nsWindow::StartRemoteDrawing()
|
||||
+nsWindow::GetDrawTarget(const nsIntRegion& aRegion)
|
||||
{
|
||||
- gfxASurface *surf = GetThebesSurface();
|
||||
- if (!surf) {
|
||||
+ if (!mGdkWindow) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- nsIntSize size = surf->GetSize();
|
||||
+ nsIntRect bounds = aRegion.GetBounds();
|
||||
+ IntSize size(bounds.XMost(), bounds.YMost());
|
||||
if (size.width <= 0 || size.height <= 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- gfxPlatform *platform = gfxPlatform::GetPlatform();
|
||||
- if (platform->SupportsAzureContentForType(BackendType::CAIRO) ||
|
||||
- surf->GetType() == gfxSurfaceType::Xlib) {
|
||||
- return platform->CreateDrawTargetForSurface(surf, size);
|
||||
- } else if (platform->SupportsAzureContentForType(BackendType::SKIA) &&
|
||||
- surf->GetType() == gfxSurfaceType::Image) {
|
||||
- gfxImageSurface* imgSurf = static_cast<gfxImageSurface*>(surf);
|
||||
- SurfaceFormat format = ImageFormatToSurfaceFormat(imgSurf->Format());
|
||||
- return platform->CreateDrawTargetForData(
|
||||
- imgSurf->Data(), size, imgSurf->Stride(), format);
|
||||
- } else {
|
||||
- return nullptr;
|
||||
+ RefPtr<DrawTarget> dt;
|
||||
+#ifdef MOZ_X11
|
||||
+# ifdef MOZ_HAVE_SHMIMAGE
|
||||
+ if (nsShmImage::UseShm()) {
|
||||
+ dt = nsShmImage::EnsureShmImage(size,
|
||||
+ mXDisplay, mXVisual, mXDepth,
|
||||
+ mShmImage);
|
||||
}
|
||||
+# endif // MOZ_HAVE_SHMIMAGE
|
||||
+ if (!dt) {
|
||||
+ RefPtr<gfxXlibSurface> surf = new gfxXlibSurface(mXDisplay, mXWindow, mXVisual, size);
|
||||
+ if (!surf->CairoStatus()) {
|
||||
+ dt = gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(surf.get(), surf->GetSize());
|
||||
+ }
|
||||
+ }
|
||||
+#endif // MOZ_X11
|
||||
+
|
||||
+ return dt.forget();
|
||||
+}
|
||||
+
|
||||
+TemporaryRef<DrawTarget>
|
||||
+nsWindow::StartRemoteDrawingInRegion(nsIntRegion& aInvalidRegion)
|
||||
+{
|
||||
+ return GetDrawTarget(aInvalidRegion);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -6191,73 +6212,11 @@ nsWindow::EndRemoteDrawingInRegion(DrawT
|
||||
return;
|
||||
}
|
||||
|
||||
- if (mThebesSurface) {
|
||||
- aInvalidRegion.AndWith(nsIntRect(nsIntPoint(0, 0), mThebesSurface->GetSize()));
|
||||
- }
|
||||
-
|
||||
- mShmImage->Put(mGdkWindow, aInvalidRegion);
|
||||
-
|
||||
+ mShmImage->Put(mXDisplay, mXWindow, aInvalidRegion);
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
#endif // MOZ_X11
|
||||
}
|
||||
|
||||
-// return the gfxASurface for rendering to this widget
|
||||
-gfxASurface*
|
||||
-nsWindow::GetThebesSurface()
|
||||
-{
|
||||
- if (!mGdkWindow)
|
||||
- return nullptr;
|
||||
-
|
||||
-#ifdef MOZ_X11
|
||||
- gint width, height;
|
||||
-
|
||||
-#if (MOZ_WIDGET_GTK == 2)
|
||||
- gdk_drawable_get_size(GDK_DRAWABLE(mGdkWindow), &width, &height);
|
||||
-#else
|
||||
- width = GdkCoordToDevicePixels(gdk_window_get_width(mGdkWindow));
|
||||
- height = GdkCoordToDevicePixels(gdk_window_get_height(mGdkWindow));
|
||||
-#endif
|
||||
-
|
||||
- // Owen Taylor says this is the right thing to do!
|
||||
- width = std::min(32767, width);
|
||||
- height = std::min(32767, height);
|
||||
- gfxIntSize size(width, height);
|
||||
-
|
||||
- GdkVisual *gdkVisual = gdk_window_get_visual(mGdkWindow);
|
||||
- Visual* visual = gdk_x11_visual_get_xvisual(gdkVisual);
|
||||
-
|
||||
-# ifdef MOZ_HAVE_SHMIMAGE
|
||||
- bool usingShm = false;
|
||||
- if (nsShmImage::UseShm()) {
|
||||
- // EnsureShmImage() is a dangerous interface, but we guarantee
|
||||
- // that the thebes surface and the shmimage have the same
|
||||
- // lifetime
|
||||
- mThebesSurface =
|
||||
- nsShmImage::EnsureShmImage(size,
|
||||
- visual, gdk_visual_get_depth(gdkVisual),
|
||||
- mShmImage);
|
||||
- usingShm = mThebesSurface != nullptr;
|
||||
- }
|
||||
- if (!usingShm)
|
||||
-# endif // MOZ_HAVE_SHMIMAGE
|
||||
- {
|
||||
- mThebesSurface = new gfxXlibSurface
|
||||
- (GDK_WINDOW_XDISPLAY(mGdkWindow),
|
||||
- gdk_x11_window_get_xid(mGdkWindow),
|
||||
- visual,
|
||||
- size);
|
||||
- }
|
||||
-#endif // MOZ_X11
|
||||
-
|
||||
- // if the surface creation is reporting an error, then
|
||||
- // we don't have a surface to give back
|
||||
- if (mThebesSurface && mThebesSurface->CairoStatus() != 0) {
|
||||
- mThebesSurface = nullptr;
|
||||
- }
|
||||
-
|
||||
- return mThebesSurface;
|
||||
-}
|
||||
-
|
||||
// Code shared begin BeginMoveDrag and BeginResizeDrag
|
||||
bool
|
||||
nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent,
|
||||
diff -up mozilla-release/widget/gtk/nsWindow.h.1205045 mozilla-release/widget/gtk/nsWindow.h
|
||||
--- mozilla-release/widget/gtk/nsWindow.h.1205045 2015-09-18 00:13:31.000000000 +0200
|
||||
+++ mozilla-release/widget/gtk/nsWindow.h 2015-09-22 12:57:51.049938673 +0200
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
gpointer aData);
|
||||
|
||||
virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget>
|
||||
- StartRemoteDrawing() override;
|
||||
+ StartRemoteDrawingInRegion(nsIntRegion& aInvalidRegion) override;
|
||||
virtual void EndRemoteDrawingInRegion(mozilla::gfx::DrawTarget* aDrawTarget,
|
||||
nsIntRegion& aInvalidRegion) override;
|
||||
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override;
|
||||
nsresult UpdateTranslucentWindowAlphaInternal(const nsIntRect& aRect,
|
||||
uint8_t* aAlphas, int32_t aStride);
|
||||
- virtual gfxASurface *GetThebesSurface();
|
||||
+ virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget> GetDrawTarget(const nsIntRegion& aRegion);
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
static already_AddRefed<gfxASurface> GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
|
||||
@@ -393,11 +393,17 @@ private:
|
||||
guint32 mLastScrollEventTime;
|
||||
#endif
|
||||
|
||||
+#ifdef MOZ_X11
|
||||
+ Display* mXDisplay;
|
||||
+ Drawable mXWindow;
|
||||
+ Visual* mXVisual;
|
||||
+ int mXDepth;
|
||||
+#endif
|
||||
+
|
||||
#ifdef MOZ_HAVE_SHMIMAGE
|
||||
- // If we're using xshm rendering, mThebesSurface wraps mShmImage
|
||||
+ // If we're using xshm rendering
|
||||
nsRefPtr<nsShmImage> mShmImage;
|
||||
#endif
|
||||
- nsRefPtr<gfxASurface> mThebesSurface;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
nsRefPtr<mozilla::a11y::Accessible> mRootAccessible;
|
||||
diff -up mozilla-release/widget/nsIWidget.h.1205045 mozilla-release/widget/nsIWidget.h
|
||||
--- mozilla-release/widget/nsIWidget.h.1205045 2015-09-18 00:13:31.000000000 +0200
|
||||
+++ mozilla-release/widget/nsIWidget.h 2015-09-22 13:24:51.542447323 +0200
|
||||
@@ -1706,6 +1706,9 @@ class nsIWidget : public nsISupports {
|
||||
* before each composition.
|
||||
*/
|
||||
virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawing() = 0;
|
||||
+ virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawingInRegion(nsIntRegion& aInvalidRegion) {
|
||||
+ return StartRemoteDrawing();
|
||||
+ }
|
||||
|
||||
/**
|
||||
* Ensure that what was painted into the DrawTarget returned from
|
||||
diff -up mozilla-release/widget/nsShmImage.cpp.1205045 mozilla-release/widget/nsShmImage.cpp
|
||||
--- mozilla-release/widget/nsShmImage.cpp.1205045 2015-09-18 00:13:31.000000000 +0200
|
||||
+++ mozilla-release/widget/nsShmImage.cpp 2015-09-22 12:57:51.050938674 +0200
|
||||
@@ -15,11 +15,11 @@
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include "gfxPlatformGtk.h"
|
||||
#endif
|
||||
-#include "gfxImageSurface.h"
|
||||
|
||||
#ifdef MOZ_HAVE_SHMIMAGE
|
||||
|
||||
using namespace mozilla::ipc;
|
||||
+using namespace mozilla::gfx;
|
||||
|
||||
// If XShm isn't available to our client, we'll try XShm once, fail,
|
||||
// set this to false and then never try again.
|
||||
@@ -33,14 +33,25 @@ bool nsShmImage::UseShm()
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef MOZ_WIDGET_GTK
|
||||
+static int gShmError = 0;
|
||||
+
|
||||
+static int
|
||||
+TrapShmError(Display* aDisplay, XErrorEvent* aEvent)
|
||||
+{
|
||||
+ // store the error code and ignore the error
|
||||
+ gShmError = aEvent->error_code;
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
already_AddRefed<nsShmImage>
|
||||
nsShmImage::Create(const gfxIntSize& aSize,
|
||||
- Visual* aVisual, unsigned int aDepth)
|
||||
+ Display* aDisplay, Visual* aVisual, unsigned int aDepth)
|
||||
{
|
||||
- Display* dpy = DISPLAY();
|
||||
-
|
||||
nsRefPtr<nsShmImage> shm = new nsShmImage();
|
||||
- shm->mImage = XShmCreateImage(dpy, aVisual, aDepth,
|
||||
+ shm->mDisplay = aDisplay;
|
||||
+ shm->mImage = XShmCreateImage(aDisplay, aVisual, aDepth,
|
||||
ZPixmap, nullptr,
|
||||
&(shm->mInfo),
|
||||
aSize.width, aSize.height);
|
||||
@@ -60,17 +71,20 @@ nsShmImage::Create(const gfxIntSize& aSi
|
||||
shm->mImage->data = static_cast<char*>(shm->mSegment->memory());
|
||||
shm->mInfo.readOnly = False;
|
||||
|
||||
- int xerror = 0;
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
- gdk_error_trap_push();
|
||||
- Status attachOk = XShmAttach(dpy, &shm->mInfo);
|
||||
- XSync(dpy, False);
|
||||
- xerror = gdk_error_trap_pop();
|
||||
+ gShmError = 0;
|
||||
+ XErrorHandler previousHandler = XSetErrorHandler(TrapShmError);
|
||||
+ Status attachOk = XShmAttach(aDisplay, &shm->mInfo);
|
||||
+ XSync(aDisplay, False);
|
||||
+ XSetErrorHandler(previousHandler);
|
||||
+ if (gShmError) {
|
||||
+ attachOk = 0;
|
||||
+ }
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
- Status attachOk = XShmAttach(dpy, &shm->mInfo);
|
||||
+ Status attachOk = XShmAttach(aDisplay, &shm->mInfo);
|
||||
#endif
|
||||
|
||||
- if (!attachOk || xerror) {
|
||||
+ if (!attachOk) {
|
||||
// Assume XShm isn't available, and don't attempt to use it
|
||||
// again.
|
||||
gShmAvailable = false;
|
||||
@@ -84,7 +98,7 @@ nsShmImage::Create(const gfxIntSize& aSi
|
||||
if ((shm->mImage->red_mask == 0xff0000) &&
|
||||
(shm->mImage->green_mask == 0xff00) &&
|
||||
(shm->mImage->blue_mask == 0xff)) {
|
||||
- shm->mFormat = gfxImageFormat::ARGB32;
|
||||
+ shm->mFormat = SurfaceFormat::B8G8R8A8;
|
||||
break;
|
||||
}
|
||||
goto unsupported;
|
||||
@@ -93,12 +107,13 @@ nsShmImage::Create(const gfxIntSize& aSi
|
||||
if ((shm->mImage->red_mask == 0xff0000) &&
|
||||
(shm->mImage->green_mask == 0xff00) &&
|
||||
(shm->mImage->blue_mask == 0xff)) {
|
||||
- shm->mFormat = gfxImageFormat::RGB24;
|
||||
+ shm->mFormat = SurfaceFormat::B8G8R8X8;
|
||||
break;
|
||||
}
|
||||
goto unsupported;
|
||||
case 16:
|
||||
- shm->mFormat = gfxImageFormat::RGB16_565; break;
|
||||
+ shm->mFormat = SurfaceFormat::R5G6B5;
|
||||
+ break;
|
||||
unsupported:
|
||||
default:
|
||||
NS_WARNING("Unsupported XShm Image format!");
|
||||
@@ -108,20 +123,19 @@ nsShmImage::Create(const gfxIntSize& aSi
|
||||
return shm.forget();
|
||||
}
|
||||
|
||||
-already_AddRefed<gfxASurface>
|
||||
-nsShmImage::AsSurface()
|
||||
+already_AddRefed<DrawTarget>
|
||||
+nsShmImage::CreateDrawTarget()
|
||||
{
|
||||
- return nsRefPtr<gfxASurface>(
|
||||
- new gfxImageSurface(static_cast<unsigned char*>(mSegment->memory()),
|
||||
- mSize,
|
||||
- mImage->bytes_per_line,
|
||||
- mFormat)
|
||||
- ).forget();
|
||||
+ return gfxPlatform::GetPlatform()->CreateDrawTargetForData(
|
||||
+ static_cast<unsigned char*>(mSegment->memory()),
|
||||
+ mSize,
|
||||
+ mImage->bytes_per_line,
|
||||
+ mFormat);
|
||||
}
|
||||
|
||||
-#if (MOZ_WIDGET_GTK == 2)
|
||||
+#ifdef MOZ_WIDGET_GTK
|
||||
void
|
||||
-nsShmImage::Put(GdkWindow* aWindow, const nsIntRegion& aRegion)
|
||||
+nsShmImage::Put(Display* aDisplay, Drawable aWindow, const nsIntRegion& aRegion)
|
||||
{
|
||||
GdkDrawable* gd;
|
||||
gint dx, dy;
|
||||
@@ -130,45 +144,16 @@ nsShmImage::Put(GdkWindow* aWindow, cons
|
||||
Display* dpy = gdk_x11_get_default_xdisplay();
|
||||
Drawable d = GDK_DRAWABLE_XID(gd);
|
||||
|
||||
- GC gc = XCreateGC(dpy, d, 0, nullptr);
|
||||
+ GC gc = XCreateGC(aDisplay, aWindow, 0, nullptr);
|
||||
nsIntRegionRectIterator iter(aRegion);
|
||||
for (const nsIntRect *r = iter.Next(); r; r = iter.Next()) {
|
||||
- XShmPutImage(dpy, d, gc, mImage,
|
||||
+ XShmPutImage(aDisplay, aWindow, gc, mImage,
|
||||
r->x, r->y,
|
||||
- r->x - dx, r->y - dy,
|
||||
- r->width, r->height,
|
||||
- False);
|
||||
- }
|
||||
- XFreeGC(dpy, gc);
|
||||
-
|
||||
- // FIXME/bug 597336: we need to ensure that the shm image isn't
|
||||
- // scribbled over before all its pending XShmPutImage()s complete.
|
||||
- // However, XSync() is an unnecessarily heavyweight
|
||||
- // synchronization mechanism; other options are possible. If this
|
||||
- // XSync is shown to hurt responsiveness, we need to explore the
|
||||
- // other options.
|
||||
- XSync(dpy, False);
|
||||
-}
|
||||
-
|
||||
-#elif (MOZ_WIDGET_GTK == 3)
|
||||
-void
|
||||
-nsShmImage::Put(GdkWindow* aWindow, const nsIntRegion& aRegion)
|
||||
-{
|
||||
- Display* dpy = gdk_x11_get_default_xdisplay();
|
||||
- Drawable d = GDK_WINDOW_XID(aWindow);
|
||||
- int dx = 0, dy = 0;
|
||||
-
|
||||
- GC gc = XCreateGC(dpy, d, 0, nullptr);
|
||||
- nsIntRegionRectIterator iter(aRegion);
|
||||
- for (const nsIntRect *r = iter.Next(); r; r = iter.Next()) {
|
||||
- XShmPutImage(dpy, d, gc, mImage,
|
||||
r->x, r->y,
|
||||
- r->x - dx, r->y - dy,
|
||||
r->width, r->height,
|
||||
False);
|
||||
}
|
||||
-
|
||||
- XFreeGC(dpy, gc);
|
||||
+ XFreeGC(aDisplay, gc);
|
||||
|
||||
// FIXME/bug 597336: we need to ensure that the shm image isn't
|
||||
// scribbled over before all its pending XShmPutImage()s complete.
|
||||
@@ -176,7 +161,7 @@ nsShmImage::Put(GdkWindow* aWindow, cons
|
||||
// synchronization mechanism; other options are possible. If this
|
||||
// XSync is shown to hurt responsiveness, we need to explore the
|
||||
// other options.
|
||||
- XSync(dpy, False);
|
||||
+ XSync(aDisplay, False);
|
||||
}
|
||||
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
@@ -198,9 +183,10 @@ nsShmImage::Put(QWindow* aWindow, QRect&
|
||||
}
|
||||
#endif
|
||||
|
||||
-already_AddRefed<gfxASurface>
|
||||
-nsShmImage::EnsureShmImage(const gfxIntSize& aSize, Visual* aVisual, unsigned int aDepth,
|
||||
- nsRefPtr<nsShmImage>& aImage)
|
||||
+already_AddRefed<DrawTarget>
|
||||
+nsShmImage::EnsureShmImage(const gfxIntSize& aSize,
|
||||
+ Display* aDisplay, Visual* aVisual, unsigned int aDepth,
|
||||
+ nsRefPtr<nsShmImage>& aImage)
|
||||
{
|
||||
if (!aImage || aImage->Size() != aSize) {
|
||||
// Because we XSync() after XShmAttach() to trap errors, we
|
||||
@@ -208,9 +194,9 @@ nsShmImage::EnsureShmImage(const gfxIntS
|
||||
// into its address space, so it's OK to destroy the old image
|
||||
// here even if there are outstanding Puts. The Detach is
|
||||
// ordered after the Puts.
|
||||
- aImage = nsShmImage::Create(aSize, aVisual, aDepth);
|
||||
+ aImage = nsShmImage::Create(aSize, aDisplay, aVisual, aDepth);
|
||||
}
|
||||
- return !aImage ? nullptr : aImage->AsSurface();
|
||||
+ return !aImage ? nullptr : aImage->CreateDrawTarget();
|
||||
}
|
||||
|
||||
#endif // defined(MOZ_X11) && defined(MOZ_HAVE_SHAREDMEMORYSYSV)
|
||||
diff -up mozilla-release/widget/nsShmImage.h.1205045 mozilla-release/widget/nsShmImage.h
|
||||
--- mozilla-release/widget/nsShmImage.h.1205045 2015-09-18 00:13:31.000000000 +0200
|
||||
+++ mozilla-release/widget/nsShmImage.h 2015-09-22 12:57:51.051938675 +0200
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
#ifdef MOZ_HAVE_SHMIMAGE
|
||||
|
||||
+#include "mozilla/gfx/2D.h"
|
||||
#include "nsIWidget.h"
|
||||
-#include "gfxTypes.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#include "mozilla/X11Util.h"
|
||||
@@ -24,15 +24,10 @@
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
|
||||
-#if defined(MOZ_WIDGET_GTK)
|
||||
-#define DISPLAY gdk_x11_get_default_xdisplay
|
||||
-#elif defined(MOZ_WIDGET_QT)
|
||||
-#define DISPLAY mozilla::DefaultXDisplay
|
||||
-#endif
|
||||
-
|
||||
+#ifdef MOZ_WIDGET_QT
|
||||
class QRect;
|
||||
class QWindow;
|
||||
-class gfxASurface;
|
||||
+#endif
|
||||
|
||||
class nsShmImage {
|
||||
// bug 1168843, compositor thread may create shared memory instances that are destroyed by main thread on shutdown, so this must use thread-safe RC to avoid hitting assertion
|
||||
@@ -41,31 +36,31 @@ class nsShmImage {
|
||||
typedef mozilla::ipc::SharedMemorySysV SharedMemorySysV;
|
||||
|
||||
public:
|
||||
- typedef gfxImageFormat Format;
|
||||
-
|
||||
static bool UseShm();
|
||||
static already_AddRefed<nsShmImage>
|
||||
- Create(const gfxIntSize& aSize, Visual* aVisual, unsigned int aDepth);
|
||||
- static already_AddRefed<gfxASurface>
|
||||
- EnsureShmImage(const gfxIntSize& aSize, Visual* aVisual, unsigned int aDepth,
|
||||
+ Create(const gfxIntSize& aSize,
|
||||
+ Display* aDisplay, Visual* aVisual, unsigned int aDepth);
|
||||
+ static already_AddRefed<mozilla::gfx::DrawTarget>
|
||||
+ EnsureShmImage(const gfxIntSize& aSize,
|
||||
+ Display* aDisplay, Visual* aVisual, unsigned int aDepth,
|
||||
nsRefPtr<nsShmImage>& aImage);
|
||||
|
||||
private:
|
||||
~nsShmImage() {
|
||||
if (mImage) {
|
||||
- mozilla::FinishX(DISPLAY());
|
||||
+ mozilla::FinishX(mDisplay);
|
||||
if (mXAttached) {
|
||||
- XShmDetach(DISPLAY(), &mInfo);
|
||||
+ XShmDetach(mDisplay, &mInfo);
|
||||
}
|
||||
XDestroyImage(mImage);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
- already_AddRefed<gfxASurface> AsSurface();
|
||||
+ already_AddRefed<mozilla::gfx::DrawTarget> CreateDrawTarget();
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
- void Put(GdkWindow* aWindow, const nsIntRegion& aRegion);
|
||||
+ void Put(Display* aDisplay, Drawable aWindow, const nsIntRegion& aRegion);
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
void Put(QWindow* aWindow, QRect& aRect);
|
||||
#endif
|
||||
@@ -75,14 +70,17 @@ public:
|
||||
private:
|
||||
nsShmImage()
|
||||
: mImage(nullptr)
|
||||
+ , mDisplay(nullptr)
|
||||
+ , mFormat(mozilla::gfx::SurfaceFormat::UNKNOWN)
|
||||
, mXAttached(false)
|
||||
{ mInfo.shmid = SharedMemorySysV::NULLHandle(); }
|
||||
|
||||
nsRefPtr<SharedMemorySysV> mSegment;
|
||||
XImage* mImage;
|
||||
+ Display* mDisplay;
|
||||
XShmSegmentInfo mInfo;
|
||||
gfxIntSize mSize;
|
||||
- Format mFormat;
|
||||
+ mozilla::gfx::SurfaceFormat mFormat;
|
||||
bool mXAttached;
|
||||
};
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
Add ability to specify system paths to @old_configure_options
|
||||
|
||||
--- a/build/moz.configure/old.configure 2016-07-04 12:03:37.503301144 -0400
|
||||
+++ b/build/moz.configure/old.configure 2016-07-04 12:04:33.443147224 -0400
|
||||
@@ -149,16 +149,19 @@
|
||||
def all_options(help):
|
||||
return list(options)
|
||||
|
||||
return depends(prepare_configure, extra_old_configure_args, all_options,
|
||||
*options)
|
||||
|
||||
|
||||
@old_configure_options(
|
||||
+ '--libdir',
|
||||
+ '--includedir',
|
||||
+ '--datadir',
|
||||
'--cache-file',
|
||||
'--enable-accessibility',
|
||||
'--enable-address-sanitizer',
|
||||
'--enable-alsa',
|
||||
'--enable-android-omx',
|
||||
'--enable-android-resource-constrained',
|
||||
'--enable-approximate-location',
|
||||
'--enable-b2g-bt',
|
|
@ -1,5 +1,5 @@
|
|||
# HG changeset patch
|
||||
# Parent 972c67cdd5dd4463abbee60036b686d4cb78e616
|
||||
# Parent 1d3f5cacba056949ea9a56d4d805c3073efe403b
|
||||
Description: Add KDE integration to Firefox (toolkit parts)
|
||||
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
|
||||
Author: Lubos Lunak <lunak@suse.com>
|
||||
|
@ -27,7 +27,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
|||
#include "prefread.h"
|
||||
#include "prefapi_private_data.h"
|
||||
|
||||
@@ -1145,16 +1146,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
|
||||
@@ -1162,16 +1163,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
|
||||
|
||||
static nsresult pref_LoadPrefsInDirList(const char *listId)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
|||
return NS_OK;
|
||||
|
||||
bool hasMore;
|
||||
@@ -1170,17 +1189,17 @@ static nsresult pref_LoadPrefsInDirList(
|
||||
@@ -1187,17 +1206,17 @@ static nsresult pref_LoadPrefsInDirList(
|
||||
|
||||
nsAutoCString leaf;
|
||||
path->GetNativeLeafName(leaf);
|
||||
|
@ -81,7 +81,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
|||
{
|
||||
nsZipItemPtr<char> manifest(jarReader, name, true);
|
||||
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
|
||||
@@ -1274,24 +1293,36 @@ static nsresult pref_InitInitialObjects(
|
||||
@@ -1291,24 +1310,36 @@ static nsresult pref_InitInitialObjects(
|
||||
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
|
||||
static const char* specialFiles[] = {
|
||||
#if defined(XP_MACOSX)
|
||||
|
@ -141,7 +141,7 @@ diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
|
|||
DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
|
||||
DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
FINAL_TARGET_PP_FILES += [
|
||||
diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py
|
||||
--- a/python/mozbuild/mozpack/chrome/flags.py
|
||||
+++ b/python/mozbuild/mozpack/chrome/flags.py
|
||||
|
@ -187,7 +187,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac
|
|||
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
|
||||
--- a/toolkit/components/downloads/moz.build
|
||||
+++ b/toolkit/components/downloads/moz.build
|
||||
@@ -60,15 +60,16 @@ if not CONFIG['MOZ_SUITE']:
|
||||
@@ -60,17 +60,18 @@ if not CONFIG['MOZ_SUITE']:
|
||||
'nsDownloadManagerUI.js',
|
||||
'nsDownloadManagerUI.manifest',
|
||||
]
|
||||
|
@ -205,6 +205,8 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa
|
|||
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
|
||||
|
||||
CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
|
||||
--- a/toolkit/components/downloads/nsDownloadManager.cpp
|
||||
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
|
||||
|
@ -2288,7 +2290,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
|
|||
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
|
||||
--- a/toolkit/xre/moz.build
|
||||
+++ b/toolkit/xre/moz.build
|
||||
@@ -48,17 +48,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
|
||||
@@ -47,17 +47,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
|
||||
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
||||
EXPORTS += ['nsQAppInstance.h']
|
||||
SOURCES += [
|
||||
|
@ -2708,18 +2710,18 @@ new file mode 100644
|
|||
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
|
||||
--- a/uriloader/exthandler/moz.build
|
||||
+++ b/uriloader/exthandler/moz.build
|
||||
@@ -75,17 +75,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
|
||||
else:
|
||||
# These files can't be built in unified mode because they redefine LOG.
|
||||
@@ -77,17 +77,19 @@ else:
|
||||
SOURCES += [
|
||||
osdir + '/nsOSHelperAppService.cpp',
|
||||
]
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
||||
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
||||
UNIFIED_SOURCES += [
|
||||
+ 'unix/nsCommonRegistry.cpp',
|
||||
'unix/nsGNOMERegistry.cpp',
|
||||
+ 'unix/nsKDERegistry.cpp',
|
||||
+ 'unix/nsKDERegistry.cpp',
|
||||
'unix/nsMIMEInfoUnix.cpp',
|
||||
]
|
||||
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
|
@ -2728,7 +2730,7 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
|
|||
'android/nsExternalSharingAppService.cpp',
|
||||
'android/nsExternalURLHandlerService.cpp',
|
||||
'android/nsMIMEInfoAndroid.cpp',
|
||||
@@ -129,16 +131,17 @@ include('/ipc/chromium/chromium-config.m
|
||||
@@ -131,16 +133,17 @@ include('/ipc/chromium/chromium-config.m
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
|
@ -3164,7 +3166,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
|
|||
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
|
||||
--- a/widget/gtk/moz.build
|
||||
+++ b/widget/gtk/moz.build
|
||||
@@ -90,16 +90,17 @@ else:
|
||||
@@ -87,16 +87,17 @@ else:
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -3672,7 +3674,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||
diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build
|
||||
--- a/xpcom/components/moz.build
|
||||
+++ b/xpcom/components/moz.build
|
||||
@@ -47,12 +47,13 @@ FINAL_LIBRARY = 'xul'
|
||||
@@ -44,12 +44,13 @@ FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'!..',
|
||||
'../base',
|
|
@ -1,142 +0,0 @@
|
|||
diff -urN mozilla-release.orig/browser/components/shell/src/nsKDEShellService.cpp mozilla-release/browser/components/shell/src/nsKDEShellService.cpp
|
||||
--- mozilla-release.orig/browser/components/shell/src/nsKDEShellService.cpp 2014-08-04 17:37:32.064081427 +0400
|
||||
+++ mozilla-release/browser/components/shell/src/nsKDEShellService.cpp 2014-08-04 17:42:22.108041230 +0400
|
||||
@@ -17,6 +17,21 @@
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsArrayUtils.h"
|
||||
+#include "nsIImageLoadingContent.h"
|
||||
+#include "imgIRequest.h"
|
||||
+#include "nsIStringBundle.h"
|
||||
+#include "nsIDOMHTMLImageElement.h"
|
||||
+#include "prenv.h"
|
||||
+
|
||||
+#include <glib.h>
|
||||
+#include <glib-object.h>
|
||||
+#include <gtk/gtk.h>
|
||||
+#include <gdk/gdk.h>
|
||||
+#if defined(MOZ_WIDGET_GTK)
|
||||
+#include "nsIImageToPixbuf.h"
|
||||
+#endif
|
||||
+#include <limits.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -28,6 +43,29 @@
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+static nsresult
|
||||
+WriteImage(const nsCString& aPath, imgIContainer* aImage)
|
||||
+{
|
||||
+#if !defined(MOZ_WIDGET_GTK)
|
||||
+ return NS_ERROR_NOT_AVAILABLE;
|
||||
+#else
|
||||
+ nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
|
||||
+ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");
|
||||
+ if (!imgToPixbuf)
|
||||
+ return NS_ERROR_NOT_AVAILABLE;
|
||||
+
|
||||
+ GdkPixbuf* pixbuf = imgToPixbuf->ConvertImageToPixbuf(aImage);
|
||||
+ if (!pixbuf)
|
||||
+ return NS_ERROR_NOT_AVAILABLE;
|
||||
+
|
||||
+ gboolean res = gdk_pixbuf_save(pixbuf, aPath.get(), "png", nullptr, nullptr);
|
||||
+
|
||||
+ g_object_unref(pixbuf);
|
||||
+ return res ? NS_OK : NS_ERROR_FAILURE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+
|
||||
NS_IMPL_ISUPPORTS(nsKDEShellService, nsIShellService)
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -123,19 +161,83 @@
|
||||
nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
|
||||
PRInt32 aPosition)
|
||||
{
|
||||
- return NS_ERROR_NOT_IMPLEMENTED;
|
||||
+ nsresult rv;
|
||||
+ nsCOMPtr<nsIImageLoadingContent> imageContent = do_QueryInterface(aElement, &rv);
|
||||
+ if (!imageContent) return rv;
|
||||
+
|
||||
+ // get the image container
|
||||
+ nsCOMPtr<imgIRequest> request;
|
||||
+ rv = imageContent->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
|
||||
+ getter_AddRefs(request));
|
||||
+ if (!request) return rv;
|
||||
+ nsCOMPtr<imgIContainer> container;
|
||||
+ rv = request->GetImage(getter_AddRefs(container));
|
||||
+ if (!container) return rv;
|
||||
+
|
||||
+ // Set desktop wallpaper filling style
|
||||
+ nsAutoCString options;
|
||||
+ if (aPosition == BACKGROUND_TILE)
|
||||
+ options.Assign("TiledResize");
|
||||
+ else if (aPosition == BACKGROUND_STRETCH)
|
||||
+ options.Assign("ScaledResize");
|
||||
+ else if (aPosition == BACKGROUND_FILL)
|
||||
+ options.Assign("ScaledAndCroppedResize");
|
||||
+ else if (aPosition == BACKGROUND_FIT)
|
||||
+ options.Assign("MaxpectResize");
|
||||
+ else
|
||||
+ options.Assign("CenteredResize");
|
||||
+
|
||||
+ // Write the background file to the home directory.
|
||||
+ nsAutoCString filePath(PR_GetEnv("HOME"));
|
||||
+
|
||||
+ // get the product brand name from localized strings
|
||||
+ nsString brandName;
|
||||
+ nsCID bundleCID = NS_STRINGBUNDLESERVICE_CID;
|
||||
+ nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(bundleCID));
|
||||
+ if (bundleService) {
|
||||
+ nsCOMPtr<nsIStringBundle> brandBundle;
|
||||
+ rv = bundleService->CreateBundle(BRAND_PROPERTIES,
|
||||
+ getter_AddRefs(brandBundle));
|
||||
+ if (NS_SUCCEEDED(rv) && brandBundle) {
|
||||
+ rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
|
||||
+ getter_Copies(brandName));
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // build the file name
|
||||
+ filePath.Append('/');
|
||||
+ filePath.Append(NS_ConvertUTF16toUTF8(brandName));
|
||||
+ filePath.Append("_wallpaper.png");
|
||||
+
|
||||
+ // write the image to a file in the home dir
|
||||
+ rv = WriteImage(filePath, container);
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+
|
||||
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
||||
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
||||
+ nsCOMPtr<nsISupportsCString> imgstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
||||
+ nsCOMPtr<nsISupportsCString> modestr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
||||
+ cmdstr->SetData( NS_LITERAL_CSTRING( "SETWALLPAPER" ));
|
||||
+ command->AppendElement( cmdstr, false );
|
||||
+ imgstr->SetData( filePath );
|
||||
+ command->AppendElement( imgstr, false );
|
||||
+ modestr->SetData( options );
|
||||
+ command->AppendElement( modestr, false );
|
||||
+ return nsKDEUtils::command( command ) ? rv : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
|
||||
{
|
||||
- return NS_ERROR_NOT_IMPLEMENTED;
|
||||
+ aColor = 0;
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
|
||||
{
|
||||
- return NS_ERROR_NOT_IMPLEMENTED;
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
Loading…
Add table
Reference in a new issue