mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-30 03:08:38 +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
|
|
@ -511,6 +511,14 @@ HttpBaseChannel::SetContentCharset(const nsACString& aContentCharset)
|
|||
NS_IMETHODIMP
|
||||
HttpBaseChannel::GetContentDisposition(uint32_t *aContentDisposition)
|
||||
{
|
||||
// DISPOSITION_FORCE_INLINE is used to explicitly set inline, used by
|
||||
// the pdf reader when loading an attachment pdf without downloading it.
|
||||
if (mContentDispositionHint == nsIChannel::DISPOSITION_ATTACHMENT ||
|
||||
mContentDispositionHint == nsIChannel::DISPOSITION_FORCE_INLINE) {
|
||||
*aContentDisposition = mContentDispositionHint;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCString header;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue