In bug 677670 I added an anchorPosX/Y attribute to control where we anchor arrowboxes to. Unfortunately, it requires an attribute on the XUL element that is actually theme dependent (i.e. the anchor position might be different in different themes). And its an ugly ugly horrible hack. We'd like to find a better solution. There's actually a similar situation with the "offset" attribute on arrowboxes, and its caused problems when developing the honeycomb theme (where we sometimes hide the arrows, but still may or may not want the offset to be applied). One alternative idea might be to look at using transforms on the elements. If we always position the popup's so they are at the corner of the element, we can then transform them upwards a few px if we want the arrow to slightly overlap. Similarly, instead of using anchorPosX/Y, I can translate the arrow inside the arrowbox slightly.
Created attachment 562897 [details] [diff] [review] WIP This removes all uses of offset and anchorPosX and replaces them with a lot of transforms in three different themes. I'm also offsetting arrowboxes that hit the edge of the screen slightly. Seeing some small problems with the identity popup on phone themes bouncing between two "left" positions each time it is opened. And want to try and be smarter about the bookmarks popup, which can open pointing up or to the left/right depending on the theme in use. I think maybe we set a position attribute on the arrowbox to indicate where the arrow is pointing. Ideally, with that and another attribute telling us if the box is on a screen edge, we could abstract a lot of these rules...
Assignee: nobody → wjohnston
You need to log in before you can comment on or make changes to this bug.