[AccessFu] Move BORDER_PADDING to VisualPresenter

RESOLVED FIXED in mozilla14

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I put it my mistake in the base class.
Attachment #615503 - Flags: review?(surkov.alexander)
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+
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: nobody → eitan
OS: Windows 2000 → All
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/4a5d25e138e2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.