diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-05-11 20:11:18 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-05-11 20:11:18 +0000 |
commit | 74cf9c003784df286a14019ce985e691a2f54ce0 (patch) | |
tree | 96e252bfdbe27407a1e850cab56bd9d70c849f2a /www | |
parent | 03e981e4e4a7b71681a3e48d42074f5e1bdc5568 (diff) | |
download | ports-74cf9c003784df286a14019ce985e691a2f54ce0.tar.gz ports-74cf9c003784df286a14019ce985e691a2f54ce0.zip |
MFH: r469685
www/waterfox: update to 56.1.0.89
Changes: https://github.com/MrAlex94/Waterfox/compare/56.1.0...2bb1a86e5dbd6
Approved by: ports-secteam blanket
Notes
Notes:
svn path=/branches/2018Q2/; revision=469687
Diffstat (limited to 'www')
28 files changed, 48 insertions, 4751 deletions
diff --git a/www/waterfox/Makefile b/www/waterfox/Makefile index 01fbddf5b23d..e254673c34e5 100644 --- a/www/waterfox/Makefile +++ b/www/waterfox/Makefile @@ -1,8 +1,8 @@ # $FreeBSD$ PORTNAME= waterfox -DISTVERSION= 56.1.0 -PORTREVISION= 18 +DISTVERSION= 56.1.0-89 +DISTVERSIONSUFFIX= -g2bb1a86e5dbd6 CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org diff --git a/www/waterfox/distinfo b/www/waterfox/distinfo index 264a70d7aac9..7220af0da95b 100644 --- a/www/waterfox/distinfo +++ b/www/waterfox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1521928239 -SHA256 (MrAlex94-Waterfox-56.1.0_GH0.tar.gz) = 638d3c2bf092c36fac3a93ace4aa30bcfee0b7fe867e5b515f304238b9414d17 -SIZE (MrAlex94-Waterfox-56.1.0_GH0.tar.gz) = 394072277 +TIMESTAMP = 1526056588 +SHA256 (MrAlex94-Waterfox-56.1.0-89-g2bb1a86e5dbd6_GH0.tar.gz) = ab20b2392440e321ce7a3ecbd8b77eae40110b387094488cec95c57f2a6853bc +SIZE (MrAlex94-Waterfox-56.1.0-89-g2bb1a86e5dbd6_GH0.tar.gz) = 394172045 diff --git a/www/waterfox/files/patch-a-bug863246 b/www/waterfox/files/patch-a-bug863246 deleted file mode 100644 index d77dd916d76a..000000000000 --- a/www/waterfox/files/patch-a-bug863246 +++ /dev/null @@ -1,1209 +0,0 @@ -commit 6a8ee766d639 -Author: Chung-Sheng Fu <cfu@mozilla.com> -Date: Thu Jun 8 17:44:09 2017 +0800 - - Bug 863246 - Content can only load resource:// URIs declared content-accessible in manifests r=billm,bz - - bz: - caps/nsScriptSecurityManager.cpp - - billm: - browser/extensions/activity-stream/jar.mn - browser/extensions/onboarding/jar.mn - chrome/RegistryMessageUtils.h - chrome/nsChromeRegistry.h - chrome/nsChromeRegistryChrome.cpp - chrome/nsChromeRegistryContent.cpp - netwerk/protocol/res/SubstitutingProtocolHandler.cpp - netwerk/protocol/res/SubstitutingProtocolHandler.h - netwerk/protocol/res/nsIResProtocolHandler.idl - netwerk/protocol/res/nsISubstitutingProtocolHandler.idl - netwerk/protocol/res/nsResProtocolHandler.cpp - netwerk/protocol/res/nsResProtocolHandler.h - xpcom/components/ManifestParser.cpp - - MozReview-Commit-ID: 1RXeNn7jdBf - - --HG-- - extra : rebase_source : 83000448abf58b7956c2eb122604d7ab38ad0f7c ---- - browser/extensions/activity-stream/jar.mn | 2 +- - browser/extensions/onboarding/jar.mn | 4 +- - browser/extensions/shield-recipe-client/jar.mn | 4 +- - caps/nsScriptSecurityManager.cpp | 54 ++++++++++++++++++---- - chrome/RegistryMessageUtils.h | 10 +++- - chrome/nsChromeRegistryChrome.cpp | 10 +++- - chrome/nsChromeRegistryContent.cpp | 2 +- - .../protocol/res/SubstitutingProtocolHandler.cpp | 53 +++++++++++++++++---- - netwerk/protocol/res/SubstitutingProtocolHandler.h | 26 +++++++++-- - netwerk/protocol/res/nsIResProtocolHandler.idl | 1 + - .../res/nsISubstitutingProtocolHandler.idl | 10 ++++ - netwerk/protocol/res/nsResProtocolHandler.cpp | 37 +++++++++++++-- - netwerk/protocol/res/nsResProtocolHandler.h | 3 +- - xpcom/components/ManifestParser.cpp | 4 +- - 14 files changed, 183 insertions(+), 37 deletions(-) - -diff --git caps/nsScriptSecurityManager.cpp caps/nsScriptSecurityManager.cpp -index 5dcb7f7ec424..4b797faf1eb3 100644 ---- caps/nsScriptSecurityManager.cpp -+++ caps/nsScriptSecurityManager.cpp -@@ -53,6 +53,7 @@ - #include "nsIURIFixup.h" - #include "nsCDefaultURIFixup.h" - #include "nsIChromeRegistry.h" -+#include "nsIResProtocolHandler.h" - #include "nsIContentSecurityPolicy.h" - #include "nsIAsyncVerifyRedirectCallback.h" - #include "mozilla/Preferences.h" -@@ -915,10 +916,9 @@ nsScriptSecurityManager::CheckLoadURIFlags(nsIURI *aSourceURI, - NS_ENSURE_SUCCESS(rv, rv); - if (hasFlags) { - if (aFlags & nsIScriptSecurityManager::ALLOW_CHROME) { -- -- // For now, don't change behavior for resource:// or moz-icon:// and -- // just allow them. -- if (!targetScheme.EqualsLiteral("chrome")) { -+ // For now, don't change behavior for moz-icon:// and just allow it. -+ if (!targetScheme.EqualsLiteral("chrome") -+ && !targetScheme.EqualsLiteral("resource")) { - return NS_OK; - } - -@@ -939,15 +939,51 @@ nsScriptSecurityManager::CheckLoadURIFlags(nsIURI *aSourceURI, - return NS_OK; - } - -- // Allow the load only if the chrome package is whitelisted. -- nsCOMPtr<nsIXULChromeRegistry> reg(do_GetService( -- NS_CHROMEREGISTRY_CONTRACTID)); -- if (reg) { -+ if (targetScheme.EqualsLiteral("resource")) { -+ // Mochitests that need to load resource:// URIs not declared -+ // content-accessible in manifests should set the preference -+ // "security.all_resource_uri_content_accessible" true. -+ static bool sSecurityPrefCached = false; -+ static bool sAllResourceUriContentAccessible = false; -+ if (!sSecurityPrefCached) { -+ sSecurityPrefCached = true; -+ Preferences::AddBoolVarCache( -+ &sAllResourceUriContentAccessible, -+ "security.all_resource_uri_content_accessible", -+ false); -+ } -+ if (sAllResourceUriContentAccessible) { -+ return NS_OK; -+ } -+ -+ nsCOMPtr<nsIProtocolHandler> ph; -+ rv = sIOService->GetProtocolHandler("resource", getter_AddRefs(ph)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ if (!ph) { -+ return NS_ERROR_DOM_BAD_URI; -+ } -+ -+ nsCOMPtr<nsIResProtocolHandler> rph = do_QueryInterface(ph); -+ if (!rph) { -+ return NS_ERROR_DOM_BAD_URI; -+ } -+ - bool accessAllowed = false; -- reg->AllowContentToAccess(aTargetBaseURI, &accessAllowed); -+ rph->AllowContentToAccess(aTargetBaseURI, &accessAllowed); - if (accessAllowed) { - return NS_OK; - } -+ } else { -+ // Allow the load only if the chrome package is whitelisted. -+ nsCOMPtr<nsIXULChromeRegistry> reg( -+ do_GetService(NS_CHROMEREGISTRY_CONTRACTID)); -+ if (reg) { -+ bool accessAllowed = false; -+ reg->AllowContentToAccess(aTargetBaseURI, &accessAllowed); -+ if (accessAllowed) { -+ return NS_OK; -+ } -+ } - } - } - -diff --git chrome/RegistryMessageUtils.h chrome/RegistryMessageUtils.h -index cb9db55b7ccd..d8cfa616852a 100644 ---- chrome/RegistryMessageUtils.h -+++ chrome/RegistryMessageUtils.h -@@ -42,12 +42,14 @@ struct SubstitutionMapping - nsCString scheme; - nsCString path; - SerializedURI resolvedURI; -+ uint32_t flags; - - bool operator ==(const SubstitutionMapping& rhs) const - { - return scheme.Equals(rhs.scheme) && - path.Equals(rhs.path) && -- resolvedURI == rhs.resolvedURI; -+ resolvedURI == rhs.resolvedURI && -+ flags == rhs.flags; - } - }; - -@@ -140,19 +142,23 @@ struct ParamTraits<SubstitutionMapping> - WriteParam(aMsg, aParam.scheme); - WriteParam(aMsg, aParam.path); - WriteParam(aMsg, aParam.resolvedURI); -+ WriteParam(aMsg, aParam.flags); - } - - static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) - { - nsCString scheme, path; - SerializedURI resolvedURI; -+ uint32_t flags; - - if (ReadParam(aMsg, aIter, &scheme) && - ReadParam(aMsg, aIter, &path) && -- ReadParam(aMsg, aIter, &resolvedURI)) { -+ ReadParam(aMsg, aIter, &resolvedURI) && -+ ReadParam(aMsg, aIter, &flags)) { - aResult->scheme = scheme; - aResult->path = path; - aResult->resolvedURI = resolvedURI; -+ aResult->flags = flags; - return true; - } - return false; -diff --git chrome/nsChromeRegistryChrome.cpp chrome/nsChromeRegistryChrome.cpp -index 8df9079d1cbd..ae10e65bd381 100644 ---- chrome/nsChromeRegistryChrome.cpp -+++ chrome/nsChromeRegistryChrome.cpp -@@ -927,7 +927,15 @@ nsChromeRegistryChrome::ManifestResource(ManifestProcessingContext& cx, int line - return; - } - -- rv = rph->SetSubstitution(host, resolved); -+ // By default, Firefox resources are not content-accessible unless the -+ // manifests opts in. -+ bool contentAccessible = (flags & nsChromeRegistry::CONTENT_ACCESSIBLE); -+ -+ uint32_t substitutionFlags = 0; -+ if (contentAccessible) { -+ substitutionFlags |= nsIResProtocolHandler::ALLOW_CONTENT_ACCESS; -+ } -+ rv = rph->SetSubstitutionWithFlags(host, resolved, substitutionFlags); - if (NS_FAILED(rv)) { - LogMessageWithContext(cx.GetManifestURI(), lineno, nsIScriptError::warningFlag, - "Warning: cannot set substitution for '%s'.", -diff --git chrome/nsChromeRegistryContent.cpp chrome/nsChromeRegistryContent.cpp -index a066f32f13d2..75141204d0b5 100644 ---- chrome/nsChromeRegistryContent.cpp -+++ chrome/nsChromeRegistryContent.cpp -@@ -114,7 +114,7 @@ nsChromeRegistryContent::RegisterSubstitution(const SubstitutionMapping& aSubsti - return; - } - -- rv = sph->SetSubstitution(aSubstitution.path, resolvedURI); -+ rv = sph->SetSubstitutionWithFlags(aSubstitution.path, resolvedURI, aSubstitution.flags); - if (NS_FAILED(rv)) - return; - } -diff --git netwerk/protocol/res/SubstitutingProtocolHandler.cpp netwerk/protocol/res/SubstitutingProtocolHandler.cpp -index d6971b036bdb..1fd362bfb1ff 100644 ---- netwerk/protocol/res/SubstitutingProtocolHandler.cpp -+++ netwerk/protocol/res/SubstitutingProtocolHandler.cpp -@@ -117,14 +117,15 @@ nsresult - SubstitutingProtocolHandler::CollectSubstitutions(InfallibleTArray<SubstitutionMapping>& aMappings) - { - for (auto iter = mSubstitutions.ConstIter(); !iter.Done(); iter.Next()) { -- nsCOMPtr<nsIURI> uri = iter.Data(); -+ SubstitutionEntry& entry = iter.Data(); -+ nsCOMPtr<nsIURI> uri = entry.baseURI; - SerializedURI serialized; - if (uri) { - nsresult rv = uri->GetSpec(serialized.spec); - NS_ENSURE_SUCCESS(rv, rv); - uri->GetOriginCharset(serialized.charset); - } -- SubstitutionMapping substitution = { mScheme, nsCString(iter.Key()), serialized }; -+ SubstitutionMapping substitution = { mScheme, nsCString(iter.Key()), serialized, entry.flags }; - aMappings.AppendElement(substitution); - } - -@@ -131,7 +132,7 @@ SubstitutingProtocolHandler::CollectSubstitutions(InfallibleTArray<SubstitutionM - } - - nsresult --SubstitutingProtocolHandler::SendSubstitution(const nsACString& aRoot, nsIURI* aBaseURI) -+SubstitutingProtocolHandler::SendSubstitution(const nsACString& aRoot, nsIURI* aBaseURI, uint32_t aFlags) - { - if (GeckoProcessType_Content == XRE_GetProcessType()) { - return NS_OK; -@@ -150,6 +151,7 @@ SubstitutingProtocolHandler::SendSubstitution(const nsACString& aRoot, nsIURI* a - nsresult rv = aBaseURI->GetSpec(mapping.resolvedURI.spec); - NS_ENSURE_SUCCESS(rv, rv); - } -+ mapping.flags = aFlags; - - for (uint32_t i = 0; i < parents.Length(); i++) { - Unused << parents[i]->SendRegisterChromeItem(mapping); -@@ -292,11 +294,19 @@ SubstitutingProtocolHandler::AllowPort(int32_t port, const char *scheme, bool *_ - - nsresult - SubstitutingProtocolHandler::SetSubstitution(const nsACString& root, nsIURI *baseURI) -+{ -+ // Add-ons use this API but they should not be able to make anything -+ // content-accessible. -+ return SetSubstitutionWithFlags(root, baseURI, 0); -+} -+ -+nsresult -+SubstitutingProtocolHandler::SetSubstitutionWithFlags(const nsACString& root, nsIURI *baseURI, uint32_t flags) - { - if (!baseURI) { - mSubstitutions.Remove(root); - NotifyObservers(root, baseURI); -- return SendSubstitution(root, baseURI); -+ return SendSubstitution(root, baseURI, flags); - } - - // If baseURI isn't a same-scheme URI, we can set the substitution immediately. -@@ -310,9 +320,11 @@ SubstitutingProtocolHandler::SetSubstitution(const nsACString& root, nsIURI *bas - return NS_ERROR_INVALID_ARG; - } - -- mSubstitutions.Put(root, baseURI); -+ SubstitutionEntry& entry = mSubstitutions.GetOrInsert(root); -+ entry.baseURI = baseURI; -+ entry.flags = flags; - NotifyObservers(root, baseURI); -- return SendSubstitution(root, baseURI); -+ return SendSubstitution(root, baseURI, flags); - } - - // baseURI is a same-type substituting URI, let's resolve it first. -@@ -324,9 +336,11 @@ SubstitutingProtocolHandler::SetSubstitution(const nsACString& root, nsIURI *bas - rv = mIOService->NewURI(newBase, nullptr, nullptr, getter_AddRefs(newBaseURI)); - NS_ENSURE_SUCCESS(rv, rv); - -- mSubstitutions.Put(root, newBaseURI); -+ SubstitutionEntry& entry = mSubstitutions.GetOrInsert(root); -+ entry.baseURI = newBaseURI; -+ entry.flags = flags; - NotifyObservers(root, baseURI); -- return SendSubstitution(root, newBaseURI); -+ return SendSubstitution(root, newBaseURI, flags); - } - - nsresult -@@ -334,10 +348,29 @@ SubstitutingProtocolHandler::GetSubstitution(const nsACString& root, nsIURI **re - { - NS_ENSURE_ARG_POINTER(result); - -- if (mSubstitutions.Get(root, result)) -+ SubstitutionEntry entry; -+ if (mSubstitutions.Get(root, &entry)) { -+ nsCOMPtr<nsIURI> baseURI = entry.baseURI; -+ baseURI.forget(result); - return NS_OK; -+ } -+ -+ uint32_t flags; -+ return GetSubstitutionInternal(root, result, &flags); -+} - -- return GetSubstitutionInternal(root, result); -+nsresult -+SubstitutingProtocolHandler::GetSubstitutionFlags(const nsACString& root, uint32_t* flags) -+{ -+ *flags = 0; -+ SubstitutionEntry entry; -+ if (mSubstitutions.Get(root, &entry)) { -+ *flags = entry.flags; -+ return NS_OK; -+ } -+ -+ nsCOMPtr<nsIURI> baseURI; -+ return GetSubstitutionInternal(root, getter_AddRefs(baseURI), flags); - } - - nsresult -diff --git netwerk/protocol/res/SubstitutingProtocolHandler.h netwerk/protocol/res/SubstitutingProtocolHandler.h -index a08bd40de427..874eb1f9d04f 100644 ---- netwerk/protocol/res/SubstitutingProtocolHandler.h -+++ netwerk/protocol/res/SubstitutingProtocolHandler.h -@@ -9,9 +9,9 @@ - - #include "nsISubstitutingProtocolHandler.h" - --#include "nsInterfaceHashtable.h" - #include "nsIOService.h" - #include "nsISubstitutionObserver.h" -+#include "nsDataHashtable.h" - #include "nsStandardURL.h" - #include "mozilla/chrome/RegistryMessageUtils.h" - #include "mozilla/Maybe.h" -@@ -44,13 +44,16 @@ protected: - virtual ~SubstitutingProtocolHandler() {} - void ConstructInternal(); - -- MOZ_MUST_USE nsresult SendSubstitution(const nsACString& aRoot, nsIURI* aBaseURI); -+ MOZ_MUST_USE nsresult SendSubstitution(const nsACString& aRoot, nsIURI* aBaseURI, uint32_t aFlags); -+ -+ nsresult GetSubstitutionFlags(const nsACString& root, uint32_t* flags); - - // Override this in the subclass to try additional lookups after checking - // mSubstitutions. -- virtual MOZ_MUST_USE nsresult GetSubstitutionInternal(const nsACString& aRoot, nsIURI** aResult) -+ virtual MOZ_MUST_USE nsresult GetSubstitutionInternal(const nsACString& aRoot, nsIURI** aResult, uint32_t* aFlags) - { - *aResult = nullptr; -+ *aFlags = 0; - return NS_ERROR_NOT_AVAILABLE; - } - -@@ -74,13 +77,28 @@ protected: - nsIIOService* IOService() { return mIOService; } - - private: -+ struct SubstitutionEntry -+ { -+ SubstitutionEntry() -+ : flags(0) -+ { -+ } -+ -+ ~SubstitutionEntry() -+ { -+ } -+ -+ nsCOMPtr<nsIURI> baseURI; -+ uint32_t flags; -+ }; -+ - // Notifies all observers that a new substitution from |aRoot| to - // |aBaseURI| has been set/installed for this protocol handler. - void NotifyObservers(const nsACString& aRoot, nsIURI* aBaseURI); - - nsCString mScheme; - Maybe<uint32_t> mFlags; -- nsInterfaceHashtable<nsCStringHashKey,nsIURI> mSubstitutions; -+ nsDataHashtable<nsCStringHashKey, SubstitutionEntry> mSubstitutions; - nsCOMPtr<nsIIOService> mIOService; - - // The list of observers added with AddObserver that will be -diff --git netwerk/protocol/res/nsIResProtocolHandler.idl netwerk/protocol/res/nsIResProtocolHandler.idl -index 56c597f4c73f..7046f2f1d452 100644 ---- netwerk/protocol/res/nsIResProtocolHandler.idl -+++ netwerk/protocol/res/nsIResProtocolHandler.idl -@@ -11,4 +11,5 @@ - [scriptable, uuid(241d34ac-9ed5-46d7-910c-7a9d914aa0c5)] - interface nsIResProtocolHandler : nsISubstitutingProtocolHandler - { -+ boolean allowContentToAccess(in nsIURI url); - }; -diff --git netwerk/protocol/res/nsISubstitutingProtocolHandler.idl netwerk/protocol/res/nsISubstitutingProtocolHandler.idl -index 11be8a5b1e0b..af0f02c28493 100644 ---- netwerk/protocol/res/nsISubstitutingProtocolHandler.idl -+++ netwerk/protocol/res/nsISubstitutingProtocolHandler.idl -@@ -14,6 +14,11 @@ interface nsISubstitutionObserver; - [scriptable, uuid(154c64fd-a69e-4105-89f8-bd7dfe621372)] - interface nsISubstitutingProtocolHandler : nsIProtocolHandler - { -+ /** -+ * Content script may access files in this package. -+ */ -+ const short ALLOW_CONTENT_ACCESS = 1; -+ - /** - * Sets the substitution for the root key: - * resource://root/path ==> baseURI.resolve(path) -@@ -25,6 +30,11 @@ interface nsISubstitutingProtocolHandler : nsIProtocolHandler - */ - [must_use] void setSubstitution(in ACString root, in nsIURI baseURI); - -+ /** -+ * Same as setSubstitution, but with specific flags. -+ */ -+ [must_use] void setSubstitutionWithFlags(in ACString root, in nsIURI baseURI, in uint32_t flags); -+ - /** - * Gets the substitution for the root key. - * -diff --git netwerk/protocol/res/nsResProtocolHandler.cpp netwerk/protocol/res/nsResProtocolHandler.cpp -index 265bab9ec9dc..57b615e67b07 100644 ---- netwerk/protocol/res/nsResProtocolHandler.cpp -+++ netwerk/protocol/res/nsResProtocolHandler.cpp -@@ -61,16 +61,36 @@ NS_IMPL_QUERY_INTERFACE(nsResProtocolHandler, nsIResProtocolHandler, - NS_IMPL_ADDREF_INHERITED(nsResProtocolHandler, SubstitutingProtocolHandler) - NS_IMPL_RELEASE_INHERITED(nsResProtocolHandler, SubstitutingProtocolHandler) - -+NS_IMETHODIMP -+nsResProtocolHandler::AllowContentToAccess(nsIURI *aURI, bool *aResult) -+{ -+ *aResult = false; -+ -+ nsAutoCString host; -+ nsresult rv = aURI->GetAsciiHost(host); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ uint32_t flags; -+ rv = GetSubstitutionFlags(host, &flags); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ *aResult = flags & nsISubstitutingProtocolHandler::ALLOW_CONTENT_ACCESS; -+ return NS_OK; -+} -+ - nsresult --nsResProtocolHandler::GetSubstitutionInternal(const nsACString& root, nsIURI **result) -+nsResProtocolHandler::GetSubstitutionInternal(const nsACString& aRoot, -+ nsIURI** aResult, -+ uint32_t* aFlags) - { - nsAutoCString uri; - -- if (!ResolveSpecialCases(root, NS_LITERAL_CSTRING("/"), NS_LITERAL_CSTRING("/"), uri)) { -+ if (!ResolveSpecialCases(aRoot, NS_LITERAL_CSTRING("/"), NS_LITERAL_CSTRING("/"), uri)) { - return NS_ERROR_NOT_AVAILABLE; - } - -- return NS_NewURI(result, uri); -+ *aFlags = 0; // No content access. -+ return NS_NewURI(aResult, uri); - } - - bool -@@ -98,3 +118,14 @@ nsResProtocolHandler::SetSubstitution(const nsACString& aRoot, nsIURI* aBaseURI) - MOZ_ASSERT(!aRoot.Equals(kGRE)); - return SubstitutingProtocolHandler::SetSubstitution(aRoot, aBaseURI); - } -+ -+nsresult -+nsResProtocolHandler::SetSubstitutionWithFlags(const nsACString& aRoot, -+ nsIURI* aBaseURI, -+ uint32_t aFlags) -+{ -+ MOZ_ASSERT(!aRoot.Equals("")); -+ MOZ_ASSERT(!aRoot.Equals(kAPP)); -+ MOZ_ASSERT(!aRoot.Equals(kGRE)); -+ return SubstitutingProtocolHandler::SetSubstitutionWithFlags(aRoot, aBaseURI, aFlags); -+} -diff --git netwerk/protocol/res/nsResProtocolHandler.h netwerk/protocol/res/nsResProtocolHandler.h -index 3f6243667586..56bde73c0c1c 100644 ---- netwerk/protocol/res/nsResProtocolHandler.h -+++ netwerk/protocol/res/nsResProtocolHandler.h -@@ -34,6 +34,7 @@ public: - MOZ_MUST_USE nsresult Init(); - - NS_IMETHOD SetSubstitution(const nsACString& aRoot, nsIURI* aBaseURI) override; -+ NS_IMETHOD SetSubstitutionWithFlags(const nsACString& aRoot, nsIURI* aBaseURI, uint32_t aFlags) override; - - NS_IMETHOD GetSubstitution(const nsACString& aRoot, nsIURI** aResult) override - { -@@ -61,7 +62,7 @@ public: - } - - protected: -- MOZ_MUST_USE nsresult GetSubstitutionInternal(const nsACString& aRoot, nsIURI** aResult) override; -+ MOZ_MUST_USE nsresult GetSubstitutionInternal(const nsACString& aRoot, nsIURI** aResult, uint32_t* aFlags) override; - virtual ~nsResProtocolHandler() {} - - MOZ_MUST_USE bool ResolveSpecialCases(const nsACString& aHost, -diff --git xpcom/components/ManifestParser.cpp xpcom/components/ManifestParser.cpp -index ea1a243bae1f..63d7d56523d4 100644 ---- xpcom/components/ManifestParser.cpp -+++ xpcom/components/ManifestParser.cpp -@@ -56,7 +56,7 @@ struct ManifestDirective - - bool allowbootstrap; - -- // The contentaccessible flags only apply to content directives. -+ // The contentaccessible flags only apply to content/resource directives. - bool contentflags; - - // Function to handle this directive. This isn't a union because C++ still -@@ -123,7 +123,7 @@ static const ManifestDirective kParsingTable[] = { - nullptr, &nsChromeRegistry::ManifestOverride, nullptr - }, - { -- "resource", 2, false, true, true, true, false, -+ "resource", 2, false, true, true, true, true, - nullptr, &nsChromeRegistry::ManifestResource, nullptr - } - }; - -commit e5b80e9a8fc1 -Author: Chung-Sheng Fu <cfu@mozilla.com> -Date: Thu Jun 8 17:52:46 2017 +0800 - - Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm - - MozReview-Commit-ID: ArhSHKPYOr8 - - --HG-- - extra : rebase_source : 888f7ce8f9db809ad5abbe6340af74e9dfb1d73b ---- - browser/installer/package-manifest.in | 6 +++--- - devtools/client/jsonview/converter-child.js | 2 +- - devtools/client/jsonview/viewer-config.js | 8 ++++---- - devtools/shared/jar.mn | 2 ++ - dom/html/ImageDocument.cpp | 4 ++-- - dom/html/VideoDocument.cpp | 2 +- - dom/xml/resources/XMLPrettyPrint.css | 2 +- - layout/style/jar.mn | 2 +- - layout/style/moz.build | 4 ++++ - mobile/android/installer/package-manifest.in | 5 +++-- - parser/html/nsHtml5ViewSourceUtils.cpp | 2 +- - python/mozbuild/mozbuild/frontend/context.py | 8 ++++++++ - python/mozbuild/mozpack/chrome/manifest.py | 1 + - python/mozbuild/mozpack/packager/formats.py | 1 + - toolkit/content/browser-content.js | 2 +- - 15 files changed, 34 insertions(+), 17 deletions(-) - -diff --git browser/installer/package-manifest.in browser/installer/package-manifest.in -index 641cc024892f..6c4ae941aef2 100644 ---- browser/installer/package-manifest.in -+++ browser/installer/package-manifest.in -@@ -683,9 +683,6 @@ - @RESPATH@/res/EditorOverride.css - @RESPATH@/res/contenteditable.css - @RESPATH@/res/designmode.css --@RESPATH@/res/ImageDocument.css --@RESPATH@/res/TopLevelImageDocument.css --@RESPATH@/res/TopLevelVideoDocument.css - @RESPATH@/res/table-add-column-after-active.gif - @RESPATH@/res/table-add-column-after-hover.gif - @RESPATH@/res/table-add-column-after.gif -@@ -716,6 +713,9 @@ - @RESPATH@/res/MainMenu.nib/ - #endif - -+; Content-accessible resources. -+@RESPATH@/contentaccessible/* -+ - ; svg - @RESPATH@/res/svg.css - @RESPATH@/components/dom_svg.xpt -diff --git devtools/client/jsonview/converter-child.js devtools/client/jsonview/converter-child.js -index d272dad00fb1..19060088ae6b 100644 ---- devtools/client/jsonview/converter-child.js -+++ devtools/client/jsonview/converter-child.js -@@ -208,7 +208,7 @@ function initialHTML(doc) { - - // The base URI is prepended to all URIs instead of using a <base> element - // because the latter can be blocked by a CSP base-uri directive (bug 1316393) -- let baseURI = "resource://devtools/client/jsonview/"; -+ let baseURI = "resource://devtools-client-jsonview/"; - - let style = doc.createElement("link"); - style.rel = "stylesheet"; -diff --git devtools/client/jsonview/viewer-config.js devtools/client/jsonview/viewer-config.js -index 387a0dd4ebfb..429bf9b07298 100644 ---- devtools/client/jsonview/viewer-config.js -+++ devtools/client/jsonview/viewer-config.js -@@ -21,14 +21,14 @@ - * of the code base, so it's consistent and modules can be easily reused. - */ - require.config({ -- baseUrl: "resource://devtools/client/jsonview/", -+ baseUrl: "resource://devtools-client-jsonview/", - paths: { -- "devtools/client/shared": "resource://devtools/client/shared", -+ "devtools/client/shared": "resource://devtools-client-shared", - "devtools/shared": "resource://devtools/shared", - "devtools/client/shared/vendor/react": - JSONView.debug -- ? "resource://devtools/client/shared/vendor/react-dev" -- : "resource://devtools/client/shared/vendor/react" -+ ? "resource://devtools-client-shared/vendor/react-dev" -+ : "resource://devtools-client-shared/vendor/react" - } - }); - -diff --git devtools/shared/jar.mn devtools/shared/jar.mn -index 4d0823550c5a..82dc7741b213 100644 ---- devtools/shared/jar.mn -+++ devtools/shared/jar.mn -@@ -4,6 +4,8 @@ - - devtools.jar: - % resource devtools %modules/devtools/ -+% resource devtools-client-jsonview resource://devtools/client/jsonview/ contentaccessible=yes -+% resource devtools-client-shared resource://devtools/client/shared/ contentaccessible=yes - # The typical approach would be to list all the resource files in this manifest - # for installation. Instead of doing this, use the DevToolsModules syntax via - # moz.build files to do the installation so that we can enforce correct paths -diff --git dom/html/ImageDocument.cpp dom/html/ImageDocument.cpp -index d5c686c27b9f..6e0d31275a49 100644 ---- dom/html/ImageDocument.cpp -+++ dom/html/ImageDocument.cpp -@@ -279,9 +279,9 @@ ImageDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) - target->AddEventListener(NS_LITERAL_STRING("keypress"), this, false); - - if (GetReadyStateEnum() != nsIDocument::READYSTATE_COMPLETE) { -- LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/ImageDocument.css")); -+ LinkStylesheet(NS_LITERAL_STRING("resource://content-accessible/ImageDocument.css")); - if (!nsContentUtils::IsChildOfSameType(this)) { -- LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/TopLevelImageDocument.css")); -+ LinkStylesheet(NS_LITERAL_STRING("resource://content-accessible/TopLevelImageDocument.css")); - LinkStylesheet(NS_LITERAL_STRING("chrome://global/skin/media/TopLevelImageDocument.css")); - } - } -diff --git dom/html/VideoDocument.cpp dom/html/VideoDocument.cpp -index 1bd898564a47..9ca616a5ec53 100644 ---- dom/html/VideoDocument.cpp -+++ dom/html/VideoDocument.cpp -@@ -74,7 +74,7 @@ VideoDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) - if (aScriptGlobalObject) { - if (!nsContentUtils::IsChildOfSameType(this) && - GetReadyStateEnum() != nsIDocument::READYSTATE_COMPLETE) { -- LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/TopLevelVideoDocument.css")); -+ LinkStylesheet(NS_LITERAL_STRING("resource://content-accessible/TopLevelVideoDocument.css")); - LinkStylesheet(NS_LITERAL_STRING("chrome://global/skin/media/TopLevelVideoDocument.css")); - LinkScript(NS_LITERAL_STRING("chrome://global/content/TopLevelVideoDocument.js")); - } -diff --git dom/xml/resources/XMLPrettyPrint.css dom/xml/resources/XMLPrettyPrint.css -index efc7ab5e5e17..13bb61e71532 100644 ---- dom/xml/resources/XMLPrettyPrint.css -+++ dom/xml/resources/XMLPrettyPrint.css -@@ -3,7 +3,7 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --@import url("resource://gre-resources/viewsource.css"); -+@import url("resource://content-accessible/viewsource.css"); - - #header { - background-color: #ccc; -diff --git layout/style/jar.mn layout/style/jar.mn -index af8c15d4fab5..81af0f7540fc 100644 ---- layout/style/jar.mn -+++ layout/style/jar.mn -@@ -7,7 +7,6 @@ toolkit.jar: - * res/html.css (res/html.css) - res/quirk.css (res/quirk.css) - res/plaintext.css (res/plaintext.css) -- res/viewsource.css (res/viewsource.css) - res/counterstyles.css (res/counterstyles.css) - res/noscript.css (res/noscript.css) - res/noframes.css (res/noframes.css) -@@ -33,3 +32,4 @@ toolkit.jar: - res/accessiblecaret-tilt-right@2.25x.png (res/accessiblecaret-tilt-right@2.25x.png) - - % resource gre-resources %res/ -+% resource content-accessible resource://gre/contentaccessible/ contentaccessible=yes -diff --git layout/style/moz.build layout/style/moz.build -index 0d1f261454f9..d4fbd0fef384 100644 ---- layout/style/moz.build -+++ layout/style/moz.build -@@ -300,7 +300,11 @@ JAR_MANIFESTS += ['jar.mn'] - RESOURCE_FILES += [ - 'contenteditable.css', - 'designmode.css', -+] -+ -+CONTENT_ACCESSIBLE_FILES += [ - 'ImageDocument.css', -+ 'res/viewsource.css', - 'TopLevelImageDocument.css', - 'TopLevelVideoDocument.css', - ] -diff --git mobile/android/installer/package-manifest.in mobile/android/installer/package-manifest.in -index 0fc95bb838c8..ebbf39b171b6 100644 ---- mobile/android/installer/package-manifest.in -+++ mobile/android/installer/package-manifest.in -@@ -459,8 +459,6 @@ - @BINPATH@/res/EditorOverride.css - @BINPATH@/res/contenteditable.css - @BINPATH@/res/designmode.css --@BINPATH@/res/TopLevelImageDocument.css --@BINPATH@/res/TopLevelVideoDocument.css - @BINPATH@/res/table-add-column-after-active.gif - @BINPATH@/res/table-add-column-after-hover.gif - @BINPATH@/res/table-add-column-after.gif -@@ -490,6 +488,9 @@ - @BINPATH@/res/fonts/*.properties - #endif - -+; Content-accessible resources. -+@BINPATH@/contentaccessible/* -+ - ; svg - @BINPATH@/res/svg.css - @BINPATH@/components/dom_svg.xpt -diff --git parser/html/nsHtml5ViewSourceUtils.cpp parser/html/nsHtml5ViewSourceUtils.cpp -index b2f635bffe52..d94865d0acee 100644 ---- parser/html/nsHtml5ViewSourceUtils.cpp -+++ parser/html/nsHtml5ViewSourceUtils.cpp -@@ -50,7 +50,7 @@ nsHtml5ViewSourceUtils::NewLinkAttributes() - nsHtml5String type = nsHtml5Portability::newStringFromLiteral("text/css"); - linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TYPE, type, -1); - nsHtml5String href = nsHtml5Portability::newStringFromLiteral( -- "resource://gre-resources/viewsource.css"); -+ "resource://content-accessible/viewsource.css"); - linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_HREF, href, -1); - return linkAttrs; - } -diff --git python/mozbuild/mozbuild/frontend/context.py python/mozbuild/mozbuild/frontend/context.py -index b06f39e3ee34..e97ee820bc79 100644 ---- python/mozbuild/mozbuild/frontend/context.py -+++ python/mozbuild/mozbuild/frontend/context.py -@@ -2090,6 +2090,14 @@ SPECIAL_VARIABLES = { - RESOURCE_FILES.fonts += ['bar.res'] - """), - -+ 'CONTENT_ACCESSIBLE_FILES': (lambda context: context['FINAL_TARGET_FILES'].contentaccessible, list, -+ """List of files which can be accessed by web content through resource:// URIs. -+ -+ ``CONTENT_ACCESSIBLE_FILES`` is used to list the files to be exported -+ to ``dist/bin/contentaccessible``. Files can also be appended to a -+ field to indicate which subdirectory they should be exported to. -+ """), -+ - 'EXTRA_JS_MODULES': (lambda context: context['FINAL_TARGET_FILES'].modules, list, - """Additional JavaScript files to distribute. - -diff --git python/mozbuild/mozpack/chrome/manifest.py python/mozbuild/mozpack/chrome/manifest.py -index 0781d0383304..05b97c8b9e09 100644 ---- python/mozbuild/mozpack/chrome/manifest.py -+++ python/mozbuild/mozpack/chrome/manifest.py -@@ -38,6 +38,7 @@ class ManifestEntry(object): - 'xpcnativewrappers', - 'tablet', - 'process', -+ 'contentaccessible', - ] - - def __init__(self, base, *flags): -diff --git python/mozbuild/mozpack/packager/formats.py python/mozbuild/mozpack/packager/formats.py -index f31d775646a7..ffafd5f520b4 100644 ---- python/mozbuild/mozpack/packager/formats.py -+++ python/mozbuild/mozpack/packager/formats.py -@@ -339,4 +339,5 @@ class OmniJarSubFormatter(PiecemealFormatter): - 'greprefs.js', - 'hyphenation', - 'update.locale', -+ 'contentaccessible', - ] -diff --git toolkit/content/browser-content.js toolkit/content/browser-content.js -index 4d2a8fca47a5..f478618c1b5b 100644 ---- toolkit/content/browser-content.js -+++ toolkit/content/browser-content.js -@@ -1340,7 +1340,7 @@ var ViewSelectionSource = { - return undefined; - - // serialize -- const VIEW_SOURCE_CSS = "resource://gre-resources/viewsource.css"; -+ const VIEW_SOURCE_CSS = "resource://content-accessible/viewsource.css"; - const BUNDLE_URL = "chrome://global/locale/viewSource.properties"; - - let bundle = Services.strings.createBundle(BUNDLE_URL); - -commit da32016d7637 -Author: Chung-Sheng Fu <cfu@mozilla.com> -Date: Mon Aug 7 15:55:39 2017 +0800 - - Bug 863246 - Use system principal to load debugger scripts r=billm,bkelly - - MozReview-Commit-ID: DPvbR1As2UV - - --HG-- - extra : rebase_source : c185be0d4d2180dd3dd7d0fbcfdd1035f3b4ddf3 ---- - dom/workers/ScriptLoader.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git dom/workers/ScriptLoader.cpp dom/workers/ScriptLoader.cpp -index 0948e8b1f860..461c7f4cd925 100644 ---- dom/workers/ScriptLoader.cpp -+++ dom/workers/ScriptLoader.cpp -@@ -894,10 +894,19 @@ private: - { - AssertIsOnMainThread(); - MOZ_ASSERT(aIndex < mLoadInfos.Length()); -+ MOZ_ASSERT_IF(IsMainWorkerScript(), mWorkerScriptType != DebuggerScript); - - WorkerPrivate* parentWorker = mWorkerPrivate->GetParent(); - -- nsIPrincipal* principal = mWorkerPrivate->GetPrincipal(); -+ // For JavaScript debugging, the devtools server must run on the same -+ // thread as the debuggee, indicating the worker uses content principal. -+ // However, in Bug 863246, web content will no longer be able to load -+ // resource:// URIs by default, so we need system principal to load -+ // debugger scripts. -+ nsIPrincipal* principal = (mWorkerScriptType == DebuggerScript) ? -+ nsContentUtils::GetSystemPrincipal() : -+ mWorkerPrivate->GetPrincipal(); -+ - nsCOMPtr<nsILoadGroup> loadGroup = mWorkerPrivate->GetLoadGroup(); - MOZ_DIAGNOSTIC_ASSERT(principal); - - -commit 90189a558c02 -Author: Chung-Sheng Fu <cfu@mozilla.com> -Date: Wed Jul 19 17:30:01 2017 +0800 - - Bug 863246 - Fix test failures r=Gijs - - MozReview-Commit-ID: 8tUr27zvs8z - - --HG-- - extra : rebase_source : 997ace66c37098701d433508c682ed7621a78479 ---- - .../test/static/browser_all_files_referenced.js | 6 ++- - .../content/test/static/browser_parsable_css.js | 60 ++++++++++++---------- - caps/tests/mochitest/test_bug292789.html | 7 ++- - .../platform/content/test/test_clipboard.html | 25 +++++++-- - .../test/mixedcontentblocker/test_bug803225.html | 7 ++- - .../htmlparser/tests/reftest/bug482921-1-ref.html | 2 +- - .../htmlparser/tests/reftest/bug482921-2-ref.html | 2 +- - .../htmlparser/tests/reftest/bug535530-2-ref.html | 2 +- - .../htmlparser/tests/reftest/bug704667-1-ref.html | 2 +- - .../htmlparser/tests/reftest/bug731234-1-ref.html | 2 +- - .../htmlparser/tests/reftest/bug910588-1-ref.html | 2 +- - 11 files changed, 75 insertions(+), 42 deletions(-) - -diff --git browser/base/content/test/static/browser_all_files_referenced.js browser/base/content/test/static/browser_all_files_referenced.js -index e875020ab490..87c5f96af7c3 100644 ---- browser/base/content/test/static/browser_all_files_referenced.js -+++ browser/base/content/test/static/browser_all_files_referenced.js -@@ -176,7 +176,6 @@ var whitelist = [ - {file: "resource://gre/modules/accessibility/AccessFu.jsm"}, - // Bug 1351637 - {file: "resource://gre/modules/sdk/bootstrap.js"}, -- - ]; - - whitelist = new Set(whitelist.filter(item => -@@ -478,7 +477,8 @@ function findChromeUrlsFromArray(array, prefix) { - - // Only keep strings that look like real chrome or resource urls. - if (/chrome:\/\/[a-zA-Z09 -]+\/(content|skin|locale)\//.test(string) || -- /resource:\/\/gre.*\.[a-z]+/.test(string)) -+ /resource:\/\/gre.*\.[a-z]+/.test(string) || -+ string.startsWith("resource://content-accessible/")) - gReferencesFromCode.add(string); - } - } -@@ -540,6 +540,8 @@ add_task(async function checkAllTheFiles() { - let devtoolsPrefixes = ["chrome://webide/", - "chrome://devtools", - "resource://devtools/", -+ "resource://devtools-client-jsonview/", -+ "resource://devtools-client-shared/", - "resource://app/modules/devtools", - "resource://gre/modules/devtools"]; - let chromeFiles = []; -diff --git browser/base/content/test/static/browser_parsable_css.js browser/base/content/test/static/browser_parsable_css.js -index 20d69bd9b1d1..20b12a9820c9 100644 ---- browser/base/content/test/static/browser_parsable_css.js -+++ browser/base/content/test/static/browser_parsable_css.js -@@ -17,7 +17,7 @@ let whitelist = [ - {sourceName: /devtools\/client\/debugger\/new\/debugger.css/i, - isFromDevTools: true}, - // Reps uses cross-browser CSS. -- {sourceName: /devtools\/client\/shared\/components\/reps\/reps.css/i, -+ {sourceName: /devtools-client-shared\/components\/reps\/reps.css/i, - isFromDevTools: true}, - // PDFjs is futureproofing its pseudoselectors, and those rules are dropped. - {sourceName: /web\/viewer\.css$/i, -@@ -288,41 +288,49 @@ add_task(async function checkAllTheCSS() { - // Wait for all manifest to be parsed - await Promise.all(manifestPromises); - -- // We build a list of promises that get resolved when their respective -- // files have loaded and produced no errors. -- let allPromises = []; -- - // filter out either the devtools paths or the non-devtools paths: - let isDevtools = SimpleTest.harnessParameters.subsuite == "devtools"; - let devtoolsPathBits = ["webide", "devtools"]; - uris = uris.filter(uri => isDevtools == devtoolsPathBits.some(path => uri.spec.includes(path))); - -- for (let uri of uris) { -- let linkEl = doc.createElement("link"); -+ let loadCSS = chromeUri => new Promise(resolve => { -+ let linkEl, onLoad, onError; -+ onLoad = e => { -+ processCSSRules(linkEl.sheet); -+ resolve(); -+ linkEl.removeEventListener("load", onLoad); -+ linkEl.removeEventListener("error", onError); -+ }; -+ onError = e => { -+ ok(false, "Loading " + linkEl.getAttribute("href") + " threw an error!"); -+ resolve(); -+ linkEl.removeEventListener("load", onLoad); -+ linkEl.removeEventListener("error", onError); -+ }; -+ linkEl = doc.createElement("link"); - linkEl.setAttribute("rel", "stylesheet"); -- allPromises.push(new Promise(resolve => { -- let onLoad = (e) => { -- processCSSRules(linkEl.sheet); -- resolve(); -- linkEl.removeEventListener("load", onLoad); -- linkEl.removeEventListener("error", onError); -- }; -- let onError = (e) => { -- ok(false, "Loading " + linkEl.getAttribute("href") + " threw an error!"); -- resolve(); -- linkEl.removeEventListener("load", onLoad); -- linkEl.removeEventListener("error", onError); -- }; -- linkEl.addEventListener("load", onLoad); -- linkEl.addEventListener("error", onError); -- linkEl.setAttribute("type", "text/css"); -- let chromeUri = convertToCodeURI(uri.spec); -- linkEl.setAttribute("href", chromeUri + kPathSuffix); -- })); -+ linkEl.setAttribute("type", "text/css"); -+ linkEl.addEventListener("load", onLoad); -+ linkEl.addEventListener("error", onError); -+ linkEl.setAttribute("href", chromeUri + kPathSuffix); - doc.head.appendChild(linkEl); -+ }); -+ -+ // We build a list of promises that get resolved when their respective -+ // files have loaded and produced no errors. -+ const kInContentCommonCSS = "chrome://global/skin/in-content/common.css"; -+ let allPromises = uris.map((uri) => convertToCodeURI(uri.spec)) -+ .filter((uri) => uri !== kInContentCommonCSS); -+ -+ // Make sure chrome://global/skin/in-content/common.css is loaded before other -+ // stylesheets in order to guarantee the --in-content variables can be -+ // correctly referenced. -+ if (allPromises.length !== uris.length) { -+ await loadCSS(kInContentCommonCSS); - } - - // Wait for all the files to have actually loaded: -+ allPromises = allPromises.map(loadCSS); - await Promise.all(allPromises); - - // Check if all the files referenced from CSS actually exist. -diff --git caps/tests/mochitest/test_bug292789.html caps/tests/mochitest/test_bug292789.html -index 6b30e207771c..000cf6c12b8f 100644 ---- caps/tests/mochitest/test_bug292789.html -+++ caps/tests/mochitest/test_bug292789.html -@@ -100,7 +100,12 @@ function loadImage(uri, expect, callback) { - } - - // Start off the script src test, and have it start the img tests when complete. --testScriptSrc(runImgTest); -+// Temporarily allow content to access all resource:// URIs. -+SpecialPowers.pushPrefEnv({ -+ set: [ -+ ["security.all_resource_uri_content_accessible", true] -+ ] -+}, () => testScriptSrc(runImgTest)); - </script> - </pre> - </body> -diff --git devtools/shared/platform/content/test/test_clipboard.html devtools/shared/platform/content/test/test_clipboard.html -index 75d1c9eee4b7..832e9fc0c3c1 100644 ---- devtools/shared/platform/content/test/test_clipboard.html -+++ devtools/shared/platform/content/test/test_clipboard.html -@@ -15,12 +15,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1290230 - "use strict"; - var exports = {} - </script> -- -- <script type="application/javascript" -- src="resource://devtools/shared/platform/content/clipboard.js"></script> -- - </head> --<body onload="do_tests()"> -+<body onload="pre_do_tests()"> - <script type="application/javascript"> - "use strict"; - -@@ -31,6 +27,25 @@ function doCopy(e) { - copyString(RESULT); - } - -+async function pre_do_tests() { -+ // Temporarily allow content to access all resource:// URIs. -+ await SpecialPowers.pushPrefEnv({ -+ set: [ -+ ["security.all_resource_uri_content_accessible", true] -+ ] -+ }); -+ -+ // Load script. -+ await (() => new Promise((resolve) => { -+ var script = document.createElement("script"); -+ script.onload = resolve; -+ script.src = "resource://devtools/shared/platform/content/clipboard.js"; -+ document.head.appendChild(script); -+ }))(); -+ -+ do_tests(); -+} -+ - function do_tests() { - let elt = document.querySelector("#key"); - elt.addEventListener("keydown", doCopy); -diff --git dom/security/test/mixedcontentblocker/test_bug803225.html dom/security/test/mixedcontentblocker/test_bug803225.html -index 3037da87c6de..75e76c8f7fee 100644 ---- dom/security/test/mixedcontentblocker/test_bug803225.html -+++ dom/security/test/mixedcontentblocker/test_bug803225.html -@@ -19,8 +19,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225 - - //Cycle through 4 different preference settings. - function changePrefs(callback) { -- let newPrefs = [["security.mixed_content.block_display_content", settings[counter][0]], -- ["security.mixed_content.block_active_content", settings[counter][1]]]; -+ let newPrefs = [ -+ ["security.all_resource_uri_content_accessible", true], // Temporarily allow content to access all resource:// URIs. -+ ["security.mixed_content.block_display_content", settings[counter][0]], -+ ["security.mixed_content.block_active_content", settings[counter][1]] -+ ]; - - SpecialPowers.pushPrefEnv({"set": newPrefs}, function () { - blockDisplay = SpecialPowers.getBoolPref("security.mixed_content.block_display_content"); -diff --git parser/htmlparser/tests/reftest/bug482921-1-ref.html parser/htmlparser/tests/reftest/bug482921-1-ref.html -index d388a14bc518..71c0f91c088d 100644 ---- parser/htmlparser/tests/reftest/bug482921-1-ref.html -+++ parser/htmlparser/tests/reftest/bug482921-1-ref.html -@@ -1,4 +1,4 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span> - <span id></span><span><<span class="start-tag">html</span>></span> - <span id></span><span><<span class="start-tag">head</span>></span> - <span id></span><span><<span class="start-tag">title</span>></span><span>Title</span><span></<span class="end-tag">title</span>></span> -diff --git parser/htmlparser/tests/reftest/bug482921-2-ref.html parser/htmlparser/tests/reftest/bug482921-2-ref.html -index 44f6c03dff4a..d764c70bca50 100644 ---- parser/htmlparser/tests/reftest/bug482921-2-ref.html -+++ parser/htmlparser/tests/reftest/bug482921-2-ref.html -@@ -1,4 +1,4 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="pi"><?xml version="1.0" encoding="utf-8"?></span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="pi"><?xml version="1.0" encoding="utf-8"?></span> - <span id></span><span class="pi"><?foo bar?></span> - <span id></span><span><<span class="start-tag">html</span>></span> - <span id></span><span><<span class="start-tag">head</span>></span> -diff --git parser/htmlparser/tests/reftest/bug535530-2-ref.html parser/htmlparser/tests/reftest/bug535530-2-ref.html -index 5931b9b16be6..54c12912181f 100644 ---- parser/htmlparser/tests/reftest/bug535530-2-ref.html -+++ parser/htmlparser/tests/reftest/bug535530-2-ref.html -@@ -1,4 +1,4 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span> - <span id></span>XX<span class="error">&</span>XX - <span id></span>XX<span class="error">&</span>nXX - <span id></span>XX<span class="error">&</span>noXX -diff --git parser/htmlparser/tests/reftest/bug704667-1-ref.html parser/htmlparser/tests/reftest/bug704667-1-ref.html -index db05bd5245d8..a7a939f3a481 100644 ---- parser/htmlparser/tests/reftest/bug704667-1-ref.html -+++ parser/htmlparser/tests/reftest/bug704667-1-ref.html -@@ -1,4 +1,4 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="error comment"><!--></span> <span class="error comment"><!X></span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="error comment"><!--></span> <span class="error comment"><!X></span> - <span id></span> - </pre> - <!-- View source CSS matches the <pre id> and <span id> elements and produces line numbers. --> -diff --git parser/htmlparser/tests/reftest/bug731234-1-ref.html parser/htmlparser/tests/reftest/bug731234-1-ref.html -index 31b808ec4d4e..897b73ea1bbb 100644 ---- parser/htmlparser/tests/reftest/bug731234-1-ref.html -+++ parser/htmlparser/tests/reftest/bug731234-1-ref.html -@@ -1,4 +1,4 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span><span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="wrap highlight"><pre id><span class="doctype"><!DOCTYPE html></span><span> - <span id></span></span><span><<span class="start-tag">body</span>></span><span> - <span id></span></span><span><<span class="start-tag">script</span>></span><span></span><span></<span class="end-tag">script</span>></span><span>X - <span id></span></span><span><<span class="start-tag">script</span>></span><span></span><span></<span class="end-tag">script</span> ></span><span>X -diff --git parser/htmlparser/tests/reftest/bug910588-1-ref.html parser/htmlparser/tests/reftest/bug910588-1-ref.html -index da9c6867ab1b..46133dd2c48f 100644 ---- parser/htmlparser/tests/reftest/bug910588-1-ref.html -+++ parser/htmlparser/tests/reftest/bug910588-1-ref.html -@@ -1,2 +1,2 @@ --<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="highlight" style="-moz-tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span></span><span><<span class="start-tag">table</span>></span><span></span><span title="Start tag “input” seen in “table”." class="error"><<span class="start-tag">input</span> <span class="attribute-name">type</span>=<a class="attribute-value">hidden</a>></span><span></span><span></<span class="end-tag">table</span>></span><span> -+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://content-accessible/viewsource.css"></head><body id="viewsource" class="highlight" style="-moz-tab-size: 4"><pre id="line1"><span></span><span class="doctype"><!DOCTYPE html></span><span></span><span><<span class="start-tag">table</span>></span><span></span><span title="Start tag “input” seen in “table”." class="error"><<span class="start-tag">input</span> <span class="attribute-name">type</span>=<a class="attribute-value">hidden</a>></span><span></span><span></<span class="end-tag">table</span>></span><span> - <span id="line2"></span></span></pre></body></html> - -commit 72b72cc0b4b8 -Author: Chung-Sheng Fu <cfu@mozilla.com> -Date: Thu Jun 8 17:54:41 2017 +0800 - - Bug 863246 - Add test cases r=billm - - MozReview-Commit-ID: 9oXWNOREemX - - --HG-- - extra : rebase_source : ff74bcd4d60964b7656a8c6131dbf8132d00e214 ---- - .../test/mochitest/mochitest.ini | 2 + - .../mochitest/test_bug863246_resource_uri.html | 51 ++++++++++++++++++++++ - 2 files changed, 53 insertions(+) - -diff --git browser/components/resistfingerprinting/test/mochitest/mochitest.ini browser/components/resistfingerprinting/test/mochitest/mochitest.ini -index 1399554529e0..4f09fffd85d5 100644 ---- browser/components/resistfingerprinting/test/mochitest/mochitest.ini -+++ browser/components/resistfingerprinting/test/mochitest/mochitest.ini -@@ -1,5 +1,6 @@ - [DEFAULT] - tags = resistfingerprinting -+ - support-files = - file_animation_api.html - worker_child.js -@@ -12,3 +13,4 @@ scheme = https - [test_hide_gamepad_info.html] - support-files = test_hide_gamepad_info_iframe.html - [test_speech_synthesis.html] -+[test_bug863246_resource_uri.html] -diff --git browser/components/resistfingerprinting/test/mochitest/test_bug863246_resource_uri.html browser/components/resistfingerprinting/test/mochitest/test_bug863246_resource_uri.html -new file mode 100644 -index 000000000000..13dad300ff05 ---- /dev/null -+++ browser/components/resistfingerprinting/test/mochitest/test_bug863246_resource_uri.html -@@ -0,0 +1,51 @@ -+<!DOCTYPE html> -+<meta charset="utf8"> -+<script src="/tests/SimpleTest/SimpleTest.js"></script> -+<script src="/tests/SimpleTest/SpawnTask.js"></script> -+<script> -+/* global SimpleTest SpecialPowers add_task */ -+ -+function waitForDOMContentLoaded() { -+ return new Promise((aResolve) => { -+ document.addEventListener("DOMContentLoaded", aResolve); -+ }); -+} -+ -+function testResourceUri(aTest, aUri, aContentAccessible) { -+ return new Promise((aResolve) => { -+ let link = document.createElement("link"); -+ link.rel = "stylesheet"; -+ link.onload = () => { -+ SimpleTest.ok(aContentAccessible, aTest); -+ aResolve(); -+ }; -+ link.onerror = () => { -+ SimpleTest.ok(!aContentAccessible, aTest); -+ aResolve(); -+ }; -+ link.href = aUri; -+ document.head.appendChild(link); -+ }); -+} -+ -+add_task(async function() { -+ await waitForDOMContentLoaded(); -+ await testResourceUri( -+ "resource://content-accessible is content-accessible", -+ "resource://content-accessible/viewsource.css", -+ true); -+ await testResourceUri( -+ "resource://gre-resources is not content-accessible", -+ "resource://gre-resources/html.css", -+ false); -+ await SpecialPowers.pushPrefEnv({ -+ set: [ -+ ["security.all_resource_uri_content_accessible", true] -+ ] -+ }); -+ await testResourceUri( -+ "security.all_resource_uri_content_accessible = true, resource://gre-resources is now content-accessible", -+ "resource://gre-resources/html.css", -+ true); -+}); -+</script> diff --git a/www/waterfox/files/patch-bug1314928 b/www/waterfox/files/patch-bug1314928 deleted file mode 100644 index 22309cf26ea7..000000000000 --- a/www/waterfox/files/patch-bug1314928 +++ /dev/null @@ -1,64 +0,0 @@ -commit 4cb65b680138 -Author: Martin Stransky <stransky@redhat.com> -Date: Fri Aug 25 10:30:28 2017 +0200 - - Bug 1314928 - get link text color by GTK_STATE_FLAG_LINK on Gtk3 >= 3.12, r=karlt - - MozReview-Commit-ID: BPR2AgoUx5H - - --HG-- - extra : rebase_source : c4670cd6b7df84dd00a4d04c3bfc582f917795da ---- - widget/gtk/nsLookAndFeel.cpp | 32 ++++++++++++++++++++++++-------- - 1 file changed, 24 insertions(+), 8 deletions(-) - -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index 7cd8e8dcc163..6bb3e27c6653 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -43,6 +43,10 @@ using mozilla::LookAndFeel; - ((nscolor) NS_RGBA((int)((c).red*255), (int)((c).green*255), \ - (int)((c).blue*255), (int)((c).alpha*255))) - -+#if !GTK_CHECK_VERSION(3,12,0) -+#define GTK_STATE_FLAG_LINK (static_cast<GtkStateFlags>(1 << 9)) -+#endif -+ - nsLookAndFeel::nsLookAndFeel() - : nsXPLookAndFeel(), - #if (MOZ_WIDGET_GTK == 2) -@@ -1457,14 +1461,26 @@ nsLookAndFeel::EnsureInit() - } - sMenuSupportsDrag = supports_menubar_drag; - -- colorValuePtr = nullptr; -- gtk_widget_style_get(linkButton, "link-color", &colorValuePtr, nullptr); -- if (colorValuePtr) { -- colorValue = *colorValuePtr; // we can't pass deref pointers to GDK_COLOR_TO_NS_RGB -- sNativeHyperLinkText = GDK_COLOR_TO_NS_RGB(colorValue); -- gdk_color_free(colorValuePtr); -- } else { -- sNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE); -+#if (MOZ_WIDGET_GTK == 3) -+ if (gtk_check_version(3, 12, 0) == nullptr) { -+ // TODO: It returns wrong color for themes which -+ // sets link color for GtkLabel only as we query -+ // GtkLinkButton style here. -+ style = gtk_widget_get_style_context(linkButton); -+ gtk_style_context_get_color(style, GTK_STATE_FLAG_LINK, &color); -+ sNativeHyperLinkText = GDK_RGBA_TO_NS_RGBA(color); -+ } else -+#endif -+ { -+ colorValuePtr = nullptr; -+ gtk_widget_style_get(linkButton, "link-color", &colorValuePtr, nullptr); -+ if (colorValuePtr) { -+ colorValue = *colorValuePtr; // we can't pass deref pointers to GDK_COLOR_TO_NS_RGB -+ sNativeHyperLinkText = GDK_COLOR_TO_NS_RGB(colorValue); -+ gdk_color_free(colorValuePtr); -+ } else { -+ sNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE); -+ } - } - - // invisible character styles diff --git a/www/waterfox/files/patch-bug1341234 b/www/waterfox/files/patch-bug1341234 deleted file mode 100644 index e9d7c17e80af..000000000000 --- a/www/waterfox/files/patch-bug1341234 +++ /dev/null @@ -1,215 +0,0 @@ -commit 1009160a12a7 -Author: Nathan Froyd <froydnj@mozilla.com> -Date: Fri Nov 10 10:05:36 2017 -0500 - - Bug 1341234 - part 0 - fix typo in AC_SUBST_SET checking; r=gps - - The various AC_SUBST macros generate AC_SUBST_*FOO macros for holding the - values to substitute. The macros also cross-check the AC_SUBST_* macros - generated by other variants to make sure that you don't try to do - something like AC_SUBST(FOO) and AC_SUBST_SET(FOO). However, the check - in AC_SUBST_SET for AC_SUBST_LIST duplicate is missing an underscore: - the AC_SUBST_LIST macro generates another macro starting with - AC_SUBST_LIST_, but the AC_SUBST_SET macro checks for the prefix - AC_SUBST_LIST, which is missing the trailing underscore. - - As we're going to be adding yet another AC_SUBST_* macro variant, and - therefore adding more checks to all existing macros, let's clean this up - before we start. ---- - build/autoconf/config.status.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git build/autoconf/config.status.m4 build/autoconf/config.status.m4 -index cede9d36928d..ae1a871952a9 100644 ---- build/autoconf/config.status.m4 -+++ build/autoconf/config.status.m4 -@@ -24,7 +24,7 @@ dnl with values got from the value of the environment variable, split on - dnl whitespaces. - define([AC_SUBST_SET], - [ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_SET on the same variable ($1)])], --[ifdef([AC_SUBST_LIST$1], [m4_fatal([Cannot use AC_SUBST_LIST and AC_SUBST_SET on the same variable ($1)])], -+[ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST_LIST and AC_SUBST_SET on the same variable ($1)])], - [ifdef([AC_SUBST_SET_$1], , - [define([AC_SUBST_SET_$1], )dnl - AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl - -commit 380dc56df216 -Author: Nathan Froyd <froydnj@mozilla.com> -Date: Fri Nov 10 10:05:36 2017 -0500 - - Bug 1341234 - part 1 - add AC_SUBST_TOML_LIST macro; r=gps - - Stylo's bindgen is configured partially through a .toml.in file that - substitutes the value of a configure variable (BINDGEN_CFLAGS) into a - TOML list. We can debate whether this is a good thing to do some other - time; the reality is that the current moz.configure code that provides - the set_config for BINDGEN_CFLAGS needs to perform all the quoting - itself. - - We want, however, to define the substituted variable in old-configure.in - land (some of the values that will go into BINDGEN_CFLAGS are only - defined in old-configure.in, and are not trivially ported to - moz.configure), which means that we need to have quoting logic in - m4/Python when we generate config.status. This patch adds an - appropriate macro for doing so. ---- - build/autoconf/config.status.m4 | 25 ++++++++++++++++++++++--- - 1 file changed, 22 insertions(+), 3 deletions(-) - -diff --git build/autoconf/config.status.m4 build/autoconf/config.status.m4 -index ae1a871952a9..c75575386129 100644 ---- build/autoconf/config.status.m4 -+++ build/autoconf/config.status.m4 -@@ -12,12 +12,13 @@ dnl AC_SOMETHING(foo,AC_SUBST(),bar) - define([AC_SUBST], - [ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_SET on the same variable ($1)])], - [ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_LIST on the same variable ($1)])], -+[ifdef([AC_SUBST_TOML_LIST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_TOML_LIST on the same variable ($1)])], - [ifdef([AC_SUBST_$1], , - [define([AC_SUBST_$1], )dnl - AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl - (''' $1 ''', r''' [$]$1 ''') - AC_DIVERT_POP()dnl --])])])]) -+])])])])]) - - dnl Like AC_SUBST, but makes the value available as a set in python, - dnl with values got from the value of the environment variable, split on -@@ -25,12 +26,13 @@ dnl whitespaces. - define([AC_SUBST_SET], - [ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_SET on the same variable ($1)])], - [ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST_LIST and AC_SUBST_SET on the same variable ($1)])], -+[ifdef([AC_SUBST_TOML_LIST_$1], [m4_fatal([Cannot use AC_SUBST_TOML_LIST and AC_SUBST_SET on the same variable ($1)])], - [ifdef([AC_SUBST_SET_$1], , - [define([AC_SUBST_SET_$1], )dnl - AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl - (''' $1 ''', unique_list(r''' [$]$1 '''.split())) - AC_DIVERT_POP()dnl --])])])]) -+])])])])]) - - dnl Like AC_SUBST, but makes the value available as a list in python, - dnl with values got from the value of the environment variable, split on -@@ -38,12 +40,29 @@ dnl whitespaces. - define([AC_SUBST_LIST], - [ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_LIST on the same variable ($1)])], - [ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_LIST on the same variable ($1)])], -+[ifdef([AC_SUBST_TOML_LIST_$1], [m4_fatal([Cannot use AC_SUBST_TOML_LIST and AC_SUBST_LIST on the same variable ($1)])], - [ifdef([AC_SUBST_LIST_$1], , - [define([AC_SUBST_LIST_$1], )dnl - AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl - (''' $1 ''', list(r''' [$]$1 '''.split())) - AC_DIVERT_POP()dnl --])])])]) -+])])])])]) -+ -+dnl Like AC_SUBST, but makes the value available as a string of comma-separated -+dnl quoted strings in python, with values got from the value of the environment -+dnl variable, split on whitespaces. The value is suitable for embedding into a -+dnl .toml list. -+define([AC_SUBST_TOML_LIST], -+[ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_TOML_LIST on the same variable ($1)])], -+[ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_TOML_LIST on the same variable ($1)])], -+[ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST_LIST and AC_SUBST_TOML_LIST on the same variable ($1)])], -+[ifdef([AC_SUBST_TOML_LIST_$1], , -+[define([AC_SUBST_TOML_LIST_$1], )dnl -+AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl -+ (''' $1 ''', r''' %s ''' % str(', '.join("'%s'" % s for s in r''' [$]$1 '''.split()))) -+AC_DIVERT_POP()dnl -+])])])])]) -+ - - dnl Ignore AC_SUBSTs for variables we don't have use for but that autoconf - dnl itself exports. - -commit 17b61015519a -Author: Nathan Froyd <froydnj@mozilla.com> -Date: Fri Nov 10 10:05:36 2017 -0500 - - Bug 1341234 - part 2 - add an intermediate step for determining bindgen's CFLAGS; r=gps - - Add an intermediate step in old-configure.in for setting up - BINDGEN_CFLAGS (renamed to BINDGEN_SYSTEM_FLAGS), so we can add whatever - flags we like (e.g. for system libaries with their includes in - non-standard places) at a later point. ---- - build/moz.configure/toolchain.configure | 9 +++------ - layout/style/bindgen.toml.in | 2 +- - old-configure.in | 3 +++ - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure -index 002a4cbbc2f0..7e1a8acd5194 100755 ---- build/moz.configure/toolchain.configure -+++ build/moz.configure/toolchain.configure -@@ -902,15 +902,12 @@ option(env='BINDGEN_CFLAGS', - help='Options bindgen should pass to the C/C++ parser') - - @depends('BINDGEN_CFLAGS') --@checking('bindgen cflags', lambda s: s if s and s.strip() else 'no') -+@checking('bindgen cflags', lambda s: s if s else 'no') - def bindgen_cflags(value): - if value and len(value): -- # Reformat the env value for substitution into a toml list. -- flags = value[0].split() -- return ', '.join('"' + flag + '"' for flag in flags) -- return '' -+ return value[0].split() - --set_config('BINDGEN_CFLAGS', bindgen_cflags) -+add_old_configure_assignment('_BINDGEN_CFLAGS', bindgen_cflags) - - @depends(c_compiler) - def default_debug_flags(compiler_info): -diff --git layout/style/bindgen.toml.in layout/style/bindgen.toml.in -index 7b1c72c86ec7..894008d0cfb6 100644 ---- layout/style/bindgen.toml.in -+++ layout/style/bindgen.toml.in -@@ -1,4 +1,4 @@ - [build] - args = [ -- @BINDGEN_CFLAGS@ -+ @BINDGEN_SYSTEM_FLAGS@ - ] -diff --git old-configure.in old-configure.in -index f95c55515094..dd69eca8ff69 100644 ---- old-configure.in -+++ old-configure.in -@@ -4395,6 +4395,9 @@ AC_SUBST_LIST(MOZ_CAIRO_LIBS) - AC_SUBST_LIST(MOZ_CAIRO_OSLIBS) - AC_SUBST(MOZ_TREE_PIXMAN) - -+BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS" -+AC_SUBST_TOML_LIST(BINDGEN_SYSTEM_FLAGS) -+ - dnl ======================================================== - dnl disable xul - dnl ======================================================== - -commit 4d60ad6f6676 -Author: Nathan Froyd <froydnj@mozilla.com> -Date: Fri Nov 10 10:05:36 2017 -0500 - - Bug 1341234 - part 3 - add various system library CFLAGS to BINDGEN_SYSTEM_FLAGS; r=gps - - This change ensures that folks who configure --with-system-FOO for - various values of FOO can build Stylo, since bindgen will know where to - find the flags for said FOO packages. ---- - old-configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git old-configure.in old-configure.in -index dd69eca8ff69..2f8161ad035e 100644 ---- old-configure.in -+++ old-configure.in -@@ -4395,7 +4395,7 @@ AC_SUBST_LIST(MOZ_CAIRO_LIBS) - AC_SUBST_LIST(MOZ_CAIRO_OSLIBS) - AC_SUBST(MOZ_TREE_PIXMAN) - --BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS" -+BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS $NSS_CFLAGS $MOZ_PIXMAN_CFLAGS $MOZ_CAIRO_CFLAGS" - AC_SUBST_TOML_LIST(BINDGEN_SYSTEM_FLAGS) - - dnl ======================================================== diff --git a/www/waterfox/files/patch-bug1386371 b/www/waterfox/files/patch-bug1386371 deleted file mode 100644 index 2d5cf5e7fdf2..000000000000 --- a/www/waterfox/files/patch-bug1386371 +++ /dev/null @@ -1,103 +0,0 @@ -commit 503070ad8daa -Author: Matt Brubeck <mbrubeck@mozilla.com> -Date: Thu Aug 10 11:38:10 2017 -0700 - - Bug 1386371 - Disable LTO by default, but enable in automation. r=froydnj - - MozReview-Commit-ID: 2DIY9ex3Mch - - --HG-- - extra : rebase_source : 61f2f073adabfa7c46c324470a308adab23e7781 ---- - build/moz.configure/toolchain.configure | 1 + - config/rules.mk | 14 ++++++++++++-- - python/mozbuild/mozbuild/frontend/emitter.py | 1 - - toolkit/library/gtest/rust/Cargo.toml | 1 - - toolkit/library/rust/Cargo.toml | 1 - - 5 files changed, 13 insertions(+), 5 deletions(-) - -diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure -index eba0fbf65538..6a89676385c4 100755 ---- build/moz.configure/toolchain.configure -+++ build/moz.configure/toolchain.configure -@@ -1126,6 +1126,7 @@ def developer_options(value): - return True - - add_old_configure_assignment('DEVELOPER_OPTIONS', developer_options) -+set_config('DEVELOPER_OPTIONS', developer_options) - - # Linker detection - # ============================================================== -diff --git config/rules.mk config/rules.mk -index dc16e99c6e4d..9897c203feb4 100644 ---- config/rules.mk -+++ config/rules.mk -@@ -862,6 +862,16 @@ cargo_build_flags += --color=always - endif - endif - -+# These flags are passed via `cargo rustc` and only apply to the final rustc -+# invocation (i.e., only the top-level crate, not its dependencies). -+cargo_rustc_flags = $(CARGO_RUSTCFLAGS) -+ifndef DEVELOPER_OPTIONS -+ifndef MOZ_DEBUG_RUST -+# Enable link-time optimization for release builds. -+cargo_rustc_flags += -C lto -+endif -+endif -+ - # Cargo currently supports only two interesting profiles for building: - # development and release. Those map (roughly) to --enable-debug and - # --disable-debug in Gecko, respectively, but there's another axis that we'd -@@ -939,7 +949,7 @@ endef - # - # $(call CARGO_BUILD) - define CARGO_BUILD --$(call RUN_CARGO,build,$(1)) -+$(call RUN_CARGO,rustc,$(1)) - endef - - define CARGO_CHECK -@@ -984,7 +994,7 @@ endif - # build. - force-cargo-library-build: - $(REPORT_BUILD) -- $(call CARGO_BUILD,$(target_cargo_env_vars)) --lib $(cargo_target_flag) $(rust_features_flag) -+ $(call CARGO_BUILD,$(target_cargo_env_vars)) --lib $(cargo_target_flag) $(rust_features_flag) -- $(cargo_rustc_flags) - - $(RUST_LIBRARY_FILE): force-cargo-library-build - -diff --git python/mozbuild/mozbuild/frontend/emitter.py python/mozbuild/mozbuild/frontend/emitter.py -index 815126d145b3..07a33caca893 100644 ---- python/mozbuild/mozbuild/frontend/emitter.py -+++ python/mozbuild/mozbuild/frontend/emitter.py -@@ -480,7 +480,6 @@ class TreeMetadataEmitter(LoggingMixin): - expected_profile = { - 'opt-level': 2, - 'rpath': False, -- 'lto': True, - 'debug-assertions': False, - 'panic': 'abort', - } -diff --git toolkit/library/gtest/rust/Cargo.toml toolkit/library/gtest/rust/Cargo.toml -index a7a64486c684..c9f942c88033 100644 ---- toolkit/library/gtest/rust/Cargo.toml -+++ toolkit/library/gtest/rust/Cargo.toml -@@ -42,6 +42,5 @@ panic = "abort" - [profile.release] - opt-level = 2 - rpath = false --lto = true - debug-assertions = false - panic = "abort" -diff --git toolkit/library/rust/Cargo.toml toolkit/library/rust/Cargo.toml -index f67669513d38..fd5668729199 100644 ---- toolkit/library/rust/Cargo.toml -+++ toolkit/library/rust/Cargo.toml -@@ -40,6 +40,5 @@ panic = "abort" - [profile.release] - opt-level = 2 - rpath = false --lto = true - debug-assertions = false - panic = "abort" diff --git a/www/waterfox/files/patch-bug1386887 b/www/waterfox/files/patch-bug1386887 deleted file mode 100644 index 7421a8d84012..000000000000 --- a/www/waterfox/files/patch-bug1386887 +++ /dev/null @@ -1,89 +0,0 @@ -commit efbe3a9af876 -Author: Manish Goregaokar <manishearth@gmail.com> -Date: Wed Aug 2 11:24:35 2017 -0700 - - Bug 1386887 - Clean up FFI lifetimes to work on nightly; r=emilio - - MozReview-Commit-ID: 5WAIVd6p2du ---- - layout/style/ServoBindingList.h | 4 ++-- - layout/style/ServoBindingTypes.h | 2 ++ - layout/style/ServoBindings.h | 4 ++-- - layout/style/ServoBindings.toml | 4 +++- - 4 files changed, 9 insertions(+), 5 deletions(-) - -diff --git layout/style/ServoBindingList.h layout/style/ServoBindingList.h -index 6c669ebb3d3e..87ade14ea4de 100644 ---- layout/style/ServoBindingList.h -+++ layout/style/ServoBindingList.h -@@ -379,10 +379,10 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_HasCSSWideKeyword, bool, - nsCSSPropertyID property) - // Compose animation value for a given property. - // |base_values| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>. --// We use void* to avoid exposing nsRefPtrHashtable in FFI. -+// We use RawServoAnimationValueTableBorrowed to avoid exposing nsRefPtrHashtable in FFI. - SERVO_BINDING_FUNC(Servo_AnimationCompose, void, - RawServoAnimationValueMapBorrowedMut animation_values, -- void* base_values, -+ RawServoAnimationValueTableBorrowed base_values, - nsCSSPropertyID property, - RawGeckoAnimationPropertySegmentBorrowed animation_segment, - RawGeckoAnimationPropertySegmentBorrowed last_segment, -diff --git layout/style/ServoBindingTypes.h layout/style/ServoBindingTypes.h -index aaf4fc27e1b9..69be15ee9f51 100644 ---- layout/style/ServoBindingTypes.h -+++ layout/style/ServoBindingTypes.h -@@ -54,6 +54,8 @@ class nsXBLBinding; - using mozilla::dom::StyleChildrenIterator; - using mozilla::ServoElementSnapshot; - -+typedef void* RawServoAnimationValueTableBorrowed; -+ - typedef nsINode RawGeckoNode; - typedef mozilla::dom::Element RawGeckoElement; - typedef nsIDocument RawGeckoDocument; -diff --git layout/style/ServoBindings.h layout/style/ServoBindings.h -index 493ca63f932b..c6ced6d1fedb 100644 ---- layout/style/ServoBindings.h -+++ layout/style/ServoBindings.h -@@ -268,9 +268,9 @@ double Gecko_GetPositionInSegment( - // Get servo's AnimationValue for |aProperty| from the cached base style - // |aBaseStyles|. - // |aBaseStyles| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>. --// We use void* to avoid exposing nsRefPtrHashtable in FFI. -+// We use RawServoAnimationValueTableBorrowed to avoid exposing nsRefPtrHashtable in FFI. - RawServoAnimationValueBorrowedOrNull Gecko_AnimationGetBaseStyle( -- void* aBaseStyles, -+ RawServoAnimationValueTableBorrowed aBaseStyles, - nsCSSPropertyID aProperty); - void Gecko_StyleTransition_SetUnsupportedProperty( - mozilla::StyleTransition* aTransition, -diff --git layout/style/ServoBindings.toml layout/style/ServoBindings.toml -index 11e372541235..3c3902beea80 100644 ---- layout/style/ServoBindings.toml -+++ layout/style/ServoBindings.toml -@@ -357,6 +357,7 @@ raw-lines = [ - "pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues;", - "pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>;", - "pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData;", -+ "pub type RawServoAnimationValueTableBorrowed<'a> = &'a ();" - ] - whitelist-functions = ["Servo_.*", "Gecko_.*"] - structs-types = [ -@@ -389,7 +390,7 @@ structs-types = [ - "RawGeckoPresContext", - "RawGeckoPresContextOwned", - "RawGeckoStyleAnimationList", -- "RawGeckoStyleChildrenIteratorBorrowedMut", -+ "RawGeckoStyleChildrenIterator", - "RawGeckoServoStyleRuleList", - "RawGeckoURLExtraData", - "RawGeckoXBLBinding", -@@ -526,6 +527,7 @@ servo-borrow-types = [ - "RawGeckoFontFaceRuleList", - "RawGeckoServoStyleRuleList", - "RawGeckoServoAnimationValueList", -+ "RawGeckoStyleChildrenIterator", - ] - fixups = [ - # hack for gecko-owned string diff --git a/www/waterfox/files/patch-bug1393283 b/www/waterfox/files/patch-bug1393283 index 0a4b9327ea2b..b9c763fe47ec 100644 --- a/www/waterfox/files/patch-bug1393283 +++ b/www/waterfox/files/patch-bug1393283 @@ -37,7 +37,7 @@ index 31d0f8832732..b957d835b52f 100644 - // version. - uint32_t spoofedVersion = mAppVersion.ToInteger(&rv); - if (NS_SUCCEEDED(rv)) { -- spoofedVersion = spoofedVersion - (spoofedVersion % 10); +- spoofedVersion = (10 - spoofedVersion % 10) + spoofedVersion; - mSpoofedUserAgent.Assign(nsPrintfCString( - "Mozilla/5.0 (%s; rv:%d.0) Gecko/%s Firefox/%d.0", - SPOOFED_OSCPU, spoofedVersion, LEGACY_BUILD_ID, spoofedVersion)); diff --git a/www/waterfox/files/patch-bug1409680 b/www/waterfox/files/patch-bug1409680 deleted file mode 100644 index 37c71ec234b2..000000000000 --- a/www/waterfox/files/patch-bug1409680 +++ /dev/null @@ -1,27 +0,0 @@ -Bug 1409680 - Extend --disable-debug-symbols to Rust code. - -This reduces disk I/O and memory usage during build that already lacks -debugging symbols from C++ code, allowing to use more jobs on 32bit hosts. - ---disable-debug-symbols build on FreeBSD 10.3 i386 (8 cores) host: -Max RSS before: libxul - 612 Mb, libgkrust - 1908 Mb -Max RSS after: libxul - 444 Mb, libgkrust - 1471 Mb -Binary before: libxul - 203 Mb, libgkrust - 732 Mb -Binary after: libxul - 123 Mb, libgkrust - 301 Mb - ---- config/rules.mk.orig 2017-09-14 20:15:53 UTC -+++ config/rules.mk -@@ -906,11 +906,13 @@ ifdef MOZ_USING_SCCACHE - sccache_wrap := RUSTC_WRAPPER='$(CCACHE)' - endif - -+ifdef MOZ_DEBUG_SYMBOLS - # XXX hack to work around dsymutil failing on cross-OSX builds (bug 1380381) - ifeq ($(HOST_OS_ARCH)-$(OS_ARCH),Linux-Darwin) - default_rustflags += -C debuginfo=1 - else - default_rustflags += -C debuginfo=2 -+endif - endif - - # We use the + prefix to pass down the jobserver fds to cargo, but we diff --git a/www/waterfox/files/patch-bug1416045 b/www/waterfox/files/patch-bug1416045 deleted file mode 100644 index 0d41443faa5c..000000000000 --- a/www/waterfox/files/patch-bug1416045 +++ /dev/null @@ -1,338 +0,0 @@ -commit 5d7b84950d03 -Author: vinoth <cegvinoth@gmail.com> -Date: Thu Mar 22 21:02:16 2018 +0200 - - Bug 1416045. r=mayhemer, a=RyanVM - - Reviewers: mayhemer - - Reviewed By: mayhemer - - Subscribers: freddyb, dveditz, mayhemer, ckerschb, vinoth - - Tags: PHID-PROJ-wkydohdk6pajyfn2llkb - - Bug #: 1416045 - - Differential Revision: https://phabricator.services.mozilla.com/D675 - - --HG-- - extra : source : a0a2092724797e534549cc2d80dc9c423bfaf43d - extra : amend_source : f1ddea498e322b79b6d1b9af45c7e04832f43ed1 ---- - .../test/csp/file_multipart_testserver.sjs | 110 ++++++++++++++++++++- - dom/security/test/csp/test_multipartchannel.html | 42 +++++++- - netwerk/streamconv/converters/nsMultiMixedConv.cpp | 36 +++++++ - netwerk/streamconv/converters/nsMultiMixedConv.h | 3 + - 4 files changed, 182 insertions(+), 9 deletions(-) - -diff --git dom/security/test/csp/file_multipart_testserver.sjs dom/security/test/csp/file_multipart_testserver.sjs -index d2eb58c82b52..3934df0a9572 100644 ---- dom/security/test/csp/file_multipart_testserver.sjs -+++ dom/security/test/csp/file_multipart_testserver.sjs -@@ -1,8 +1,11 @@ - // SJS file specifically for the needs of bug --// Bug 1223743 - CSP: Check baseChannel for CSP when loading multipart channel -+// Bug 1416045/Bug 1223743 - CSP: Check baseChannel for CSP when loading multipart channel - - var CSP = "script-src 'unsafe-inline', img-src 'none'"; --var BOUNDARY = "fooboundary" -+var rootCSP = "script-src 'unsafe-inline'"; -+var part1CSP = "img-src *"; -+var part2CSP = "img-src 'none'"; -+var BOUNDARY = "fooboundary"; - - // small red image - const IMG_BYTES = atob( -@@ -14,16 +17,72 @@ var RESPONSE = ` - var myImg = new Image; - myImg.src = "file_multipart_testserver.sjs?img"; - myImg.onerror = function(e) { -- window.parent.postMessage("img-blocked", "*"); -+ window.parent.postMessage({"test": "rootCSP_test", -+ "msg": "img-blocked"}, "*"); - }; - myImg.onload = function() { -- window.parent.postMessage("img-loaded", "*"); -+ window.parent.postMessage({"test": "rootCSP_test", -+ "msg": "img-loaded"}, "*"); - }; - document.body.appendChild(myImg); - </script> - `; - --var myTimer; -+var RESPONSE1 = ` -+ <body> -+ <script> -+ var triggerNextPartFrame = document.createElement('iframe'); -+ var myImg = new Image; -+ myImg.src = "file_multipart_testserver.sjs?img"; -+ myImg.onerror = function(e) { -+ window.parent.postMessage({"test": "part1CSP_test", -+ "msg": "part1-img-blocked"}, "*"); -+ triggerNextPartFrame.src = 'file_multipart_testserver.sjs?sendnextpart'; -+ }; -+ myImg.onload = function() { -+ window.parent.postMessage({"test": "part1CSP_test", -+ "msg": "part1-img-loaded"}, "*"); -+ triggerNextPartFrame.src = 'file_multipart_testserver.sjs?sendnextpart'; -+ }; -+ document.body.appendChild(myImg); -+ document.body.appendChild(triggerNextPartFrame); -+ </script> -+ </body> -+`; -+ -+var RESPONSE2 = ` -+ <body> -+ <script> -+ var myImg = new Image; -+ myImg.src = "file_multipart_testserver.sjs?img"; -+ myImg.onerror = function(e) { -+ window.parent.postMessage({"test": "part2CSP_test", -+ "msg": "part2-img-blocked"}, "*"); -+ }; -+ myImg.onload = function() { -+ window.parent.postMessage({"test": "part2CSP_test", -+ "msg": "part2-img-loaded"}, "*"); -+ }; -+ document.body.appendChild(myImg); -+ </script> -+ </body> -+`; -+ -+function setGlobalState(data, key) -+{ -+ x = { data: data, QueryInterface: function(iid) { return this } }; -+ x.wrappedJSObject = x; -+ setObjectState(key, x); -+} -+ -+function getGlobalState(key) -+{ -+ var data; -+ getObjectState(key, function(x) { -+ data = x && x.wrappedJSObject.data; -+ }); -+ return data; -+} - - function handleRequest(request, response) - { -@@ -39,6 +98,29 @@ function handleRequest(request, response) - return; - } - -+ if (request.queryString == "partcspdoc") { -+ response.setHeader("Content-Security-Policy", rootCSP, false); -+ response.setHeader("Content-Type", -+ "multipart/x-mixed-replace; boundary=" + BOUNDARY, false); -+ response.setStatusLine(request.httpVersion, 200, "OK"); -+ response.processAsync(); -+ response.write("--"+BOUNDARY+"\r\n"); -+ sendNextPart(response, 1); -+ return; -+ } -+ -+ if (request.queryString == "sendnextpart") { -+ response.setStatusLine(request.httpVersion, 204, "No content"); -+ var blockedResponse = getGlobalState("root-document-response"); -+ if (typeof blockedResponse == "object") { -+ sendNextPart(blockedResponse, 2); -+ sendClose(blockedResponse); -+ } else { -+ dump("Couldn't find the stored response object."); -+ } -+ return; -+ } -+ - if (request.queryString == "img") { - response.setHeader("Content-Type", "image/png"); - response.write(IMG_BYTES); -@@ -48,3 +130,21 @@ function handleRequest(request, response) - // we should never get here - return something unexpected - response.write("d'oh"); - } -+ -+function sendClose(response) { -+ response.write("--"+BOUNDARY+"--\r\n"); -+ response.finish(); -+} -+ -+function sendNextPart(response, partNumber) { -+ response.write("Content-type: text/html" + "\r\n"); -+ if (partNumber == 1) { -+ response.write("Content-Security-Policy:" + part1CSP + "\r\n"); -+ response.write(RESPONSE1); -+ setGlobalState(response, "root-document-response"); -+ } else { -+ response.write("Content-Security-Policy:" + part2CSP + "\r\n"); -+ response.write(RESPONSE2); -+ } -+ response.write("--"+BOUNDARY+"\r\n"); -+} -diff --git dom/security/test/csp/test_multipartchannel.html dom/security/test/csp/test_multipartchannel.html -index 120f9712d0e0..1c03157cc0b4 100644 ---- dom/security/test/csp/test_multipartchannel.html -+++ dom/security/test/csp/test_multipartchannel.html -@@ -2,32 +2,66 @@ - <html> - <head> - <meta charset="utf-8"> -- <title>Bug 1223743 - CSP: Check baseChannel for CSP when loading multipart channel</title> -+ <title>Bug 1416045/Bug 1223743 - CSP: Check baseChannel for CSP when loading multipart channel</title> - <!-- Including SimpleTest.js so we can use waitForExplicitFinish !--> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> - </head> - <body> - <iframe style="width:100%;" id="testframe"></iframe> -+<iframe style="width:100%;" id="testPartCSPframe"></iframe> - - <script class="testbody" type="text/javascript"> - -+var testsToRunMultipartCSP = { -+ rootCSP_test: false, -+ part1CSP_test: false, -+ part2CSP_test: false, -+}; -+ - SimpleTest.waitForExplicitFinish(); - -+function checkTestsCompleted() { -+ for (var prop in testsToRunMultipartCSP) { -+ // some test hasn't run yet so we're not done -+ if (!testsToRunMultipartCSP[prop]) { -+ return; -+ } -+ } -+ window.removeEventListener("message", receiveMessage); -+ SimpleTest.finish(); -+} - /* Description of the test: - * We apply a CSP to a multipart channel and then try to load an image - * within a segment making sure the image is blocked correctly by CSP. -+ * We also provide CSP for each part and try to load an image in each -+ * part and make sure the image is loaded in first part and blocked in -+ * second part correctly based on its CSP accordingly. - */ - - window.addEventListener("message", receiveMessage); - function receiveMessage(event) { -- is(event.data, "img-blocked", "image should be blocked"); -- window.removeEventListener("message", receiveMessage); -- SimpleTest.finish(); -+ switch (event.data.test) { -+ case "rootCSP_test": -+ is(event.data.msg, "img-blocked", "image should be blocked"); -+ testsToRunMultipartCSP["rootCSP_test"] = true; -+ break; -+ case "part1CSP_test": -+ is(event.data.msg, "part1-img-loaded", "Part1 image should be loaded"); -+ testsToRunMultipartCSP["part1CSP_test"] = true; -+ break; -+ case "part2CSP_test": -+ is(event.data.msg, "part2-img-blocked", "Part2 image should be blocked"); -+ testsToRunMultipartCSP["part2CSP_test"] = true; -+ break; -+ } -+ checkTestsCompleted(); - } - - // start the test - document.getElementById("testframe").src = "file_multipart_testserver.sjs?doc"; -+document.getElementById("testPartCSPframe").src = -+ "file_multipart_testserver.sjs?partcspdoc"; - - </script> - </body> -diff --git netwerk/streamconv/converters/nsMultiMixedConv.cpp netwerk/streamconv/converters/nsMultiMixedConv.cpp -index 1af800eb8d90..80cb030a6fab 100644 ---- netwerk/streamconv/converters/nsMultiMixedConv.cpp -+++ netwerk/streamconv/converters/nsMultiMixedConv.cpp -@@ -488,6 +488,12 @@ nsMultiMixedConv::OnStartRequest(nsIRequest *request, nsISupports *ctxt) - if (NS_FAILED(rv)) { - return rv; - } -+ nsCString csp; -+ rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("content-security-policy"), -+ csp); -+ if (NS_SUCCEEDED(rv)) { -+ mRootContentSecurityPolicy = csp; -+ } - } else { - // try asking the channel directly - rv = mChannel->GetContentType(contentType); -@@ -528,6 +534,10 @@ nsMultiMixedConv::OnStartRequest(nsIRequest *request, nsISupports *ctxt) - mTokenizer.AddCustomToken("content-range", mTokenizer.CASE_INSENSITIVE, false); - mHeaderTokens[HEADER_RANGE] = - mTokenizer.AddCustomToken("range", mTokenizer.CASE_INSENSITIVE, false); -+ mHeaderTokens[HEADER_CONTENT_SECURITY_POLICY] = -+ mTokenizer.AddCustomToken("content-security-policy", -+ mTokenizer.CASE_INSENSITIVE, -+ false); - - mLFToken = mTokenizer.AddCustomToken("\n", mTokenizer.CASE_SENSITIVE, false); - mCRLFToken = mTokenizer.AddCustomToken("\r\n", mTokenizer.CASE_SENSITIVE, false); -@@ -1001,6 +1011,7 @@ nsMultiMixedConv::HeadersToDefault() - mContentLength = UINT64_MAX; - mContentType.Truncate(); - mContentDisposition.Truncate(); -+ mContentSecurityPolicy.Truncate(); - mIsByteRangeRequest = false; - } - -@@ -1053,6 +1064,31 @@ nsMultiMixedConv::ProcessHeader() - } - break; - } -+ case HEADER_CONTENT_SECURITY_POLICY: { -+ mContentSecurityPolicy = mResponseHeaderValue; -+ mContentSecurityPolicy.CompressWhitespace(); -+ nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel); -+ if (httpChannel) { -+ nsCString resultCSP = mRootContentSecurityPolicy; -+ if (!mContentSecurityPolicy.IsEmpty()) { -+ // We are updating the root channel CSP header respectively for -+ // each part as: CSP-root + CSP-partN, where N is the part number. -+ // Here we append current part's CSP to root CSP and reset CSP -+ // header for each part. -+ if (!resultCSP.IsEmpty()) { -+ resultCSP.Append(";"); -+ } -+ resultCSP.Append(mContentSecurityPolicy); -+ } -+ nsresult rv = httpChannel->SetResponseHeader( -+ NS_LITERAL_CSTRING("Content-Security-Policy"), -+ resultCSP, false); -+ if (NS_FAILED(rv)) { -+ return NS_ERROR_CORRUPTED_CONTENT; -+ } -+ } -+ break; -+ } - case HEADER_UNKNOWN: - // We ignore anything else... - break; -diff --git netwerk/streamconv/converters/nsMultiMixedConv.h netwerk/streamconv/converters/nsMultiMixedConv.h -index b46a094608a5..fdd7e73c7fd1 100644 ---- netwerk/streamconv/converters/nsMultiMixedConv.h -+++ netwerk/streamconv/converters/nsMultiMixedConv.h -@@ -151,6 +151,8 @@ protected: - nsCOMPtr<nsISupports> mContext; - nsCString mContentType; - nsCString mContentDisposition; -+ nsCString mContentSecurityPolicy; -+ nsCString mRootContentSecurityPolicy; - uint64_t mContentLength; - uint64_t mTotalSent; - -@@ -198,6 +200,7 @@ protected: - HEADER_SET_COOKIE, - HEADER_CONTENT_RANGE, - HEADER_RANGE, -+ HEADER_CONTENT_SECURITY_POLICY, - HEADER_UNKNOWN - } mResponseHeader; - // Cumulated value of a response header. diff --git a/www/waterfox/files/patch-bug1433715 b/www/waterfox/files/patch-bug1433715 deleted file mode 100644 index 39354490d9e2..000000000000 --- a/www/waterfox/files/patch-bug1433715 +++ /dev/null @@ -1,72 +0,0 @@ -commit bd563cddc5dd -Author: Jan Henning <jh+bugzilla@buttercookie.de> -Date: Sun Jan 28 23:01:42 2018 +0100 - - Bug 1433715 - Make fallback folder icon content-accessible. r=Gijs, a=RyanVM - - The skin used on Firefox for Android doesn't style directory listing, hence we - fall back to using the default icon from gre/res/html. As of bug 863246, this - location is no longer accessible from content as a resource://, hence the file - needs moving into the special content-accessible directory. - - MozReview-Commit-ID: obtefafqul - - --HG-- - extra : source : 2703a2d5b196fb2fb61929e0ce5d3596799d52cd ---- - browser/installer/package-manifest.in | 1 - - layout/generic/moz.build | 2 +- - mobile/android/installer/package-manifest.in | 1 - - netwerk/streamconv/converters/nsIndexedToHTML.cpp | 2 +- - 4 files changed, 2 insertions(+), 4 deletions(-) - -diff --git browser/installer/package-manifest.in browser/installer/package-manifest.in -index b215cada67ce..015568109c48 100644 ---- browser/installer/package-manifest.in -+++ browser/installer/package-manifest.in -@@ -690,7 +690,6 @@ - #endif - @RESPATH@/res/fonts/* - @RESPATH@/res/dtd/* --@RESPATH@/res/html/* - @RESPATH@/res/language.properties - #ifdef XP_MACOSX - @RESPATH@/res/MainMenu.nib/ -diff --git layout/generic/moz.build layout/generic/moz.build -index 13d64901ebf6..c277ca131e81 100644 ---- layout/generic/moz.build -+++ layout/generic/moz.build -@@ -212,7 +212,7 @@ LOCAL_INCLUDES += [ - - JAR_MANIFESTS += ['jar.mn'] - --RESOURCE_FILES.html = [ -+CONTENT_ACCESSIBLE_FILES.html = [ - 'folder.png', - ] - -diff --git mobile/android/installer/package-manifest.in mobile/android/installer/package-manifest.in -index 01c8bc32408d..3489bd812787 100644 ---- mobile/android/installer/package-manifest.in -+++ mobile/android/installer/package-manifest.in -@@ -469,7 +469,6 @@ - @BINPATH@/res/table-remove-row.gif - @BINPATH@/res/grabber.gif - @BINPATH@/res/dtd/* --@BINPATH@/res/html/* - @BINPATH@/res/language.properties - - #ifndef MOZ_ANDROID_EXCLUDE_FONTS -diff --git netwerk/streamconv/converters/nsIndexedToHTML.cpp netwerk/streamconv/converters/nsIndexedToHTML.cpp -index f18c39e99c8c..91372de3a617 100644 ---- netwerk/streamconv/converters/nsIndexedToHTML.cpp -+++ netwerk/streamconv/converters/nsIndexedToHTML.cpp -@@ -351,7 +351,7 @@ nsIndexedToHTML::DoOnStartRequest(nsIRequest* request, nsISupports *aContext, - " vertical-align: middle;\n" - "}\n" - ".dir::before {\n" -- " content: url(resource://gre/res/html/folder.png);\n" -+ " content: url(resource://content-accessible/html/folder.png);\n" - "}\n" - "</style>\n" - "<link rel=\"stylesheet\" media=\"screen, projection\" type=\"text/css\"" diff --git a/www/waterfox/files/patch-bug1434619 b/www/waterfox/files/patch-bug1434619 deleted file mode 100644 index 6ae1ba656ccb..000000000000 --- a/www/waterfox/files/patch-bug1434619 +++ /dev/null @@ -1,54 +0,0 @@ -commit 98c3940f8b16 -Author: Simon Sapin <simon.sapin@exyr.org> -Date: Wed Jan 31 11:01:26 2018 -0600 - - servo: Merge #19914 - Remove #![deny(warnings)] (from servo:dont-deny); r=nox - - We already have https://github.com/servo/servo/pull/19612 to deny warnings at the time of landing into master. But it’s not useful to break the build when later compiler with a more recent Rust version that has introduced new warnings: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1434619 - - Source-Repo: https://github.com/servo/servo - Source-Revision: 7546c37f1e921a112fef5828c59c6738a98c3f30 ---- - servo/components/style/lib.rs | 1 - - servo/ports/geckolib/lib.rs | 1 - - servo/support/gecko/nsstring/src/lib.rs | 1 - - 3 files changed, 3 deletions(-) - -diff --git servo/components/style/lib.rs servo/components/style/lib.rs -index d789c1d3305d..8a343496e6de 100644 ---- servo/components/style/lib.rs -+++ servo/components/style/lib.rs -@@ -23,7 +23,6 @@ - //! [cssparser]: ../cssparser/index.html - //! [selectors]: ../selectors/index.html - --#![deny(warnings)] - #![deny(missing_docs)] - - #![recursion_limit = "500"] // For define_css_keyword_enum! in -moz-appearance -diff --git servo/ports/geckolib/lib.rs servo/ports/geckolib/lib.rs -index ca57307c245a..15c42509a811 100644 ---- servo/ports/geckolib/lib.rs -+++ servo/ports/geckolib/lib.rs -@@ -2,7 +2,6 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - --#![deny(warnings)] - - extern crate cssparser; - extern crate env_logger; -diff --git servo/support/gecko/nsstring/src/lib.rs servo/support/gecko/nsstring/src/lib.rs -index 0321e38f8bbf..d5c5f147c480 100644 ---- servo/components/style/gecko_bindings/nsstring_vendor/src/lib.rs -+++ servo/components/style/gecko_bindings/nsstring_vendor/src/lib.rs -@@ -113,7 +113,6 @@ - //! which invoke their member's destructors through C++ code. - - #![allow(non_camel_case_types)] --#![deny(warnings)] - - #[macro_use] - extern crate bitflags; diff --git a/www/waterfox/files/patch-bug1436117 b/www/waterfox/files/patch-bug1436117 new file mode 100644 index 000000000000..ac4b9cd4bd3d --- /dev/null +++ b/www/waterfox/files/patch-bug1436117 @@ -0,0 +1,42 @@ +commit 34646edc7884 +Author: Andreas Pehrson <pehrsons@mozilla.com> +Date: Mon Feb 26 10:32:29 2018 +0100 + + Bug 1436117 - Keep aImage around until the WrappedI420Buffer is released. r=dminor + + MozReview-Commit-ID: GuBHFnPA3YQ + + --HG-- + extra : rebase_source : e5cc3c1d5e0f08279e8c40ebf03ef7e535cfe5e5 +--- + media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +index 2bb7203f85bd0..cfaadaaa7ff73 100644 +--- media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp ++++ media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +@@ -57,6 +57,7 @@ + #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" + #include "webrtc/common_video/include/video_frame_buffer.h" + #include "webrtc/base/bind.h" ++#include "webrtc/base/keep_ref_until_done.h" + + #include "nsThreadUtils.h" + +@@ -336,14 +337,13 @@ protected: + uint32_t width = yuv->GetSize().width; + uint32_t height = yuv->GetSize().height; + +- rtc::Callback0<void> callback_unused; + rtc::scoped_refptr<webrtc::WrappedI420Buffer> video_frame_buffer( + new rtc::RefCountedObject<webrtc::WrappedI420Buffer>( + width, height, + y, yStride, + cb, cbCrStride, + cr, cbCrStride, +- callback_unused)); ++ rtc::KeepRefUntilDone(aImage))); + + webrtc::VideoFrame i420_frame(video_frame_buffer, + 0, 0, // not setting timestamps diff --git a/www/waterfox/files/patch-bug1436482 b/www/waterfox/files/patch-bug1436482 deleted file mode 100644 index 3a9881eeed4f..000000000000 --- a/www/waterfox/files/patch-bug1436482 +++ /dev/null @@ -1,28 +0,0 @@ -commit fb1d12efaddd -Author: Kris Maglione <maglione.k@gmail.com> -Date: Wed Apr 4 17:01:59 2018 -0700 - - Bug 1436482 - Always use the principal URI as the principal URI. r=mixedpuppy, a=jcristau - - MozReview-Commit-ID: 7oePANQBCxK - - --HG-- - extra : source : 07ab807639ee42a407a9bdb0d374206c0f17678d ---- - toolkit/components/extensions/WebExtensionPolicy.cpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git toolkit/components/extensions/WebExtensionPolicy.cpp toolkit/components/extensions/WebExtensionPolicy.cpp -index d59507fcdd59..2580bc932dd1 100644 ---- toolkit/components/extensions/WebExtensionPolicy.cpp -+++ toolkit/components/extensions/WebExtensionPolicy.cpp -@@ -681,8 +681,7 @@ DocInfo::Principal() const - const URLInfo& - DocInfo::PrincipalURL() const - { -- if (!URL().InheritsPrincipal() || -- !(Principal() && Principal()->GetIsCodebasePrincipal())) { -+ if (!(Principal() && Principal()->GetIsCodebasePrincipal())) { - return URL(); - } - diff --git a/www/waterfox/files/patch-bug1436809 b/www/waterfox/files/patch-bug1436809 deleted file mode 100644 index 541eaa1562ee..000000000000 --- a/www/waterfox/files/patch-bug1436809 +++ /dev/null @@ -1,27 +0,0 @@ -commit 91f4336a7ddc -Author: Michal Novotny <michal.novotny@gmail.com> -Date: Mon Apr 2 12:59:18 2018 -0400 - - Bug 1436809 - Check that stream message was converted to string correctly. r=valentin, a=abillings - - --HG-- - extra : rebase_source : c81e8000cd7e41d8928e6ee0c6eb6ee823debc23 - extra : source : b229809d17ff18263becfad6f9777c9ab0165279 ---- - netwerk/protocol/websocket/WebSocketChannel.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/WebSocketChannel.cpp -index a08655f95d8c..a17b2f382d23 100644 ---- netwerk/protocol/websocket/WebSocketChannel.cpp -+++ netwerk/protocol/websocket/WebSocketChannel.cpp -@@ -1052,6 +1052,9 @@ public: - nsresult rv = NS_ReadInputStreamToString(mMsg.pStream, *temp, mLength); - - NS_ENSURE_SUCCESS(rv, rv); -+ if (temp->Length() != mLength) { -+ return NS_ERROR_UNEXPECTED; -+ } - - mMsg.pStream->Close(); - mMsg.pStream->Release(); diff --git a/www/waterfox/files/patch-bug1440717 b/www/waterfox/files/patch-bug1440717 deleted file mode 100644 index 9df204f128ab..000000000000 --- a/www/waterfox/files/patch-bug1440717 +++ /dev/null @@ -1,40 +0,0 @@ -commit d6284e2e2fa3 -Author: Nicolas Silva <nsilva@mozilla.com> -Date: Mon Mar 12 13:36:00 2018 +0100 - - Bug 1440717 - Use RefPtr for CompositingRenderTargetOGL::mGL. r=Bas a=jcristau - - --HG-- - extra : rebase_source : f3b0ec3793901a9546bb013f9e4271786dc1d9e2 - extra : source : b6d2d55223d2aa5cb85bbdf33075d1d38f2a9a30 ---- - gfx/layers/opengl/CompositingRenderTargetOGL.cpp | 2 +- - gfx/layers/opengl/CompositingRenderTargetOGL.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git gfx/layers/opengl/CompositingRenderTargetOGL.cpp gfx/layers/opengl/CompositingRenderTargetOGL.cpp -index 1f6357e114fc..2206df13d131 100644 ---- gfx/layers/opengl/CompositingRenderTargetOGL.cpp -+++ gfx/layers/opengl/CompositingRenderTargetOGL.cpp -@@ -61,7 +61,7 @@ CompositingRenderTargetOGL::BindRenderTarget() - msg.AppendPrintf("Framebuffer not complete -- CheckFramebufferStatus returned 0x%x, " - "GLContext=%p, IsOffscreen()=%d, mFBO=%d, aFBOTextureTarget=0x%x, " - "aRect.width=%d, aRect.height=%d", -- result, mGL, mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, -+ result, mGL.get(), mGL->IsOffscreen(), mFBO, mInitParams.mFBOTextureTarget, - mInitParams.mSize.width, mInitParams.mSize.height); - NS_WARNING(msg.get()); - } -diff --git gfx/layers/opengl/CompositingRenderTargetOGL.h gfx/layers/opengl/CompositingRenderTargetOGL.h -index 34cf95cd43ba..9b4959fbae4f 100644 ---- gfx/layers/opengl/CompositingRenderTargetOGL.h -+++ gfx/layers/opengl/CompositingRenderTargetOGL.h -@@ -185,7 +185,7 @@ private: - * the target is always cleared at the end of a frame. - */ - RefPtr<CompositorOGL> mCompositor; -- GLContext* mGL; -+ RefPtr<GLContext> mGL; - GLuint mTextureHandle; - GLuint mFBO; - }; diff --git a/www/waterfox/files/patch-bug1443092 b/www/waterfox/files/patch-bug1443092 deleted file mode 100644 index 9df39136173c..000000000000 --- a/www/waterfox/files/patch-bug1443092 +++ /dev/null @@ -1,64 +0,0 @@ -commit a70f63a1ef81 -Author: Botond Ballo <botond@mozilla.com> -Date: Fri Mar 9 17:26:24 2018 -0500 - - Bug 1443092 - Avoid calling SVGAnimatedEnumeration::AnimVal() from nsSVGUtils::GetBBox(). r=jwatt, a=RyanVM - - AnimVal() is a DOM getter, and it flushes animations, which we don't want - in GetBBox() which is called from display list building cide and - FrameLayerBuilder. - - MozReview-Commit-ID: 80DyTcGs5io ---- - dom/svg/SVGClipPathElement.cpp | 7 +++++++ - dom/svg/SVGClipPathElement.h | 4 ++++ - layout/svg/nsSVGUtils.cpp | 3 +-- - 3 files changed, 12 insertions(+), 2 deletions(-) - -diff --git dom/svg/SVGClipPathElement.cpp dom/svg/SVGClipPathElement.cpp -index 4220c206a3f1..86b361012fa4 100644 ---- dom/svg/SVGClipPathElement.cpp -+++ dom/svg/SVGClipPathElement.cpp -@@ -53,6 +53,13 @@ SVGClipPathElement::GetEnumInfo() - ArrayLength(sEnumInfo)); - } - -+bool -+SVGClipPathElement::IsUnitsObjectBoundingBox() const -+{ -+ return mEnumAttributes[CLIPPATHUNITS].GetAnimValue() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX; -+} -+ -+ - //---------------------------------------------------------------------- - // nsIDOMNode methods - -diff --git dom/svg/SVGClipPathElement.h dom/svg/SVGClipPathElement.h -index c5f8eb765246..d8ca24d28a20 100644 ---- dom/svg/SVGClipPathElement.h -+++ dom/svg/SVGClipPathElement.h -@@ -37,6 +37,10 @@ public: - // WebIDL - already_AddRefed<SVGAnimatedEnumeration> ClipPathUnits(); - -+ // This is an internal method that does not flush style, and thus -+ // the answer may be out of date if there's a pending style flush. -+ bool IsUnitsObjectBoundingBox() const; -+ - protected: - - enum { CLIPPATHUNITS }; -diff --git layout/svg/nsSVGUtils.cpp layout/svg/nsSVGUtils.cpp -index 714f35f9f549..cd9fae39dec6 100644 ---- layout/svg/nsSVGUtils.cpp -+++ layout/svg/nsSVGUtils.cpp -@@ -1183,8 +1183,7 @@ nsSVGUtils::GetBBox(nsIFrame* aFrame, uint32_t aFlags, - if (clipPathFrame) { - SVGClipPathElement *clipContent = - static_cast<SVGClipPathElement*>(clipPathFrame->GetContent()); -- RefPtr<SVGAnimatedEnumeration> units = clipContent->ClipPathUnits(); -- if (units->AnimVal() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { -+ if (clipContent->IsUnitsObjectBoundingBox()) { - matrix.PreTranslate(gfxPoint(x, y)); - matrix.PreScale(width, height); - } else if (aFrame->IsSVGForeignObjectFrame()) { diff --git a/www/waterfox/files/patch-bug1448774 b/www/waterfox/files/patch-bug1448774 deleted file mode 100644 index 8627702a8f10..000000000000 --- a/www/waterfox/files/patch-bug1448774 +++ /dev/null @@ -1,40 +0,0 @@ -commit 8ae6890efea4 -Author: Robert Longson <longsonr@gmail.com> -Date: Thu Mar 29 03:12:05 2018 +0100 - - Bug 1448774. r=dholbert, a=RyanVM - - --HG-- - extra : source : edfd9ffbd7208ef0a59f40a0d77d8dd53c905cb9 ---- - dom/svg/SVGTextContentElement.h | 1 + - layout/svg/SVGTextFrame.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git dom/svg/SVGTextContentElement.h dom/svg/SVGTextContentElement.h -index 712d9492b5a0..9eb464ab159a 100644 ---- dom/svg/SVGTextContentElement.h -+++ dom/svg/SVGTextContentElement.h -@@ -25,6 +25,7 @@ typedef SVGGraphicsElement SVGTextContentElementBase; - - class SVGTextContentElement : public SVGTextContentElementBase - { -+ friend class ::SVGTextFrame; - public: - using FragmentOrElement::TextLength; - -diff --git layout/svg/SVGTextFrame.cpp layout/svg/SVGTextFrame.cpp -index 9c44ce595654..2be5970075dd 100644 ---- layout/svg/SVGTextFrame.cpp -+++ layout/svg/SVGTextFrame.cpp -@@ -5290,8 +5290,8 @@ SVGTextFrame::DoGlyphPositioning() - float actualTextLength = - static_cast<float>(presContext->AppUnitsToGfxUnits(frameLength) * factor); - -- RefPtr<SVGAnimatedEnumeration> lengthAdjustEnum = element->LengthAdjust(); -- uint16_t lengthAdjust = lengthAdjustEnum->AnimVal(); -+ uint16_t lengthAdjust = -+ element->EnumAttributes()[SVGTextContentElement::LENGTHADJUST].GetAnimValue(); - switch (lengthAdjust) { - case LENGTHADJUST_SPACINGANDGLYPHS: - // Scale the glyphs and their positions. diff --git a/www/waterfox/files/patch-bug1449548 b/www/waterfox/files/patch-bug1449548 deleted file mode 100644 index 61af0136f6a7..000000000000 --- a/www/waterfox/files/patch-bug1449548 +++ /dev/null @@ -1,186 +0,0 @@ -commit d422b5f2f8bd -Author: Gijs Kruitbosch <gijskruitbosch@gmail.com> -Date: Wed Mar 28 13:48:09 2018 +0100 - - Bug 1449548. r=mconley, r=aswan, a=RyanVM - - --HG-- - extra : source : a578a9117c193ecfd6c7abdca5fbb841e46155ab ---- - browser/base/content/browser-addons.js | 73 ++++++++++++++++++---------------- - browser/base/content/content.js | 4 +- - 2 files changed, 41 insertions(+), 36 deletions(-) - -diff --git browser/base/content/browser-addons.js browser/base/content/browser-addons.js -index 902011f9f2a0..077626a29ee1 100644 ---- browser/base/content/browser-addons.js -+++ browser/base/content/browser-addons.js -@@ -575,6 +575,8 @@ var LightWeightThemeWebInstaller = { - mm.addMessageListener("LightWeightThemeWebInstaller:Install", this); - mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this); - mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this); -+ -+ XPCOMUtils.defineLazyPreferenceGetter(this, "_apiTesting", "extensions.webapi.testing", false); - }, - - receiveMessage(message) { -@@ -587,15 +589,15 @@ var LightWeightThemeWebInstaller = { - - switch (message.name) { - case "LightWeightThemeWebInstaller:Install": { -- this._installRequest(data.themeData, data.baseURI); -+ this._installRequest(data.themeData, data.principal, data.baseURI); - break; - } - case "LightWeightThemeWebInstaller:Preview": { -- this._preview(data.themeData, data.baseURI); -+ this._preview(data.themeData, data.principal, data.baseURI); - break; - } - case "LightWeightThemeWebInstaller:ResetPreview": { -- this._resetPreview(data && data.baseURI); -+ this._resetPreview(data && data.principal); - break; - } - } -@@ -617,33 +619,24 @@ var LightWeightThemeWebInstaller = { - return this._manager = temp.LightweightThemeManager; - }, - -- _installRequest(dataString, baseURI) { -+ _installRequest(dataString, principal, baseURI) { -+ // Don't allow installing off null principals. -+ if (!principal.URI) { -+ return; -+ } -+ - let data = this._manager.parseTheme(dataString, baseURI); - - if (!data) { - return; - } - -- let uri = makeURI(baseURI); -- - // A notification bar with the option to undo is normally shown after a - // theme is installed. But the discovery pane served from the url(s) - // below has its own toggle switch for quick undos, so don't show the - // notification in that case. -- let notify = uri.prePath != "https://discovery.addons.mozilla.org"; -- if (notify) { -- try { -- if (Services.prefs.getBoolPref("extensions.webapi.testing") -- && (uri.prePath == "https://discovery.addons.allizom.org" -- || uri.prePath == "https://discovery.addons-dev.allizom.org")) { -- notify = false; -- } -- } catch (e) { -- // getBoolPref() throws if the testing pref isn't set. ignore it. -- } -- } -- -- if (this._isAllowed(baseURI)) { -+ let notify = this._shouldShowUndoPrompt(principal); -+ if (this._isAllowed(principal)) { - this._install(data, notify); - return; - } -@@ -652,7 +645,7 @@ var LightWeightThemeWebInstaller = { - header: gNavigatorBundle.getFormattedString("webextPerms.header", ["<>"]), - addonName: data.name, - text: gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message2", -- [uri.host]), -+ [principal.URI.host]), - acceptText: gNavigatorBundle.getString("lwthemeInstallRequest.allowButton2"), - acceptKey: gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey2"), - cancelText: gNavigatorBundle.getString("webextPerms.cancel.label"), -@@ -706,8 +699,8 @@ var LightWeightThemeWebInstaller = { - AddonManager.removeAddonListener(listener); - }, - -- _preview(dataString, baseURI) { -- if (!this._isAllowed(baseURI)) -+ _preview(dataString, principal, baseURI) { -+ if (!this._isAllowed(principal)) - return; - - let data = this._manager.parseTheme(dataString, baseURI); -@@ -719,27 +712,37 @@ var LightWeightThemeWebInstaller = { - this._manager.previewTheme(data); - }, - -- _resetPreview(baseURI) { -- if (baseURI && !this._isAllowed(baseURI)) -+ _resetPreview(principal) { -+ if (!this._isAllowed(principal)) - return; - gBrowser.tabContainer.removeEventListener("TabSelect", this); - this._manager.resetPreview(); - }, - -- _isAllowed(srcURIString) { -- let uri; -- try { -- uri = makeURI(srcURIString); -- } catch (e) { -- // makeURI fails if srcURIString is a nonsense URI -+ _isAllowed(principal) { -+ if (!principal || !principal.URI || !principal.URI.schemeIs("https")) { -+ return false; -+ } -+ -+ let pm = Services.perms; -+ return pm.testPermission(principal.URI, "install") == pm.ALLOW_ACTION; -+ }, -+ -+ _shouldShowUndoPrompt(principal) { -+ if (!principal || !principal.URI) { -+ return true; -+ } -+ -+ let prePath = principal.URI.prePath; -+ if (prePath == "https://discovery.addons.mozilla.org") { - return false; - } - -- if (!uri.schemeIs("https")) { -+ if (this._apiTesting && (prePath == "https://discovery.addons.allizom.org" || -+ prePath == "https://discovery.addons-dev.allizom.org")) { - return false; - } -+ return true; -+ }, - -- let pm = Services.perms; -- return pm.testPermission(uri, "install") == pm.ALLOW_ACTION; -- } - }; -diff --git browser/base/content/content.js browser/base/content/content.js -index 8b3f6af14783..08fe4ba2efe3 100644 ---- browser/base/content/content.js -+++ browser/base/content/content.js -@@ -749,6 +749,7 @@ var LightWeightThemeWebInstallListener = { - case "InstallBrowserTheme": { - sendAsyncMessage("LightWeightThemeWebInstaller:Install", { - baseURI: event.target.baseURI, -+ principal: event.target.nodePrincipal, - themeData: event.target.getAttribute("data-browsertheme"), - }); - break; -@@ -756,6 +757,7 @@ var LightWeightThemeWebInstallListener = { - case "PreviewBrowserTheme": { - sendAsyncMessage("LightWeightThemeWebInstaller:Preview", { - baseURI: event.target.baseURI, -+ principal: event.target.nodePrincipal, - themeData: event.target.getAttribute("data-browsertheme"), - }); - this._previewWindow = event.target.ownerGlobal; -@@ -770,7 +772,7 @@ var LightWeightThemeWebInstallListener = { - case "ResetBrowserThemePreview": { - if (this._previewWindow) { - sendAsyncMessage("LightWeightThemeWebInstaller:ResetPreview", -- {baseURI: event.target.baseURI}); -+ {principal: event.target.nodePrincipal}); - this._resetPreviewWindow(); - } - break; diff --git a/www/waterfox/files/patch-bug1451908 b/www/waterfox/files/patch-bug1451908 deleted file mode 100644 index 05b4d7d46052..000000000000 --- a/www/waterfox/files/patch-bug1451908 +++ /dev/null @@ -1,29 +0,0 @@ -commit 507fd5c4b515 -Author: Eric Rahm <erahm@mozilla.com> -Date: Tue Apr 17 11:22:04 2018 -0700 - - Bug 1451908 - Check for infinite value in txFormatNumberFunctionCall. r=peterv a=abillings - - --HG-- - extra : source : e47d7dbc1cd289086eb63c24cce1600c2b5329c7 ---- - dom/xslt/xslt/txFormatNumberFunctionCall.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git dom/xslt/xslt/txFormatNumberFunctionCall.cpp dom/xslt/xslt/txFormatNumberFunctionCall.cpp -index ddeede2502a3..54de0b48daa8 100644 ---- dom/xslt/xslt/txFormatNumberFunctionCall.cpp -+++ dom/xslt/xslt/txFormatNumberFunctionCall.cpp -@@ -265,6 +265,12 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, - - value = fabs(value) * multiplier; - -+ // Make sure the multiplier didn't push value to infinity. -+ if (value == mozilla::PositiveInfinity<double>()) { -+ return aContext->recycler()->getStringResult(format->mInfinity, -+ aResult); -+ } -+ - // Prefix - nsAutoString res(prefix); - diff --git a/www/waterfox/files/patch-servo17934 b/www/waterfox/files/patch-servo17934 deleted file mode 100644 index c6e4193a1f6c..000000000000 --- a/www/waterfox/files/patch-servo17934 +++ /dev/null @@ -1,53 +0,0 @@ -commit 4cbdfa028752 -Author: Manish Goregaokar <manishsmail@gmail.com> -Date: Tue Aug 1 12:57:42 2017 -0500 - - servo: Merge #17934 - Remove doc comment on statement (from Manishearth:doc-comment); r=canaltinova - - rustc warns about these now - - Source-Repo: https://github.com/servo/servo - Source-Revision: b49311c65a083a9b8eb03741bf7ea980b64f1e03 - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : 6b3c7d7f4ffeb9e271c52d418cda42cac5dd378d ---- - servo/components/style/values/specified/image.rs | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git servo/components/style/values/specified/image.rs servo/components/style/values/specified/image.rs -index 37ed00ccf443..687c6f17d432 100644 ---- servo/components/style/values/specified/image.rs -+++ servo/components/style/values/specified/image.rs -@@ -686,14 +686,14 @@ impl LineDirection { - input.try(|i| { - let to_ident = i.try(|i| i.expect_ident_matching("to")); - match *compat_mode { -- /// `to` keyword is mandatory in modern syntax. -+ // `to` keyword is mandatory in modern syntax. - CompatMode::Modern => to_ident?, - // Fall back to Modern compatibility mode in case there is a `to` keyword. - // According to Gecko, `-moz-linear-gradient(to ...)` should serialize like - // `linear-gradient(to ...)`. - CompatMode::Moz if to_ident.is_ok() => *compat_mode = CompatMode::Modern, -- /// There is no `to` keyword in webkit prefixed syntax. If it's consumed, -- /// parsing should throw an error. -+ // There is no `to` keyword in webkit prefixed syntax. If it's consumed, -+ // parsing should throw an error. - CompatMode::WebKit if to_ident.is_ok() => { - return Err(SelectorParseError::UnexpectedIdent("to".into()).into()) - }, -diff --git servo/components/style/properties/gecko.mako.rs servo/components/style/properties/gecko.mako.rs -index 37ed00ccf443..687c6f17d432 100644 ---- servo/components/style/properties/gecko.mako.rs -+++ servo/components/style/properties/gecko.mako.rs -@@ -2081,7 +2081,7 @@ fn static_assert() { - return (parent_size, parent_unconstrained_size) - } - -- /// XXXManishearth this should also handle text zoom -+ // XXXManishearth this should also handle text zoom - let min = Au(parent.gecko.mScriptMinSize); - - let scale = (parent.gecko.mScriptSizeMultiplier as f32).powi(delta as i32); diff --git a/www/waterfox/files/patch-servo17969 b/www/waterfox/files/patch-servo17969 deleted file mode 100644 index ca16754b987f..000000000000 --- a/www/waterfox/files/patch-servo17969 +++ /dev/null @@ -1,110 +0,0 @@ -commit 9f5c1f2e4b5b -Author: Manish Goregaokar <manishsmail@gmail.com> -Date: Thu Aug 3 16:27:12 2017 -0500 - - servo: Merge #17969 - Update stylo code to work on nightly (from Manishearth:rustup); r=emilio - - r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1386887 - - Source-Repo: https://github.com/servo/servo - Source-Revision: 7cee7d7fcc4194e410fa8a308a77d37ac452778a - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : d9c874ebcfa1e64c86265d0ed2e5cff65d9133be ---- - servo/components/style/gecko/generated/bindings.rs | 12 +++++++++--- - servo/components/style/gecko/wrapper.rs | 7 ++++++- - servo/ports/geckolib/glue.rs | 3 ++- - 3 files changed, 17 insertions(+), 5 deletions(-) - -diff --git servo/components/style/gecko/generated/bindings.rs servo/components/style/gecko/generated/bindings.rs -index e46bdfe1e1ea..b6703ab95bf7 100644 ---- servo/components/style/gecko/generated/bindings.rs -+++ servo/components/style/gecko/generated/bindings.rs -@@ -8,6 +8,7 @@ type nsAString_internal = nsAString; - pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues; - pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>; - pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData; -+pub type RawServoAnimationValueTableBorrowed<'a> = &'a (); - use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue; - use gecko_bindings::structs::mozilla::css::ErrorReporter; - use gecko_bindings::structs::mozilla::css::ImageValue; -@@ -37,7 +38,7 @@ use gecko_bindings::structs::RawServoStyleRule; - use gecko_bindings::structs::RawGeckoPresContext; - use gecko_bindings::structs::RawGeckoPresContextOwned; - use gecko_bindings::structs::RawGeckoStyleAnimationList; --use gecko_bindings::structs::RawGeckoStyleChildrenIteratorBorrowedMut; -+use gecko_bindings::structs::RawGeckoStyleChildrenIterator; - use gecko_bindings::structs::RawGeckoServoStyleRuleList; - use gecko_bindings::structs::RawGeckoURLExtraData; - use gecko_bindings::structs::RawGeckoXBLBinding; -@@ -320,6 +321,10 @@ pub type RawGeckoServoAnimationValueListBorrowed<'a> = &'a RawGeckoServoAnimatio - pub type RawGeckoServoAnimationValueListBorrowedOrNull<'a> = Option<&'a RawGeckoServoAnimationValueList>; - pub type RawGeckoServoAnimationValueListBorrowedMut<'a> = &'a mut RawGeckoServoAnimationValueList; - pub type RawGeckoServoAnimationValueListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoServoAnimationValueList>; -+pub type RawGeckoStyleChildrenIteratorBorrowed<'a> = &'a RawGeckoStyleChildrenIterator; -+pub type RawGeckoStyleChildrenIteratorBorrowedOrNull<'a> = Option<&'a RawGeckoStyleChildrenIterator>; -+pub type RawGeckoStyleChildrenIteratorBorrowedMut<'a> = &'a mut RawGeckoStyleChildrenIterator; -+pub type RawGeckoStyleChildrenIteratorBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoStyleChildrenIterator>; - pub type ServoCssRulesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoCssRules>; - pub type ServoCssRulesBorrowed<'a> = &'a ServoCssRules; - pub type ServoCssRulesBorrowedOrNull<'a> = Option<&'a ServoCssRules>; -@@ -840,7 +845,7 @@ extern "C" { - } - extern "C" { - pub fn Gecko_AnimationGetBaseStyle(aBaseStyles: -- *mut ::std::os::raw::c_void, -+ RawServoAnimationValueTableBorrowed, - aProperty: nsCSSPropertyID) - -> RawServoAnimationValueBorrowedOrNull; - } -@@ -2602,7 +2607,8 @@ extern "C" { - extern "C" { - pub fn Servo_AnimationCompose(animation_values: - RawServoAnimationValueMapBorrowedMut, -- base_values: *mut ::std::os::raw::c_void, -+ base_values: -+ RawServoAnimationValueTableBorrowed, - property: nsCSSPropertyID, - animation_segment: - RawGeckoAnimationPropertySegmentBorrowed, -diff --git servo/components/style/gecko/wrapper.rs servo/components/style/gecko/wrapper.rs -index dae898692313..6d62f54951cc 100644 ---- servo/components/style/gecko/wrapper.rs -+++ servo/components/style/gecko/wrapper.rs -@@ -387,7 +387,12 @@ impl<'a> Iterator for GeckoChildrenIterator<'a> { - curr - }, - GeckoChildrenIterator::GeckoIterator(ref mut it) => unsafe { -- Gecko_GetNextStyleChild(it).map(GeckoNode) -+ // We do this unsafe lengthening of the lifetime here because -+ // structs::StyleChildrenIterator is actually StyleChildrenIterator<'a>, -+ // however we can't express this easily with bindgen, and it would -+ // introduce functions with two input lifetimes into bindgen, -+ // which would be out of scope for elision. -+ Gecko_GetNextStyleChild(&mut * (it as *mut _)).map(GeckoNode) - } - } - } -diff --git servo/ports/geckolib/glue.rs servo/ports/geckolib/glue.rs -index 367d24ff87b2..e69959f3710b 100644 ---- servo/ports/geckolib/glue.rs -+++ servo/ports/geckolib/glue.rs -@@ -59,6 +59,7 @@ use style::gecko_bindings::bindings::RawGeckoServoStyleRuleListBorrowedMut; - use style::gecko_bindings::bindings::RawServoAnimationValueBorrowed; - use style::gecko_bindings::bindings::RawServoAnimationValueMapBorrowedMut; - use style::gecko_bindings::bindings::RawServoAnimationValueStrong; -+use style::gecko_bindings::bindings::RawServoAnimationValueTableBorrowed; - use style::gecko_bindings::bindings::RawServoStyleRuleBorrowed; - use style::gecko_bindings::bindings::ServoStyleContextBorrowedOrNull; - use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t; -@@ -374,7 +375,7 @@ pub extern "C" fn Servo_AnimationValues_ComputeDistance(from: RawServoAnimationV - - #[no_mangle] - pub extern "C" fn Servo_AnimationCompose(raw_value_map: RawServoAnimationValueMapBorrowedMut, -- base_values: *mut ::std::os::raw::c_void, -+ base_values: RawServoAnimationValueTableBorrowed, - css_property: nsCSSPropertyID, - segment: RawGeckoAnimationPropertySegmentBorrowed, - last_segment: RawGeckoAnimationPropertySegmentBorrowed, diff --git a/www/waterfox/files/patch-servo18046 b/www/waterfox/files/patch-servo18046 deleted file mode 100644 index 574e91f8831f..000000000000 --- a/www/waterfox/files/patch-servo18046 +++ /dev/null @@ -1,763 +0,0 @@ -commit ea9c8db790e4 -Author: Simon Sapin <simon.sapin@exyr.org> -Date: Tue Aug 15 07:31:04 2017 -0500 - - servo: Merge #18046 - Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) (from servo:rustup); r=emilio - - Source-Repo: https://github.com/servo/servo - Source-Revision: 7d9b82b9efa7b10a2e34d93df5ac535d99518f7a - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : e1b3d113c3edaea3c4c07f8b206f2e02922e3caf ---- - servo/Cargo.lock | 6 +++--- - servo/components/devtools/lib.rs | 2 +- - servo/components/layout/animation.rs | 2 +- - servo/components/layout/construct.rs | 6 +++--- - servo/components/layout/display_list_builder.rs | 2 +- - servo/components/layout/flex.rs | 6 +++--- - servo/components/layout/inline.rs | 4 ++-- - servo/components/layout/sequential.rs | 2 +- - servo/components/layout/table_cell.rs | 2 +- - servo/components/layout/text.rs | 2 +- - servo/components/net/cookie_storage.rs | 2 +- - servo/components/profile/heartbeats.rs | 4 ++-- - servo/components/script/dom/bindings/js.rs | 4 ++-- - servo/components/script/dom/cssstyledeclaration.rs | 8 ++++---- - servo/components/script/dom/cssstylerule.rs | 2 +- - servo/components/script/dom/document.rs | 12 ++++++------ - servo/components/script/dom/medialist.rs | 4 ++-- - servo/components/script/dom/range.rs | 4 ++-- - .../script/dom/servoparser/async_html.rs | 4 ++-- - servo/components/script/dom/url.rs | 4 ++-- - servo/components/script/dom/vrdisplay.rs | 2 +- - .../components/script/dom/webglrenderingcontext.rs | 2 +- - servo/components/script/dom/xmlhttprequest.rs | 2 +- - servo/components/script/lib.rs | 1 - - .../script_plugins/unrooted_must_root.rs | 22 +++++++++++++++------- - servo/components/selectors/matching.rs | 2 +- - servo/components/selectors/parser.rs | 2 +- - .../style/invalidation/element/invalidator.rs | 2 +- - servo/components/style/matching.rs | 2 +- - .../components/style/properties/properties.mako.rs | 2 +- - servo/components/style/style_adjuster.rs | 2 +- - servo/components/style/style_resolver.rs | 2 +- - servo/components/style/stylesheets/rule_list.rs | 2 +- - servo/components/style/stylesheets/rule_parser.rs | 2 +- - .../components/style/stylesheets/rules_iterator.rs | 2 +- - servo/components/style/values/animated/color.rs | 2 +- - servo/components/style/values/computed/border.rs | 2 +- - servo/components/webdriver_server/lib.rs | 2 +- - servo/rust-commit-hash | 2 +- - servo/tests/unit/style/stylist.rs | 13 ------------- - 40 files changed, 73 insertions(+), 79 deletions(-) - -diff --git servo/Cargo.lock servo/Cargo.lock -index 50dd6e1a785a..2aa7bd8ea3dd 100644 ---- servo/Cargo.lock -+++ servo/Cargo.lock -@@ -3577,7 +3577,7 @@ version = "0.1.4" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "xcb 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", -+ "xcb 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] -@@ -3592,7 +3592,7 @@ dependencies = [ - - [[package]] - name = "xcb" --version = "0.7.6" -+version = "0.7.7" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -3918,7 +3918,7 @@ dependencies = [ - "checksum x11 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db27c597c187da52194a4b8232e7d869503911aab9ff726fefb76d7a830f78ed" - "checksum x11-clipboard 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "731230b8edcbb9d99247105e4c9ec0a538594d50ad68d2afa8662195f9db2973" - "checksum x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "326c500cdc166fd7c70dd8c8a829cd5c0ce7be5a5d98c25817de2b9bdc67faf8" --"checksum xcb 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "63e3a849b73e4e1905e4f4d48f1750429bc86ea9f473632ab382a6f69ecb6b33" -+"checksum xcb 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "7cede38417fcdf2f0a9d8abf1cea1c1b066320a8a316e9583a0d717c334fafb2" - "checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" - "checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" - "checksum xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7ec6c39eaa68382c8e31e35239402c0a9489d4141a8ceb0c716099a0b515b562" -diff --git servo/components/devtools/lib.rs servo/components/devtools/lib.rs -index d5a2764a7102..6a25696eaed7 100644 ---- servo/components/devtools/lib.rs -+++ servo/components/devtools/lib.rs -@@ -306,7 +306,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>, - columnNumber: console_message.columnNumber, - }, - }; -- for mut stream in &mut *console_actor.streams.borrow_mut() { -+ for stream in &mut *console_actor.streams.borrow_mut() { - stream.write_json_packet(&msg); - } - } -diff --git servo/components/layout/animation.rs servo/components/layout/animation.rs -index e4a2782c1271..ebbba82fcc6a 100644 ---- servo/components/layout/animation.rs -+++ servo/components/layout/animation.rs -@@ -39,7 +39,7 @@ pub fn update_animation_state(constellation_chan: &IpcSender<ConstellationMsg>, - // run. - if let Some(ref mut animations) = running_animations.get_mut(node) { - // TODO: This being linear is probably not optimal. -- for mut anim in animations.iter_mut() { -+ for anim in animations.iter_mut() { - if let Animation::Keyframes(_, ref anim_name, ref mut anim_state) = *anim { - if *name == *anim_name { - debug!("update_animation_state: Found other animation {}", name); -diff --git servo/components/layout/construct.rs servo/components/layout/construct.rs -index c863219941e4..7ef391b42183 100644 ---- servo/components/layout/construct.rs -+++ servo/components/layout/construct.rs -@@ -1921,7 +1921,7 @@ impl Legalizer { - /// true for anonymous block children of flex flows. - fn try_to_add_child(&mut self, context: &SharedStyleContext, parent: &mut FlowRef, child: &mut FlowRef) - -> bool { -- let mut parent = self.stack.last_mut().unwrap_or(parent); -+ let parent = self.stack.last_mut().unwrap_or(parent); - let (parent_class, child_class) = (parent.class(), child.class()); - match (parent_class, child_class) { - (FlowClass::TableWrapper, FlowClass::Table) | -@@ -1962,7 +1962,7 @@ impl Legalizer { - } else { - IS_BLOCK_FLEX_ITEM - }; -- let mut block = FlowRef::deref_mut(&mut block_wrapper).as_mut_block(); -+ let block = FlowRef::deref_mut(&mut block_wrapper).as_mut_block(); - block.base.flags.insert(MARGINS_CANNOT_COLLAPSE); - block.fragment.flags.insert(flag); - } -@@ -1979,7 +1979,7 @@ impl Legalizer { - } else { - IS_BLOCK_FLEX_ITEM - }; -- let mut block = FlowRef::deref_mut(child).as_mut_block(); -+ let block = FlowRef::deref_mut(child).as_mut_block(); - block.base.flags.insert(MARGINS_CANNOT_COLLAPSE); - block.fragment.flags.insert(flag); - } -diff --git servo/components/layout/display_list_builder.rs servo/components/layout/display_list_builder.rs -index f8b26899b57d..783574afd2a3 100644 ---- servo/components/layout/display_list_builder.rs -+++ servo/components/layout/display_list_builder.rs -@@ -2718,7 +2718,7 @@ impl InlineFlowDisplayListBuilding for InlineFlow { - self.base.scroll_root_id = Some(state.current_scroll_root_id); - self.base.clip = state.clip_stack.last().cloned().unwrap_or_else(max_rect); - -- for mut fragment in self.fragments.fragments.iter_mut() { -+ for fragment in self.fragments.fragments.iter_mut() { - let previous_containing_block_scroll_root_id = state.containing_block_scroll_root_id; - if establishes_containing_block_for_absolute(fragment.style.get_box().position) { - state.containing_block_scroll_root_id = state.current_scroll_root_id; -diff --git servo/components/layout/flex.rs servo/components/layout/flex.rs -index 353c939f58b9..d79580f8cd0d 100644 ---- servo/components/layout/flex.rs -+++ servo/components/layout/flex.rs -@@ -415,7 +415,7 @@ impl FlexFlow { - - let items = &mut self.items[start..]; - let mut children = self.block_flow.base.children.random_access_mut(); -- for mut item in items { -+ for item in items { - let kid = children.get(item.index); - item.init_sizes(kid, container_size, self.main_mode); - let outer_main_size = item.outer_main_size(kid, self.main_mode); -@@ -607,7 +607,7 @@ impl FlexFlow { - - let mut children = self.block_flow.base.children.random_access_mut(); - for item in items.iter_mut() { -- let mut block = children.get(item.index).as_mut_block(); -+ let block = children.get(item.index).as_mut_block(); - - block.base.block_container_writing_mode = container_mode; - block.base.block_container_inline_size = inline_size; -@@ -659,7 +659,7 @@ impl FlexFlow { - - let mut children = self.block_flow.base.children.random_access_mut(); - for item in &mut self.items { -- let mut base = flow::mut_base(children.get(item.index)); -+ let base = flow::mut_base(children.get(item.index)); - if !self.main_reverse { - base.position.start.b = cur_b; - cur_b = cur_b + base.position.size.block; -diff --git servo/components/layout/inline.rs servo/components/layout/inline.rs -index d5813d9bea22..10e091c3c66d 100644 ---- servo/components/layout/inline.rs -+++ servo/components/layout/inline.rs -@@ -435,7 +435,7 @@ impl LineBreaker { - return - } - let last_fragment_index = self.pending_line.range.end() - FragmentIndex(1); -- let mut fragment = &mut self.new_fragments[last_fragment_index.get() as usize]; -+ let fragment = &mut self.new_fragments[last_fragment_index.get() as usize]; - - let old_fragment_inline_size = fragment.border_box.size.inline; - -@@ -1047,7 +1047,7 @@ impl InlineFlow { - let space_per_expansion_opportunity = slack_inline_size / expansion_opportunities as i32; - for fragment_index in line.range.each_index() { - let fragment = fragments.get_mut(fragment_index.to_usize()); -- let mut scanned_text_fragment_info = match fragment.specific { -+ let scanned_text_fragment_info = match fragment.specific { - SpecificFragmentInfo::ScannedText(ref mut info) if !info.range.is_empty() => info, - _ => continue - }; -diff --git servo/components/layout/sequential.rs servo/components/layout/sequential.rs -index f6f8ce429e4f..4986ebb6c852 100644 ---- servo/components/layout/sequential.rs -+++ servo/components/layout/sequential.rs -@@ -133,7 +133,7 @@ pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) { - return; - } - -- for mut kid in flow::mut_base(flow).child_iter_mut() { -+ for kid in flow::mut_base(flow).child_iter_mut() { - store_overflow(layout_context, kid); - } - -diff --git servo/components/layout/table_cell.rs servo/components/layout/table_cell.rs -index 7ef02e28db65..fd807989b463 100644 ---- servo/components/layout/table_cell.rs -+++ servo/components/layout/table_cell.rs -@@ -136,7 +136,7 @@ impl TableCellFlow { - } - - for kid in flow::mut_base(self).children.iter_mut() { -- let mut kid_base = flow::mut_base(kid); -+ let kid_base = flow::mut_base(kid); - if !kid_base.flags.contains(IS_ABSOLUTELY_POSITIONED) { - kid_base.position.start.b += offset - } -diff --git servo/components/layout/text.rs servo/components/layout/text.rs -index 6e1c7b2a43a1..9a207a2bb84e 100644 ---- servo/components/layout/text.rs -+++ servo/components/layout/text.rs -@@ -460,7 +460,7 @@ fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragm - } - - let new_fragment = { -- let mut first_fragment = fragments.front_mut().unwrap(); -+ let first_fragment = fragments.front_mut().unwrap(); - let string_before; - let selection_before; - { -diff --git servo/components/net/cookie_storage.rs servo/components/net/cookie_storage.rs -index f255f57b56d2..b3147ef4dd32 100644 ---- servo/components/net/cookie_storage.rs -+++ servo/components/net/cookie_storage.rs -@@ -103,7 +103,7 @@ impl CookieStorage { - - // Step 12 - let domain = reg_host(&cookie.cookie.domain().as_ref().unwrap_or(&"")); -- let mut cookies = self.cookies_map.entry(domain).or_insert(vec![]); -+ let cookies = self.cookies_map.entry(domain).or_insert(vec![]); - - if cookies.len() == self.max_per_host { - let old_len = cookies.len(); -diff --git servo/components/profile/heartbeats.rs servo/components/profile/heartbeats.rs -index 4661dad61836..0d474fe3a111 100644 ---- servo/components/profile/heartbeats.rs -+++ servo/components/profile/heartbeats.rs -@@ -33,7 +33,7 @@ pub fn cleanup() { - ) - ); - if let Some(mut hbs) = hbs_opt_box { -- for (_, mut v) in hbs.iter_mut() { -+ for (_, v) in hbs.iter_mut() { - // log any remaining heartbeat records before dropping - log_heartbeat_records(v); - } -@@ -65,7 +65,7 @@ pub fn maybe_heartbeat(category: &ProfilerCategory, - if !(*hbs_ptr).contains_key(category) { - maybe_create_heartbeat(&mut (*hbs_ptr), category.clone()); - } -- if let Some(mut h) = (*hbs_ptr).get_mut(category) { -+ if let Some(h) = (*hbs_ptr).get_mut(category) { - (*h).heartbeat(0, 1, start_time, end_time, start_energy, end_energy); - } - } -diff --git servo/components/script/dom/bindings/js.rs servo/components/script/dom/bindings/js.rs -index 975ddeda13b0..abfd9f47eff1 100644 ---- servo/components/script/dom/bindings/js.rs -+++ servo/components/script/dom/bindings/js.rs -@@ -469,7 +469,7 @@ impl RootCollection { - /// Start tracking a stack-based root - unsafe fn root(&self, untracked_reflector: *const Reflector) { - debug_assert!(thread_state::get().is_script()); -- let mut roots = &mut *self.roots.get(); -+ let roots = &mut *self.roots.get(); - roots.push(untracked_reflector); - assert!(!(*untracked_reflector).get_jsobject().is_null()) - } -@@ -479,7 +479,7 @@ impl RootCollection { - assert!(!tracked_reflector.is_null()); - assert!(!(*tracked_reflector).get_jsobject().is_null()); - debug_assert!(thread_state::get().is_script()); -- let mut roots = &mut *self.roots.get(); -+ let roots = &mut *self.roots.get(); - match roots.iter().rposition(|r| *r == tracked_reflector) { - Some(idx) => { - roots.remove(idx); -diff --git servo/components/script/dom/cssstyledeclaration.rs servo/components/script/dom/cssstyledeclaration.rs -index 0732c9af9e45..ddf085b34913 100644 ---- servo/components/script/dom/cssstyledeclaration.rs -+++ servo/components/script/dom/cssstyledeclaration.rs -@@ -238,7 +238,7 @@ impl CSSStyleDeclaration { - return Err(Error::NoModificationAllowed); - } - -- self.owner.mutate_associated_block(|ref mut pdb, mut changed| { -+ self.owner.mutate_associated_block(|pdb, changed| { - if value.is_empty() { - // Step 3 - *changed = pdb.remove_property(&id); -@@ -360,7 +360,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { - _ => return Ok(()), - }; - -- self.owner.mutate_associated_block(|ref mut pdb, mut changed| { -+ self.owner.mutate_associated_block(|pdb, changed| { - // Step 5 & 6 - *changed = pdb.set_importance(&id, importance); - }); -@@ -388,7 +388,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { - }; - - let mut string = String::new(); -- self.owner.mutate_associated_block(|mut pdb, mut changed| { -+ self.owner.mutate_associated_block(|pdb, changed| { - pdb.property_value_to_css(&id, &mut string).unwrap(); - *changed = pdb.remove_property(&id); - }); -@@ -438,7 +438,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { - } - - let quirks_mode = window.Document().quirks_mode(); -- self.owner.mutate_associated_block(|mut pdb, mut _changed| { -+ self.owner.mutate_associated_block(|pdb, _changed| { - // Step 3 - *pdb = parse_style_attribute(&value, - &self.owner.base_url(), -diff --git servo/components/script/dom/cssstylerule.rs servo/components/script/dom/cssstylerule.rs -index ea121ef900a9..12e9cdcc8694 100644 ---- servo/components/script/dom/cssstylerule.rs -+++ servo/components/script/dom/cssstylerule.rs -@@ -99,7 +99,7 @@ impl CSSStyleRuleMethods for CSSStyleRule { - if let Ok(mut s) = SelectorList::parse(&parser, &mut css_parser) { - // This mirrors what we do in CSSStyleOwner::mutate_associated_block. - let mut guard = self.cssrule.shared_lock().write(); -- let mut stylerule = self.stylerule.write_with(&mut guard); -+ let stylerule = self.stylerule.write_with(&mut guard); - mem::swap(&mut stylerule.selectors, &mut s); - // It seems like we will want to avoid having to invalidate all - // stylesheets eventually! -diff --git servo/components/script/dom/document.rs servo/components/script/dom/document.rs -index 90ea06fbe7b4..71bb02eaa364 100644 ---- servo/components/script/dom/document.rs -+++ servo/components/script/dom/document.rs -@@ -633,7 +633,7 @@ impl Document { - // reset_form_owner_for_listeners -> reset_form_owner -> GetElementById - { - let mut id_map = self.id_map.borrow_mut(); -- let mut elements = id_map.entry(id.clone()).or_insert(Vec::new()); -+ let elements = id_map.entry(id.clone()).or_insert(Vec::new()); - elements.insert_pre_order(element, root.r().upcast::<Node>()); - } - self.reset_form_owner_for_listeners(&id); -@@ -642,7 +642,7 @@ impl Document { - pub fn register_form_id_listener<T: ?Sized + FormControl>(&self, id: DOMString, listener: &T) { - let mut map = self.form_id_listener_map.borrow_mut(); - let listener = listener.to_element(); -- let mut set = map.entry(Atom::from(id)).or_insert(HashSet::new()); -+ let set = map.entry(Atom::from(id)).or_insert(HashSet::new()); - set.insert(JS::from_ref(listener)); - } - -@@ -1572,7 +1572,7 @@ impl Document { - /// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe - pub fn cancel_animation_frame(&self, ident: u32) { - let mut list = self.animation_frame_list.borrow_mut(); -- if let Some(mut pair) = list.iter_mut().find(|pair| pair.0 == ident) { -+ if let Some(pair) = list.iter_mut().find(|pair| pair.0 == ident) { - pair.1 = None; - } - } -@@ -2399,7 +2399,7 @@ impl Document { - if entry.snapshot.is_none() { - entry.snapshot = Some(Snapshot::new(el.html_element_in_html_document())); - } -- let mut snapshot = entry.snapshot.as_mut().unwrap(); -+ let snapshot = entry.snapshot.as_mut().unwrap(); - if snapshot.state.is_none() { - snapshot.state = Some(el.state()); - } -@@ -2426,7 +2426,7 @@ impl Document { - entry.hint.insert(RESTYLE_SELF); - } - -- let mut snapshot = entry.snapshot.as_mut().unwrap(); -+ let snapshot = entry.snapshot.as_mut().unwrap(); - if attr.local_name() == &local_name!("id") { - snapshot.id_changed = true; - } else if attr.local_name() == &local_name!("class") { -@@ -4028,7 +4028,7 @@ impl PendingInOrderScriptVec { - - fn loaded(&self, element: &HTMLScriptElement, result: ScriptResult) { - let mut scripts = self.scripts.borrow_mut(); -- let mut entry = scripts.iter_mut().find(|entry| &*entry.element == element).unwrap(); -+ let entry = scripts.iter_mut().find(|entry| &*entry.element == element).unwrap(); - entry.loaded(result); - } - -diff --git servo/components/script/dom/medialist.rs servo/components/script/dom/medialist.rs -index 0064d0445095..ae20f5aa0422 100644 ---- servo/components/script/dom/medialist.rs -+++ servo/components/script/dom/medialist.rs -@@ -63,7 +63,7 @@ impl MediaListMethods for MediaList { - // https://drafts.csswg.org/cssom/#dom-medialist-mediatext - fn SetMediaText(&self, value: DOMString) { - let mut guard = self.shared_lock().write(); -- let mut media_queries = self.media_queries.write_with(&mut guard); -+ let media_queries = self.media_queries.write_with(&mut guard); - // Step 2 - if value.is_empty() { - // Step 1 -@@ -154,7 +154,7 @@ impl MediaListMethods for MediaList { - // Step 3 - let m_serialized = m.unwrap().to_css_string(); - let mut guard = self.shared_lock().write(); -- let mut media_list = self.media_queries.write_with(&mut guard); -+ let media_list = self.media_queries.write_with(&mut guard); - let new_vec = media_list.media_queries.drain(..) - .filter(|q| m_serialized != q.to_css_string()) - .collect(); -diff --git servo/components/script/dom/range.rs servo/components/script/dom/range.rs -index fa849a0fc1a2..1e65caedc9dd 100644 ---- servo/components/script/dom/range.rs -+++ servo/components/script/dom/range.rs -@@ -1049,7 +1049,7 @@ impl WeakRangeVec { - let offset = context.index(); - let parent = context.parent; - unsafe { -- let mut ranges = &mut *self.cell.get(); -+ let ranges = &mut *self.cell.get(); - - ranges.update(|entry| { - let range = entry.root().unwrap(); -@@ -1076,7 +1076,7 @@ impl WeakRangeVec { - } - - unsafe { -- let mut ranges = &mut *self.cell.get(); -+ let ranges = &mut *self.cell.get(); - - ranges.update(|entry| { - let range = entry.root().unwrap(); -diff --git servo/components/script/dom/servoparser/async_html.rs servo/components/script/dom/servoparser/async_html.rs -index 59411fda1c73..70d2008f49f6 100644 ---- servo/components/script/dom/servoparser/async_html.rs -+++ servo/components/script/dom/servoparser/async_html.rs -@@ -568,7 +568,7 @@ impl TreeSink for Sink { - } - let node = self.new_parse_node(); - { -- let mut data = self.get_parse_node_data_mut(&target.id); -+ let data = self.get_parse_node_data_mut(&target.id); - data.contents = Some(node.clone()); - } - self.send_op(ParseOperation::GetTemplateContents { target: target.id, contents: node.id }); -@@ -596,7 +596,7 @@ impl TreeSink for Sink { - let mut node = self.new_parse_node(); - node.qual_name = Some(name.clone()); - { -- let mut node_data = self.get_parse_node_data_mut(&node.id); -+ let node_data = self.get_parse_node_data_mut(&node.id); - node_data.is_integration_point = html_attrs.iter() - .any(|attr| { - let attr_value = &String::from(attr.value.clone()); -diff --git servo/components/script/dom/url.rs servo/components/script/dom/url.rs -index a02a735638fc..41de4dcc0c72 100644 ---- servo/components/script/dom/url.rs -+++ servo/components/script/dom/url.rs -@@ -96,8 +96,8 @@ impl URL { - - // https://w3c.github.io/FileAPI/#dfn-createObjectURL - pub fn CreateObjectURL(global: &GlobalScope, blob: &Blob) -> DOMString { -- /// XXX: Second field is an unicode-serialized Origin, it is a temporary workaround -- /// and should not be trusted. See issue https://github.com/servo/servo/issues/11722 -+ // XXX: Second field is an unicode-serialized Origin, it is a temporary workaround -+ // and should not be trusted. See issue https://github.com/servo/servo/issues/11722 - let origin = get_blob_origin(&global.get_url()); - - let id = blob.get_blob_url_id(); -diff --git servo/components/script/dom/vrdisplay.rs servo/components/script/dom/vrdisplay.rs -index 3f73a577fad7..54f06fb928f2 100644 ---- servo/components/script/dom/vrdisplay.rs -+++ servo/components/script/dom/vrdisplay.rs -@@ -268,7 +268,7 @@ impl VRDisplayMethods for VRDisplay { - fn CancelAnimationFrame(&self, handle: u32) { - if self.presenting.get() { - let mut list = self.raf_callback_list.borrow_mut(); -- if let Some(mut pair) = list.iter_mut().find(|pair| pair.0 == handle) { -+ if let Some(pair) = list.iter_mut().find(|pair| pair.0 == handle) { - pair.1 = None; - } - } else { -diff --git servo/components/script/dom/webglrenderingcontext.rs servo/components/script/dom/webglrenderingcontext.rs -index 73d4ddba1b90..62c92b42785c 100644 ---- servo/components/script/dom/webglrenderingcontext.rs -+++ servo/components/script/dom/webglrenderingcontext.rs -@@ -2434,7 +2434,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { - } - - typedarray!(in(cx) let mut pixels_data: ArrayBufferView = pixels); -- let (array_type, mut data) = match { pixels_data.as_mut() } { -+ let (array_type, data) = match { pixels_data.as_mut() } { - Ok(data) => (data.get_array_type(), data.as_mut_slice()), - Err(_) => return Err(Error::Type("Not an ArrayBufferView".to_owned())), - }; -diff --git servo/components/script/dom/xmlhttprequest.rs servo/components/script/dom/xmlhttprequest.rs -index 6ed2dda1851f..e6652d79d706 100644 ---- servo/components/script/dom/xmlhttprequest.rs -+++ servo/components/script/dom/xmlhttprequest.rs -@@ -627,7 +627,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest { - - if !content_type_set { - let ct = request.headers.get_mut::<ContentType>(); -- if let Some(mut ct) = ct { -+ if let Some(ct) = ct { - if let Some(encoding) = encoding { - for param in &mut (ct.0).2 { - if param.0 == MimeAttr::Charset { -diff --git servo/components/script/lib.rs servo/components/script/lib.rs -index e1a1ab592cb7..5824d6f2e490 100644 ---- servo/components/script/lib.rs -+++ servo/components/script/lib.rs -@@ -9,7 +9,6 @@ - #![feature(mpsc_select)] - #![feature(nonzero)] - #![feature(on_unimplemented)] --#![feature(option_entry)] - #![feature(plugin)] - #![feature(proc_macro)] - #![feature(stmt_expr_attributes)] -diff --git servo/components/script_plugins/unrooted_must_root.rs servo/components/script_plugins/unrooted_must_root.rs -index 5dbd2b1a3bdd..f3f5e60ab62a 100644 ---- servo/components/script_plugins/unrooted_must_root.rs -+++ servo/components/script_plugins/unrooted_must_root.rs -@@ -182,7 +182,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> { - } - - match expr.node { -- /// Trait casts from #[must_root] types are not allowed -+ // Trait casts from #[must_root] types are not allowed - hir::ExprCast(ref subexpr, _) => require_rooted(cx, self.in_new_function, &*subexpr), - // This catches assignments... the main point of this would be to catch mutable - // references to `JS<T>`. -@@ -206,13 +206,21 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> { - fn visit_pat(&mut self, pat: &'tcx hir::Pat) { - let cx = self.cx; - -- if let hir::PatKind::Binding(hir::BindingMode::BindByValue(_), _, _, _) = pat.node { -- let ty = cx.tables.pat_ty(pat); -- if is_unrooted_ty(cx, ty, self.in_new_function) { -- cx.span_lint(UNROOTED_MUST_ROOT, -- pat.span, -- &format!("Expression of type {:?} must be rooted", ty)) -+ // We want to detect pattern bindings that move a value onto the stack. -+ // When "default binding modes" https://github.com/rust-lang/rust/issues/42640 -+ // are implemented, the `Unannotated` case could cause false-positives. -+ // These should be fixable by adding an explicit `ref`. -+ match pat.node { -+ hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, _, _, _) | -+ hir::PatKind::Binding(hir::BindingAnnotation::Mutable, _, _, _) => { -+ let ty = cx.tables.pat_ty(pat); -+ if is_unrooted_ty(cx, ty, self.in_new_function) { -+ cx.span_lint(UNROOTED_MUST_ROOT, -+ pat.span, -+ &format!("Expression of type {:?} must be rooted", ty)) -+ } - } -+ _ => {} - } - - visit::walk_pat(self, pat); -diff --git servo/components/selectors/matching.rs servo/components/selectors/matching.rs -index 7bd9814d26fb..8f6b2fa6aa54 100644 ---- servo/components/selectors/matching.rs -+++ servo/components/selectors/matching.rs -@@ -458,7 +458,7 @@ where - /// Matches a complex selector. - pub fn matches_complex_selector<E, F>(mut iter: SelectorIter<E::Impl>, - element: &E, -- mut context: &mut LocalMatchingContext<E::Impl>, -+ context: &mut LocalMatchingContext<E::Impl>, - flags_setter: &mut F) - -> bool - where E: Element, -diff --git servo/components/selectors/parser.rs servo/components/selectors/parser.rs -index 490399ce38ce..6b2c1f2b4e86 100644 ---- servo/components/selectors/parser.rs -+++ servo/components/selectors/parser.rs -@@ -1464,7 +1464,7 @@ fn parse_negation<'i, 't, P, E, Impl>(parser: &P, - fn parse_compound_selector<'i, 't, P, E, Impl>( - parser: &P, - input: &mut CssParser<'i, 't>, -- mut builder: &mut SelectorBuilder<Impl>) -+ builder: &mut SelectorBuilder<Impl>) - -> Result<bool, ParseError<'i, SelectorParseError<'i, E>>> - where P: Parser<'i, Impl=Impl, Error=E>, Impl: SelectorImpl - { -diff --git servo/components/style/invalidation/element/invalidator.rs servo/components/style/invalidation/element/invalidator.rs -index 848c5cd13dc8..b8510ba3169b 100644 ---- servo/components/style/invalidation/element/invalidator.rs -+++ servo/components/style/invalidation/element/invalidator.rs -@@ -154,7 +154,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E> - trace!(" > visitedness change, force subtree restyle"); - // We can't just return here because there may also be attribute - // changes as well that imply additional hints. -- let mut data = self.data.as_mut().unwrap(); -+ let data = self.data.as_mut().unwrap(); - data.restyle.hint.insert(RestyleHint::restyle_subtree()); - } - -diff --git servo/components/style/matching.rs servo/components/style/matching.rs -index b62bc54bf768..f58d7cd123e6 100644 ---- servo/components/style/matching.rs -+++ servo/components/style/matching.rs -@@ -440,7 +440,7 @@ pub trait MatchMethods : TElement { - fn finish_restyle( - &self, - context: &mut StyleContext<Self>, -- mut data: &mut ElementData, -+ data: &mut ElementData, - mut new_styles: ElementStyles, - important_rules_changed: bool, - ) -> ChildCascadeRequirement { -diff --git servo/components/style/properties/properties.mako.rs servo/components/style/properties/properties.mako.rs -index d98e173db5ba..81ff00fb6d5e 100644 ---- servo/components/style/properties/properties.mako.rs -+++ servo/components/style/properties/properties.mako.rs -@@ -3364,7 +3364,7 @@ pub fn modify_border_style_for_inline_sides(style: &mut Arc<ComputedValues>, - return; - } - } -- let mut style = Arc::make_mut(style); -+ let style = Arc::make_mut(style); - let border = Arc::make_mut(&mut style.border); - match side { - PhysicalSide::Left => { -diff --git servo/components/style/style_adjuster.rs servo/components/style/style_adjuster.rs -index 366641ebe0bc..6e51fa74072a 100644 ---- servo/components/style/style_adjuster.rs -+++ servo/components/style/style_adjuster.rs -@@ -269,7 +269,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { - - if overflow_x != original_overflow_x || - overflow_y != original_overflow_y { -- let mut box_style = self.style.mutate_box(); -+ let box_style = self.style.mutate_box(); - box_style.set_overflow_x(overflow_x); - box_style.set_overflow_y(overflow_y); - } -diff --git servo/components/style/style_resolver.rs servo/components/style/style_resolver.rs -index cf512c4fbdd2..3fc1d57cc8f7 100644 ---- servo/components/style/style_resolver.rs -+++ servo/components/style/style_resolver.rs -@@ -247,7 +247,7 @@ where - Some(&*primary_style.style) - }; - -- for (i, mut inputs) in pseudo_array.iter_mut().enumerate() { -+ for (i, inputs) in pseudo_array.iter_mut().enumerate() { - if let Some(inputs) = inputs.take() { - let pseudo = PseudoElement::from_eager_index(i); - pseudo_styles.set( -diff --git servo/components/style/stylesheets/rule_list.rs servo/components/style/stylesheets/rule_list.rs -index 82e78015400d..14b3dc5e7696 100644 ---- servo/components/style/stylesheets/rule_list.rs -+++ servo/components/style/stylesheets/rule_list.rs -@@ -150,7 +150,7 @@ impl CssRulesHelpers for RawOffsetArc<Locked<CssRules>> { - - { - let mut write_guard = lock.write(); -- let mut rules = self.write_with(&mut write_guard); -+ let rules = self.write_with(&mut write_guard); - // Step 5 - // Computes the maximum allowed parser state at a given index. - let rev_state = rules.0.get(index).map_or(State::Body, CssRule::rule_state); -diff --git servo/components/style/stylesheets/rule_parser.rs servo/components/style/stylesheets/rule_parser.rs -index 007d7e11026e..f0d224e498a7 100644 ---- servo/components/style/stylesheets/rule_parser.rs -+++ servo/components/style/stylesheets/rule_parser.rs -@@ -209,7 +209,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> { - let id = register_namespace(&url) - .map_err(|()| StyleParseError::UnspecifiedError)?; - -- let mut namespaces = self.namespaces.as_mut().unwrap(); -+ let namespaces = self.namespaces.as_mut().unwrap(); - - let opt_prefix = if let Ok(prefix) = prefix_result { - let prefix = Prefix::from(prefix.as_ref()); -diff --git servo/components/style/stylesheets/rules_iterator.rs servo/components/style/stylesheets/rules_iterator.rs -index 95a3ab8b3885..65e1b637ae52 100644 ---- servo/components/style/stylesheets/rules_iterator.rs -+++ servo/components/style/stylesheets/rules_iterator.rs -@@ -70,7 +70,7 @@ impl<'a, 'b, C> Iterator for RulesIterator<'a, 'b, C> - - let rule; - let sub_iter = { -- let mut nested_iter = self.stack.last_mut().unwrap(); -+ let nested_iter = self.stack.last_mut().unwrap(); - rule = match nested_iter.next() { - Some(r) => r, - None => { -diff --git servo/components/webdriver_server/lib.rs servo/components/webdriver_server/lib.rs -index bd2f667f9892..28a4885f0d41 100644 ---- servo/components/webdriver_server/lib.rs -+++ servo/components/webdriver_server/lib.rs -@@ -702,7 +702,7 @@ impl Handler { - fn handle_set_timeouts(&mut self, - parameters: &TimeoutsParameters) - -> WebDriverResult<WebDriverResponse> { -- let mut session = self.session -+ let session = self.session - .as_mut() - .ok_or(WebDriverError::new(ErrorStatus::SessionNotCreated, ""))?; - -diff --git servo/rust-commit-hash servo/rust-commit-hash -index d4f08fe97644..a08d23cd1a71 100644 ---- servo/rust-commit-hash -+++ servo/rust-commit-hash -@@ -1 +1 @@ --599be0d18f4c6ddf36366d2a5a2ca6dc65886896 -+13d94d5fa8129a34f5c77a1bcd76983f5aed2434 -diff --git servo/tests/unit/style/stylist.rs servo/tests/unit/style/stylist.rs -index da9a9478957a..52067b501788 100644 ---- servo/tests/unit/style/stylist.rs -+++ servo/tests/unit/style/stylist.rs -@@ -51,19 +51,6 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec<Vec<Rule>>, SharedRwLock) { - }).collect(), shared_lock) - } - --fn get_mock_map(selectors: &[&str]) -> (SelectorMap<Rule>, SharedRwLock) { -- let mut map = SelectorMap::<Rule>::new(); -- let (selector_rules, shared_lock) = get_mock_rules(selectors); -- -- for rules in selector_rules.into_iter() { -- for rule in rules.into_iter() { -- map.insert(rule, QuirksMode::NoQuirks) -- } -- } -- -- (map, shared_lock) --} -- - fn parse_selectors(selectors: &[&str]) -> Vec<Selector<SelectorImpl>> { - selectors.iter() - .map(|x| SelectorParser::parse_author_origin_no_namespace(x).unwrap().0 diff --git a/www/waterfox/files/patch-servo18126 b/www/waterfox/files/patch-servo18126 deleted file mode 100644 index ec5e77ad94e0..000000000000 --- a/www/waterfox/files/patch-servo18126 +++ /dev/null @@ -1,232 +0,0 @@ -commit f0acf27d189d -Author: Simon Sapin <simon.sapin@exyr.org> -Date: Thu Aug 17 11:05:32 2017 -0500 - - servo: Merge #18126 - geckolib: Fix some warnings (treated as error) new in Rust Nigthly (from servo:glow-fox); r=emilio - - Source-Repo: https://github.com/servo/servo - Source-Revision: cc86ca2bcdec5e89ee5279085ea38db63ef41af9 - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : 0586dbc81f1411c89821605a6dae4ebd0af8f0d5 ---- - servo/components/style/gecko/conversions.rs | 2 +- - servo/components/style/gecko/wrapper.rs | 2 +- - .../style/gecko_bindings/sugar/ns_t_array.rs | 4 ++-- - servo/components/style/properties/gecko.mako.rs | 18 +++++++++--------- - servo/components/style/style_adjuster.rs | 4 ++-- - servo/ports/geckolib/glue.rs | 12 ++++++------ - 6 files changed, 21 insertions(+), 21 deletions(-) - -diff --git servo/components/style/gecko/conversions.rs servo/components/style/gecko/conversions.rs -index 8f3fb6bf2d0f..51015997c5c1 100644 ---- servo/components/style/gecko/conversions.rs -+++ servo/components/style/gecko/conversions.rs -@@ -348,7 +348,7 @@ impl nsStyleImage { - // NB: stops are guaranteed to be none in the gecko side by - // default. - -- let mut gecko_stop = unsafe { -+ let gecko_stop = unsafe { - &mut (*gecko_gradient).mStops[index] - }; - let mut coord = nsStyleCoord::null(); -diff --git servo/components/style/gecko/wrapper.rs servo/components/style/gecko/wrapper.rs -index 034dd94590e2..c402ddaf15bd 100644 ---- servo/components/style/gecko/wrapper.rs -+++ servo/components/style/gecko/wrapper.rs -@@ -424,7 +424,7 @@ impl<'lb> GeckoXBLBinding<'lb> { - } - } - -- fn each_xbl_stylist<F>(self, mut f: &mut F) -+ fn each_xbl_stylist<F>(self, f: &mut F) - where - F: FnMut(&Stylist), - { -diff --git servo/components/style/gecko_bindings/sugar/ns_t_array.rs servo/components/style/gecko_bindings/sugar/ns_t_array.rs -index 6bc389702f54..068e10ddea1b 100644 ---- servo/components/style/gecko_bindings/sugar/ns_t_array.rs -+++ servo/components/style/gecko_bindings/sugar/ns_t_array.rs -@@ -90,7 +90,7 @@ impl<T> nsTArray<T> { - // this can leak - debug_assert!(len >= self.len() as u32); - self.ensure_capacity(len as usize); -- let mut header = self.header_mut(); -+ let header = self.header_mut(); - header.mLength = len; - } - -@@ -99,7 +99,7 @@ impl<T> nsTArray<T> { - /// This will not leak since it only works on POD types (and thus doesn't assert) - pub unsafe fn set_len_pod(&mut self, len: u32) where T: Copy { - self.ensure_capacity(len as usize); -- let mut header = unsafe { self.header_mut() }; -+ let header = unsafe { self.header_mut() }; - header.mLength = len; - } - } -diff --git servo/components/style/properties/gecko.mako.rs servo/components/style/properties/gecko.mako.rs -index 9a2ab2135fc5..bc41ef139af5 100644 ---- servo/components/style/properties/gecko.mako.rs -+++ servo/components/style/properties/gecko.mako.rs -@@ -4136,14 +4136,14 @@ fn static_assert() { - fn init_shadow(filter: &mut nsStyleFilter) -> &mut nsCSSShadowArray { - unsafe { - let ref mut union = filter.__bindgen_anon_1; -- let mut shadow_array: &mut *mut nsCSSShadowArray = union.mDropShadow.as_mut(); -+ let shadow_array: &mut *mut nsCSSShadowArray = union.mDropShadow.as_mut(); - *shadow_array = Gecko_NewCSSShadowArray(1); - - &mut **shadow_array - } - } - -- let mut gecko_shadow = init_shadow(gecko_filter); -+ let gecko_shadow = init_shadow(gecko_filter); - gecko_shadow.mArray[0].set_from_simple_shadow(shadow); - }, - Url(ref url) => { -@@ -4665,14 +4665,14 @@ fn static_assert() { - unsafe { - // We have to be very careful to avoid a copy here! - let ref mut union = ${ident}.__bindgen_anon_1; -- let mut shape: &mut *mut StyleBasicShape = union.mBasicShape.as_mut(); -+ let shape: &mut *mut StyleBasicShape = union.mBasicShape.as_mut(); - *shape = Gecko_NewBasicShape(ty); - &mut **shape - } - } - match servo_shape { - BasicShape::Inset(inset) => { -- let mut shape = init_shape(${ident}, StyleBasicShapeType::Inset); -+ let shape = init_shape(${ident}, StyleBasicShapeType::Inset); - unsafe { shape.mCoordinates.set_len(4) }; - - // set_len() can't call constructors, so the coordinates -@@ -4694,7 +4694,7 @@ fn static_assert() { - set_corners_from_radius(inset.round, &mut shape.mRadius); - } - BasicShape::Circle(circ) => { -- let mut shape = init_shape(${ident}, StyleBasicShapeType::Circle); -+ let shape = init_shape(${ident}, StyleBasicShapeType::Circle); - unsafe { shape.mCoordinates.set_len(1) }; - shape.mCoordinates[0].leaky_set_null(); - circ.radius.to_gecko_style_coord(&mut shape.mCoordinates[0]); -@@ -4702,7 +4702,7 @@ fn static_assert() { - shape.mPosition = circ.position.into(); - } - BasicShape::Ellipse(el) => { -- let mut shape = init_shape(${ident}, StyleBasicShapeType::Ellipse); -+ let shape = init_shape(${ident}, StyleBasicShapeType::Ellipse); - unsafe { shape.mCoordinates.set_len(2) }; - shape.mCoordinates[0].leaky_set_null(); - el.semiaxis_x.to_gecko_style_coord(&mut shape.mCoordinates[0]); -@@ -4712,7 +4712,7 @@ fn static_assert() { - shape.mPosition = el.position.into(); - } - BasicShape::Polygon(poly) => { -- let mut shape = init_shape(${ident}, StyleBasicShapeType::Polygon); -+ let shape = init_shape(${ident}, StyleBasicShapeType::Polygon); - unsafe { - shape.mCoordinates.set_len(poly.coordinates.len() as u32 * 2); - } -@@ -4797,7 +4797,7 @@ clip-path - bindings::Gecko_nsStyleSVG_SetDashArrayLength(&mut self.gecko, v.len() as u32); - } - -- for (mut gecko, servo) in self.gecko.mStrokeDasharray.iter_mut().zip(v) { -+ for (gecko, servo) in self.gecko.mStrokeDasharray.iter_mut().zip(v) { - match servo { - Either::First(number) => gecko.set_value(CoordDataValue::Factor(number)), - Either::Second(lop) => gecko.set(lop), -@@ -4885,7 +4885,7 @@ clip-path - } - - self.gecko.mContextPropsBits = 0; -- for (mut gecko, servo) in self.gecko.mContextProps.iter_mut().zip(v) { -+ for (gecko, servo) in self.gecko.mContextProps.iter_mut().zip(v) { - if servo.0 == atom!("fill") { - self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_FILL as u8; - } else if servo.0 == atom!("stroke") { -diff --git servo/components/style/style_adjuster.rs servo/components/style/style_adjuster.rs -index 03b15916b237..366641ebe0bc 100644 ---- servo/components/style/style_adjuster.rs -+++ servo/components/style/style_adjuster.rs -@@ -167,7 +167,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { - // When 'contain: paint', update overflow from 'visible' to 'clip'. - if self.style.get_box().clone_contain().contains(contain::PAINT) { - if self.style.get_box().clone_overflow_x() == overflow::visible { -- let mut box_style = self.style.mutate_box(); -+ let box_style = self.style.mutate_box(); - box_style.set_overflow_x(overflow::_moz_hidden_unscrollable); - box_style.set_overflow_y(overflow::_moz_hidden_unscrollable); - } -@@ -182,7 +182,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { - use properties::longhands::font_style::computed_value::T as font_style; - use properties::longhands::font_weight::computed_value::T as font_weight; - if self.style.get_font().clone__moz_math_variant() != moz_math_variant::none { -- let mut font_style = self.style.mutate_font(); -+ let font_style = self.style.mutate_font(); - // Sadly we don't have a nice name for the computed value - // of "font-weight: normal". - font_style.set_font_weight(font_weight::normal()); -diff --git servo/ports/geckolib/glue.rs servo/ports/geckolib/glue.rs -index 977728286fc3..fa09bee29553 100644 ---- servo/ports/geckolib/glue.rs -+++ servo/ports/geckolib/glue.rs -@@ -815,7 +815,7 @@ pub extern "C" fn Servo_StyleSet_AppendStyleSheet( - ) { - let global_style_data = &*GLOBAL_STYLE_DATA; - let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); -- let mut data = &mut *data; -+ let data = &mut *data; - let guard = global_style_data.shared_lock.read(); - data.stylesheets.append_stylesheet( - &data.stylist, -@@ -867,7 +867,7 @@ pub extern "C" fn Servo_StyleSet_PrependStyleSheet( - ) { - let global_style_data = &*GLOBAL_STYLE_DATA; - let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); -- let mut data = &mut *data; -+ let data = &mut *data; - let guard = global_style_data.shared_lock.read(); - data.stylesheets.prepend_stylesheet( - &data.stylist, -@@ -885,7 +885,7 @@ pub extern "C" fn Servo_StyleSet_InsertStyleSheetBefore( - ) { - let global_style_data = &*GLOBAL_STYLE_DATA; - let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); -- let mut data = &mut *data; -+ let data = &mut *data; - let guard = global_style_data.shared_lock.read(); - data.stylesheets.insert_stylesheet_before( - &data.stylist, -@@ -903,7 +903,7 @@ pub extern "C" fn Servo_StyleSet_RemoveStyleSheet( - ) { - let global_style_data = &*GLOBAL_STYLE_DATA; - let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); -- let mut data = &mut *data; -+ let data = &mut *data; - let guard = global_style_data.shared_lock.read(); - data.stylesheets.remove_stylesheet( - &data.stylist, -@@ -1274,7 +1274,7 @@ pub extern "C" fn Servo_StyleRule_GetSpecificityAtIndex( - specificity: *mut u64 - ) { - read_locked_arc(rule, |rule: &StyleRule| { -- let mut specificity = unsafe { specificity.as_mut().unwrap() }; -+ let specificity = unsafe { specificity.as_mut().unwrap() }; - let index = index as usize; - if index >= rule.selectors.0.len() { - *specificity = 0; -@@ -2775,7 +2775,7 @@ pub extern "C" fn Servo_NoteExplicitHints(element: RawGeckoElementBorrowed, - pub extern "C" fn Servo_TakeChangeHint(element: RawGeckoElementBorrowed, - was_restyled: *mut bool) -> nsChangeHint - { -- let mut was_restyled = unsafe { was_restyled.as_mut().unwrap() }; -+ let was_restyled = unsafe { was_restyled.as_mut().unwrap() }; - let element = GeckoElement(element); - - let damage = match element.mutate_data() { diff --git a/www/waterfox/files/patch-servo19128 b/www/waterfox/files/patch-servo19128 deleted file mode 100644 index 43f1145186aa..000000000000 --- a/www/waterfox/files/patch-servo19128 +++ /dev/null @@ -1,295 +0,0 @@ -commit a6f7082122e9 -Author: Simon Sapin <simon.sapin@exyr.org> -Date: Thu Nov 9 10:00:38 2017 -0600 - - servo: Merge #19128 - Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08) (from servo:asciiext); r=nox - - This fixes some new warnings, some of which (in `style`) are treated as errors. See https://users.rust-lang.org/t/psa-dealing-with-warning-unused-import-std-ascii-asciiext-in-today-s-nightly/13726 - - Source-Repo: https://github.com/servo/servo - Source-Revision: c46c9dc019ffe5447297140c22cd8b6ee95a9f5f - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : 49e4a180cd0d8ecdd48cd6896dc16b580f564e10 ---- - servo/components/gfx/font.rs | 1 - - servo/components/net/fetch/cors_cache.rs | 1 - - servo/components/net/fetch/methods.rs | 1 - - servo/components/net/http_loader.rs | 1 - - servo/components/net/websocket_loader.rs | 1 - - servo/components/net_traits/response.rs | 1 - - servo/components/script/dom/bindings/str.rs | 1 - - servo/components/script/dom/blob.rs | 1 - - servo/components/script/dom/cssstyledeclaration.rs | 1 - - servo/components/script/dom/document.rs | 1 - - servo/components/script/dom/element.rs | 1 - - servo/components/script/dom/htmlelement.rs | 1 - - servo/components/script/dom/htmllinkelement.rs | 1 - - servo/components/script/dom/htmlmetaelement.rs | 1 - - servo/components/script/dom/htmlscriptelement.rs | 1 - - servo/components/script/dom/macros.rs | 1 - - servo/components/script/dom/namednodemap.rs | 1 - - servo/components/script/dom/serviceworkercontainer.rs | 1 - - servo/components/script/dom/servoparser/async_html.rs | 1 - - servo/components/script/dom/servoparser/mod.rs | 1 - - servo/components/script/dom/textdecoder.rs | 1 - - servo/components/script/dom/websocket.rs | 1 - - servo/components/script/dom/window.rs | 1 - - servo/components/script/dom/xmlhttprequest.rs | 1 - - servo/components/style/servo/selector_parser.rs | 1 - - servo/rust-toolchain | 2 +- - 26 files changed, 1 insertion(+), 26 deletions(-) - -diff --git servo/components/gfx/font.rs servo/components/gfx/font.rs -index 357f61a2d7ab..acf98e6f9e9a 100644 ---- servo/components/gfx/font.rs -+++ servo/components/gfx/font.rs -@@ -10,7 +10,6 @@ use platform::font::{FontHandle, FontTable}; - use platform::font_context::FontContextHandle; - use platform::font_template::FontTemplateData; - use smallvec::SmallVec; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::RefCell; - use std::collections::HashMap; -diff --git servo/components/net/fetch/cors_cache.rs servo/components/net/fetch/cors_cache.rs -index 6c30782453d5..8962dd2c9985 100644 ---- servo/components/net/fetch/cors_cache.rs -+++ servo/components/net/fetch/cors_cache.rs -@@ -12,7 +12,6 @@ - use hyper::method::Method; - use net_traits::request::{CredentialsMode, Origin, Request}; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use time::{self, Timespec}; - - /// Union type for CORS cache entries -diff --git servo/components/net/websocket_loader.rs servo/components/net/websocket_loader.rs -index 71178bbc7d93..f2d36b4fdae9 100644 ---- servo/components/net/websocket_loader.rs -+++ servo/components/net/websocket_loader.rs -@@ -19,7 +19,6 @@ use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, - use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; - use net_traits::request::{Destination, Type}; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::io::{self, Write}; - use std::net::TcpStream; - use std::sync::{Arc, Mutex}; -diff --git servo/components/net_traits/response.rs servo/components/net_traits/response.rs -index 74525a85f07b..a7699d8ad911 100644 ---- servo/components/net_traits/response.rs -+++ servo/components/net_traits/response.rs -@@ -9,7 +9,6 @@ use hyper::header::{AccessControlExposeHeaders, ContentType, Headers}; - use hyper::status::StatusCode; - use hyper_serde::Serde; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::sync::{Arc, Mutex}; - - /// [Response type](https://fetch.spec.whatwg.org/#concept-response-type) -diff --git servo/components/script/dom/bindings/str.rs servo/components/script/dom/bindings/str.rs -index 761acab30682..e2c91a1f5061 100644 ---- servo/components/script/dom/bindings/str.rs -+++ servo/components/script/dom/bindings/str.rs -@@ -7,7 +7,6 @@ - use cssparser::CowRcStr; - use html5ever::{LocalName, Namespace}; - use servo_atoms::Atom; --use std::ascii::AsciiExt; - use std::borrow::{Borrow, Cow, ToOwned}; - use std::fmt; - use std::hash::{Hash, Hasher}; -diff --git servo/components/script/dom/cssstyledeclaration.rs servo/components/script/dom/cssstyledeclaration.rs -index 0732c9af9e45..c70f081922bf 100644 ---- servo/components/script/dom/cssstyledeclaration.rs -+++ servo/components/script/dom/cssstyledeclaration.rs -@@ -16,7 +16,6 @@ use dom::window::Window; - use dom_struct::dom_struct; - use servo_arc::Arc; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use style::attr::AttrValue; - use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId}; - use style::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration}; -diff --git servo/components/script/dom/document.rs servo/components/script/dom/document.rs -index 90ea06fbe7b4..4fe244b47b74 100644 ---- servo/components/script/dom/document.rs -+++ servo/components/script/dom/document.rs -@@ -122,7 +122,6 @@ use servo_arc::Arc; - use servo_atoms::Atom; - use servo_config::prefs::PREFS; - use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl}; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::{Cell, Ref, RefMut}; - use std::collections::{HashMap, HashSet, VecDeque}; -diff --git servo/components/script/dom/element.rs servo/components/script/dom/element.rs -index 59db577c4eb3..ea7567020b97 100644 ---- servo/components/script/dom/element.rs -+++ servo/components/script/dom/element.rs -@@ -95,7 +95,6 @@ use selectors::matching::{RelevantLinkStatus, matches_selector_list}; - use selectors::sink::Push; - use servo_arc::Arc; - use servo_atoms::Atom; --use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::cell::{Cell, Ref}; - use std::convert::TryFrom; -diff --git servo/components/script/dom/htmlelement.rs servo/components/script/dom/htmlelement.rs -index 59846595166a..eb1f1022c8b7 100644 ---- servo/components/script/dom/htmlelement.rs -+++ servo/components/script/dom/htmlelement.rs -@@ -31,7 +31,6 @@ use dom::nodelist::NodeList; - use dom::virtualmethods::VirtualMethods; - use dom_struct::dom_struct; - use html5ever::{LocalName, Prefix}; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::default::Default; - use std::rc::Rc; -diff --git servo/components/script/dom/htmllinkelement.rs servo/components/script/dom/htmllinkelement.rs -index 8175da5c913c..5da65a49d34d 100644 ---- servo/components/script/dom/htmllinkelement.rs -+++ servo/components/script/dom/htmllinkelement.rs -@@ -27,7 +27,6 @@ use net_traits::ReferrerPolicy; - use script_layout_interface::message::Msg; - use script_traits::{MozBrowserEvent, ScriptMsg as ConstellationMsg}; - use servo_arc::Arc; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::Cell; - use std::default::Default; -diff --git servo/components/script/dom/htmlmetaelement.rs servo/components/script/dom/htmlmetaelement.rs -index 9370675eb6bd..dc3ee9aa12de 100644 ---- servo/components/script/dom/htmlmetaelement.rs -+++ servo/components/script/dom/htmlmetaelement.rs -@@ -22,7 +22,6 @@ use html5ever::{LocalName, Prefix}; - use parking_lot::RwLock; - use servo_arc::Arc; - use servo_config::prefs::PREFS; --use std::ascii::AsciiExt; - use std::sync::atomic::AtomicBool; - use style::attr::AttrValue; - use style::media_queries::MediaList; -diff --git servo/components/script/dom/htmlscriptelement.rs servo/components/script/dom/htmlscriptelement.rs -index ea0cc4c25e8e..f5f758060525 100644 ---- servo/components/script/dom/htmlscriptelement.rs -+++ servo/components/script/dom/htmlscriptelement.rs -@@ -36,7 +36,6 @@ use network_listener::{NetworkListener, PreInvoke}; - use servo_atoms::Atom; - use servo_config::opts; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::cell::Cell; - use std::fs::File; - use std::io::{Read, Write}; -diff --git servo/components/script/dom/macros.rs servo/components/script/dom/macros.rs -index a1bb30657252..9cd5fb9a8dc5 100644 ---- servo/components/script/dom/macros.rs -+++ servo/components/script/dom/macros.rs -@@ -149,7 +149,6 @@ macro_rules! make_enumerated_getter( - fn $attr(&self) -> DOMString { - use dom::bindings::inheritance::Castable; - use dom::element::Element; -- use std::ascii::AsciiExt; - let element = self.upcast::<Element>(); - let mut val = element.get_string_attribute(&local_name!($htmlname)); - val.make_ascii_lowercase(); -diff --git servo/components/script/dom/namednodemap.rs servo/components/script/dom/namednodemap.rs -index 9d92bf11c2d2..4f1b13a999e8 100644 ---- servo/components/script/dom/namednodemap.rs -+++ servo/components/script/dom/namednodemap.rs -@@ -15,7 +15,6 @@ use dom::element::Element; - use dom::window::Window; - use dom_struct::dom_struct; - use html5ever::LocalName; --use std::ascii::AsciiExt; - - #[dom_struct] - pub struct NamedNodeMap { -diff --git servo/components/script/dom/serviceworkercontainer.rs servo/components/script/dom/serviceworkercontainer.rs -index ba2e327409f1..3a0ed0fcb253 100644 ---- servo/components/script/dom/serviceworkercontainer.rs -+++ servo/components/script/dom/serviceworkercontainer.rs -@@ -16,7 +16,6 @@ use dom::serviceworker::ServiceWorker; - use dom_struct::dom_struct; - use script_thread::ScriptThread; - use serviceworkerjob::{Job, JobType}; --use std::ascii::AsciiExt; - use std::default::Default; - use std::rc::Rc; - -diff --git servo/components/script/dom/servoparser/async_html.rs servo/components/script/dom/servoparser/async_html.rs -index 59411fda1c73..f9e3bf48c378 100644 ---- servo/components/script/dom/servoparser/async_html.rs -+++ servo/components/script/dom/servoparser/async_html.rs -@@ -27,7 +27,6 @@ use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts, TokenizerR - use html5ever::tree_builder::{ElementFlags, NodeOrText as HtmlNodeOrText, NextParserState, QuirksMode, TreeSink}; - use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts}; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::cell::Cell; - use std::collections::HashMap; -diff --git servo/components/script/dom/servoparser/mod.rs servo/components/script/dom/servoparser/mod.rs -index 6a5a723111da..bb8b066c2439 100644 ---- servo/components/script/dom/servoparser/mod.rs -+++ servo/components/script/dom/servoparser/mod.rs -@@ -46,7 +46,6 @@ use script_traits::DocumentActivity; - use servo_config::prefs::PREFS; - use servo_config::resource_files::read_resource_file; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::cell::Cell; - use std::mem; -diff --git servo/components/script/dom/websocket.rs servo/components/script/dom/websocket.rs -index b533789e6118..80febbe72fe4 100644 ---- servo/components/script/dom/websocket.rs -+++ servo/components/script/dom/websocket.rs -@@ -34,7 +34,6 @@ use script_runtime::CommonScriptMsg; - use script_runtime::ScriptThreadEventCategory::WebSocketEvent; - use script_thread::{Runnable, RunnableWrapper}; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::Cell; - use std::ptr; -diff --git servo/components/script/dom/window.rs servo/components/script/dom/window.rs -index 3c87e5f6b0b4..d10d2131dc5a 100644 ---- servo/components/script/dom/window.rs -+++ servo/components/script/dom/window.rs -@@ -88,7 +88,6 @@ use servo_config::opts; - use servo_config::prefs::PREFS; - use servo_geometry::{f32_rect_to_au_rect, max_rect}; - use servo_url::{Host, MutableOrigin, ImmutableOrigin, ServoUrl}; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::Cell; - use std::collections::{HashMap, HashSet}; -diff --git servo/components/script/dom/xmlhttprequest.rs servo/components/script/dom/xmlhttprequest.rs -index 6ed2dda1851f..e8902f6133c5 100644 ---- servo/components/script/dom/xmlhttprequest.rs -+++ servo/components/script/dom/xmlhttprequest.rs -@@ -63,7 +63,6 @@ use script_traits::DocumentActivity; - use servo_atoms::Atom; - use servo_config::prefs::PREFS; - use servo_url::ServoUrl; --use std::ascii::AsciiExt; - use std::borrow::ToOwned; - use std::cell::Cell; - use std::default::Default; -diff --git servo/components/style/servo/selector_parser.rs servo/components/style/servo/selector_parser.rs -index 95ef6b0169f5..d205c4ee1170 100644 ---- servo/components/style/servo/selector_parser.rs -+++ servo/components/style/servo/selector_parser.rs -@@ -21,7 +21,6 @@ use selectors::Element; - use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; - use selectors::parser::{SelectorMethods, SelectorParseError}; - use selectors::visitor::SelectorVisitor; --use std::ascii::AsciiExt; - use std::fmt; - use std::fmt::Debug; - use std::mem; diff --git a/www/waterfox/files/patch-servo19162 b/www/waterfox/files/patch-servo19162 deleted file mode 100644 index def866431f59..000000000000 --- a/www/waterfox/files/patch-servo19162 +++ /dev/null @@ -1,331 +0,0 @@ -commit cf341df19ad7 -Author: Simon Sapin <simon.sapin@exyr.org> -Date: Thu Nov 9 06:49:29 2017 -0600 - - servo: Merge #19162 - Allow unused imports for AsciiExt in style code (from emilio:ascii-ext); r=emilio - - See #19128, this part is cherry-picked so Gecko can build with rust nightly. - - Source-Repo: https://github.com/servo/servo - Source-Revision: e7a654dd13f589e127193267bcb576ffd661c11d - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : 0ee67ddf598b1ea99e92f6a285a960f86b1cb971 ---- - servo/components/selectors/attr.rs | 2 +- - servo/components/selectors/parser.rs | 2 +- - servo/components/style/attr.rs | 2 +- - servo/components/style/counter_style/mod.rs | 2 +- - servo/components/style/custom_properties.rs | 2 +- - servo/components/style/gecko/generated/pseudo_element_definition.rs | 4 ++-- - servo/components/style/gecko/pseudo_element_definition.mako.rs | 4 ++-- - servo/components/style/gecko_string_cache/mod.rs | 2 +- - servo/components/style/properties/longhand/font.mako.rs | 2 +- - servo/components/style/properties/longhand/pointing.mako.rs | 2 +- - servo/components/style/str.rs | 2 +- - servo/components/style/stylesheets/viewport_rule.rs | 2 +- - servo/components/style/values/mod.rs | 2 +- - servo/components/style/values/specified/align.rs | 2 +- - servo/components/style/values/specified/angle.rs | 2 +- - servo/components/style/values/specified/calc.rs | 2 +- - servo/components/style/values/specified/grid.rs | 2 +- - servo/components/style/values/specified/length.rs | 2 +- - servo/components/style/values/specified/mod.rs | 2 +- - servo/components/style/values/specified/percentage.rs | 2 +- - servo/components/style/values/specified/text.rs | 2 +- - servo/components/style/values/specified/time.rs | 2 +- - servo/components/style_traits/viewport.rs | 2 +- - 23 files changed, 25 insertions(+), 25 deletions(-) - -diff --git servo/components/selectors/attr.rs servo/components/selectors/attr.rs -index b71be2cca73b..577b52eb26ab 100644 ---- servo/components/selectors/attr.rs -+++ servo/components/selectors/attr.rs -@@ -4,7 +4,7 @@ - - use cssparser::ToCss; - use parser::SelectorImpl; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt; - - #[derive(Eq, PartialEq, Clone)] -diff --git servo/components/selectors/parser.rs servo/components/selectors/parser.rs -index 490399ce38ce..a6c58179e110 100644 ---- servo/components/selectors/parser.rs -+++ servo/components/selectors/parser.rs -@@ -13,7 +13,7 @@ use precomputed_hash::PrecomputedHash; - use servo_arc::ThinArc; - use sink::Push; - use smallvec::SmallVec; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::borrow::{Borrow, Cow}; - use std::fmt::{self, Display, Debug, Write}; - use std::iter::Rev; -diff --git servo/components/style/attr.rs servo/components/style/attr.rs -index 9861c4360f98..e34d03f01823 100644 ---- servo/components/style/attr.rs -+++ servo/components/style/attr.rs -@@ -16,7 +16,7 @@ use selectors::attr::AttrSelectorOperation; - use servo_arc::Arc; - use servo_url::ServoUrl; - use shared_lock::Locked; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::str::FromStr; - use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction}; - use str::{read_numbers, split_commas, split_html_space_chars}; -diff --git servo/components/style/counter_style/mod.rs servo/components/style/counter_style/mod.rs -index 1eb47fedf516..6b55364bca96 100644 ---- servo/components/style/counter_style/mod.rs -+++ servo/components/style/counter_style/mod.rs -@@ -15,7 +15,7 @@ use error_reporting::ContextualParseError; - use parser::{ParserContext, log_css_error, Parse}; - use selectors::parser::SelectorParseError; - use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard}; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::fmt; - use std::ops::Range; -diff --git servo/components/style/custom_properties.rs servo/components/style/custom_properties.rs -index cb9e39561846..787dfaadf82c 100644 ---- servo/components/style/custom_properties.rs -+++ servo/components/style/custom_properties.rs -@@ -12,7 +12,7 @@ use parser::ParserContext; - use properties::{CSSWideKeyword, DeclaredValue}; - use selectors::parser::SelectorParseError; - use servo_arc::Arc; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::collections::{HashMap, hash_map, HashSet}; - use std::fmt; -diff --git servo/components/style/gecko/generated/pseudo_element_definition.rs servo/components/style/gecko/generated/pseudo_element_definition.rs -index 46da69d1e9b6..1cb2bf9f3e1d 100644 ---- servo/components/style/gecko/generated/pseudo_element_definition.rs -+++ servo/components/style/gecko/generated/pseudo_element_definition.rs -@@ -1182,7 +1182,7 @@ impl PseudoElement { - /// Returns `None` if the pseudo-element is not recognised. - #[inline] - pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - - // We don't need to support tree pseudos because functional - // pseudo-elements needs arguments, and thus should be created -@@ -1552,7 +1552,7 @@ impl PseudoElement { - /// Returns `None` if the pseudo-element is not recognized. - #[inline] - pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - debug_assert!(name.starts_with("-moz-tree-")); - let tree_part = &name[10..]; - if tree_part.eq_ignore_ascii_case("column") { -diff --git servo/components/style/gecko/pseudo_element_definition.mako.rs servo/components/style/gecko/pseudo_element_definition.mako.rs -index e4a5025314b6..d676cb9f0491 100644 ---- servo/components/style/gecko/pseudo_element_definition.mako.rs -+++ servo/components/style/gecko/pseudo_element_definition.mako.rs -@@ -171,7 +171,7 @@ impl PseudoElement { - /// Returns `None` if the pseudo-element is not recognised. - #[inline] - pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - - // We don't need to support tree pseudos because functional - // pseudo-elements needs arguments, and thus should be created -@@ -193,7 +193,7 @@ impl PseudoElement { - /// Returns `None` if the pseudo-element is not recognized. - #[inline] - pub fn tree_pseudo_element(name: &str, args: Box<[String]>) -> Option<Self> { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - debug_assert!(name.starts_with("-moz-tree-")); - let tree_part = &name[10..]; - % for pseudo in TREE_PSEUDOS: -diff --git servo/components/style/gecko_string_cache/mod.rs servo/components/style/gecko_string_cache/mod.rs -index fed06fbeec5d..726bbc8631ca 100644 ---- servo/components/style/gecko_string_cache/mod.rs -+++ servo/components/style/gecko_string_cache/mod.rs -@@ -13,7 +13,7 @@ use gecko_bindings::bindings::Gecko_ReleaseAtom; - use gecko_bindings::structs::nsIAtom; - use nsstring::{nsAString, nsString}; - use precomputed_hash::PrecomputedHash; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::borrow::{Cow, Borrow}; - use std::char::{self, DecodeUtf16}; - use std::fmt::{self, Write}; -diff --git servo/components/style/media_queries.rs servo/components/style/media_queries.rs -index 5f71ddf974fb..6667f16f3585 100644 ---- servo/components/style/media_queries.rs -+++ servo/components/style/media_queries.rs -@@ -12,7 +12,7 @@ use cssparser::{Delimiter, Parser, Token, ParserInput}; - use parser::ParserContext; - use selectors::parser::SelectorParseError; - use serialize_comma_separated_list; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt; - use style_traits::{ToCss, ParseError, StyleParseError}; - -diff --git servo/components/style/properties/longhand/font.mako.rs servo/components/style/properties/longhand/font.mako.rs -index f6b78a917498..093c6c1009e7 100644 ---- servo/components/style/properties/longhand/font.mako.rs -+++ servo/components/style/properties/longhand/font.mako.rs -@@ -2096,7 +2096,7 @@ https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-settings-control- - - #[inline] - fn to_computed_value(&self, _context: &Context) -> computed_value::T { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - match *self { - SpecifiedValue::Normal => computed_value::T(0), - SpecifiedValue::Override(ref lang) => { -diff --git servo/components/style/properties/longhand/pointing.mako.rs servo/components/style/properties/longhand/pointing.mako.rs -index 9e7923889b17..132e62501647 100644 ---- servo/components/style/properties/longhand/pointing.mako.rs -+++ servo/components/style/properties/longhand/pointing.mako.rs -@@ -93,7 +93,7 @@ - impl Parse for computed_value::Keyword { - fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<computed_value::Keyword, ParseError<'i>> { -- use std::ascii::AsciiExt; -+ #[allow(unused_imports)] use std::ascii::AsciiExt; - use style_traits::cursor::Cursor; - let ident = input.expect_ident()?; - if ident.eq_ignore_ascii_case("auto") { -diff --git servo/components/style/str.rs servo/components/style/str.rs -index 92febb408249..e4ba90d6435e 100644 ---- servo/components/style/str.rs -+++ servo/components/style/str.rs -@@ -7,7 +7,7 @@ - #![deny(missing_docs)] - - use num_traits::ToPrimitive; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::convert::AsRef; - use std::iter::{Filter, Peekable}; - use std::str::Split; -diff --git servo/components/style/stylesheets/viewport_rule.rs servo/components/style/stylesheets/viewport_rule.rs -index 7d3339a92148..ad57415cbc90 100644 ---- servo/components/style/stylesheets/viewport_rule.rs -+++ servo/components/style/stylesheets/viewport_rule.rs -@@ -19,7 +19,7 @@ use parser::{Parse, ParserContext, log_css_error}; - use properties::StyleBuilder; - use selectors::parser::SelectorParseError; - use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard}; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::borrow::Cow; - use std::fmt; - use std::iter::Enumerate; -diff --git servo/components/style/values/mod.rs servo/components/style/values/mod.rs -index 616aa5cb4852..0ea4759ff23e 100644 ---- servo/components/style/values/mod.rs -+++ servo/components/style/values/mod.rs -@@ -12,7 +12,7 @@ use Atom; - pub use cssparser::{RGBA, Token, Parser, serialize_identifier, BasicParseError, CowRcStr}; - use parser::{Parse, ParserContext}; - use selectors::parser::SelectorParseError; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt::{self, Debug}; - use std::hash; - use style_traits::{ToCss, ParseError, StyleParseError}; -diff --git servo/components/style/values/specified/align.rs servo/components/style/values/specified/align.rs -index dc7fd43ed941..10da78904e2b 100644 ---- servo/components/style/values/specified/align.rs -+++ servo/components/style/values/specified/align.rs -@@ -10,7 +10,7 @@ use cssparser::Parser; - use gecko_bindings::structs; - use parser::{Parse, ParserContext}; - use selectors::parser::SelectorParseError; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt; - use style_traits::{ToCss, ParseError, StyleParseError}; - -diff --git servo/components/style/values/specified/calc.rs servo/components/style/values/specified/calc.rs -index 66b94b20ad01..58d12fe0147e 100644 ---- servo/components/style/values/specified/calc.rs -+++ servo/components/style/values/specified/calc.rs -@@ -9,7 +9,7 @@ - use app_units::Au; - use cssparser::{Parser, Token, BasicParseError}; - use parser::ParserContext; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt; - use style_traits::{HasViewportPercentage, ToCss, ParseError, StyleParseError}; - use style_traits::values::specified::AllowedLengthType; -diff --git servo/components/style/values/specified/grid.rs servo/components/style/values/specified/grid.rs -index beb1459e76dc..927b8c912935 100644 ---- servo/components/style/values/specified/grid.rs -+++ servo/components/style/values/specified/grid.rs -@@ -7,7 +7,7 @@ - - use cssparser::{Parser, Token, BasicParseError}; - use parser::{Parse, ParserContext}; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::mem; - use style_traits::{HasViewportPercentage, ParseError, StyleParseError}; - use values::{CSSFloat, CustomIdent}; -diff --git servo/components/style/values/specified/length.rs servo/components/style/values/specified/length.rs -index bf4b83b52932..2514b2aaca89 100644 ---- servo/components/style/values/specified/length.rs -+++ servo/components/style/values/specified/length.rs -@@ -12,7 +12,7 @@ use euclid::Size2D; - use font_metrics::FontMetricsQueryResult; - use parser::{Parse, ParserContext}; - use std::{cmp, fmt, mem}; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::ops::Mul; - use style_traits::{HasViewportPercentage, ToCss, ParseError, StyleParseError}; - use style_traits::values::specified::{AllowedLengthType, AllowedNumericType}; -diff --git servo/components/style/values/specified/mod.rs servo/components/style/values/specified/mod.rs -index 7c51c3868f8a..8fbdc827829a 100644 ---- servo/components/style/values/specified/mod.rs -+++ servo/components/style/values/specified/mod.rs -@@ -11,7 +11,7 @@ use context::QuirksMode; - use cssparser::{Parser, Token, serialize_identifier, BasicParseError}; - use parser::{ParserContext, Parse}; - use self::url::SpecifiedUrl; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::f32; - use std::fmt; - use style_traits::{ToCss, ParseError, StyleParseError}; -diff --git servo/components/style/values/specified/text.rs servo/components/style/values/specified/text.rs -index 2c0395128c64..c3248a7bc45d 100644 ---- servo/components/style/values/specified/text.rs -+++ servo/components/style/values/specified/text.rs -@@ -7,7 +7,7 @@ - use cssparser::Parser; - use parser::{Parse, ParserContext}; - use selectors::parser::SelectorParseError; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use style_traits::ParseError; - use values::computed::{Context, ToComputedValue}; - use values::computed::text::LineHeight as ComputedLineHeight; -diff --git servo/components/style_traits/viewport.rs servo/components/style_traits/viewport.rs -index 01d9b541ac34..e25ff9ba9e71 100644 ---- servo/components/style_traits/viewport.rs -+++ servo/components/style_traits/viewport.rs -@@ -7,7 +7,7 @@ - use {CSSPixel, PinchZoomFactor, ParseError}; - use cssparser::{Parser, ToCss, ParseError as CssParseError, BasicParseError}; - use euclid::TypedSize2D; --use std::ascii::AsciiExt; -+#[allow(unused_imports)] use std::ascii::AsciiExt; - use std::fmt; - - define_css_keyword_enum!(UserZoom: diff --git a/www/waterfox/files/patch-servo19654 b/www/waterfox/files/patch-servo19654 deleted file mode 100644 index a6fc2c441530..000000000000 --- a/www/waterfox/files/patch-servo19654 +++ /dev/null @@ -1,44 +0,0 @@ -commit 61f3d7e4e83b -Author: Emilio Cobos Álvarez <emilio@crisal.io> -Date: Wed Jan 3 12:01:42 2018 -0600 - - servo: Merge #19654 - style: Allow building stylo with rust nightly (from emilio:geckolib-nightly); r=jdm - - See individual commits for details. - - Source-Repo: https://github.com/servo/servo - Source-Revision: f71fb8bddc28060320c233701898541112322d66 - - --HG-- - extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear - extra : subtree_revision : 8f8b2ccece94cc9df26c8c41afba04032fe9d506 ---- - servo/components/style/gecko/wrapper.rs | 2 +- - servo/components/style/gecko_bindings/sugar/ownership.rs | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git servo/components/style/gecko/wrapper.rs servo/components/style/gecko/wrapper.rs -index 034dd94590e2..a516d5db7d0d 100644 ---- servo/components/style/gecko/wrapper.rs -+++ servo/components/style/gecko/wrapper.rs -@@ -1398,7 +1398,7 @@ impl<'le> Eq for GeckoElement<'le> {} - - impl<'le> Hash for GeckoElement<'le> { - fn hash<H: Hasher>(&self, state: &mut H) { -- (self.0 as *const _).hash(state); -+ (self.0 as *const RawGeckoElement).hash(state); - } - } - -diff --git servo/components/style/gecko_bindings/sugar/ownership.rs servo/components/style/gecko_bindings/sugar/ownership.rs -index b0ac00368eae..8695efaaa40f 100644 ---- servo/components/style/gecko_bindings/sugar/ownership.rs -+++ servo/components/style/gecko_bindings/sugar/ownership.rs -@@ -109,7 +109,6 @@ pub unsafe trait HasArcFFI : HasFFI { - /// - /// &GeckoType -> &Arc<ServoType> - fn as_arc<'a>(ptr: &'a &Self::FFIType) -> &'a RawOffsetArc<Self> { -- debug_assert!(!(ptr as *const _).is_null()); - unsafe { - transmute::<&&Self::FFIType, &RawOffsetArc<Self>>(ptr) - } diff --git a/www/waterfox/files/patch-waterfox503 b/www/waterfox/files/patch-waterfox503 deleted file mode 100644 index be3db70a1e6d..000000000000 --- a/www/waterfox/files/patch-waterfox503 +++ /dev/null @@ -1,332 +0,0 @@ -../../media/libwebp/dsp/yuv.o: In function `WebPInitConvertARGBToYUV': -media/libwebp/dsp/yuv.c:(.text.WebPInitConvertARGBToYUV+0x78): undefined reference to `WebPInitConvertARGBToYUVNEON' -media/libwebp/dsp/yuv.c:(.text.WebPInitConvertARGBToYUV+0x7c): undefined reference to `WebPInitSharpYUVNEON' -/usr/bin/ld: libxul.so: hidden symbol `WebPInitConvertARGBToYUVNEON' isn't defined -/usr/bin/ld: final link failed: Bad value - -diff --git media/libwebp/dsp/moz.build media/libwebp/dsp/moz.build -index 7c4e5a7bf8ba..e6cd5d741299 100644 ---- media/libwebp/dsp/moz.build -+++ media/libwebp/dsp/moz.build -@@ -30,6 +30,7 @@ SOURCES += [ - 'upsampling_neon.c', - 'upsampling_sse2.c', - 'yuv.c', -+ 'yuv_neon.c', - 'yuv_sse2.c', - ] - -@@ -40,6 +41,7 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']: - SOURCES['lossless_neon.c'].flags += CONFIG['NEON_FLAGS'] - SOURCES['rescaler_neon.c'].flags += CONFIG['NEON_FLAGS'] - SOURCES['upsampling_neon.c'].flags += CONFIG['NEON_FLAGS'] -+ SOURCES['yuv_neon.c'].flags += CONFIG['NEON_FLAGS'] - elif CONFIG['INTEL_ARCHITECTURE']: - SOURCES['alpha_processing_sse2.c'].flags += CONFIG['SSE2_FLAGS'] - SOURCES['alpha_processing_sse41.c'].flags += CONFIG['SSE2_FLAGS'] -diff --git media/libwebp/dsp/yuv_neon.c media/libwebp/dsp/yuv_neon.c -new file mode 100644 -index 000000000000..e5209b0296df ---- /dev/null -+++ media/libwebp/dsp/yuv_neon.c -@@ -0,0 +1,288 @@ -+// Copyright 2017 Google Inc. All Rights Reserved. -+// -+// Use of this source code is governed by a BSD-style license -+// that can be found in the COPYING file in the root of the source -+// tree. An additional intellectual property rights grant can be found -+// in the file PATENTS. All contributing project authors may -+// be found in the AUTHORS file in the root of the source tree. -+// ----------------------------------------------------------------------------- -+// -+// YUV->RGB conversion functions -+// -+// Author: Skal (pascal.massimino@gmail.com) -+ -+#include "./yuv.h" -+ -+#if defined(WEBP_USE_NEON) -+ -+#include <assert.h> -+#include <stdlib.h> -+ -+#include "./neon.h" -+ -+//----------------------------------------------------------------------------- -+ -+static uint8x8_t ConvertRGBToY_NEON(const uint8x8_t R, -+ const uint8x8_t G, -+ const uint8x8_t B) { -+ const uint16x8_t r = vmovl_u8(R); -+ const uint16x8_t g = vmovl_u8(G); -+ const uint16x8_t b = vmovl_u8(B); -+ const uint16x4_t r_lo = vget_low_u16(r); -+ const uint16x4_t r_hi = vget_high_u16(r); -+ const uint16x4_t g_lo = vget_low_u16(g); -+ const uint16x4_t g_hi = vget_high_u16(g); -+ const uint16x4_t b_lo = vget_low_u16(b); -+ const uint16x4_t b_hi = vget_high_u16(b); -+ const uint32x4_t tmp0_lo = vmull_n_u16( r_lo, 16839u); -+ const uint32x4_t tmp0_hi = vmull_n_u16( r_hi, 16839u); -+ const uint32x4_t tmp1_lo = vmlal_n_u16(tmp0_lo, g_lo, 33059u); -+ const uint32x4_t tmp1_hi = vmlal_n_u16(tmp0_hi, g_hi, 33059u); -+ const uint32x4_t tmp2_lo = vmlal_n_u16(tmp1_lo, b_lo, 6420u); -+ const uint32x4_t tmp2_hi = vmlal_n_u16(tmp1_hi, b_hi, 6420u); -+ const uint16x8_t Y1 = vcombine_u16(vrshrn_n_u32(tmp2_lo, 16), -+ vrshrn_n_u32(tmp2_hi, 16)); -+ const uint16x8_t Y2 = vaddq_u16(Y1, vdupq_n_u16(16)); -+ return vqmovn_u16(Y2); -+} -+ -+static void ConvertRGB24ToY_NEON(const uint8_t* rgb, uint8_t* y, int width) { -+ int i; -+ for (i = 0; i + 8 <= width; i += 8, rgb += 3 * 8) { -+ const uint8x8x3_t RGB = vld3_u8(rgb); -+ const uint8x8_t Y = ConvertRGBToY_NEON(RGB.val[0], RGB.val[1], RGB.val[2]); -+ vst1_u8(y + i, Y); -+ } -+ for (; i < width; ++i, rgb += 3) { // left-over -+ y[i] = VP8RGBToY(rgb[0], rgb[1], rgb[2], YUV_HALF); -+ } -+} -+ -+static void ConvertBGR24ToY_NEON(const uint8_t* bgr, uint8_t* y, int width) { -+ int i; -+ for (i = 0; i + 8 <= width; i += 8, bgr += 3 * 8) { -+ const uint8x8x3_t BGR = vld3_u8(bgr); -+ const uint8x8_t Y = ConvertRGBToY_NEON(BGR.val[2], BGR.val[1], BGR.val[0]); -+ vst1_u8(y + i, Y); -+ } -+ for (; i < width; ++i, bgr += 3) { // left-over -+ y[i] = VP8RGBToY(bgr[2], bgr[1], bgr[0], YUV_HALF); -+ } -+} -+ -+static void ConvertARGBToY_NEON(const uint32_t* argb, uint8_t* y, int width) { -+ int i; -+ for (i = 0; i + 8 <= width; i += 8) { -+ const uint8x8x4_t RGB = vld4_u8((const uint8_t*)&argb[i]); -+ const uint8x8_t Y = ConvertRGBToY_NEON(RGB.val[2], RGB.val[1], RGB.val[0]); -+ vst1_u8(y + i, Y); -+ } -+ for (; i < width; ++i) { // left-over -+ const uint32_t p = argb[i]; -+ y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff, -+ YUV_HALF); -+ } -+} -+ -+//----------------------------------------------------------------------------- -+ -+// computes: DST_s16 = [(C0 * r + C1 * g + C2 * b) >> 16] + CST -+#define MULTIPLY_16b_PREAMBLE(r, g, b) \ -+ const int16x4_t r_lo = vreinterpret_s16_u16(vget_low_u16(r)); \ -+ const int16x4_t r_hi = vreinterpret_s16_u16(vget_high_u16(r)); \ -+ const int16x4_t g_lo = vreinterpret_s16_u16(vget_low_u16(g)); \ -+ const int16x4_t g_hi = vreinterpret_s16_u16(vget_high_u16(g)); \ -+ const int16x4_t b_lo = vreinterpret_s16_u16(vget_low_u16(b)); \ -+ const int16x4_t b_hi = vreinterpret_s16_u16(vget_high_u16(b)) -+ -+#define MULTIPLY_16b(C0, C1, C2, CST, DST_s16) do { \ -+ const int32x4_t tmp0_lo = vmull_n_s16( r_lo, C0); \ -+ const int32x4_t tmp0_hi = vmull_n_s16( r_hi, C0); \ -+ const int32x4_t tmp1_lo = vmlal_n_s16(tmp0_lo, g_lo, C1); \ -+ const int32x4_t tmp1_hi = vmlal_n_s16(tmp0_hi, g_hi, C1); \ -+ const int32x4_t tmp2_lo = vmlal_n_s16(tmp1_lo, b_lo, C2); \ -+ const int32x4_t tmp2_hi = vmlal_n_s16(tmp1_hi, b_hi, C2); \ -+ const int16x8_t tmp3 = vcombine_s16(vshrn_n_s32(tmp2_lo, 16), \ -+ vshrn_n_s32(tmp2_hi, 16)); \ -+ DST_s16 = vaddq_s16(tmp3, vdupq_n_s16(CST)); \ -+} while (0) -+ -+// This needs to be a macro, since (128 << SHIFT) needs to be an immediate. -+#define CONVERT_RGB_TO_UV(r, g, b, SHIFT, U_DST, V_DST) do { \ -+ MULTIPLY_16b_PREAMBLE(r, g, b); \ -+ MULTIPLY_16b(-9719, -19081, 28800, 128 << SHIFT, U_DST); \ -+ MULTIPLY_16b(28800, -24116, -4684, 128 << SHIFT, V_DST); \ -+} while (0) -+ -+static void ConvertRGBA32ToUV_NEON(const uint16_t* rgb, -+ uint8_t* u, uint8_t* v, int width) { -+ int i; -+ for (i = 0; i + 8 <= width; i += 8, rgb += 4 * 8) { -+ const uint16x8x4_t RGB = vld4q_u16((const uint16_t*)rgb); -+ int16x8_t U, V; -+ CONVERT_RGB_TO_UV(RGB.val[0], RGB.val[1], RGB.val[2], 2, U, V); -+ vst1_u8(u + i, vqrshrun_n_s16(U, 2)); -+ vst1_u8(v + i, vqrshrun_n_s16(V, 2)); -+ } -+ for (; i < width; i += 1, rgb += 4) { -+ const int r = rgb[0], g = rgb[1], b = rgb[2]; -+ u[i] = VP8RGBToU(r, g, b, YUV_HALF << 2); -+ v[i] = VP8RGBToV(r, g, b, YUV_HALF << 2); -+ } -+} -+ -+static void ConvertARGBToUV_NEON(const uint32_t* argb, uint8_t* u, uint8_t* v, -+ int src_width, int do_store) { -+ int i; -+ for (i = 0; i + 16 <= src_width; i += 16, u += 8, v += 8) { -+ const uint8x16x4_t RGB = vld4q_u8((const uint8_t*)&argb[i]); -+ const uint16x8_t R = vpaddlq_u8(RGB.val[2]); // pair-wise adds -+ const uint16x8_t G = vpaddlq_u8(RGB.val[1]); -+ const uint16x8_t B = vpaddlq_u8(RGB.val[0]); -+ int16x8_t U_tmp, V_tmp; -+ CONVERT_RGB_TO_UV(R, G, B, 1, U_tmp, V_tmp); -+ { -+ const uint8x8_t U = vqrshrun_n_s16(U_tmp, 1); -+ const uint8x8_t V = vqrshrun_n_s16(V_tmp, 1); -+ if (do_store) { -+ vst1_u8(u, U); -+ vst1_u8(v, V); -+ } else { -+ const uint8x8_t prev_u = vld1_u8(u); -+ const uint8x8_t prev_v = vld1_u8(v); -+ vst1_u8(u, vrhadd_u8(U, prev_u)); -+ vst1_u8(v, vrhadd_u8(V, prev_v)); -+ } -+ } -+ } -+ if (i < src_width) { // left-over -+ WebPConvertARGBToUV_C(argb + i, u, v, src_width - i, do_store); -+ } -+} -+ -+ -+//------------------------------------------------------------------------------ -+ -+extern void WebPInitConvertARGBToYUVNEON(void); -+ -+WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUVNEON(void) { -+ WebPConvertRGB24ToY = ConvertRGB24ToY_NEON; -+ WebPConvertBGR24ToY = ConvertBGR24ToY_NEON; -+ WebPConvertARGBToY = ConvertARGBToY_NEON; -+ WebPConvertARGBToUV = ConvertARGBToUV_NEON; -+ WebPConvertRGBA32ToUV = ConvertRGBA32ToUV_NEON; -+} -+ -+//------------------------------------------------------------------------------ -+ -+#define MAX_Y ((1 << 10) - 1) // 10b precision over 16b-arithmetic -+static uint16_t clip_y_NEON(int v) { -+ return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v; -+} -+ -+static uint64_t SharpYUVUpdateY_NEON(const uint16_t* ref, const uint16_t* src, -+ uint16_t* dst, int len) { -+ int i; -+ const int16x8_t zero = vdupq_n_s16(0); -+ const int16x8_t max = vdupq_n_s16(MAX_Y); -+ uint64x2_t sum = vdupq_n_u64(0); -+ uint64_t diff; -+ -+ for (i = 0; i + 8 <= len; i += 8) { -+ const int16x8_t A = vreinterpretq_s16_u16(vld1q_u16(ref + i)); -+ const int16x8_t B = vreinterpretq_s16_u16(vld1q_u16(src + i)); -+ const int16x8_t C = vreinterpretq_s16_u16(vld1q_u16(dst + i)); -+ const int16x8_t D = vsubq_s16(A, B); // diff_y -+ const int16x8_t F = vaddq_s16(C, D); // new_y -+ const uint16x8_t H = -+ vreinterpretq_u16_s16(vmaxq_s16(vminq_s16(F, max), zero)); -+ const int16x8_t I = vabsq_s16(D); // abs(diff_y) -+ vst1q_u16(dst + i, H); -+ sum = vpadalq_u32(sum, vpaddlq_u16(vreinterpretq_u16_s16(I))); -+ } -+ diff = vgetq_lane_u64(sum, 0) + vgetq_lane_u64(sum, 1); -+ for (; i < len; ++i) { -+ const int diff_y = ref[i] - src[i]; -+ const int new_y = (int)(dst[i]) + diff_y; -+ dst[i] = clip_y_NEON(new_y); -+ diff += (uint64_t)(abs(diff_y)); -+ } -+ return diff; -+} -+ -+static void SharpYUVUpdateRGB_NEON(const int16_t* ref, const int16_t* src, -+ int16_t* dst, int len) { -+ int i; -+ for (i = 0; i + 8 <= len; i += 8) { -+ const int16x8_t A = vld1q_s16(ref + i); -+ const int16x8_t B = vld1q_s16(src + i); -+ const int16x8_t C = vld1q_s16(dst + i); -+ const int16x8_t D = vsubq_s16(A, B); // diff_uv -+ const int16x8_t E = vaddq_s16(C, D); // new_uv -+ vst1q_s16(dst + i, E); -+ } -+ for (; i < len; ++i) { -+ const int diff_uv = ref[i] - src[i]; -+ dst[i] += diff_uv; -+ } -+} -+ -+static void SharpYUVFilterRow_NEON(const int16_t* A, const int16_t* B, int len, -+ const uint16_t* best_y, uint16_t* out) { -+ int i; -+ const int16x8_t max = vdupq_n_s16(MAX_Y); -+ const int16x8_t zero = vdupq_n_s16(0); -+ for (i = 0; i + 8 <= len; i += 8) { -+ const int16x8_t a0 = vld1q_s16(A + i + 0); -+ const int16x8_t a1 = vld1q_s16(A + i + 1); -+ const int16x8_t b0 = vld1q_s16(B + i + 0); -+ const int16x8_t b1 = vld1q_s16(B + i + 1); -+ const int16x8_t a0b1 = vaddq_s16(a0, b1); -+ const int16x8_t a1b0 = vaddq_s16(a1, b0); -+ const int16x8_t a0a1b0b1 = vaddq_s16(a0b1, a1b0); // A0+A1+B0+B1 -+ const int16x8_t a0b1_2 = vaddq_s16(a0b1, a0b1); // 2*(A0+B1) -+ const int16x8_t a1b0_2 = vaddq_s16(a1b0, a1b0); // 2*(A1+B0) -+ const int16x8_t c0 = vshrq_n_s16(vaddq_s16(a0b1_2, a0a1b0b1), 3); -+ const int16x8_t c1 = vshrq_n_s16(vaddq_s16(a1b0_2, a0a1b0b1), 3); -+ const int16x8_t d0 = vaddq_s16(c1, a0); -+ const int16x8_t d1 = vaddq_s16(c0, a1); -+ const int16x8_t e0 = vrshrq_n_s16(d0, 1); -+ const int16x8_t e1 = vrshrq_n_s16(d1, 1); -+ const int16x8x2_t f = vzipq_s16(e0, e1); -+ const int16x8_t g0 = vreinterpretq_s16_u16(vld1q_u16(best_y + 2 * i + 0)); -+ const int16x8_t g1 = vreinterpretq_s16_u16(vld1q_u16(best_y + 2 * i + 8)); -+ const int16x8_t h0 = vaddq_s16(g0, f.val[0]); -+ const int16x8_t h1 = vaddq_s16(g1, f.val[1]); -+ const int16x8_t i0 = vmaxq_s16(vminq_s16(h0, max), zero); -+ const int16x8_t i1 = vmaxq_s16(vminq_s16(h1, max), zero); -+ vst1q_u16(out + 2 * i + 0, vreinterpretq_u16_s16(i0)); -+ vst1q_u16(out + 2 * i + 8, vreinterpretq_u16_s16(i1)); -+ } -+ for (; i < len; ++i) { -+ const int a0b1 = A[i + 0] + B[i + 1]; -+ const int a1b0 = A[i + 1] + B[i + 0]; -+ const int a0a1b0b1 = a0b1 + a1b0 + 8; -+ const int v0 = (8 * A[i + 0] + 2 * a1b0 + a0a1b0b1) >> 4; -+ const int v1 = (8 * A[i + 1] + 2 * a0b1 + a0a1b0b1) >> 4; -+ out[2 * i + 0] = clip_y_NEON(best_y[2 * i + 0] + v0); -+ out[2 * i + 1] = clip_y_NEON(best_y[2 * i + 1] + v1); -+ } -+} -+#undef MAX_Y -+ -+//------------------------------------------------------------------------------ -+ -+extern void WebPInitSharpYUVNEON(void); -+ -+WEBP_TSAN_IGNORE_FUNCTION void WebPInitSharpYUVNEON(void) { -+ WebPSharpYUVUpdateY = SharpYUVUpdateY_NEON; -+ WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_NEON; -+ WebPSharpYUVFilterRow = SharpYUVFilterRow_NEON; -+} -+ -+#else // !WEBP_USE_NEON -+ -+WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVNEON) -+WEBP_DSP_INIT_STUB(WebPInitSharpYUVNEON) -+ -+#endif // WEBP_USE_NEON -diff --git media/libwebp/update.sh media/libwebp/update.sh -index 57cd45996bb2..45741ce16000 100644 ---- media/libwebp/update.sh -+++ media/libwebp/update.sh -@@ -57,6 +57,7 @@ cp $1/src/dsp/upsampling.c dsp - cp $1/src/dsp/upsampling_neon.c dsp - cp $1/src/dsp/upsampling_sse2.c dsp - cp $1/src/dsp/yuv.c dsp -+cp $1/src/dsp/yuv_neon.c dsp - cp $1/src/dsp/yuv_sse2.c dsp - - mkdir -p enc |