From 76ef799b8632e05a0880d6ae68f783fc8996fd8f Mon Sep 17 00:00:00 2001 From: Paolo Amadini Date: Fri, 23 Feb 2018 15:54:08 +0000 Subject: [PATCH] Bug 1440333 - Part 2 - Rename the "current" attribute to "visible". r=Gijs MozReview-Commit-ID: EazXDT6JC3M --HG-- extra : rebase_source : 5cca4cd0cf565ffbdf75a9777dfc15b359dcda57 --- browser/base/content/browser.css | 2 +- browser/components/customizableui/PanelMultiView.jsm | 4 ++-- .../customizableui/test/browser_947914_button_history.js | 2 +- .../test/browser_967000_button_charEncoding.js | 2 +- .../customizableui/test/browser_remote_tabs_button.js | 2 +- .../customizableui/test/browser_synced_tabs_menu.js | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 1f62350f49cf..eaa1eb254255 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -87,7 +87,7 @@ panelview { -moz-box-orient: vertical; } -panelview:not([current]) { +panelview:not([visible]) { visibility: collapse; } diff --git a/browser/components/customizableui/PanelMultiView.jsm b/browser/components/customizableui/PanelMultiView.jsm index fdb9ea77760b..06105467c188 100644 --- a/browser/components/customizableui/PanelMultiView.jsm +++ b/browser/components/customizableui/PanelMultiView.jsm @@ -1171,9 +1171,9 @@ var PanelView = class extends this.AssociatedToNode { set visible(value) { if (value) { - this.node.setAttribute("current", true); + this.node.setAttribute("visible", true); } else { - this.node.removeAttribute("current"); + this.node.removeAttribute("visible"); } } diff --git a/browser/components/customizableui/test/browser_947914_button_history.js b/browser/components/customizableui/test/browser_947914_button_history.js index 3ed2e3939678..cd122640d589 100644 --- a/browser/components/customizableui/test/browser_947914_button_history.js +++ b/browser/components/customizableui/test/browser_947914_button_history.js @@ -28,7 +28,7 @@ add_task(async function() { let promise = BrowserTestUtils.waitForEvent(historyPanel, "ViewShown"); historyButton.click(); await promise; - ok(historyPanel.getAttribute("current"), "History Panel is in view"); + ok(historyPanel.getAttribute("visible"), "History Panel is in view"); let browserLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser); let panelHiddenPromise = promiseOverflowHidden(window); diff --git a/browser/components/customizableui/test/browser_967000_button_charEncoding.js b/browser/components/customizableui/test/browser_967000_button_charEncoding.js index 9b02be4c7bac..35c51100b4be 100644 --- a/browser/components/customizableui/test/browser_967000_button_charEncoding.js +++ b/browser/components/customizableui/test/browser_967000_button_charEncoding.js @@ -37,7 +37,7 @@ add_task(async function() { charEncodingButton.click(); await subviewShownPromise; - ok(characterEncodingView.hasAttribute("current"), "The Character encoding panel is displayed"); + ok(characterEncodingView.hasAttribute("visible"), "The Character encoding panel is displayed"); let pinnedEncodings = document.getElementById("PanelUI-characterEncodingView-pinned"); let charsetsList = document.getElementById("PanelUI-characterEncodingView-charsets"); diff --git a/browser/components/customizableui/test/browser_remote_tabs_button.js b/browser/components/customizableui/test/browser_remote_tabs_button.js index d96b21086a1a..4e3e739d2e76 100644 --- a/browser/components/customizableui/test/browser_remote_tabs_button.js +++ b/browser/components/customizableui/test/browser_remote_tabs_button.js @@ -38,7 +38,7 @@ add_task(async function testSyncRemoteTabsButtonFunctionality() { // click the button - the panel should open. syncRemoteTabsBtn.click(); await viewShown; - ok(remoteTabsPanel.getAttribute("current"), "Sync Panel is in view"); + ok(remoteTabsPanel.getAttribute("visible"), "Sync Panel is in view"); // Find and click the "setup" button. let syncNowButton = document.getElementById("PanelUI-remotetabs-syncnow"); diff --git a/browser/components/customizableui/test/browser_synced_tabs_menu.js b/browser/components/customizableui/test/browser_synced_tabs_menu.js index 30c9eb5fb888..b8073e5892c8 100644 --- a/browser/components/customizableui/test/browser_synced_tabs_menu.js +++ b/browser/components/customizableui/test/browser_synced_tabs_menu.js @@ -86,7 +86,7 @@ async function openPrefsFromMenuPanel(expectedPanelId, entryPoint) { let viewShownPromise = BrowserTestUtils.waitForEvent(syncPanel, "ViewShown"); syncButton.click(); await Promise.all([tabsUpdatedPromise, viewShownPromise]); - ok(syncPanel.getAttribute("current"), "Sync Panel is in view"); + ok(syncPanel.getAttribute("visible"), "Sync Panel is in view"); // Sync is not configured - verify that state is reflected. let subpanel = document.getElementById(expectedPanelId); @@ -187,7 +187,7 @@ add_task(async function() { let syncButton = document.getElementById("sync-button"); syncButton.click(); await Promise.all([tabsUpdatedPromise, viewShownPromise]); - ok(syncPanel.getAttribute("current"), "Sync Panel is in view"); + ok(syncPanel.getAttribute("visible"), "Sync Panel is in view"); let subpanel = document.getElementById("PanelUI-remotetabs-main"); ok(!subpanel.hidden, "main pane is visible"); @@ -352,7 +352,7 @@ add_task(async function() { await Promise.all([tabsUpdatedPromise, viewShownPromise]); // Check pre-conditions - ok(syncPanel.getAttribute("current"), "Sync Panel is in view"); + ok(syncPanel.getAttribute("visible"), "Sync Panel is in view"); let subpanel = document.getElementById("PanelUI-remotetabs-main"); ok(!subpanel.hidden, "main pane is visible"); let deck = document.getElementById("PanelUI-remotetabs-deck");