Closed Bug 1030468 Opened 6 years ago Closed 6 years ago

[AccessFu] VC rectangle needs to work with scaled content

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: yzen, Assigned: eeejay)

Details

Attachments

(1 file)

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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.