Skip to content

Bugfix FXIOS-15125 ⁃ The inline PDF viewer is not working properly#33915

Open
dicarobinho wants to merge 1 commit into
mainfrom
afarcasanu/fxios_15125_32557_handling_html_pdfs
Open

Bugfix FXIOS-15125 ⁃ The inline PDF viewer is not working properly#33915
dicarobinho wants to merge 1 commit into
mainfrom
afarcasanu/fxios_15125_32557_handling_html_pdfs

Conversation

@dicarobinho
Copy link
Copy Markdown
Collaborator

📜 Tickets

Jira ticket
Github issue

💡 Description

Handling an edge case when mimeType is PDF but URL have HTML content

🎥 Demos

ScreenRecording_05-20-2026.14-52-58_1.mp4
Before After
Demo

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@dicarobinho dicarobinho marked this pull request as ready for review May 20, 2026 12:13
@dicarobinho dicarobinho requested a review from a team as a code owner May 20, 2026 12:13
@mobiletest-ci-bot
Copy link
Copy Markdown

Warnings
⚠️ Detected tab related changes in: firefox-ios/Client/Frontend/Browser/BrowserViewController/Extensions/BrowserViewController+WebViewDelegates.swift (cc @lmarceau)
Messages
📖 Project coverage: 42.29%

🧹 Tidy commit

Just 1 file(s) touched. Thanks for keeping it clean and review-friendly!

✅ New file code coverage

No new file detected so code coverage gate wasn't ran.

✅ Existing file code coverage

No modified file had significant enough changes for the coverage gate to run.

Client.app: Coverage: 40.73

File Coverage
BrowserViewController+WebViewDelegates.swift 22.32% ⚠️

Generated by 🚫 Danger Swift against c2b8fa8

if response.mimeType == MIMEType.PDF,
let request,
let url = request.url,
url.pathExtension.lowercased() == "pdf" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure this is a correct fix, cause i think there are link that don't ends with pdf. with this some websites will fail downloading the pdf.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may be true... I will check if there is a better way to make a difference between these types.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect thanks Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants