Skip to content

Commit

Permalink
Merge remote-tracking branch 'mer/master' into mer-esr45-v2-3
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Feb 26, 2019
2 parents b9658ca + 8bda9db commit ed777c7
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 7 deletions.
4 changes: 1 addition & 3 deletions embedding/embedlite/embedding.js
Expand Up @@ -52,7 +52,6 @@ pref("layers.max-active", 20);

// APZC preferences.
pref("apz.allow_zooming", true);
pref("apz.asyncscroll.throttle", 15);
pref("apz.fling_accel_base_mult", "1.125f");
pref("apz.min_skate_speed", "1.0f");

Expand All @@ -67,7 +66,6 @@ pref("apz.fling_curve_function_y2", "1.0");
pref("apz.fling_curve_threshold_inches_per_ms", "0.03");
pref("apz.fling_friction", "0.003");
pref("apz.max_velocity_inches_per_ms", "0.07");
pref("apz.touch_start_tolerance", "0.027777f");

// Tweak default displayport values to reduce the risk of running out of
// memory when zooming in
Expand Down Expand Up @@ -181,7 +179,7 @@ pref("layout.reflow.synthMouseMove", false);
pref("mozilla.widget.disable-native-theme", true);
pref("layers.enable-tiles", true);
pref("layers.low-precision-buffer", true);
pref("layers.low-precision-opacity", "0.5");
pref("layers.low-precision-opacity", "1.0");
pref("layers.progressive-paint", true);

/* password manager */
Expand Down
7 changes: 6 additions & 1 deletion embedding/embedlite/embedshared/EmbedLitePuppetWidget.cpp
Expand Up @@ -345,7 +345,12 @@ EmbedLitePuppetWidget::Resize(double aWidth, double aHeight, bool aRepaint)
} else {
mBounds.SizeTo(nsIntSize(NSToIntRound(aHeight), NSToIntRound(aWidth)));
}
mBounds.Deflate(mMargins);

// Do not move bounds here. Just alter size based on margins.
mBounds.y = 0;
mBounds.x = 0;
mBounds.width = std::max(0, (mBounds.width - std::max(0, mMargins.left) - std::max(0, mMargins.right)));
mBounds.height = std::max(0, (mBounds.height - std::max(0, mMargins.top) - std::max(0, mMargins.bottom)));

for (ObserverArray::size_type i = 0; i < mObservers.Length(); ++i) {
mObservers[i]->WidgetBoundsChanged(mBounds);
Expand Down
@@ -0,0 +1,63 @@
From 7aab4545f513cd082c35005b8ec3392c44ab467b Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 29 Aug 2017 14:30:11 +0300
Subject: [PATCH 19/19] [xulrunner] Disable SiteSpecificUserAgent.js from the
build. Contributes to JB#39252

As both "general.useragent.override" and nsISiteSpecificUserAgent
are used and EmbedLite Components provides a UserAgentOverrideHelper
component that implements both complex UA override (register's handler)
and nsISiteSpecificUserAgent that is loaded on startup, let it update
also user agent string that is exposed via DOM's window.navigator.

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
dom/base/Navigator.cpp | 3 +++
dom/base/moz.build | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 7288420..ab94e3c 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -2590,6 +2590,8 @@ Navigator::GetUserAgent(nsPIDOMWindow* aWindow, nsIURI* aURI,
{
MOZ_ASSERT(NS_IsMainThread());

+ // Pass call through to nsISiteSpecificUserAgent provided by EmbedLite Components.
+#if 0
if (!aIsCallerChrome) {
const nsAdoptingString& override =
mozilla::Preferences::GetString("general.useragent.override");
@@ -2599,6 +2601,7 @@ Navigator::GetUserAgent(nsPIDOMWindow* aWindow, nsIURI* aURI,
return NS_OK;
}
}
+#endif

nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
diff --git a/dom/base/moz.build b/dom/base/moz.build
index 27de87b..9629be7 100644
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -375,14 +375,13 @@ EXTRA_COMPONENTS += [
'contentAreaDropListener.manifest',
'messageWakeupService.js',
'messageWakeupService.manifest',
- 'SiteSpecificUserAgent.js',
- 'SiteSpecificUserAgent.manifest',
'SlowScriptDebug.js',
'SlowScriptDebug.manifest',
]

+# Disable SiteSpecificUserAgent.js
# Firefox for Android provides an alternate version of this component
-if CONFIG['MOZ_BUILD_APP'] != 'mobile/android':
+if CONFIG['MOZ_BUILD_APP'] not in ['mobile/android', 'xulrunner']:
EXTRA_COMPONENTS += [
'SiteSpecificUserAgent.js',
'SiteSpecificUserAgent.manifest',
--
2.7.4

7 changes: 4 additions & 3 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -57,6 +57,7 @@ Patch11: 0011-Don-t-try-to-access-undefined-app-list-of-AppsServic.patch
Patch12: 0012-xulrunner-Make-fullscreen-enabling-work-as-used-to-w.patch
Patch13: 0013-Do-not-load-nsHelperAppDlg.js.-Fixes-JB-44322.patch
Patch14: 0014-Embedlite-doesn-t-have-prompter-implementation.patch
Patch15: 0015-xulrunner-Disable-SiteSpecificUserAgent.js-from-the-.patch

BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Network)
Expand All @@ -70,7 +71,6 @@ BuildRequires: pkgconfig(nss) >= 3.21.3
%endif
%if %{system_sqlite}
BuildRequires: pkgconfig(sqlite3) >= 3.8.9
Requires: sqlite >= 3.8.9
%endif
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libproxy-1.0)
Expand Down Expand Up @@ -160,6 +160,7 @@ Tests and misc files for xulrunner.
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1

mkdir -p "%BUILD_DIR"
cp -rf "%BASE_CONFIG" "%BUILD_DIR"/mozconfig
Expand All @@ -174,8 +175,8 @@ printf "#\n# Added by xulrunner-qt.spec:\n#" >> "$MOZCONFIG"
%ifarch %arm
echo "ac_add_options --with-arm-kuser" >> "$MOZCONFIG"
echo "ac_add_options --with-float-abi=toolchain-default" >> "$MOZCONFIG"
# No need for this, this should be managed by toolchain
echo "ac_add_options --with-thumb=toolchain-default" >> "$MOZCONFIG"
# Do not build as thumb since it breaks video decoding.
echo "ac_add_options --with-thumb=no" >> "$MOZCONFIG"
%endif

echo "mk_add_options MOZ_MAKE_FLAGS='%{?jobs:-j%jobs}'" >> "$MOZCONFIG"
Expand Down

0 comments on commit ed777c7

Please sign in to comment.