[AccessFu] VC rectangle needs to work with scaled content

RESOLVED FIXED in mozilla34

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: yzen, Assigned: eeejay)

Tracking

Trunk
mozilla34
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Currently VC rectangle does not take into account scaled content. You can see the example of it in the browser app in Gaia, when loading some classic (non-mobile) website.
Assignee: nobody → eitan
Got rid of the viewport code, instead use the content window resolution to scale the coordinates. Tested on Android to make sure it works there too.
Attachment #8474063 - Flags: review?(yzenevich)
Comment on attachment 8474063 [details] [diff] [review]
User content window resolution to scale bounding boxes before presentation.

Review of attachment 8474063 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with a couple of comments. thanks!

::: accessible/jsat/Utils.jsm
@@ +295,5 @@
>  
> +  getBounds: function getBounds(aAccessible, aPreserveContentScale) {
> +    let objX = {}, objY = {}, objW = {}, objH = {};
> +    aAccessible.getBounds(objX, objY, objW, objH);
> +    let scaleX = { value: 1 }, scaleY = { value: 1 };

Nit: line 299 should be consistent with line 317. This one is nicer, imho.

@@ +298,5 @@
> +    aAccessible.getBounds(objX, objY, objW, objH);
> +    let scaleX = { value: 1 }, scaleY = { value: 1 };
> +
> +    if (!aPreserveContentScale) {
> +      aAccessible.document.window.QueryInterface(

Nit: Lets put scale calculation into its own function?
Attachment #8474063 - Flags: review?(yzenevich) → review+
https://hg.mozilla.org/mozilla-central/rev/9b12f5f4b5cb
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.