Closed
Bug 1281493
Opened 8 years ago
Closed 8 years ago
Identity popup sometimes doesn't display EV/DV site identity above "Secure connection" label
Categories
(Firefox :: Address Bar, defect, P1)
Tracking
()
People
(Reporter: Gijs, Assigned: jkt)
Details
(Whiteboard: [fxprivacy] )
Attachments
(3 files)
Seen on 48b1. I'm not sure what's triggering this yet - it works fine in a new window. It feels like it broke due to something or other, and now is permanently broken. Or something. :-\
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
status-firefox48:
--- → affected
status-firefox49:
--- → ?
status-firefox50:
--- → ?
Keywords: steps-wanted
Version: 45 Branch → 48 Branch
Reporter | ||
Comment 2•8 years ago
|
||
STR: 1. open Firefox 2. open the browser toolbox (don't open the identity popup before this) 3. search for the #identity-popup in the inspector 4. expand its kids/grandkids until you can see both the mainview and the security subview. 5. open the identity popup in the browser by clicking the identity block I assume that the expansion of the tree under the element triggers XBL binding somehow. Obviously I didn't follow these exact steps when I first ran into this problem, but it's pretty plausible that I used the browser toolbox at some point in the uptime of the window where I first saw this, without ever having opened the identity popup (which I do almost never). Per discussion on IRC, the problem seems to be that after the binding has been instantiated, the querySelectorAll call in the getter for the host/hostless labels finds only 1 of the 2 items, namely the one in the security subview, and ignores the one in the main view. I expect this has to do with the panel multiview moving the children / mainview around in the <stack> in its anonymous content. Either way, I think we should avoid the code here behaving differently depending on when the panelmultiview binding for the popup gets instantiated.
Keywords: steps-wanted
Updated•8 years ago
|
Whiteboard: [fxprivacy] [triage]
Comment 3•8 years ago
|
||
I wonder if bug 1207619 could have caused this.
Comment 4•8 years ago
|
||
Hey Jonathan any idea about this? Could it be caused by bug 1207619?
Flags: needinfo?(jkt)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jkt
Flags: needinfo?(jkt)
Assignee | ||
Comment 5•8 years ago
|
||
Looks related yeah, will look into this.
Assignee | ||
Comment 6•8 years ago
|
||
So I can't seem to find what is causing this however the reason it isn't showing now is related to the bug I worked on: bug 1207619 However this looks like a side effect of something else. For example running in toolbox console this selector should return two results: document.querySelectorAll(".identity-popup-headline.host") Instead it only shows the more details section which hasn't been expanded. This seems to be similar to an inspecting issue I have had where using the inspector and highlighting the heading sometimes crashed out the inspector elements requiring me to manually expand them until it would step through and select it with the pointer. Gijs has the heading not being shown without inspecting with developer mode at all?
Flags: needinfo?(gijskruitbosch+bugs)
Reporter | ||
Comment 7•8 years ago
|
||
(In reply to Jonathan Kingston [:jkt] from comment #6) > So I can't seem to find what is causing this however the reason it isn't > showing now is related to the bug I worked on: bug 1207619 > > However this looks like a side effect of something else. For example running > in toolbox console this selector should return two results: > document.querySelectorAll(".identity-popup-headline.host") > > Instead it only shows the more details section which hasn't been expanded. > This seems to be similar to an inspecting issue I have had where using the > inspector and highlighting the heading sometimes crashed out the inspector > elements requiring me to manually expand them until it would step through > and select it with the pointer. > > Gijs has the heading not being shown without inspecting with developer mode > at all? I think it'll happen any time the binding gets instantiated at a different time than when showing the popup and/or this may be timing-dependent when the popup is shown (depends on the order of instantiation of bindings and/or when elements are shown/hidden). Either way, it feels fragile to me. As you noted, the qSA call always returns only 1 element instead of 2. This likely has to do with how the panelUI binding moves <panelview> items around when it's instantiated, ie https://dxr.mozilla.org/mozilla-central/source/browser/components/customizableui/content/panelUI.xml#147-149 . I bet that manually checking both the main view and the subview container when querying for all applicable elements would fix this. We should do that for both the .host and the .hostless ones.
Flags: needinfo?(gijskruitbosch+bugs)
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: [fxprivacy] [triage] → [fxprivacy]
Assignee | ||
Comment 8•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/60844/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/60844/
Assignee | ||
Comment 9•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dcb36a1a829d
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8765495 [details] Bug 1281493 - Moving element shuffle to when the popup is showing which prevents inspector XBL binding from breaking identity-popup. Removing surplus identity-popup-security-content selector. So this looks like it solves the issue, I triggered a try here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=dcb36a1a829d Let me know if you think this change will cause any issues. Took a fair amount of learning how all the stack of elements relate to each other. Thanks for the pointers.
Attachment #8765495 -
Flags: review?(gijskruitbosch+bugs)
Reporter | ||
Updated•8 years ago
|
Attachment #8765495 -
Flags: review?(gijskruitbosch+bugs) → review-
Reporter | ||
Comment 11•8 years ago
|
||
Comment on attachment 8765495 [details] Bug 1281493 - Moving element shuffle to when the popup is showing which prevents inspector XBL binding from breaking identity-popup. Removing surplus identity-popup-security-content selector. https://reviewboard.mozilla.org/r/60844/#review57832 I'm not convinced this is right, especially because try is also very unhappy, as far as I can tell. ::: browser/components/customizableui/content/panelUI.xml (Diff revision 1) > - if (this._mainView) { > - this.setMainView(this._mainView); > - } Moving this is pretty scary and also affects the main (hamburger) menu panel, especially because we're also moving it after syncContainerWithMainView, which seems wrong... Why did you go for this approach rather than 'just' fixing the queryselector calls to explicitly look in the two subviews (main and security) ?
Assignee | ||
Comment 12•8 years ago
|
||
No I'm not really convinced either, however some of the tests that broke initially worked on my computer others looked like timing issues which may relate to syncContainerWithMainView etc. I tried going for that and it didn't seem to work, will try a few more selectors.
Reporter | ||
Comment 13•8 years ago
|
||
(In reply to Jonathan Kingston [:jkt] from comment #12) > No I'm not really convinced either, however some of the tests that broke > initially worked on my computer others looked like timing issues which may > relate to syncContainerWithMainView etc. > > I tried going for that and it didn't seem to work, will try a few more > selectors. The selector is fine - it's the thing you're calling it on. You should be able to get a reference to the mainview container and its kid from the XBL binding of the panelmultiview, ditto for the subviews container.
Assignee | ||
Comment 14•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4eda133f10c8
Assignee | ||
Comment 15•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f0cf3ac79a21
Assignee | ||
Comment 16•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61034/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/61034/
Assignee | ||
Comment 17•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. This is the one based on the selector method, thanks for the pointers. This works and neatens up the selectors etc.
Attachment #8765890 -
Flags: review?(gijskruitbosch+bugs)
Reporter | ||
Comment 18•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. https://reviewboard.mozilla.org/r/61034/#review57844 Nice, thanks! ::: browser/base/content/browser.js:6597 (Diff revision 1) > + return document.getElementById("identity-popup-multiView"); > + }, > get _identityPopupContentHosts () { > delete this._identityPopupContentHosts; > - return this._identityPopupContentHosts = [...document.querySelectorAll(".identity-popup-headline.host")]; > + let selector = ".identity-popup-headline.host"; > + return this._identityPopupContentHosts = [...this._identityPopupMultiView._mainView.querySelectorAll(selector), ...document.querySelectorAll(selector)]; Nit: here and below, can you reformat as: <stuff> = [ ... <expr1>, ... <expr2>, ]; ?
Attachment #8765890 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 19•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61034/diff/1-2/
Attachment #8765890 -
Flags: review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 20•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5c84f0e3feb5
Assignee | ||
Comment 21•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61034/diff/2-3/
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 22•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. A typo busted the tests, however this now passes those. Sorry about that. Can I get a review just to double check? Thanks!
Attachment #8765890 -
Flags: review?(gijskruitbosch+bugs)
Reporter | ||
Comment 23•8 years ago
|
||
Comment on attachment 8765890 [details] Bug 1281493 - Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. https://reviewboard.mozilla.org/r/61034/#review57912
Attachment #8765890 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 24•8 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/fx-team/rev/200d819719ee Add another selector for identity popup main view as XBL bindings sometimes have a race condition. Removing surplus identity-popup-security-content selector. r=gijs
Keywords: checkin-needed
Comment 25•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/200d819719ee
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Updated•8 years ago
|
Iteration: --- → 50.2 - Jul 4
Priority: P3 → P1
Updated•8 years ago
|
Flags: qe-verify?
Updated•8 years ago
|
Flags: qe-verify? → qe-verify+
Updated•8 years ago
|
QA Contact: paul.silaghi
Comment 26•8 years ago
|
||
Reproduced on FX 48b1. Verified fixed FX 50.0a2 (2016-08-02) Win 7.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•