Closed
Bug 1226887
Opened 9 years ago
Closed 9 years ago
No tooltips for allocation sites
Categories
(DevTools :: Memory, defect, P3)
DevTools
Memory
Tracking
(firefox47 fixed)
RESOLVED
FIXED
Firefox 47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: jsantell, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: [polish-backlog][difficulty=easy])
Attachments
(2 files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
In the profiler, when mousing over a location, the tooltip contains the function name as well as the full path to the source, as we only display the function name, filename and host. Right now, the `frame` component sets a `title` attr on the debugger link, but this isn't working.
STR:
* Turn on allocations and take a snapshot
* view by allocation site breakdown
* hover over one of the links to the debugger
ER: Should display a tooltip with full filename
AR: No tooltip.
Reporter | ||
Updated•9 years ago
|
Has STR: --- → yes
Reporter | ||
Updated•9 years ago
|
Whiteboard: [polish-backlog][difficulty=easy]
Reporter | ||
Updated•9 years ago
|
Blocks: memory-frontend
Comment 1•9 years ago
|
||
memory.xhtml is the only xhtml file used in definitions.js. Other tooltips from .xhtml files work because the embedding iframe has |tooltip="aHTMLTooltip"|, e.g. bug 1237556.
Reporter | ||
Comment 2•9 years ago
|
||
The iframes the tools live in also have the tooltip=aHTMLTooltip attribute, but the elements with a `title` attribute still don't display, hmm
Updated•9 years ago
|
Priority: -- → P3
Comment 3•9 years ago
|
||
Neil, :ntim tells me you may understand why `title="foo bar baz"` tooltips may or may not be showing up in different windows/iframes. Any idea what might be going on here, or why the `tooltip="aHTMLTooltip"` thing did not work for us in this case?
Thanks!
Flags: needinfo?(enndeakin)
Comment 4•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] from comment #3)
> Neil, :ntim tells me you may understand why `title="foo bar baz"` tooltips
> may or may not be showing up in different windows/iframes. Any idea what
> might be going on here, or why the `tooltip="aHTMLTooltip"` thing did not
> work for us in this case?
Could this be bug 248862?
Assignee | ||
Comment 5•9 years ago
|
||
Using tooltip=aHTMLTooltip simply means we should rely on the XUL tooltip with id "aHTMLTooltip".
This XUL tooltip is either declared in a XUL file, or created dynamically (see https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/sidebar.js#256 for instance).
When loading the memory profiler, no <tooltip id="aHTMLTooltip"> is created/available, therefore no tooltip is displayed. For the sake of testing, adding a hardcoded <tooltip id="aHTMLTooltip"> to toolbox.xul will enable tooltips in the memory profiler.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•9 years ago
|
||
@bgrins : flagged you for review as you have the highest "score" on toolbox.xul edits.
Bug 1226887 - add aHTMLTooltip in toolbox.xul;r=bgrins
In order for tooltips to work in XHTML documents embedded in XUL documents,
the parent XUL document needs to have a <tooltip> element which can be
used to display the title.
In the devtools, a tooltip element with id "aHTMLTooltip" is usually created
for this. For the memory profiler, the embedding XUL document is toolbox.xul.
This commit adds a tooltip element with id aHTMLTooltip.
try : https://treeherder.mozilla.org/#/jobs?repo=try&revision=c775de590373
Attachment #8711472 -
Flags: review?(bgrinstead)
Comment 7•9 years ago
|
||
Comment on attachment 8711472 [details] [diff] [review]
bug1226887.v1.patch
Review of attachment 8711472 [details] [diff] [review]:
-----------------------------------------------------------------
OK, this fixes the problem for me. Good find! I notice we also have a <tooltip id="aHTMLTooltip" page="true"/> in webconsole.xul. I couldn't figure out why at first but it looks like that's needed to get the title attribute to work on XHTML elements inside of the xul doc
Attachment #8711472 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Thanks for the review !
> I couldn't figure out why at first but it looks like that's needed to get the title attribute
> to work on XHTML elements inside of the xul doc
From what I tested, you need to have the XUL tooltip element in the parent of the XHTML document. That's why having a <tooltip> in toolbox.xul is not enough to ensure we will always have tooltips everywhere : it only works for XHTML documents that are directly embedded in toolbox.xul.
FWIW, we also create <tooltip> elements dynamically in sidebar.js, for similar reasons.
Assignee | ||
Comment 9•9 years ago
|
||
Keywords: checkin-needed
Comment 10•9 years ago
|
||
Generally, for displaying tooltips in web pages, you need:
<browser src="..." tooltip="someTooltip"/>
<tooltip id="someTooltip" page="true"/>
The tooltip attribute on the browser indicates that this element wants the mouseover/mousemove event handling that causes the tooltip with that id to appear. It doesn't have to be browser; any element with a tooltip attribute will work, but it naturally will only handle tooltips on children of that element.
The page attribute on the tooltip indicates that you want the analysis done to find and fill in the text of the tooltip from the node the mouse is over. This will handle titles from html/xhtml/svg. Without the page attribute, the tooltip displays whatever you put as children of the tooltip node instead.
Flags: needinfo?(enndeakin)
Comment 11•9 years ago
|
||
Keywords: checkin-needed
Comment 12•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•