[go: nahoru, domu]

PDF accessibility tweaks

1. Allows EnableAccessibility to be called at any time, and doesn't actually
   send the accessibility tree until after the document loads. (In the future
   we could send it while loading, but this is a good start.)
2. The character width wasn't accurate if there was space between
   characters in the same text run. Update it so that a character's width
   includes all of the space between this character and the start of the
   next one, because the purpose of this field is a very compact
   representation of the character bounds within a line, to enable
   visually highlighting the accessible selection.
3. Heuristic: split a text run after whitespace wider than 3 characters.
4. Heuristic: if the font size is missing or obviously bogus, use the
   pixel height of the text run, which is at least in the right ballpark.

BUG=54724

Review-Url: https://codereview.chromium.org/2050973003
Cr-Commit-Position: refs/heads/master@{#399505}
7 files changed