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

Issue 2055953002: Make the PDF plug-in accessible. (Closed)

Created:
4 years, 6 months ago by dmazzoni
Modified:
4 years, 5 months ago
CC:
aboxhall+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, je_julie, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@pdf_3_generate_ax_id
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make the PDF plug-in accessible. Makes the PDF plug-in accessible on all supported platforms by building an accessibility tree for the PDF content and grafting it on as a subtree of the accessibility tree for the embedding page. It exposes all of the text of the PDF, including full support for computing the bounding box of any arbitrary text range. Using heuristics, automatically groups the text runs into paragraphs and marks some of them as headings if their font size is larger than the average for the page. I wrote a browser test for this, to be reviewed in a follow-up changelist. Currently the coordinates don't update if the user zooms. I want to fix that by using a transformation matrix after this change lands - http://crrev.com/2047873002 - but scrolling works fine. Future work might include incremental loading and support for links and maybe even fill-in forms. Depends on: http://crrev.com/1953053002 http://crrev.com/2058453002 http://crrev.com/2050973003 http://crrev.com/2055903002 BUG=54724 Committed: https://crrev.com/8e6fe4d789f430554f47df5085fa04a6808221c7 Cr-Commit-Position: refs/heads/master@{#402122}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Add changes to content/common to this patch #

Total comments: 10

Patch Set 4 : Address feedback from raymes #

Patch Set 5 : Fix compile error in test #

Total comments: 10

Patch Set 6 : Add missing file #

Total comments: 2

Patch Set 7 : Address feedback from dtseng #

Patch Set 8 : Don't create new accessibility tree each time #

Patch Set 9 : Don't want to skip the Unserialize call with DCHECK #

Total comments: 10

Patch Set 10 : Address more feedback #

Patch Set 11 : Update name of disabled Android test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+678 lines, -1213 lines) Patch
M build/android/pylib/gtest/filter/content_browsertests_disabled View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M components/pdf.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/pdf/renderer/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/pdf/renderer/DEPS View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/pdf/renderer/OWNERS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A components/pdf/renderer/pdf_accessibility_tree.h View 1 2 3 4 5 6 7 8 9 1 chunk +90 lines, -0 lines 0 comments Download
A components/pdf/renderer/pdf_accessibility_tree.cc View 1 2 3 4 5 6 7 8 9 1 chunk +309 lines, -0 lines 0 comments Download
M components/pdf/renderer/pepper_pdf_host.h View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M components/pdf/renderer/pepper_pdf_host.cc View 1 2 3 4 5 6 7 3 chunks +29 lines, -0 lines 0 comments Download
M components/pdf_strings.grdp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/ax_content_node_data.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/ax_content_node_data.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/renderer/pepper_plugin_instance.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A content/public/renderer/render_accessibility.h View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
M content/public/renderer/render_frame.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + content/renderer/accessibility/render_accessibility_impl.h View 1 2 3 8 chunks +24 lines, -8 lines 0 comments Download
A + content/renderer/accessibility/render_accessibility_impl.cc View 1 2 3 24 chunks +95 lines, -29 lines 0 comments Download
A + content/renderer/accessibility/render_accessibility_impl_browsertest.cc View 1 2 3 11 chunks +26 lines, -26 lines 0 comments Download
D content/renderer/accessibility/renderer_accessibility.h View 1 2 3 1 chunk +0 lines, -161 lines 0 comments Download
D content/renderer/accessibility/renderer_accessibility.cc View 1 2 3 1 chunk +0 lines, -615 lines 0 comments Download
D content/renderer/accessibility/renderer_accessibility_browsertest.cc View 1 2 3 1 chunk +0 lines, -342 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 6 chunks +8 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 7 chunks +18 lines, -14 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 31 (10 generated)
dmazzoni
4 years, 6 months ago (2016-06-09 20:48:55 UTC) #2
raymes
A few suggestions, thanks :) https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc File content/renderer/pepper/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc#newcode14 content/renderer/pepper/pdf_accessibility_tree.cc:14: PdfAccessibilityTree::PdfAccessibilityTree( It may be ...
4 years, 6 months ago (2016-06-14 03:54:27 UTC) #3
raymes
https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc File content/renderer/pepper/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc#newcode57 content/renderer/pepper/pdf_accessibility_tree.cc:57: // content/renderer or should it be in components/pdf? +1 ...
4 years, 6 months ago (2016-06-14 03:56:48 UTC) #4
dmazzoni
Moved to components/pdf/renderer and ready for another look! https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc File content/renderer/pepper/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/40001/content/renderer/pepper/pdf_accessibility_tree.cc#newcode14 content/renderer/pepper/pdf_accessibility_tree.cc:14: PdfAccessibilityTree::PdfAccessibilityTree( ...
4 years, 6 months ago (2016-06-20 23:55:51 UTC) #5
David Tseng
https://codereview.chromium.org/2055953002/diff/80001/components/pdf/renderer/pdf_accessibility_tree.cc File components/pdf/renderer/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/80001/components/pdf/renderer/pdf_accessibility_tree.cc#newcode64 components/pdf/renderer/pdf_accessibility_tree.cc:64: // TODO: use a localized string. Should this file ...
4 years, 6 months ago (2016-06-21 16:21:25 UTC) #6
Lei Zhang
https://codereview.chromium.org/2055953002/diff/100001/components/pdf/renderer/pepper_pdf_host.cc File components/pdf/renderer/pepper_pdf_host.cc (right): https://codereview.chromium.org/2055953002/diff/100001/components/pdf/renderer/pepper_pdf_host.cc#newcode238 components/pdf/renderer/pepper_pdf_host.cc:238: pdf_accessibility_tree_.reset( Are we going to create a new PdfAccessibilityTree ...
4 years, 6 months ago (2016-06-21 17:09:17 UTC) #7
dmazzoni
https://codereview.chromium.org/2055953002/diff/80001/components/pdf/renderer/pdf_accessibility_tree.cc File components/pdf/renderer/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/80001/components/pdf/renderer/pdf_accessibility_tree.cc#newcode64 components/pdf/renderer/pdf_accessibility_tree.cc:64: // TODO: use a localized string. Should this file ...
4 years, 6 months ago (2016-06-21 17:17:36 UTC) #8
raymes
components/pdf lgtm (modulo content/renderer/pepper/pdf_accessibility_tree.*) content/renderer/pepper lgtm Could you also please add yourself as a per-file ...
4 years, 6 months ago (2016-06-22 00:02:03 UTC) #9
raymes
On 2016/06/22 00:02:03, raymes wrote: > components/pdf lgtm (modulo content/renderer/pepper/pdf_accessibility_tree.*) > content/renderer/pepper lgtm > > ...
4 years, 6 months ago (2016-06-22 00:02:47 UTC) #10
Lei Zhang
https://codereview.chromium.org/2055953002/diff/160001/components/pdf/renderer/pdf_accessibility_tree.cc File components/pdf/renderer/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/160001/components/pdf/renderer/pdf_accessibility_tree.cc#newcode59 components/pdf/renderer/pdf_accessibility_tree.cc:59: CHECK(zoom_ > 0); Are these CHECKs going to stay ...
4 years, 6 months ago (2016-06-22 00:12:57 UTC) #11
dmazzoni
https://codereview.chromium.org/2055953002/diff/160001/components/pdf/renderer/pdf_accessibility_tree.cc File components/pdf/renderer/pdf_accessibility_tree.cc (right): https://codereview.chromium.org/2055953002/diff/160001/components/pdf/renderer/pdf_accessibility_tree.cc#newcode59 components/pdf/renderer/pdf_accessibility_tree.cc:59: CHECK(zoom_ > 0); On 2016/06/22 00:12:56, Lei Zhang (Slow) ...
4 years, 6 months ago (2016-06-22 05:47:32 UTC) #12
dmazzoni
+jochen for owners review
4 years, 6 months ago (2016-06-22 05:49:19 UTC) #14
jochen (gone - plz use gerrit)
which part exactly do you want me to review?
4 years, 6 months ago (2016-06-22 13:18:43 UTC) #15
dmazzoni
@jochen Sorry, I should have specified! I need an owners review of these files: content/common/* ...
4 years, 6 months ago (2016-06-22 16:01:30 UTC) #16
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-24 13:37:47 UTC) #17
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/2055953002/180001
4 years, 6 months ago (2016-06-24 18:39:52 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/93525)
4 years, 6 months ago (2016-06-24 20:00:46 UTC) #22
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/2055953002/180001
4 years, 5 months ago (2016-06-26 20:59:01 UTC) #24
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/2055953002/200001
4 years, 5 months ago (2016-06-27 05:22:31 UTC) #28
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 5 months ago (2016-06-27 06:35:57 UTC) #29
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 06:38:43 UTC) #31
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/8e6fe4d789f430554f47df5085fa04a6808221c7
Cr-Commit-Position: refs/heads/master@{#402122}

Powered by Google App Engine
This is Rietveld 408576698