DescriptionUpdate PDF accessibility when zoom level changes
There are three pieces needed for this to work:
1. Encode the page scale and offset using a transformation matrix
at the root of the PDF document, rather than by taking it into
account when computing each object's bounding box. (This wasn't
possible when PDF support first landed, but it's possible now.)
2. Update the root of the PDF tree with a new matrix whenever
the zoom level changes - this required a new public interface.
3. Minor fix to the GetBoundsForRange function in automation
internal bindings - it was converting from local to global
coordinates before walking character offsets, but this doesn't
work when there's a scale factor. Switch it to adjust for
character offsets first and then convert from local to global
last, applying matrix transformations like scale factors.
Tested manually by navigating with ChromeVox or VoiceOver
to some text in the PDF, then press Ctrl+Plus/Minus to zoom,
navigate forward/back to refresh the bounding rect and confirm
that it's updated to reflect the new bounds of the text.
BUG=649850
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/be7872773045455683c6125abb042ec88de15719
Cr-Commit-Position: refs/heads/master@{#421924}
Patch Set 1 #Patch Set 2 : Cleaned up, ready for review #
Total comments: 4
Patch Set 3 : Renamed PDF -> Plugin in content/renderer/ #
Messages
Total messages: 27 (13 generated)
|