Skip to content

Keep find-result scrolling inside the PDF viewer - #22043

Open
minwookshin wants to merge 1 commit into
mozilla:masterfrom
minwookshin:fix/find-scroll-container
Open

minwookshin wants to merge 1 commit into
mozilla:masterfrom
minwookshin:fix/find-scroll-container

Conversation

@minwookshin

Copy link
Copy Markdown

Fixes #22009.

Keep search-result scrolling inside the viewer container so an embedded viewer does not move its parent page. Use transformed client rectangles to preserve the rotated-text behavior and existing scroll margin, with the native fallback retained for controllers without a viewer.

Added an iframe regression that navigates three matches and checks both match visibility and the parent scroll position. It fails before the fix (parent scroll moves from 600 to 832).

Validation:

  • All 6 find integration specs pass in Chrome 154 and Firefox Nightly 159, including the existing rotation, small-viewport, XFA, and highlight-all cases.
  • All 38 pdf_find_controller unit specs pass.
  • Generic and legacy builds, changed-file ESLint, and formatting pass.

@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.36%. Comparing base (18e8a26) to head (970027f).
⚠️ Report is 75 commits behind head on master.

Files with missing lines Patch % Lines
web/pdf_find_controller.js 75.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #22043   +/-   ##
=======================================
  Coverage   90.35%   90.36%           
=======================================
  Files         269      269           
  Lines       67205    67212    +7     
=======================================
+ Hits        60723    60736   +13     
+ Misses       6482     6476    -6     
Flag Coverage Δ
browsertest 66.16% <0.00%> (-0.01%) ⬇️
integrationtest 69.41% <75.00%> (+0.01%) ⬆️
unittest 59.49% <0.00%> (-0.01%) ⬇️
unittestcli 58.02% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: When using the pdf search feature in an Iframe, it makes the whole window scroll

3 participants