Merge mozilla-central to mozilla-inbound. r=merge a=merge

This commit is contained in:
Sebastian Hengst 2016-08-19 12:39:57 +02:00
Родитель 0923b0fd39 fdc5082122
Коммит 1dd98c7608
6 изменённых файлов: 4 добавлений и 46 удалений

Просмотреть файл

@ -922,13 +922,11 @@ ContentChild::InitXPCOM()
ClipboardCapabilities clipboardCaps;
DomainPolicyClone domainPolicy;
StructuredCloneData initialData;
OptionalURIParams userContentSheetURL;
SendGetXPCOMProcessAttributes(&isOffline, &isConnected,
&isLangRTL, &haveBidiKeyboards,
&mAvailableDictionaries,
&clipboardCaps, &domainPolicy, &initialData,
&userContentSheetURL);
&clipboardCaps, &domainPolicy, &initialData);
RecvSetOffline(isOffline);
RecvSetConnectivity(isConnected);
RecvBidiKeyboardNotify(isLangRTL, haveBidiKeyboards);
@ -966,10 +964,6 @@ ContentChild::InitXPCOM()
global->SetInitialProcessData(data);
}
// The stylesheet cache is not ready yet. Store this URL for future use.
nsCOMPtr<nsIURI> ucsURL = DeserializeURI(userContentSheetURL);
nsLayoutStylesheetCache::SetUserContentCSSURL(ucsURL);
// This will register cross-process observer.
mozilla::dom::time::InitializeDateCacheCleaner();
}

Просмотреть файл

@ -195,8 +195,6 @@
#include "nsIBidiKeyboard.h"
#include "nsLayoutStylesheetCache.h"
#ifdef MOZ_WEBRTC
#include "signaling/src/peerconnection/WebrtcGlobalParent.h"
#endif
@ -2977,8 +2975,7 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
InfallibleTArray<nsString>* dictionaries,
ClipboardCapabilities* clipboardCaps,
DomainPolicyClone* domainPolicy,
StructuredCloneData* aInitialData,
OptionalURIParams* aUserContentCSSURL)
StructuredCloneData* aInitialData)
{
nsCOMPtr<nsIIOService> io(do_GetIOService());
MOZ_ASSERT(io, "No IO service?");
@ -3035,16 +3032,6 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
}
}
// XXX bug 1046166
// Content processes have no permission to read profile, so we send the
// file URL instead.
StyleSheetHandle::RefPtr ucs = nsLayoutStylesheetCache::For(StyleBackendType::Gecko)->UserContentSheet();
if (ucs) {
SerializeURI(ucs->GetSheetURI(), *aUserContentCSSURL);
} else {
SerializeURI(nullptr, *aUserContentCSSURL);
}
return true;
}

Просмотреть файл

@ -732,8 +732,7 @@ private:
InfallibleTArray<nsString>* dictionaries,
ClipboardCapabilities* clipboardCaps,
DomainPolicyClone* domainPolicy,
StructuredCloneData* initialData,
OptionalURIParams* aUserContentSheetURL) override;
StructuredCloneData* initialData) override;
virtual bool
DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*) override;

Просмотреть файл

@ -722,8 +722,7 @@ parent:
bool haveBidiKeyboards, nsString[] dictionaries,
ClipboardCapabilities clipboardCaps,
DomainPolicyClone domainPolicy,
StructuredCloneData initialData,
OptionalURIParams userContentSheetURL);
StructuredCloneData initialData);
sync CreateChildProcess(IPCTabContext context,
ProcessPriority priority,

Просмотреть файл

@ -21,7 +21,6 @@
#include "nsServiceManagerUtils.h"
#include "nsIXULRuntime.h"
#include "nsPrintfCString.h"
#include "nsXULAppAPI.h"
// Includes for the crash report annotation in ErrorLoadingBuiltinSheet.
#ifdef MOZ_CRASHREPORTER
@ -255,14 +254,6 @@ nsLayoutStylesheetCache::Shutdown()
gCSSLoader_Servo = nullptr;
gStyleCache_Gecko = nullptr;
gStyleCache_Servo = nullptr;
MOZ_ASSERT(!gUserContentSheetURL, "Got the URL but never used?");
}
void
nsLayoutStylesheetCache::SetUserContentCSSURL(nsIURI* aURI)
{
MOZ_ASSERT(XRE_IsContentProcess(), "Only used in content processes.");
gUserContentSheetURL = aURI;
}
MOZ_DEFINE_MALLOC_SIZE_OF(LayoutStylesheetCacheMallocSizeOf)
@ -342,12 +333,6 @@ nsLayoutStylesheetCache::nsLayoutStylesheetCache(StyleBackendType aType)
LoadSheetURL("chrome://global/content/xul.css",
&mXULSheet, eAgentSheetFeatures);
if (gUserContentSheetURL) {
MOZ_ASSERT(XRE_IsContentProcess(), "Only used in content processes.");
LoadSheet(gUserContentSheetURL, &mUserContentSheet, eUserSheetFeatures);
gUserContentSheetURL = nullptr;
}
// The remaining sheets are created on-demand do to their use being rarer
// (which helps save memory for Firefox OS apps) or because they need to
// be re-loadable in DependentPrefChanged.
@ -982,6 +967,3 @@ nsLayoutStylesheetCache::gCSSLoader_Gecko;
mozilla::StaticRefPtr<mozilla::css::Loader>
nsLayoutStylesheetCache::gCSSLoader_Servo;
mozilla::StaticRefPtr<nsIURI>
nsLayoutStylesheetCache::gUserContentSheetURL;

Просмотреть файл

@ -66,8 +66,6 @@ class nsLayoutStylesheetCache final
static void Shutdown();
static void SetUserContentCSSURL(nsIURI* aURI);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
@ -94,7 +92,6 @@ private:
static mozilla::StaticRefPtr<nsLayoutStylesheetCache> gStyleCache_Servo;
static mozilla::StaticRefPtr<mozilla::css::Loader> gCSSLoader_Gecko;
static mozilla::StaticRefPtr<mozilla::css::Loader> gCSSLoader_Servo;
static mozilla::StaticRefPtr<nsIURI> gUserContentSheetURL;
mozilla::StyleBackendType mBackendType;
mozilla::StyleSheetHandle::RefPtr mChromePreferenceSheet;
mozilla::StyleSheetHandle::RefPtr mContentEditableSheet;