Closed Bug 745982 Opened 8 years ago Closed 8 years ago

[AccessFu] Move BORDER_PADDING to VisualPresenter

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

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