Closed
Bug 993190
Opened 11 years ago
Closed 11 years ago
Remote inspector makes page content disappear
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox28 unaffected, firefox29+ fixed, firefox30+ verified, firefox31 verified, fennec29+)
RESOLVED
FIXED
Firefox 31
People
(Reporter: Margaret, Assigned: pbro)
References
(Blocks 1 open bug)
Details
(Keywords: regression, verifyme)
Attachments
(2 files, 1 obsolete file)
1.35 KB,
patch
|
pbro
:
review+
|
Details | Diff | Splinter Review |
1.35 KB,
patch
|
pbro
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I'm trying to debug about:addons on Fennec, and I found that all the way up to beta the page content will disappear as soon as I try to use the remote inspector.
I also found that this is a problem on regular websites.
I'm using desktop Nightly, but I feel like the issue must be on the Fennec side, since this isn't a problem if I try using Fennec release.
Reporter | ||
Comment 1•11 years ago
|
||
I'm going to move this over to Firefox for Android, because I feel like this might be some sort of gfx/layout issue on our end.
To clarify, the DOM does not go away, and the inspector still appears to work on desktop, but the page itself goes white, with some flashing of text or black boxes at times.
Component: Developer Tools: Inspector → Graphics, Panning and Zooming
Product: Firefox → Firefox for Android
Reporter | ||
Updated•11 years ago
|
tracking-fennec: --- → ?
Reporter | ||
Updated•11 years ago
|
Keywords: regression,
regressionwindow-wanted
Updated•11 years ago
|
tracking-firefox30:
--- → +
This was a tricky one to bisect because you need to have at least 2 tabs open before the issue will reproduce.
Last good revision: b02827c3d07d
First bad revision: 5fc335a9b782
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=b02827c3d07d&tochange=5fc335a9b782
There are still many changes in that list, but this one seems highly suspect:
c3145720f680 Patrick Brosset — Bug 916443 - part 2 - Toolbox level remote highlighter (tests), r=paul
bc5a874afdf7 Patrick Brosset — Bug 916443 - part 1 - Toolbox level remote highlighter [Australis], r=paul
Blocks: 916443
Keywords: regressionwindow-wanted
Component: Graphics, Panning and Zooming → Developer Tools: Inspector
Product: Firefox for Android → Firefox
Version: Trunk → 29 Branch
Assignee | ||
Comment 3•11 years ago
|
||
So when Bug 916443 landed, the remote highlighter definitely used to work on Fennec.
Right not, it somehow completely covers the page.
As Margaret said, the DOM is still here and the devtools do work (you can for instance change styles, etc...), the only thing is that the highlighter seems to be creating a 100% width/height white element on top of the content so you don't see anything.
What you do see though while moving the mouse over elements in the inspector is the element identifier <element#id.class> that we normally display in the highlighter node info-bar.
This node info-bar normally only exists for desktop targets. Indeed we really have 2 highlighters, one simple (just a red dashed outline) that we use for fxos and fennec because those two do not offer a parent browser node we can use to append a more complex highlighter. And one more complex one, based on XUL (and SVG today) which displays boxes on top of the element, and a node info-bar.
This problem definitely doesn't occur with Firefox 28 (before we moved to the remote highlighter), so Bug 916443 did start this, but again this used to work right when it landed.
Here is the test we run to use the simple or complex highlighter:
/**
* Can the host support the box model highlighter which requires a parent
* XUL node to attach itself.
*/
_supportsBoxModelHighlighter: function() {
return this._tabActor.browser && !!this._tabActor.browser.parentNode;
},
Did Fennec recently change in a way that this would now return true?
For info, this._tabActor.browser here is one item of the gBrowser.browsers array.
If this now returns true on Fennec, it's good in a way because it means we might be able to use the nicer box-model highlighter we have on desktop, but seeing that the page is covered by a 100% width/height white element probably means that the highlighter CSS is missing completely.
Being able to see the logs from the phone would help. How can I do that?
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #3)
> Here is the test we run to use the simple or complex highlighter:
>
> /**
> * Can the host support the box model highlighter which requires a parent
> * XUL node to attach itself.
> */
> _supportsBoxModelHighlighter: function() {
> return this._tabActor.browser && !!this._tabActor.browser.parentNode;
> },
>
> Did Fennec recently change in a way that this would now return true?
> For info, this._tabActor.browser here is one item of the gBrowser.browsers
> array.
I'm confused about how this would have ever returned false... the browser elements that we display in tabs are all children of a XUL deck, and it's been that way since our native fennec rewrite (so, years).
> If this now returns true on Fennec, it's good in a way because it means we
> might be able to use the nicer box-model highlighter we have on desktop, but
> seeing that the page is covered by a 100% width/height white element
> probably means that the highlighter CSS is missing completely.
This could be interesting to explore, although I don't know that it would work because we have special logic for drawing the content of our XUL browser elements, and our main XUL window is more of a container that we can hook into, rather than a thing that is drawn to the screen.
> Being able to see the logs from the phone would help. How can I do that?
You should be able to use the remote debugger to see browser console output (if you attach to "Main Process"). You can also use adb logcat to get all of the logging from the phone.
Updated•11 years ago
|
tracking-fennec: ? → 29+
Updated•11 years ago
|
Assignee: nobody → pbrosset
Assignee | ||
Comment 5•11 years ago
|
||
So if you debug the main process, then the expected red outline is used for the highlighter.
The problem only occurs if you debug a tab and, as Margaret said, since the tab browser is a children of the XUL deck, the highlighter uses the newer box-model structure, which doesn't work very well.
On about:addons it covers the whole page, while on other pages it's just not visible at all.
I need a way to detect, from the devtools server-side code, whether the host is Fennec or not, and use this to always use the outline highlighter.
Assignee | ||
Comment 6•11 years ago
|
||
Margaret, so far the only way I found how to detect the app type is by checking the type of browser.parentNode which, on Fennec, is a <deck> and on Desktop is a <stack>. Do you know of any other way I could detect this?
The other thing is, I've never built Fennec locally and deployed to a device. Is there a quick way I could test this fix?
Something like this would work I guess:
_supportsBoxModelHighlighter: function() {
// Note that <browser>s on Fennec also have a XUL parentNode, and there's no
// way to detect we're on Desktop rather than Fennec other than checking if
// the parentNode is a <stack>
return this._tabActor.browser &&
!!this._tabActor.browser.parentNode &&
this._tabActor.browser.parentNode.tagName === "STACK";
},
Flags: needinfo?(margaret.leibovic)
Assignee | ||
Comment 7•11 years ago
|
||
Or rather something like ...parentNode.localName === "stack"
Assignee | ||
Comment 8•11 years ago
|
||
Perhaps importing Utils.jsm and using the MozBuildApp would be better.
Comment 9•11 years ago
|
||
How about Services.appInfo.name?
http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/device.js#85
Reporter | ||
Comment 10•11 years ago
|
||
(In reply to Panos Astithas [:past] from comment #9)
> How about Services.appInfo.name?
>
> http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/
> device.js#85
I like this idea, since this feels like a less fragile way to check the app than inspecting the XUL DOM. I just tested, and desktop returns "Firefox", whereas Android returns "Fennec" (I double-checked on nightly and release to make sure this wasn't affected by branding).
Building fennec locally isn't too hard, you basically just need to download some Android/Java dependencies and swap in a different mozconfig (you can have separate object directories, which is handy for building desktop/mobile in the same directory):
https://wiki.mozilla.org/Mobile/Fennec/Android
But I can also just test a patch for you myself, since setting up a build environment is probably too much work for this one bug :)
Flags: needinfo?(margaret.leibovic)
Assignee | ||
Comment 11•11 years ago
|
||
Thanks Panos, that does seem like the best solution.
Margaret, since you mention it :) it would really be super useful if you could try this patch on Fennec.
Attachment #8405425 -
Flags: feedback?(margaret.leibovic)
Reporter | ||
Comment 12•11 years ago
|
||
Comment on attachment 8405425 [details] [diff] [review]
bug993190-remote-highlighter-fennec v1.patch
Yay, that works!
Attachment #8405425 -
Flags: feedback?(margaret.leibovic) → feedback+
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 8405425 [details] [diff] [review]
bug993190-remote-highlighter-fennec v1.patch
Thanks for testing Margaret!
Mike, a quick review on that one?
Attachment #8405425 -
Flags: review?(mratcliffe)
Comment 14•11 years ago
|
||
Comment on attachment 8405425 [details] [diff] [review]
bug993190-remote-highlighter-fennec v1.patch
Minor drive-by. Could we use:
Services.appinfo.ID !== "{a23983c0-fd0e-11dc-95ff-0800200c9a66}";
?
We use similar code in devtools for b2g:
http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webapps.js#754
http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webapps.js#845
Blocks: dbg-fennec
Comment 15•11 years ago
|
||
To make sure this goes in 29, it would be nice to have an uplift done today (Monday) before the 29 gtb (around 12 PDT)
Updated•11 years ago
|
Attachment #8405425 -
Flags: review?(mratcliffe) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 8405425 [details] [diff] [review]
bug993190-remote-highlighter-fennec v1.patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 916443
User impact if declined: If users want to inspect web pages remotely on fennec with the devtools, the highlighter won't be visible at all. If users want to inspect the "about:addons" page remotely on fennec with the devtools, the page will be blank.
Testing completed (on m-c, etc.): Testing completed on the device directly, by Margaret.
Risk to taking this patch (and alternatives if risky): The risk is very limited. The line that changed is an extra condition in the list of conditions we use to decide whether the device/browser supports the new highlighter or not.
String or IDL/UUID changes made by this patch: None
Attachment #8405425 -
Flags: approval-mozilla-aurora?
Comment 17•11 years ago
|
||
Patrick, maybe this is coming but you haven't requested an uplift to beta, is that expected?
Flags: needinfo?(pbrosset)
Assignee | ||
Comment 18•11 years ago
|
||
Comment on attachment 8405425 [details] [diff] [review]
bug993190-remote-highlighter-fennec v1.patch
[Approval Request Comment]
Exact same approval request comment as for aurora. This code hasn't changed between beta and aurora anyway.
Attachment #8405425 -
Flags: approval-mozilla-beta?
Flags: needinfo?(pbrosset)
Updated•11 years ago
|
Attachment #8405425 -
Flags: approval-mozilla-beta?
Attachment #8405425 -
Flags: approval-mozilla-beta+
Attachment #8405425 -
Flags: approval-mozilla-aurora?
Attachment #8405425 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 19•11 years ago
|
||
I missed mfinkle's comment, I will update the patch to rely on the ID instead.
Keywords: checkin-needed
Assignee | ||
Comment 20•11 years ago
|
||
Just changed the condition from using the "fennec" app name to the actual "mobile/xul" ID, to be more future-proof.
[Approval Request Comment]
Requesting approval to Aurora/Beta again, knowing that the comment is the same as when I requested approval earlier today.
Attachment #8405425 -
Attachment is obsolete: true
Attachment #8406109 -
Flags: review+
Attachment #8406109 -
Flags: approval-mozilla-beta?
Attachment #8406109 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #8405425 -
Flags: approval-mozilla-beta-
Attachment #8405425 -
Flags: approval-mozilla-beta+
Attachment #8405425 -
Flags: approval-mozilla-aurora-
Attachment #8405425 -
Flags: approval-mozilla-aurora+
Updated•11 years ago
|
Attachment #8406109 -
Flags: approval-mozilla-beta?
Attachment #8406109 -
Flags: approval-mozilla-beta+
Attachment #8406109 -
Flags: approval-mozilla-aurora?
Attachment #8406109 -
Flags: approval-mozilla-aurora+
Comment 21•11 years ago
|
||
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #20)
> Just changed the condition from using the "fennec" app name to the actual
> "mobile/xul" ID, to be more future-proof.
Wait, mfinkle did you actually mean to suggest {aa3c5121-dab2-40e2-81ca-7ea25febc110} instead?
Reporter | ||
Comment 22•11 years ago
|
||
(In reply to Panos Astithas [:past] from comment #21)
> (In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #20)
> > Just changed the condition from using the "fennec" app name to the actual
> > "mobile/xul" ID, to be more future-proof.
>
> Wait, mfinkle did you actually mean to suggest
> {aa3c5121-dab2-40e2-81ca-7ea25febc110} instead?
I think he did. On Fennec, Services.appinfo.ID returns "{aa3c5121-dab2-40e2-81ca-7ea25febc110}".
Reporter | ||
Comment 23•11 years ago
|
||
We should update the patch here to use the correct app ID and get it landed. Firefox 29 is getting close to release :)
Flags: needinfo?(pbrosset)
Comment 24•11 years ago
|
||
(In reply to :Margaret Leibovic from comment #22)
> (In reply to Panos Astithas [:past] from comment #21)
> > (In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #20)
> > > Just changed the condition from using the "fennec" app name to the actual
> > > "mobile/xul" ID, to be more future-proof.
> >
> > Wait, mfinkle did you actually mean to suggest
> > {aa3c5121-dab2-40e2-81ca-7ea25febc110} instead?
>
> I think he did. On Fennec, Services.appinfo.ID returns
> "{aa3c5121-dab2-40e2-81ca-7ea25febc110}".
Thanks for catching this. Copy/Paste strikes again.
Assignee | ||
Comment 25•11 years ago
|
||
Sorry about the delay, here is a new patch with the correct appID for Fennec.
Request aurora/beta uplift approval for this patch too! Sorry, didn't realize the appID was the wrong one. Approval request comment is the same as the original one.
Attachment #8407359 -
Flags: review+
Attachment #8407359 -
Flags: approval-mozilla-beta?
Attachment #8407359 -
Flags: approval-mozilla-aurora?
Flags: needinfo?(pbrosset)
Assignee | ||
Updated•11 years ago
|
Attachment #8406109 -
Flags: approval-mozilla-beta+
Attachment #8406109 -
Flags: approval-mozilla-aurora+
Comment 26•11 years ago
|
||
Comment on attachment 8407359 [details] [diff] [review]
bug993190-remote-highlighter-fennec v3.patch
Approving because if the feature can be unusable and because the patch is minor and should be indeed low risk.
Attachment #8407359 -
Flags: approval-mozilla-beta?
Attachment #8407359 -
Flags: approval-mozilla-beta+
Attachment #8407359 -
Flags: approval-mozilla-aurora?
Attachment #8407359 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 27•11 years ago
|
||
Fixed in fx-team: https://hg.mozilla.org/integration/fx-team/rev/8e92a7640d74
Whiteboard: [fixed-in-fx-team]
Comment 28•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Comment 29•11 years ago
|
||
Updated•10 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•