author | Bill McCloskey <billm@mozilla.com> |
Tue, 28 Apr 2015 16:09:39 -0700 | |
changeset 241713 | 628c47a140bb23d0951cf2bd6a876b52302d1555 |
parent 241712 | 7d5b9aed2c245a0002a3fb6f779cc0ac5f9440b5 |
child 241714 | d10105a7583573b5e212521c9fbcb3e680804285 |
push id | 28669 |
push user | ryanvm@gmail.com |
push date | Thu, 30 Apr 2015 17:57:05 +0000 |
treeherder | mozilla-central@7723b15ea695 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | dao |
bugs | 1095475 |
milestone | 40.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1513,23 +1513,21 @@ // keep the old one. Re-set it explicitly after unbinding from DOM. aBrowser._permanentKey = permanentKey; parent.appendChild(aBrowser); // Restore the progress listener. aBrowser.webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL); if (aShouldBeRemote) { - tab.setAttribute("remote", "true"); // Switching the browser to be remote will connect to a new child // process so the browser can no longer be considered to be // crashed. tab.removeAttribute("crashed"); } else { - tab.removeAttribute("remote"); aBrowser.messageManager.sendAsyncMessage("Browser:AppTab", { isAppTab: tab.pinned }) } if (wasActive) aBrowser.focus(); let evt = document.createEvent("Events"); evt.initEvent("TabRemotenessChange", true, false); @@ -1736,18 +1734,16 @@ t.setAttribute("onerror", "this.removeAttribute('image');"); t.className = "tabbrowser-tab"; // The new browser should be remote if this is an e10s window and // the uri to load can be loaded remotely. let remote = gMultiProcessBrowser && !aForceNotRemote && E10SUtils.canLoadURIInProcess(aURI, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT); - if (remote) - t.setAttribute("remote", "true"); this.tabContainer._unlockTabSizing(); // When overflowing, new tabs are scrolled into view smoothly, which // doesn't go well together with the width transition. So we skip the // transition in that case. let animate = !aSkipAnimation && this.tabContainer.getAttribute("overflow") != "true" && @@ -3680,19 +3676,21 @@ <parameter name="event"/> <body><![CDATA[ event.stopPropagation(); var tab = document.tooltipNode; if (tab.localName != "tab") { event.preventDefault(); return; } - event.target.setAttribute("label", tab.mOverCloseButton ? - tab.getAttribute("closetabtext") : - tab.getAttribute("label")); + event.target.setAttribute("label", + tab.mOverCloseButton ? + tab.getAttribute("closetabtext") : + tab.getAttribute("label") + + (this.AppConstants.E10S_TESTING_ONLY && tab.linkedBrowser && tab.linkedBrowser.isRemoteBrowser ? " - e10s" : "")); ]]></body> </method> <method name="handleEvent"> <parameter name="aEvent"/> <body><![CDATA[ switch (aEvent.type) { case "keydown":
--- a/browser/base/content/test/general/browser_e10s_switchbrowser.js +++ b/browser/base/content/test/general/browser_e10s_switchbrowser.js @@ -102,158 +102,158 @@ let forward = Task.async(function*() { gBrowser.goForward(); yield waitForDocLoadComplete(); gExpectedHistory.index++; }); // Tests that navigating from a page that should be in the remote process and // a page that should be in the main process works and retains history add_task(function* test_navigation() { - let expectedRemote = gMultiProcessBrowser ? "true" : ""; + let expectedRemote = gMultiProcessBrowser; info("1"); // Create a tab and load a remote page in it gBrowser.selectedTab = gBrowser.addTab("about:blank", {skipAnimation: true}); let {permanentKey} = gBrowser.selectedBrowser; yield waitForLoad("http://example.org/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); info("2"); // Load another page yield waitForLoad("http://example.com/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("3"); // Load a non-remote page yield waitForLoad("about:robots"); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("4"); // Load a remote page yield waitForLoad("http://example.org/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("5"); yield back(); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("6"); yield back(); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("7"); yield forward(); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("8"); yield forward(); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("9"); yield back(); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("10"); // Load a new remote page, this should replace the last history entry gExpectedHistory.entries.splice(gExpectedHistory.entries.length - 1, 1); yield waitForLoad("http://example.com/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield check_history(); info("11"); gBrowser.removeCurrentTab(); clear_history(); }); // Tests that calling gBrowser.loadURI or browser.loadURI to load a page in a // different process updates the browser synchronously add_task(function* test_synchronous() { - let expectedRemote = gMultiProcessBrowser ? "true" : ""; + let expectedRemote = gMultiProcessBrowser; info("1"); // Create a tab and load a remote page in it gBrowser.selectedTab = gBrowser.addTab("about:blank", {skipAnimation: true}); let {permanentKey} = gBrowser.selectedBrowser; yield waitForLoad("http://example.org/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); info("2"); // Load another page info("Loading about:robots"); gBrowser.selectedBrowser.loadURI("about:robots"); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield waitForDocLoadComplete(); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); info("3"); // Load the remote page again info("Loading http://example.org/" + DUMMY_PATH); gBrowser.loadURI("http://example.org/" + DUMMY_PATH); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); yield waitForDocLoadComplete(); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); is(gBrowser.selectedBrowser.permanentKey, permanentKey, "browser.permanentKey is still the same"); info("4"); gBrowser.removeCurrentTab(); clear_history(); }); // Tests that load flags are correctly passed through to the child process with // normal loads add_task(function* test_loadflags() { - let expectedRemote = gMultiProcessBrowser ? "true" : ""; + let expectedRemote = gMultiProcessBrowser; info("1"); // Create a tab and load a remote page in it gBrowser.selectedTab = gBrowser.addTab("about:blank", {skipAnimation: true}); yield waitForLoadWithFlags("about:robots"); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); yield check_history(); info("2"); // Load a page in the remote process with some custom flags yield waitForLoadWithFlags("http://example.com/" + DUMMY_PATH, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); yield check_history(); info("3"); // Load a non-remote page yield waitForLoadWithFlags("about:robots"); - is(gBrowser.selectedTab.getAttribute("remote"), "", "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, false, "Remote attribute should be correct"); yield check_history(); info("4"); // Load another remote page yield waitForLoadWithFlags("http://example.org/" + DUMMY_PATH, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY); - is(gBrowser.selectedTab.getAttribute("remote"), expectedRemote, "Remote attribute should be correct"); + is(gBrowser.selectedBrowser.isRemoteBrowser, expectedRemote, "Remote attribute should be correct"); yield check_history(); is(gExpectedHistory.entries.length, 2, "Should end with the right number of history entries"); info("5"); gBrowser.removeCurrentTab(); clear_history(); });
--- a/browser/themes/shared/tabs.inc.css +++ b/browser/themes/shared/tabs.inc.css @@ -37,20 +37,16 @@ margin: 0; padding: 0; } .tabbrowser-tab { -moz-box-align: stretch; } -.tabbrowser-tab[remote] { - text-decoration: underline; -} - /* The selected tab should appear above adjacent tabs, .tabs-newtab-button and the highlight of #nav-bar */ .tabbrowser-tab[visuallyselected=true] { position: relative; z-index: 2; } .tab-background-middle { -moz-box-flex: 1;