Merge m-c to mozilla-inbound. a=merge

This commit is contained in:
Ryan VanderMeulen 2014-06-17 15:43:06 -04:00
Родитель 211ed1afe6 6f80c55849
Коммит 7cfa54147d
17 изменённых файлов: 351 добавлений и 669 удалений

Просмотреть файл

@ -2,61 +2,30 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
let inspector, doc, toolbox;
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let {require} = devtools;
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
let {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
"use strict";
waitForExplicitFinish();
// Test that hovering over nodes in the markup-view shows the highlighter over
// those nodes
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onload() {
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
doc = content.document;
waitForFocus(setupTest, content);
}, true);
waitForExplicitFinish();
content.location = "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>";
let test = asyncTest(function*() {
info("Loading the test document and opening the inspector");
yield addTab("data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>");
let {toolbox, inspector} = yield openInspector();
function setupTest() {
openInspector((aInspector, aToolbox) => {
toolbox = aToolbox;
inspector = aInspector;
inspector.selection.setNode(doc.querySelector("span"), "test");
inspector.toolbox.once("highlighter-ready", runTests);
});
}
info("Selecting the test node");
yield selectNode("span", inspector);
function runTests() {
Task.spawn(function() {
yield hoverH1InMarkupView();
yield assertH1Highlighted();
let container = getContainerForRawNode(inspector.markup, getNode("h1"));
finishUp();
}).then(null, Cu.reportError);
}
let onHighlighterReady = toolbox.once("highlighter-ready");
EventUtils.synthesizeMouseAtCenter(container.tagLine, {type: "mousemove"},
inspector.markup.doc.defaultView);
yield onHighlighterReady;
function hoverH1InMarkupView() {
let deferred = promise.defer();
let container = getContainerForRawNode(inspector.markup, doc.querySelector("h1"));
ok(isHighlighting(), "The highlighter is shown on a markup container hover");
is(getHighlitNode(), getNode("h1"), "The highlighter highlights the right node");
inspector.toolbox.once("highlighter-ready", deferred.resolve);
EventUtils.synthesizeMouseAtCenter(container.tagLine, {type: "mousemove"},
inspector.markup.doc.defaultView);
return deferred.promise;
}
function assertH1Highlighted() {
ok(isHighlighting(), "The highlighter is shown on a markup container hover");
is(getHighlitNode(), doc.querySelector("h1"), "The highlighter highlights the right node");
}
function finishUp() {
inspector = doc = toolbox = null;
gBrowser.removeCurrentTab();
finish();
}
}
gBrowser.removeCurrentTab();
});

Просмотреть файл

@ -4,90 +4,88 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let div;
let rotated;
let inspector;
let contentViewer;
"use strict";
function createDocument() {
div = doc.createElement("div");
// Test that the highlighter is correctly displayed over a variety of elements
waitForExplicitFinish();
let test = asyncTest(function*() {
info("Adding the test tab and creating the document");
yield addTab("data:text/html;charset=utf-8,browser_inspector_highlighter.js");
createDocument(content.document);
info("Opening the inspector");
let {toolbox, inspector} = yield openInspector();
info("Selecting the simple, non-transformed DIV");
let div = getNode(".simple-div");
yield selectNode(div, inspector, "highlight");
testSimpleDivHighlighted(div);
yield zoomTo(2);
testZoomedSimpleDivHighlighted(div);
yield zoomTo(1);
info("Selecting the rotated DIV");
let rotated = getNode(".rotated-div");
let onBoxModelUpdate = waitForBoxModelUpdate();
yield selectNode(rotated, inspector, "highlight");
yield onBoxModelUpdate;
testMouseOverRotatedHighlights(rotated);
gBrowser.removeCurrentTab();
});
function createDocument(doc) {
info("Creating the test document");
let div = doc.createElement("div");
div.className = "simple-div";
div.setAttribute("style",
"padding:5px; border:7px solid red; margin: 9px; " +
"position:absolute; top:30px; left:150px;");
let textNode = doc.createTextNode("Gort! Klaatu barada nikto!");
rotated = doc.createElement("div");
rotated.setAttribute("style",
div.appendChild(doc.createTextNode("Gort! Klaatu barada nikto!"));
doc.body.appendChild(div);
let rotatedDiv = doc.createElement("div");
rotatedDiv.className = "rotated-div";
rotatedDiv.setAttribute("style",
"padding:5px; border:7px solid red; margin: 9px; " +
"transform:rotate(45deg); " +
"position:absolute; top:30px; left:80px;");
div.appendChild(textNode);
doc.body.appendChild(div);
doc.body.appendChild(rotated);
openInspector(aInspector => {
inspector = aInspector;
inspector.selection.setNode(div, null);
inspector.once("inspector-updated", testMouseOverDivHighlights);
});
doc.body.appendChild(rotatedDiv);
}
function testMouseOverDivHighlights() {
ok(isHighlighting(), "Highlighter is shown");
is(getHighlitNode(), div, "Highlighter's outline correspond to the non-rotated div");
testNonTransformedBoxModelDimensionsNoZoom();
}
function testSimpleDivHighlighted(div) {
ok(isHighlighting(), "The highlighter is shown");
is(getHighlitNode(), div, "The highlighter's outline corresponds to the simple div");
function testNonTransformedBoxModelDimensionsNoZoom() {
info("Highlighted the non-rotated div");
info("Checking that the simple div is correctly highlighted");
isNodeCorrectlyHighlighted(div, "non-zoomed");
waitForBoxModelUpdate().then(testNonTransformedBoxModelDimensionsZoomed);
contentViewer = gBrowser.selectedBrowser.docShell.contentViewer
.QueryInterface(Ci.nsIMarkupDocumentViewer);
contentViewer.fullZoom = 2;
}
function testNonTransformedBoxModelDimensionsZoomed() {
info("Highlighted the zoomed, non-rotated div");
function testZoomedSimpleDivHighlighted(div) {
info("Checking that the simple div is correctly highlighted, " +
"even when the page is zoomed");
isNodeCorrectlyHighlighted(div, "zoomed");
waitForBoxModelUpdate().then(testMouseOverRotatedHighlights);
contentViewer.fullZoom = 1;
}
function testMouseOverRotatedHighlights() {
let onBoxModelUpdate = waitForBoxModelUpdate();
inspector.selection.setNode(rotated);
inspector.once("inspector-updated", () => {
onBoxModelUpdate.then(() => {
ok(isHighlighting(), "Highlighter is shown");
info("Highlighted the rotated div");
isNodeCorrectlyHighlighted(rotated, "rotated");
function zoomTo(level) {
info("Zooming page to " + level);
let def = promise.defer();
executeSoon(finishUp);
});
});
waitForBoxModelUpdate().then(def.resolve);
let contentViewer = gBrowser.selectedBrowser.docShell.contentViewer
.QueryInterface(Ci.nsIMarkupDocumentViewer);
contentViewer.fullZoom = level;
return def.promise;
}
function finishUp() {
inspector.toolbox.highlighterUtils.stopPicker().then(() => {
doc = div = rotated = inspector = contentViewer = null;
let target = TargetFactory.forTab(gBrowser.selectedTab);
gDevTools.closeToolbox(target);
gBrowser.removeCurrentTab();
finish();
});
}
function test() {
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function() {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
doc = content.document;
waitForFocus(createDocument, content);
}, true);
content.location = "data:text/html;charset=utf-8,browser_inspector_highlighter.js";
function testMouseOverRotatedHighlights(rotated) {
ok(isHighlighting(), "The highlighter is shown");
info("Checking that the rotated div is correctly highlighted");
isNodeCorrectlyHighlighted(rotated, "rotated");
}

Просмотреть файл

@ -44,6 +44,34 @@ SimpleTest.registerCleanupFunction(() => {
Services.prefs.clearUserPref("devtools.inspector.activeSidebar");
});
/**
* Define an async test based on a generator function
*/
function asyncTest(generator) {
return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
}
/**
* Add a new test tab in the browser and load the given url.
* @param {String} url The url to be loaded in the new tab
* @return a promise that resolves to the tab object when the url is loaded
*/
function addTab(url) {
let def = promise.defer();
let tab = gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onload() {
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
info("URL " + url + " loading complete into new test tab");
waitForFocus(() => {
def.resolve(tab);
}, content);
}, true);
content.location = url;
return def.promise;
}
/**
* Simple DOM node accesor function that takes either a node or a string css
* selector as argument and returns the corresponding node

Просмотреть файл

@ -293,7 +293,7 @@ MarkupView.prototype = {
*/
_shouldNewSelectionBeHighlighted: function() {
let reason = this._inspector.selection.reason;
let unwantedReasons = ["inspector-open", "navigateaway", "test"];
let unwantedReasons = ["inspector-open", "navigateaway", "nodeselected", "test"];
let isHighlitNode = this._hoveredNode === this._inspector.selection.nodeFront;
return !isHighlitNode && reason && unwantedReasons.indexOf(reason) === -1;
},

Просмотреть файл

@ -106,8 +106,9 @@ browser.jar:
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png)
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
* skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
skin/classic/browser/newtab/controls.png (../shared/newtab/controls.png)
skin/classic/browser/newtab/controls@2x.png (../shared/newtab/controls@2x.png)
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
skin/classic/browser/places/bookmarksToolbar-menuPanel.png (places/bookmarksToolbar-menuPanel.png)

Просмотреть файл

@ -2,185 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:root {
-moz-appearance: none;
font-size: 75%;
background-color: transparent;
}
%include ../../shared/newtab/newTab.inc.css
/* SCROLLBOX */
#newtab-scrollbox:not([page-disabled]),
#newtab-scrollbox:not([page-disabled]) #newtab-margin-bottom {
color: rgb(0,0,0);
background-color: hsl(0,0%,95%);
}
/* UNDO */
#newtab-undo-container {
padding: 4px 3px;
border: 1px solid;
border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16);
background-color: rgba(255,255,255,.4);
color: #525e69;
}
#newtab-undo-label {
margin-top: 0;
margin-bottom: 0;
}
.newtab-undo-button {
-moz-appearance: none;
color: rgb(221,72,20);
cursor: pointer;
padding: 0;
margin: 0 4px;
border: 0;
background: transparent;
text-decoration: none;
min-width: 0;
}
.newtab-undo-button:hover {
text-decoration: underline;
}
.newtab-undo-button:-moz-focusring {
outline: 1px dotted;
}
#newtab-undo-close-button {
-moz-appearance: none;
padding: 0;
border: none;
height: 16px;
width: 16px;
}
#newtab-undo-close-button:-moz-focusring {
outline: 1px dotted;
}
/* TOGGLE */
#newtab-toggle {
width: 16px;
height: 16px;
padding: 0;
border: none;
background: -216px 0 transparent url(chrome://browser/skin/newtab/controls.png);
}
#newtab-toggle[page-disabled] {
background-position: -232px 0;
}
/* CELLS */
.newtab-cell {
background-color: rgba(255,255,255,.2);
border: 1px solid #dee0e1;
transition: border-color 100ms ease-out;
}
.newtab-cell:empty {
border: 1px dashed;
border-color: rgba(8,22,37,.15) rgba(8,22,37,.17) rgba(8,22,37,.19);
}
.newtab-cell:hover:not(:empty):not([dragged]):not([ignorehover]) {
border-color: rgba(8,22,37,.25) rgba(8,22,37,.27) rgba(8,22,37,.3);
}
/* SITES */
.newtab-site {
text-decoration: none;
transition-property: top, left, opacity, box-shadow, background-color;
}
.newtab-cell:not([ignorehover]) > .newtab-site:hover,
.newtab-site[dragged] {
box-shadow: 0 0 10px rgba(8,22,37,.3);
}
.newtab-site[dragged] {
transition-property: box-shadow, background-color;
background-color: rgb(242,242,242);
}
/* THUMBNAILS */
.newtab-thumbnail {
background-origin: padding-box;
background-clip: padding-box;
background-repeat: no-repeat;
background-size: cover;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;
background-size: auto;
}
/* TITLES */
.newtab-title {
color: #525c66;
font-family: sans-serif;
font-size: 13px;
}
.newtab-site[type=sponsored] .newtab-title {
-moz-padding-end: 24px;
}
/* CONTROLS */
.newtab-control {
width: 24px;
height: 24px;
padding: 1px 2px 3px;
border: none;
background: transparent url(chrome://browser/skin/newtab/controls.png);
}
.newtab-control-pin:hover {
background-position: -24px 0;
}
.newtab-control-pin:active {
background-position: -48px 0;
}
.newtab-control-pin[pinned] {
background-position: -72px 0;
}
.newtab-control-pin[pinned]:hover {
background-position: -96px 0;
}
.newtab-control-pin[pinned]:active {
background-position: -120px 0;
}
.newtab-control-block {
background-position: -144px 0;
}
.newtab-control-block:hover {
background-position: -168px 0;
}
.newtab-control-block:active {
background-position: -192px 0;
}
.newtab-control-sponsored {
background-position: -249px -1px;
}
.newtab-control-sponsored:hover {
background-position: -265px -1px;
}
.newtab-control-sponsored[panelShown] {
background-position: -281px -1px;
}

Просмотреть файл

@ -170,9 +170,9 @@ browser.jar:
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png)
skin/classic/browser/feeds/audioFeedIcon.png (feeds/feedIcon.png)
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/feedIcon16.png)
skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
* skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
skin/classic/browser/newtab/controls.png (../shared/newtab/controls.png)
skin/classic/browser/newtab/controls@2x.png (newtab/controls@2x.png)
skin/classic/browser/newtab/controls@2x.png (../shared/newtab/controls@2x.png)
skin/classic/browser/setDesktopBackground.css
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png

Просмотреть файл

@ -2,196 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:root {
-moz-appearance: none;
font-size: 75%;
background-color: transparent;
}
%include ../../shared/newtab/newTab.inc.css
/* SCROLLBOX */
#newtab-scrollbox:not([page-disabled]),
#newtab-scrollbox:not([page-disabled]) #newtab-margin-bottom {
color: rgb(0,0,0);
background-color: hsl(0,0%,95%);
}
/* UNDO */
#newtab-undo-container {
padding: 4px 3px;
border: 1px solid;
border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16);
background-color: rgba(255,255,255,.4);
color: #525e69;
}
#newtab-undo-label {
margin-top: 0;
margin-bottom: 0;
}
.newtab-undo-button {
-moz-appearance: none;
color: rgb(20,79,174);
cursor: pointer;
padding: 0;
margin: 0 4px;
border: 0;
background: transparent;
text-decoration: none;
min-width: 0;
}
.newtab-undo-button:hover {
text-decoration: underline;
}
.newtab-undo-button:-moz-focusring {
outline: 1px dotted;
}
#newtab-undo-close-button {
padding: 0;
border: none;
}
#newtab-undo-close-button:-moz-focusring {
outline: 1px dotted;
}
/* TOGGLE */
#newtab-toggle {
width: 16px;
height: 16px;
padding: 0;
border: none;
background: -216px 0 transparent url(chrome://browser/skin/newtab/controls.png);
}
#newtab-toggle[page-disabled] {
background-position: -232px 0;
}
@media (min-resolution: 2dppx) {
#newtab-toggle {
background-image: url(chrome://browser/skin/newtab/controls@2x.png);
background-size: 296px;
}
}
/* CELLS */
.newtab-cell {
background-color: rgba(255,255,255,.2);
border: 1px solid #dee0e1;
transition: border-color 100ms ease-out;
}
.newtab-cell:empty {
border: 1px dashed;
border-color: rgba(8,22,37,.15) rgba(8,22,37,.17) rgba(8,22,37,.19);
}
.newtab-cell:hover:not(:empty):not([dragged]):not([ignorehover]) {
border-color: rgba(8,22,37,.25) rgba(8,22,37,.27) rgba(8,22,37,.3);
}
/* SITES */
.newtab-site {
text-decoration: none;
transition-property: top, left, opacity, box-shadow, background-color;
}
.newtab-cell:not([ignorehover]) > .newtab-site:hover,
.newtab-site[dragged] {
box-shadow: 0 0 10px rgba(8,22,37,.3);
}
.newtab-site[dragged] {
transition-property: box-shadow, background-color;
background-color: rgb(242,242,242);
}
/* THUMBNAILS */
.newtab-thumbnail {
background-origin: padding-box;
background-clip: padding-box;
background-repeat: no-repeat;
background-size: cover;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;
background-size: auto;
}
/* TITLES */
.newtab-title {
color: #525c66;
font-family: Lucida Grande;
font-size: 13px;
}
.newtab-site[type=sponsored] .newtab-title {
-moz-padding-end: 24px;
}
/* CONTROLS */
.newtab-control {
width: 24px;
height: 24px;
padding: 1px 2px 3px;
border: none;
background: transparent url(chrome://browser/skin/newtab/controls.png);
}
@media (min-resolution: 2dppx) {
.newtab-control {
background-image: url(chrome://browser/skin/newtab/controls@2x.png);
background-size: 296px;
}
}
.newtab-control-pin:hover {
background-position: -24px 0;
}
.newtab-control-pin:active {
background-position: -48px 0;
}
.newtab-control-pin[pinned] {
background-position: -72px 0;
}
.newtab-control-pin[pinned]:hover {
background-position: -96px 0;
}
.newtab-control-pin[pinned]:active {
background-position: -120px 0;
}
.newtab-control-block {
background-position: -144px 0;
}
.newtab-control-block:hover {
background-position: -168px 0;
}
.newtab-control-block:active {
background-position: -192px 0;
}
.newtab-control-sponsored {
background-position: -249px -1px;
}
.newtab-control-sponsored:hover {
background-position: -265px -1px;
}
.newtab-control-sponsored[panelShown] {
background-position: -281px -1px;
}

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 22 KiB

После

Ширина:  |  Высота:  |  Размер: 22 KiB

Просмотреть файл

@ -0,0 +1,196 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:root {
-moz-appearance: none;
font-size: 75%;
background-color: transparent;
}
/* SCROLLBOX */
#newtab-scrollbox:not([page-disabled]),
#newtab-scrollbox:not([page-disabled]) #newtab-margin-bottom {
color: rgb(0,0,0);
background-color: hsl(0,0%,95%);
}
/* UNDO */
#newtab-undo-container {
padding: 4px 3px;
border: 1px solid;
border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16);
background-color: rgba(255,255,255,.4);
color: #525e69;
}
#newtab-undo-label {
margin-top: 0;
margin-bottom: 0;
}
.newtab-undo-button {
-moz-appearance: none;
cursor: pointer;
padding: 0;
margin: 0 4px;
border: 0;
background: transparent;
text-decoration: none;
min-width: 0;
}
.newtab-undo-button:hover {
text-decoration: underline;
}
.newtab-undo-button:-moz-focusring {
outline: 1px dotted;
}
#newtab-undo-close-button {
-moz-appearance: none;
padding: 0;
border: none;
}
#newtab-undo-close-button:-moz-focusring {
outline: 1px dotted;
}
/* TOGGLE */
#newtab-toggle {
width: 16px;
height: 16px;
padding: 0;
border: none;
background: -216px 0 transparent url(chrome://browser/skin/newtab/controls.png);
}
#newtab-toggle[page-disabled] {
background-position: -232px 0;
}
@media (min-resolution: 2dppx) {
#newtab-toggle {
background-image: url(chrome://browser/skin/newtab/controls@2x.png);
background-size: 296px;
}
}
/* CELLS */
.newtab-cell {
background-color: rgba(255,255,255,.2);
border: 1px solid #dee0e1;
transition: border-color 100ms ease-out;
}
.newtab-cell:empty {
border: 1px dashed;
border-color: rgba(8,22,37,.15) rgba(8,22,37,.17) rgba(8,22,37,.19);
}
.newtab-cell:hover:not(:empty):not([dragged]):not([ignorehover]) {
border-color: rgba(8,22,37,.25) rgba(8,22,37,.27) rgba(8,22,37,.3);
}
/* SITES */
.newtab-site {
text-decoration: none;
transition-property: top, left, opacity, box-shadow, background-color;
}
.newtab-cell:not([ignorehover]) > .newtab-site:hover,
.newtab-site[dragged] {
box-shadow: 0 0 10px rgba(8,22,37,.3);
}
.newtab-site[dragged] {
transition-property: box-shadow, background-color;
background-color: rgb(242,242,242);
}
/* THUMBNAILS */
.newtab-thumbnail {
background-origin: padding-box;
background-clip: padding-box;
background-repeat: no-repeat;
background-size: cover;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;
background-size: auto;
}
/* TITLES */
.newtab-title {
color: #525c66;
font-size: 13px;
}
.newtab-site[type=sponsored] .newtab-title {
-moz-padding-end: 24px;
}
/* CONTROLS */
.newtab-control {
width: 24px;
height: 24px;
padding: 1px 2px 3px;
border: none;
background: transparent url(chrome://browser/skin/newtab/controls.png);
}
@media (min-resolution: 2dppx) {
.newtab-control {
background-image: url(chrome://browser/skin/newtab/controls@2x.png);
background-size: 296px;
}
}
.newtab-control-pin:hover {
background-position: -24px 0;
}
.newtab-control-pin:active {
background-position: -48px 0;
}
.newtab-control-pin[pinned] {
background-position: -72px 0;
}
.newtab-control-pin[pinned]:hover {
background-position: -96px 0;
}
.newtab-control-pin[pinned]:active {
background-position: -120px 0;
}
.newtab-control-block {
background-position: -144px 0;
}
.newtab-control-block:hover {
background-position: -168px 0;
}
.newtab-control-block:active {
background-position: -192px 0;
}
.newtab-control-sponsored {
background-position: -249px -1px;
}
.newtab-control-sponsored:hover {
background-position: -265px -1px;
}
.newtab-control-sponsored[panelShown] {
background-position: -281px -1px;
}

Просмотреть файл

@ -127,8 +127,9 @@ browser.jar:
skin/classic/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16.png)
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
* skin/classic/browser/newtab/newTab.css (newtab/newTab.css)
skin/classic/browser/newtab/controls.png (../shared/newtab/controls.png)
skin/classic/browser/newtab/controls@2x.png (../shared/newtab/controls@2x.png)
skin/classic/browser/places/places.css (places/places.css)
* skin/classic/browser/places/organizer.css (places/organizer.css)
skin/classic/browser/places/bookmark.png (places/bookmark.png)
@ -532,8 +533,9 @@ browser.jar:
skin/classic/aero/browser/feeds/videoFeedIcon16.png (feeds/feedIcon16-aero.png)
skin/classic/aero/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/aero/browser/feeds/subscribe-ui.css (feeds/subscribe-ui.css)
skin/classic/aero/browser/newtab/newTab.css (newtab/newTab.css)
* skin/classic/aero/browser/newtab/newTab.css (newtab/newTab.css)
skin/classic/aero/browser/newtab/controls.png (../shared/newtab/controls.png)
skin/classic/aero/browser/newtab/controls@2x.png (../shared/newtab/controls@2x.png)
* skin/classic/aero/browser/places/places.css (places/places-aero.css)
* skin/classic/aero/browser/places/organizer.css (places/organizer-aero.css)
skin/classic/aero/browser/places/bookmark.png (places/bookmark-aero.png)

Просмотреть файл

@ -2,188 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:root {
-moz-appearance: none;
font-size: 75%;
background-color: transparent;
}
%include ../../shared/newtab/newTab.inc.css
/* SCROLLBOX */
#newtab-scrollbox:not([page-disabled]),
#newtab-scrollbox:not([page-disabled]) #newtab-margin-bottom {
color: rgb(0,0,0);
background-color: hsl(0,0%,95%);
}
/* UNDO */
#newtab-undo-container {
padding: 4px 3px;
border: 1px solid;
border-color: rgba(8,22,37,.12) rgba(8,22,37,.14) rgba(8,22,37,.16);
background-color: rgba(255,255,255,.4);
color: #525e69;
}
#newtab-undo-label {
margin-top: 0;
margin-bottom: 0;
}
.newtab-undo-button {
-moz-appearance: none;
color: -moz-nativehyperlinktext;
color: rgb(0,102,204);
cursor: pointer;
padding: 0;
margin: 0 4px;
border: 0;
background: transparent;
text-decoration: none;
min-width: 0;
}
.newtab-undo-button:hover {
text-decoration: underline;
}
.newtab-undo-button:-moz-focusring {
outline: 1px dotted;
}
.newtab-undo-button > .button-box {
padding: 0;
}
#newtab-undo-close-button {
-moz-appearance: none;
padding: 0;
border: none;
}
#newtab-undo-close-button:-moz-focusring {
outline: 1px dotted;
}
/* TOGGLE */
#newtab-toggle {
width: 16px;
height: 16px;
padding: 0;
border: none;
background: -216px 0 transparent url(chrome://browser/skin/newtab/controls.png);
}
#newtab-toggle[page-disabled] {
background-position: -232px 0;
}
/* CELLS */
.newtab-cell {
background-color: rgba(255,255,255,.2);
border: 1px solid #dee0e1;
transition: border-color 100ms ease-out;
}
.newtab-cell:empty {
border: 1px dashed;
border-color: rgba(8,22,37,.15) rgba(8,22,37,.17) rgba(8,22,37,.19);
}
.newtab-cell:hover:not(:empty):not([dragged]):not([ignorehover]) {
border-color: rgba(8,22,37,.25) rgba(8,22,37,.27) rgba(8,22,37,.3);
}
/* SITES */
.newtab-site {
text-decoration: none;
transition-property: top, left, opacity, box-shadow, background-color;
}
.newtab-cell:not([ignorehover]) > .newtab-site:hover,
.newtab-site[dragged] {
box-shadow: 0 0 10px rgba(8,22,37,.3);
}
.newtab-site[dragged] {
transition-property: box-shadow, background-color;
background-color: rgb(242,242,242);
}
/* THUMBNAILS */
.newtab-thumbnail {
background-origin: padding-box;
background-clip: padding-box;
background-repeat: no-repeat;
background-size: cover;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;
background-size: auto;
}
/* TITLES */
.newtab-title {
color: #525c66;
font-family: Segoe UI;
font-size: 13px;
}
.newtab-site[type=sponsored] .newtab-title {
-moz-padding-end: 24px;
}
/* CONTROLS */
.newtab-control {
width: 24px;
height: 24px;
padding: 1px 2px 3px;
border: none;
background: transparent url(chrome://browser/skin/newtab/controls.png);
}
.newtab-control-pin:hover {
background-position: -24px 0;
}
.newtab-control-pin:active {
background-position: -48px 0;
}
.newtab-control-pin[pinned] {
background-position: -72px 0;
}
.newtab-control-pin[pinned]:hover {
background-position: -96px 0;
}
.newtab-control-pin[pinned]:active {
background-position: -120px 0;
}
.newtab-control-block {
background-position: -144px 0;
}
.newtab-control-block:hover {
background-position: -168px 0;
}
.newtab-control-block:active {
background-position: -192px 0;
}
.newtab-control-sponsored {
background-position: -249px -1px;
}
.newtab-control-sponsored:hover {
background-position: -265px -1px;
}
.newtab-control-sponsored[panelShown] {
background-position: -281px -1px;
}

Просмотреть файл

@ -150,19 +150,7 @@ public class ToolbarComponent extends BaseComponent {
public ToolbarComponent dismissEditingMode() {
assertIsEditing();
// Cancel Button not implemeneted in tablet.
if (DeviceHelper.isTablet()) {
if (getUrlEditText().isInputMethodTarget()) {
// Drop the soft keyboard.
// TODO: Solo.hideSoftKeyboard() does not clear focus, causing unexpected
// behavior, but we may want to use it over goBack().
mSolo.goBack();
}
mSolo.goBack();
} else {
mSolo.clickOnView(getEditCancelButton());
}
mSolo.clickOnView(getEditCancelButton());
waitForNotEditing();

Просмотреть файл

@ -99,6 +99,8 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
private UIMode mUiMode;
private boolean mIsAttached;
private ThemedTextView mTitle;
private int mTitlePadding;
private ToolbarTitlePrefs mTitlePrefs;
@ -167,6 +169,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
@Override
public void onAttachedToWindow() {
mIsAttached = true;
mTitlePrefs = new ToolbarTitlePrefs();
Button.OnClickListener faviconListener = new Button.OnClickListener() {
@ -220,6 +223,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
@Override
public void onDetachedFromWindow() {
mIsAttached = false;
mTitlePrefs.close();
}
@ -260,6 +264,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
}
void updateFromTab(Tab tab, EnumSet<UpdateFlags> flags) {
// Several parts of ToolbarDisplayLayout's state depends
// on the views being attached to the view tree.
if (!mIsAttached) {
return;
}
if (flags.contains(UpdateFlags.TITLE)) {
updateTitle(tab);
}

Просмотреть файл

@ -8092,12 +8092,12 @@ var Tabs = {
case "Session:Prefetch":
if (aData) {
let uri = Services.io.newURI(aData, null, null);
if (uri && !this._domains.has(uri.host)) {
try {
try {
if (uri && !this._domains.has(uri.host)) {
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
this._domains.add(uri.host);
} catch (e) {}
}
}
} catch (e) {}
}
break;
}

Просмотреть файл

@ -4658,6 +4658,17 @@
"n_buckets": 20,
"description": "The PDF document size (KB)"
},
"PDF_VIEWER_FONT_TYPES": {
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 19,
"description": "The PDF document font types used"
},
"PDF_VIEWER_EMBED": {
"expires_in_version": "never",
"kind": "boolean",
"description": "A PDF document was embedded: true using OBJECT/EMBED and false using IFRAME"
},
"PDF_VIEWER_FORM": {
"expires_in_version": "never",
"kind": "boolean",
@ -4666,7 +4677,7 @@
"PDF_VIEWER_STREAM_TYPES": {
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 9,
"n_values": 19,
"description": "The PDF document compression stream types used"
},
"PDF_VIEWER_TIME_TO_VIEW_MS": {

Просмотреть файл

@ -12,16 +12,16 @@ const { worker } = Cu.import("resource://gre/modules/devtools/worker-loader.js",
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
const Services = devtools.require("Services");
const DevToolsUtils = devtools.require("devtools/toolkit/DevToolsUtils.js");
const { DebuggerServer } = devtools.require("devtools/server/main");
const { DebuggerServer: WorkerDebuggerServer } = worker.require("devtools/server/main");
// Always log packets when running tests. runxpcshelltests.py will throw
// the output away anyway, unless you give it the --verbose flag.
Services.prefs.setBoolPref("devtools.debugger.log", true);
// Enable remote debugging for the relevant tests.
Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);
const DevToolsUtils = devtools.require("devtools/toolkit/DevToolsUtils.js");
const { DebuggerServer } = devtools.require("devtools/server/main");
const { DebuggerServer: WorkerDebuggerServer } = worker.require("devtools/server/main");
function tryImport(url) {
try {
Cu.import(url);