mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
990b92ae63
5 changed files with 45 additions and 34 deletions
|
|
@ -5681,8 +5681,14 @@ HTMLMediaElement::CopyInnerTo(Element* aDest)
|
|||
{
|
||||
nsresult rv = nsGenericHTMLElement::CopyInnerTo(aDest);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Make sure cloned <audio> and <video> respect their "muted" attribute.
|
||||
HTMLMediaElement* dest = static_cast<HTMLMediaElement*>(aDest);
|
||||
if (HasAttr(kNameSpaceID_None, nsGkAtoms::muted)) {
|
||||
dest->mMuted |= MUTED_BY_CONTENT;
|
||||
}
|
||||
|
||||
if (aDest->OwnerDoc()->IsStaticDocument()) {
|
||||
HTMLMediaElement* dest = static_cast<HTMLMediaElement*>(aDest);
|
||||
dest->SetMediaInfo(mMediaInfo);
|
||||
}
|
||||
return rv;
|
||||
|
|
|
|||
|
|
@ -35,12 +35,20 @@
|
|||
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
|
||||
{
|
||||
int rt, dummy;
|
||||
if (__builtin_constant_p(shift))
|
||||
__asm__ (
|
||||
"imull %3 \n\t"
|
||||
"shrdl %4, %%edx, %%eax \n\t"
|
||||
:"=a"(rt), "=d"(dummy)
|
||||
:"a"(a), "rm"(b), "ci"((uint8_t)shift)
|
||||
:"a"(a), "rm"(b), "i"(shift & 0x1F)
|
||||
);
|
||||
else
|
||||
__asm__ (
|
||||
"imull %3 \n\t"
|
||||
"shrdl %4, %%edx, %%eax \n\t"
|
||||
:"=a"(rt), "=d"(dummy)
|
||||
:"a"(a), "rm"(b), "c"((uint8_t)shift)
|
||||
);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
|
@ -113,19 +121,31 @@ __asm__ volatile(\
|
|||
// avoid +32 for shift optimization (gcc should do that ...)
|
||||
#define NEG_SSR32 NEG_SSR32
|
||||
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
||||
if (__builtin_constant_p(s))
|
||||
__asm__ ("sarl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
: "ic" ((uint8_t)(-s))
|
||||
: "i" (-s & 0x1F)
|
||||
);
|
||||
else
|
||||
__asm__ ("sarl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
: "c" ((uint8_t)(-s))
|
||||
);
|
||||
return a;
|
||||
}
|
||||
|
||||
#define NEG_USR32 NEG_USR32
|
||||
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
|
||||
if (__builtin_constant_p(s))
|
||||
__asm__ ("shrl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
: "ic" ((uint8_t)(-s))
|
||||
: "i" (-s & 0x1F)
|
||||
);
|
||||
else
|
||||
__asm__ ("shrl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
: "c" ((uint8_t)(-s))
|
||||
);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -556,35 +556,6 @@ public:
|
|||
|
||||
NS_IMPL_ISUPPORTS(CloseCookieDBListener, mozIStorageCompletionCallback)
|
||||
|
||||
namespace {
|
||||
|
||||
class AppClearDataObserver final : public nsIObserver {
|
||||
|
||||
~AppClearDataObserver() = default;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIObserver implementation.
|
||||
NS_IMETHOD
|
||||
Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
|
||||
{
|
||||
MOZ_ASSERT(!nsCRT::strcmp(aTopic, TOPIC_CLEAR_ORIGIN_DATA));
|
||||
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
|
||||
nsCOMPtr<nsICookieManager2> cookieManager
|
||||
= do_GetService(NS_COOKIEMANAGER_CONTRACTID);
|
||||
MOZ_ASSERT(cookieManager);
|
||||
|
||||
return cookieManager->RemoveCookiesWithOriginAttributes(nsDependentString(aData), EmptyCString());
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(AppClearDataObserver, nsIObserver)
|
||||
|
||||
} // namespace
|
||||
|
||||
size_t
|
||||
nsCookieKey::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -384,8 +384,13 @@ protected:
|
|||
nsIWidget* mParent; // if we're a popup, this is our parent [WEAK]
|
||||
nsIWidget* mAncestorLink; // link to traverse ancestors [WEAK]
|
||||
BaseWindow* mWindow; // our cocoa window [STRONG]
|
||||
BaseWindow* mClosedRetainedWindow; // a second strong reference to our
|
||||
// window upon closing it, held through our destructor. This is useful
|
||||
// to ensure that macOS run loops which reference the window will still
|
||||
// have something to point to even if they don't use proper retain and
|
||||
// release patterns.
|
||||
WindowDelegate* mDelegate; // our delegate for processing window msgs [STRONG]
|
||||
RefPtr<nsMenuBarX> mMenuBar;
|
||||
RefPtr<nsMenuBarX> mMenuBar;
|
||||
NSWindow* mSheetWindowParent; // if this is a sheet, this is the NSWindow it's attached to
|
||||
nsChildView* mPopupContentView; // if this is a popup, this is its content widget
|
||||
// if this is a toplevel window, and there is any ongoing fullscreen
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ nsCocoaWindow::nsCocoaWindow()
|
|||
: mParent(nullptr)
|
||||
, mAncestorLink(nullptr)
|
||||
, mWindow(nil)
|
||||
, mClosedRetainedWindow(nil)
|
||||
, mDelegate(nil)
|
||||
, mSheetWindowParent(nil)
|
||||
, mPopupContentView(nil)
|
||||
|
|
@ -148,6 +149,12 @@ void nsCocoaWindow::DestroyNativeWindow()
|
|||
// We want to unhook the delegate here because we don't want events
|
||||
// sent to it after this object has been destroyed.
|
||||
[mWindow setDelegate:nil];
|
||||
// Closing the window will also release it. Our second reference will
|
||||
// keep it alive through our destructor. Release any reference we might
|
||||
// have from an earlier call to DestroyNativeWindow, then create a new
|
||||
// one.
|
||||
[mClosedRetainedWindow autorelease];
|
||||
mClosedRetainedWindow = [mWindow retain];
|
||||
[mWindow close];
|
||||
mWindow = nil;
|
||||
[mDelegate autorelease];
|
||||
|
|
@ -182,6 +189,8 @@ nsCocoaWindow::~nsCocoaWindow()
|
|||
DestroyNativeWindow();
|
||||
}
|
||||
|
||||
[mClosedRetainedWindow release];
|
||||
|
||||
NS_IF_RELEASE(mPopupContentView);
|
||||
|
||||
// Deal with the possiblity that we're being destroyed while running modal.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue