Closed
Bug 948807
Opened 11 years ago
Closed 11 years ago
UITour: Fix highlight position and clipping when a dimension is smaller than the minimum
Categories
(Firefox :: General, defect, P1)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 29
People
(Reporter: MattN, Assigned: MattN)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
15.52 KB,
image/png
|
Details | |
4.43 KB,
patch
|
MattN
:
review+
|
Details | Diff | Splinter Review |
This fixes two problems related to the min-height/width:
A) The min-height of the html:div isn't taken into effect for the panel's instrinsic size. => Switch to <xul:box>.
** There was a reason why I didn't switch to a XUL box before but I couldn't remember or find notes on why. It seems to be working fine now.
B) When the target of a highlight is smaller than the minimum size (32x32px), the highlight won't be centered because the "overlap" position for panels anchors from the top-left which isn't right when the highlight is larger than the target. In this case, I offset the panel by half of the difference between it's minimum size and the target size (only when the highlight is smaller than the minimum).
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8345705 -
Flags: review?(bmcbride)
Comment 2•11 years ago
|
||
Comment on attachment 8345705 [details] [diff] [review]
v.1 Fix A and B
Review of attachment 8345705 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/modules/UITour.jsm
@@ +465,4 @@
> for the wobble animation */
> + let highlightStyle = aTargetEl.ownerDocument.defaultView.getComputedStyle(highlighter);
> + let offsetX = -4 - (Math.max(0, parseFloat(highlightStyle.minWidth) - targetRect.width) / 2);
> + let offsetY = -4 - (Math.max(0, parseFloat(highlightStyle.minHeight) - targetRect.height) / 2);
Nit: The -4 should be a const.
Attachment #8345705 -
Flags: review?(bmcbride) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Blair McBride [:Unfocused] from comment #2)
> Nit: The -4 should be a const.
As discussed and reviewed on IRC, I made it calculate live with getComputedStyle like the other changes.
Attachment #8345705 -
Attachment is obsolete: true
Attachment #8345723 -
Flags: review+
Assignee | ||
Comment 4•11 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
You need to log in
before you can comment on or make changes to this bug.
Description
•