Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 2371483002: Update PDF accessibility when zoom level changes (Closed)

Created:
4 years, 3 months ago by dmazzoni
Modified:
4 years, 2 months ago
Reviewers:
raymes, jam, aboxhall
CC:
aboxhall+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, extensions-reviews_chromium.org, jam, je_julie, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update 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/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -91 lines) Patch
M chrome/renderer/extensions/automation_internal_custom_bindings.cc View 1 3 chunks +58 lines, -40 lines 0 comments Download
M components/pdf/renderer/pdf_accessibility_tree.h View 2 chunks +5 lines, -0 lines 0 comments Download
M components/pdf/renderer/pdf_accessibility_tree.cc View 1 2 10 chunks +36 lines, -6 lines 0 comments Download
M content/public/renderer/render_accessibility.h View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.h View 1 2 3 chunks +9 lines, -8 lines 0 comments Download
M content/renderer/accessibility/render_accessibility_impl.cc View 1 2 5 chunks +32 lines, -23 lines 0 comments Download
M pdf/out_of_process_instance.h View 1 2 2 chunks +11 lines, -6 lines 0 comments Download
M pdf/out_of_process_instance.cc View 1 2 3 chunks +13 lines, -6 lines 0 comments Download

Messages

Total messages: 27 (13 generated)
dmazzoni
raymes: pdf/ aboxhall: accessibility
4 years, 2 months ago (2016-09-26 17:39:58 UTC) #4
aboxhall
lgtm for accessibility/
4 years, 2 months ago (2016-09-26 18:07:45 UTC) #5
raymes
I defer to aboxhall for components/pdf/renderer/pdf_accessibility_tree.h otherwise lgtm https://codereview.chromium.org/2371483002/diff/20001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2371483002/diff/20001/pdf/out_of_process_instance.cc#newcode612 pdf/out_of_process_instance.cc:612: void ...
4 years, 2 months ago (2016-09-27 05:05:31 UTC) #6
dmazzoni
https://codereview.chromium.org/2371483002/diff/20001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/2371483002/diff/20001/pdf/out_of_process_instance.cc#newcode612 pdf/out_of_process_instance.cc:612: void OutOfProcessInstance::LoadAccessibility() { On 2016/09/27 05:05:31, raymes wrote: > ...
4 years, 2 months ago (2016-09-27 16:19:33 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2371483002/20001
4 years, 2 months ago (2016-09-27 16:20:05 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/267743)
4 years, 2 months ago (2016-09-27 16:29:22 UTC) #11
dmazzoni
+jam for content/public
4 years, 2 months ago (2016-09-27 17:06:48 UTC) #13
jam
why does content/public have to have special casing for pdf?
4 years, 2 months ago (2016-09-27 19:20:16 UTC) #14
dmazzoni
On 2016/09/27 19:20:16, jam wrote: > why does content/public have to have special casing for ...
4 years, 2 months ago (2016-09-27 20:44:30 UTC) #15
dmazzoni
PTAL. I renamed all PDF APIs in content/renderer to plugin instead, and added a comment ...
4 years, 2 months ago (2016-09-29 19:33:02 UTC) #16
jam
lgtm
4 years, 2 months ago (2016-09-29 19:54:05 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2371483002/40001
4 years, 2 months ago (2016-09-29 20:26:35 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-09-29 20:33:37 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 20:36:07 UTC) #27
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/be7872773045455683c6125abb042ec88de15719
Cr-Commit-Position: refs/heads/master@{#421924}

Powered by Google App Engine
This is Rietveld 408576698