mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1104927 - UITour: Add Loop conversation view target for email/copy link buttons. r=Unfocused,mixedpuppy
This commit is contained in:
parent
df3b4e7def
commit
df034e2a1e
@ -669,6 +669,12 @@
|
||||
if (event.target != otherWin.document)
|
||||
return;
|
||||
|
||||
let detachEvent = new aChatbox.contentWindow.CustomEvent("socialFrameDetached", {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
});
|
||||
aChatbox.contentDocument.dispatchEvent(detachEvent);
|
||||
|
||||
otherWin.removeEventListener("load", _chatLoad, true);
|
||||
let otherChatbox = otherWin.document.getElementById("chatter");
|
||||
aChatbox.swapDocShells(otherChatbox);
|
||||
|
@ -828,9 +828,15 @@ let MozLoopServiceInternal = {
|
||||
|
||||
let window = chatbox.contentWindow;
|
||||
|
||||
window.addEventListener("unload", function onUnloadChat(evt) {
|
||||
UITour.notify("Loop:ChatWindowClosed");
|
||||
});
|
||||
function socialFrameChanged(eventName) {
|
||||
UITour.availableTargetsCache.clear();
|
||||
UITour.notify(eventName);
|
||||
}
|
||||
|
||||
window.addEventListener("socialFrameHide", socialFrameChanged.bind(null, "Loop:ChatWindowHidden"));
|
||||
window.addEventListener("socialFrameShow", socialFrameChanged.bind(null, "Loop:ChatWindowShown"));
|
||||
window.addEventListener("socialFrameDetached", socialFrameChanged.bind(null, "Loop:ChatWindowDetached"));
|
||||
window.addEventListener("unload", socialFrameChanged.bind(null, "Loop:ChatWindowClosed"));
|
||||
|
||||
injectLoopAPI(window);
|
||||
|
||||
|
@ -142,6 +142,16 @@ this.UITour = {
|
||||
return loopBrowser.contentDocument.querySelector(".room-list");
|
||||
},
|
||||
}],
|
||||
["loop-selectedRoomButtons", {
|
||||
infoPanelPosition: "leftcenter bottomright",
|
||||
query: (aDocument) => {
|
||||
let chatbox = aDocument.querySelector("chatbox[src^='about\:loopconversation'][selected]");
|
||||
if (!chatbox || !chatbox.contentDocument) {
|
||||
return null;
|
||||
}
|
||||
return chatbox.contentDocument.querySelector(".call-action-group");
|
||||
},
|
||||
}],
|
||||
["loop-signInUpLink", {
|
||||
query: (aDocument) => {
|
||||
let loopBrowser = aDocument.querySelector("#loop-notification-panel > #loop");
|
||||
@ -1375,8 +1385,7 @@ this.UITour = {
|
||||
|
||||
hideLoopPanelAnnotations: function(aEvent) {
|
||||
UITour.hideAnnotationsForPanel(aEvent, (aTarget) => {
|
||||
// TODO: Bug 1104927 - Handle the conversation targets separately.
|
||||
return aTarget.targetName.startsWith("loop-");
|
||||
return aTarget.targetName.startsWith("loop-") && aTarget.targetName != "loop-selectedRoomButtons";
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user