Last Comment Bug 745982 - [AccessFu] Move BORDER_PADDING to VisualPresenter
: [AccessFu] Move BORDER_PADDING to VisualPresenter
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Eitan Isaacson [:eeejay]
: alexander :surkov
Depends on:
  Show dependency treegraph
Reported: 2012-04-16 15:36 PDT by Eitan Isaacson [:eeejay]
Modified: 2012-04-17 18:28 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Move border padding to visual presenter, oops. (1.60 KB, patch)
2012-04-16 15:37 PDT, Eitan Isaacson [:eeejay]
surkov.alexander: review+
Details | Diff | Splinter Review

Description Eitan Isaacson [:eeejay] 2012-04-16 15:36:28 PDT
I put it my mistake in the base class.
Comment 1 Eitan Isaacson [:eeejay] 2012-04-16 15:37:57 PDT
Created attachment 615503 [details] [diff] [review]
Move border padding to visual presenter, oops.
Comment 2 alexander :surkov 2012-04-17 00:08:06 PDT
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
Comment 3 Eitan Isaacson [:eeejay] 2012-04-17 09:33:24 PDT
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.
Comment 4 Eitan Isaacson [:eeejay] 2012-04-17 09:49:54 PDT
Comment 5 Ed Morley [:emorley] 2012-04-17 18:28:43 PDT

Note You need to log in before you can comment on or make changes to this bug.