mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Enhance PDF handling by introducing DISPOSITION_FORCE_INLINE and updating content disposition logic
This commit is contained in:
parent
9a60e2c532
commit
257ddfa48d
6 changed files with 63 additions and 7 deletions
|
|
@ -104,7 +104,9 @@ NS_IMETHODIMP RemoteHandlerApp::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequesto
|
|||
|
||||
NS_IMPL_ISUPPORTS(RemoteHandlerApp, nsIHandlerApp)
|
||||
|
||||
static inline void CopyHanderInfoTonsIHandlerInfo(HandlerInfo info, nsIHandlerInfo* aHandlerInfo)
|
||||
static inline void
|
||||
CopyHandlerInfoTonsIHandlerInfo(const HandlerInfo& info,
|
||||
nsIHandlerInfo* aHandlerInfo)
|
||||
{
|
||||
HandlerApp preferredApplicationHandler = info.preferredApplicationHandler();
|
||||
nsCOMPtr<nsIHandlerApp> preferredApp(new RemoteHandlerApp(preferredApplicationHandler));
|
||||
|
|
@ -112,6 +114,8 @@ static inline void CopyHanderInfoTonsIHandlerInfo(HandlerInfo info, nsIHandlerIn
|
|||
nsCOMPtr<nsIMutableArray> possibleHandlers;
|
||||
aHandlerInfo->GetPossibleApplicationHandlers(getter_AddRefs(possibleHandlers));
|
||||
possibleHandlers->AppendElement(preferredApp, false);
|
||||
aHandlerInfo->SetPreferredAction(info.preferredAction());
|
||||
aHandlerInfo->SetAlwaysAskBeforeHandling(info.alwaysAskBeforeHandling());
|
||||
}
|
||||
ContentHandlerService::~ContentHandlerService()
|
||||
{
|
||||
|
|
@ -127,7 +131,7 @@ NS_IMETHODIMP ContentHandlerService::FillHandlerInfo(nsIHandlerInfo *aHandlerInf
|
|||
HandlerInfo info;
|
||||
nsIHandlerInfoToHandlerInfo(aHandlerInfo, &info);
|
||||
mHandlerServiceChild->SendFillHandlerInfo(info, nsCString(aOverrideType), &info);
|
||||
CopyHanderInfoTonsIHandlerInfo(info, aHandlerInfo);
|
||||
CopyHandlerInfoTonsIHandlerInfo(info, aHandlerInfo);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue