mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158798 - Properly initialize the LookAndFeel cache in the child. r=mstange.
The old code was just flat-out wrong. The IPDL for getting the LookAndFeel cache from the parent during child process initialization was passing an array it wanted to be populated as an argument, rather than using a return value.
This commit is contained in:
parent
5ed998f9ea
commit
96028e803c
@ -4029,9 +4029,9 @@ ContentParent::RecvGetSystemMemory(const uint64_t& aGetterId)
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache)
|
||||
ContentParent::RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>* aLookAndFeelIntCache)
|
||||
{
|
||||
aLookAndFeelIntCache = LookAndFeel::GetIntCache();
|
||||
*aLookAndFeelIntCache = LookAndFeel::GetIntCache();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -761,7 +761,7 @@ private:
|
||||
|
||||
virtual bool RecvGetSystemMemory(const uint64_t& getterId) override;
|
||||
|
||||
virtual bool RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache) override;
|
||||
virtual bool RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>* aLookAndFeelIntCache) override;
|
||||
|
||||
virtual bool RecvDataStoreGetStores(
|
||||
const nsString& aName,
|
||||
|
@ -733,7 +733,8 @@ parent:
|
||||
sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
|
||||
returns (bool isSecureURI);
|
||||
|
||||
sync GetLookAndFeelCache(LookAndFeelInt[] lookAndFeelIntCache);
|
||||
sync GetLookAndFeelCache()
|
||||
returns (LookAndFeelInt[] lookAndFeelIntCache);
|
||||
|
||||
prio(urgent) async PHal();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
static bool UseOverlayScrollbars();
|
||||
|
||||
virtual nsTArray<LookAndFeelInt> GetIntCacheImpl();
|
||||
virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& lookAndFeelIntCache);
|
||||
virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache);
|
||||
|
||||
virtual void RefreshImpl();
|
||||
protected:
|
||||
|
@ -668,9 +668,9 @@ nsLookAndFeel::GetIntCacheImpl()
|
||||
}
|
||||
|
||||
void
|
||||
nsLookAndFeel::SetIntCacheImpl(const nsTArray<LookAndFeelInt>& lookAndFeelIntCache)
|
||||
nsLookAndFeel::SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache)
|
||||
{
|
||||
for (auto entry : lookAndFeelIntCache) {
|
||||
for (auto entry : aLookAndFeelIntCache) {
|
||||
switch(entry.id) {
|
||||
case eIntID_UseOverlayScrollbars:
|
||||
mUseOverlayScrollbars = entry.value;
|
||||
|
@ -461,7 +461,7 @@ nsXPLookAndFeel::Init()
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
|
||||
nsTArray<LookAndFeelInt> lookAndFeelIntCache;
|
||||
cc->SendGetLookAndFeelCache(lookAndFeelIntCache);
|
||||
cc->SendGetLookAndFeelCache(&lookAndFeelIntCache);
|
||||
LookAndFeel::SetIntCache(lookAndFeelIntCache);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user