Closed
Bug 1355760
Opened 7 years ago
Closed 7 years ago
Detect setImageElement to not run on the Chrome browser tab
Categories
(DevTools :: Netmonitor, enhancement, P1)
DevTools
Netmonitor
Tracking
(firefox55 fixed)
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: gasolin, Assigned: gasolin)
References
Details
(Whiteboard: [netmonitor])
Attachments
(1 file)
waterfall-background.js use `document.mozSetImageElement` API which is a firefox only API. We have to wrap it into `utils/set-image-element` and use webpack NormalModuleReplacementPlugin to resolve relative require path. With that way we can run the Network Monitor on an chrome browser tab.
Updated•7 years ago
|
Status: NEW → ASSIGNED
Flags: qe-verify?
Priority: -- → P1
Whiteboard: [netmonitor]
Updated•7 years ago
|
Iteration: --- → 55.3 - Apr 17
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8857411 [details] Bug 1355760 - detect setImageElement to not run on Chrome browser tab; https://reviewboard.mozilla.org/r/129400/#review132320 Thanks for doing this. I've some opinions about this APIs extraction. mozSetImageElement is a non-standart API, so it's hard to replace with an alternative starnd setImageElement when running other browsers. As a result, it's not that easy to implement a setImageElement in utils/chrome/ although it makes sense to support setImageElement in utils/firefox/. IMHO, the setImageElement API extraction would be useless in the future. And further, the best thing would be rewrite the waterfall-background.js, and create overly and then draw red / blue line on top of request list timeline. But yes, we're not going to do this in this patch, so I'd suggest using a simple fix. Adding a simple check in waterfall-background.js ``` // Write down documentation about this hack if (!document.mozSetImageElement) { document.mozSetImageElement = () => {}; } ``` btw, I remember there is a getBoxQuads() API which only work in firefox, do you need to wrap it by an empty shim like this?
Attachment #8857411 -
Flags: review?(rchien) → review-
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Summary: Add setImageElement mock to run on Chrome browser tab → Detect setImageElement to not run on the Chrome browser tab
Assignee | ||
Comment 4•7 years ago
|
||
I did not saw any `getBoxQuads` error in chrome console after applied this patch
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8857411 [details] Bug 1355760 - detect setImageElement to not run on Chrome browser tab; https://reviewboard.mozilla.org/r/129400/#review132416 ::: devtools/client/netmonitor/src/waterfall-background.js:35 (Diff revision 2) > +/** > + * Changes the element being used as the CSS background for a background > + * with a given background element ID. > + */ nit: I think we can explain this hack is about `This is a shim method which will not draw waterfall vertical line when running launchpad on non-firefox browser` or something like that.
Attachment #8857411 -
Flags: review?(rchien) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•7 years ago
|
||
add more comment and refer to bug 1308695, thanks
Keywords: checkin-needed
See Also: → 1308695
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b82af800c6da detect setImageElement to not run on Chrome browser tab;r=rickychien
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b82af800c6da
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•7 years ago
|
Flags: qe-verify? → qe-verify-
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•