Closed Bug 1356766 Opened 8 years ago Closed 8 years ago

Support HTMLTooltop when running launchpad on Chrome

Categories

(DevTools :: Netmonitor, enhancement, P1)

54 Branch
enhancement

Tracking

(firefox55 verified)

VERIFIED FIXED
Firefox 55
Iteration:
55.3 - Apr 17
Tracking Status
firefox55 --- verified

People

(Reporter: rickychien, Assigned: rickychien)

References

Details

(Whiteboard: [netmonitor])

Attachments

(2 files)

HTMLTooltip is using a getBoxQuads non-standard API to calculate relative position. We should find an alternative to support getBoxQuads when running launchpad on Chrome.
Here is an elegant solution to skip getBoxQuads() call in HTMLTooltip.js. When running in HTML document, getBoundingClientRect() will position properly and return correct top, right, bottom, left, width, height properties for us. But it doesn't work when tooltip is appended on XUL document. Thus, we can fallback to call getBoxQuads() to get the right position.
As attachment, tooltip can show properly when running on Chrome.
Comment on attachment 8858488 [details] Bug 1356766 - Support HTMLTooltop when running launchpad on Chrome https://reviewboard.mozilla.org/r/130454/#review133136 ::: devtools/client/shared/widgets/tooltip/HTMLTooltip.js:181 (Diff revision 1) > const getRelativeRect = function (node, relativeTo) { > + // In order to support launchpad, we can skip getBoxQuads when appending > + // Tooltip on HTML document. > + // getBoxQuads is a non-standard WebAPI which will not work on non-firefox > + // browser. > + if (relativeTo.documentElement.namespaceURI !== XUL_NS) { I think it makes more sense to do: if (!node.getBoundingRect)
Comment on attachment 8858488 [details] Bug 1356766 - Support HTMLTooltop when running launchpad on Chrome https://reviewboard.mozilla.org/r/130454/#review133136 > I think it makes more sense to do: > > if (!node.getBoundingRect) Nice catch!
Comment on attachment 8858488 [details] Bug 1356766 - Support HTMLTooltop when running launchpad on Chrome https://reviewboard.mozilla.org/r/130454/#review133140
Attachment #8858488 - Flags: review?(ntim.bugs) → review+
Pushed by rchien@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d8211a95992 Support HTMLTooltop when running launchpad on Chrome r=ntim
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Flags: qe-verify?
Flags: qe-verify? → qe-verify+
QA Contact: ciprian.georgiu
I can confirm that HTML tooltip is working accordingly when running launchpad ("devtools-launchpad": "=0.0.75") on Chrome. Marking this as verified fixed on 55 beta 7 (20170706155135) across platforms: Windows 10 x64, Mac OS X 10.11.5 and Ubuntu 16.04 x64.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: