[AccessFu] Move BORDER_PADDING to VisualPresenter

RESOLVED FIXED in mozilla14

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
I put it my mistake in the base class.
(Assignee)

Comment 1

5 years ago
Created attachment 615503 [details] [diff] [review]
Move border padding to visual presenter, oops.
Attachment #615503 - Flags: review?(surkov.alexander)

Comment 2

5 years ago
Comment on attachment 615503 [details] [diff] [review]
Move border padding to visual presenter, oops.

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

::: accessible/src/jsat/Presenters.jsm
@@ +93,5 @@
>  
> +/**
> + * The padding in pixels between the object and the highlight border.
> + */
> +VisualPresenter.prototype.BORDER_PADDING = 2;

I don't recall whether I said that or just though about that but keeping padding value in js is weird. It should live in CSS. I think you could get it back from element when you calculate things like:
left: Math.round((objX.value - docX.value - this.BORDER_PADDING) * aZoom),

but of course keeping it in VisualPresenter is more correct, so r=me
Attachment #615503 - Flags: review?(surkov.alexander) → review+
(Assignee)

Comment 3

5 years ago
I agree. It gets a bit tricky to get the CSS value in Javascript. Also, CSS values are expected to be handled by layout, and not programatically by us. I'll land this for now though.
(Assignee)

Comment 4

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/4a5d25e138e2
(Assignee)

Updated

5 years ago
Assignee: nobody → eitan
OS: Windows 2000 → All
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/4a5d25e138e2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.