mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge f-t to m-c, a=merge
This commit is contained in:
commit
94f0cdfe94
@ -821,9 +821,17 @@ Accessible::XULElmName(DocAccessible* aDocument,
|
||||
nsIContent *bindingParent = aElm->GetBindingParent();
|
||||
nsIContent* parent =
|
||||
bindingParent? bindingParent->GetParent() : aElm->GetParent();
|
||||
nsAutoString ancestorTitle;
|
||||
while (parent) {
|
||||
if (parent->IsXULElement(nsGkAtoms::toolbaritem) &&
|
||||
parent->GetAttr(kNameSpaceID_None, nsGkAtoms::title, aName)) {
|
||||
parent->GetAttr(kNameSpaceID_None, nsGkAtoms::title, ancestorTitle)) {
|
||||
// Before returning this, check if the element itself has a tooltip:
|
||||
if (aElm->GetAttr(kNameSpaceID_None, nsGkAtoms::tooltiptext, aName)) {
|
||||
aName.CompressWhitespace();
|
||||
return;
|
||||
}
|
||||
|
||||
aName.Assign(ancestorTitle);
|
||||
aName.CompressWhitespace();
|
||||
return;
|
||||
}
|
||||
|
@ -13,4 +13,5 @@ support-files =
|
||||
[test_list.html]
|
||||
[test_markup.html]
|
||||
[test_svg.html]
|
||||
[test_toolbaritem.xul]
|
||||
[test_tree.xul]
|
||||
|
84
accessible/tests/mochitest/name/test_toolbaritem.xul
Normal file
84
accessible/tests/mochitest/name/test_toolbaritem.xul
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
||||
type="text/css"?>
|
||||
<?xml-stylesheet href="general.css"
|
||||
type="text/css"?>
|
||||
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="Accessibility Name Calculating Test.">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../name.js"></script>
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
var gQueue = null;
|
||||
function doTest() {
|
||||
let ids = [];
|
||||
for (let item of ["button", "textbox"]) {
|
||||
ids.push(item + "withtooltip");
|
||||
ids.push(item + "withouttooltip");
|
||||
ids.push("nested" + item + "withtooltip");
|
||||
ids.push("nested" + item + "withouttooltip");
|
||||
}
|
||||
|
||||
for (let id of ids) {
|
||||
if (id.endsWith("withtooltip")) {
|
||||
testName(id, id, id + " should have individual name from its tooltip - ");
|
||||
} else {
|
||||
testName(id, "Toolbaritem title", id + " should have toolbaritem's title for a name - ");
|
||||
}
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<hbox flex="1" style="overflow: auto;">
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1216478"
|
||||
title="Items with tooltips inside items with a label should use their own tooltip as an accessible name, not the ancestor's label">
|
||||
Mozilla Bug 1216478
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
|
||||
<vbox flex="1">
|
||||
<toolbox>
|
||||
<toolbar>
|
||||
<toolbaritem title="Toolbaritem title">
|
||||
<toolbarbutton id="buttonwithtooltip" tooltiptext="buttonwithtooltip"/>
|
||||
<toolbarbutton id="buttonwithouttooltip"/>
|
||||
<textbox id="textboxwithtooltip" tooltiptext="textboxwithtooltip"/>
|
||||
<textbox id="textboxwithouttooltip"/>
|
||||
<vbox>
|
||||
<toolbarbutton id="nestedbuttonwithtooltip" tooltiptext="nestedbuttonwithtooltip"/>
|
||||
<toolbarbutton id="nestedbuttonwithouttooltip"/>
|
||||
<textbox id="nestedtextboxwithtooltip" tooltiptext="nestedtextboxwithtooltip"/>
|
||||
<textbox id="nestedtextboxwithouttooltip"/>
|
||||
</vbox>
|
||||
</toolbaritem>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
|
||||
</vbox> <!-- close tests area -->
|
||||
</hbox> <!-- close main area -->
|
||||
</window>
|
@ -451,6 +451,10 @@
|
||||
class="show-only-for-keyboard"
|
||||
command="Browser:BookmarkAllTabs"
|
||||
key="bookmarkAllTabsKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&recentBookmarks.label;"
|
||||
disabled="true"/>
|
||||
<vbox id="menu_recentBookmarks"/>
|
||||
<menuseparator id="bookmarksToolbarSeparator"/>
|
||||
<menu id="bookmarksToolbarFolderMenu"
|
||||
class="menu-iconic bookmark-item"
|
||||
|
@ -1305,6 +1305,9 @@ var BookmarkingUI = {
|
||||
return;
|
||||
}
|
||||
|
||||
this._updateRecentBookmarks(document.getElementById("BMB_recentBookmarks"),
|
||||
"subviewbutton");
|
||||
|
||||
if (!this._popupNeedsUpdate)
|
||||
return;
|
||||
this._popupNeedsUpdate = false;
|
||||
@ -1338,6 +1341,60 @@ var BookmarkingUI = {
|
||||
});
|
||||
},
|
||||
|
||||
_updateRecentBookmarks: function(container, extraCSSClass = "") {
|
||||
const kMaxResults = 5;
|
||||
|
||||
let options = PlacesUtils.history.getNewQueryOptions();
|
||||
options.excludeQueries = true;
|
||||
options.queryType = options.QUERY_TYPE_BOOKMARKS;
|
||||
options.sortingMode = options.SORT_BY_DATE_DESCENDING;
|
||||
options.maxResults = kMaxResults;
|
||||
let query = PlacesUtils.history.getNewQuery();
|
||||
|
||||
while (container.firstChild) {
|
||||
container.firstChild.remove();
|
||||
}
|
||||
|
||||
PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
|
||||
.asyncExecuteLegacyQueries([query], 1, options, {
|
||||
handleResult: function (aResultSet) {
|
||||
let onItemClick = function (aEvent) {
|
||||
let item = aEvent.target;
|
||||
openUILink(item.getAttribute("targetURI"), aEvent);
|
||||
CustomizableUI.hidePanelForNode(item);
|
||||
};
|
||||
|
||||
let fragment = document.createDocumentFragment();
|
||||
let row;
|
||||
while ((row = aResultSet.getNextRow())) {
|
||||
let uri = row.getResultByIndex(1);
|
||||
let title = row.getResultByIndex(2);
|
||||
let icon = row.getResultByIndex(6);
|
||||
|
||||
let item =
|
||||
document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"menuitem");
|
||||
item.setAttribute("label", title || uri);
|
||||
item.setAttribute("targetURI", uri);
|
||||
item.setAttribute("class", "menuitem-iconic menuitem-with-favicon bookmark-item " +
|
||||
extraCSSClass);
|
||||
item.addEventListener("click", onItemClick);
|
||||
if (icon) {
|
||||
let iconURL = "moz-anno:favicon:" + icon;
|
||||
item.setAttribute("image", iconURL);
|
||||
}
|
||||
fragment.appendChild(item);
|
||||
}
|
||||
container.appendChild(fragment);
|
||||
},
|
||||
handleError: function (aError) {
|
||||
Cu.reportError("Error while attempting to show recent bookmarks: " + aError);
|
||||
},
|
||||
handleCompletion: function (aReason) {
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles star styling based on page proxy state changes.
|
||||
*/
|
||||
@ -1550,6 +1607,7 @@ var BookmarkingUI = {
|
||||
onMainMenuPopupShowing: function BUI_onMainMenuPopupShowing(event) {
|
||||
this._updateBookmarkPageMenuItem();
|
||||
PlacesCommandHook.updateBookmarkAllTabsCommand();
|
||||
this._updateRecentBookmarks(document.getElementById("menu_recentBookmarks"));
|
||||
},
|
||||
|
||||
_showBookmarkedNotification: function BUI_showBookmarkedNotification() {
|
||||
|
@ -812,6 +812,11 @@
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&recentBookmarks.label;"
|
||||
disabled="true"
|
||||
class="subviewbutton"/>
|
||||
<vbox id="BMB_recentBookmarks"/>
|
||||
<menuseparator/>
|
||||
<menu id="BMB_bookmarksToolbar"
|
||||
class="menu-iconic bookmark-item subviewbutton"
|
||||
label="&personalbarCmd.label;"
|
||||
|
@ -121,7 +121,7 @@ SocialErrorListener = {
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
dwu.allowScriptsToClose();
|
||||
|
||||
content.addEventListener("DOMWindowClose", function _mozSocialDOMWindowClose(evt) {
|
||||
addEventListener("DOMWindowClose", function _mozSocialDOMWindowClose(evt) {
|
||||
sendAsyncMessage("DOMWindowClose");
|
||||
// preventDefault stops the default window.close() function being called,
|
||||
// which doesn't actually close anything but causes things to get into
|
||||
@ -135,7 +135,7 @@ SocialErrorListener = {
|
||||
break;
|
||||
case "Social:ListenForEvents":
|
||||
for (let eventName of message.data.eventNames) {
|
||||
content.addEventListener(eventName, this);
|
||||
addEventListener(eventName, this);
|
||||
}
|
||||
break;
|
||||
case "Social:SetDocumentTitle":
|
||||
|
@ -207,6 +207,16 @@
|
||||
content.setAttribute("origin", this.content.getAttribute("origin"));
|
||||
content.popupnotificationanchor.className = this.content.popupnotificationanchor.className;
|
||||
content.swapDocShells(this.content);
|
||||
|
||||
// When a chat window is attached or detached, the docShell hosting
|
||||
// the chat document is swapped to the newly created chat window.
|
||||
// (Be it inside a popup or back inside a chatbox element attached to
|
||||
// the chatbar.)
|
||||
// Since a swapDocShells call does not swap the messageManager instances
|
||||
// attached to a browser, we'll need to add the message listeners to
|
||||
// the new messageManager. This is not a bug in swapDocShells, merely
|
||||
// a design decision.
|
||||
content.messageManager.addMessageListener("DOMTitleChanged", content);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
@ -1828,6 +1828,13 @@
|
||||
|
||||
var uriIsAboutBlank = !aURI || aURI == "about:blank";
|
||||
|
||||
if (!aURI || isBlankPageURL(aURI)) {
|
||||
t.setAttribute("label", this.mStringBundle.getString("tabs.emptyTabTitle"));
|
||||
} else if (aURI.toLowerCase().startsWith("javascript:")) {
|
||||
// This can go away when bug 672618 or bug 55696 are fixed.
|
||||
t.setAttribute("label", aURI);
|
||||
}
|
||||
|
||||
if (aUserContextId)
|
||||
t.setAttribute("usercontextid", aUserContextId);
|
||||
t.setAttribute("crop", "end");
|
||||
@ -1906,15 +1913,6 @@
|
||||
this.mPanelContainer.appendChild(notificationbox);
|
||||
}
|
||||
|
||||
// We've waited until the tab is in the DOM to set the label. This
|
||||
// allows the TabLabelModified event to be properly dispatched.
|
||||
if (!aURI || isBlankPageURL(aURI)) {
|
||||
t.label = this.mStringBundle.getString("tabs.emptyTabTitle");
|
||||
} else if (aURI.toLowerCase().startsWith("javascript:")) {
|
||||
// This can go away when bug 672618 or bug 55696 are fixed.
|
||||
t.label = aURI;
|
||||
}
|
||||
|
||||
this.tabContainer.updateVisibility();
|
||||
|
||||
// wire up a progress listener for the new browser object.
|
||||
@ -6073,8 +6071,7 @@
|
||||
class="tab-icon-overlay"
|
||||
role="presentation"/>
|
||||
<xul:label flex="1"
|
||||
anonid="tab-label"
|
||||
xbl:inherits="value=visibleLabel,crop,accesskey,fadein,pinned,selected,visuallyselected,attention"
|
||||
xbl:inherits="value=label,crop,accesskey,fadein,pinned,selected,visuallyselected,attention"
|
||||
class="tab-text tab-label"
|
||||
role="presentation"/>
|
||||
<xul:image xbl:inherits="soundplaying,pinned,muted,visuallyselected"
|
||||
@ -6140,32 +6137,6 @@
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<property name="label">
|
||||
<getter>
|
||||
return this.getAttribute("label");
|
||||
</getter>
|
||||
<setter>
|
||||
this.setAttribute("label", val);
|
||||
let event = new CustomEvent("TabLabelModified", {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
});
|
||||
this.dispatchEvent(event);
|
||||
|
||||
// Let listeners prevent synchronizing the actual label to the
|
||||
// visible label (allowing them to override the visible label).
|
||||
if (!event.defaultPrevented)
|
||||
this.visibleLabel = val;
|
||||
</setter>
|
||||
</property>
|
||||
<property name="visibleLabel">
|
||||
<getter>
|
||||
return this.getAttribute("visibleLabel");
|
||||
</getter>
|
||||
<setter>
|
||||
this.setAttribute("visibleLabel", val);
|
||||
</setter>
|
||||
</property>
|
||||
<property name="pinned" readonly="true">
|
||||
<getter>
|
||||
return this.getAttribute("pinned") == "true";
|
||||
|
@ -8,4 +8,3 @@ support-files =
|
||||
skip-if = true # Bug 1245937 - Intermittent failures/timeouts.
|
||||
[browser_focus.js]
|
||||
[browser_tearoff.js]
|
||||
skip-if = true # Bug 1245805 - tearing off chat windows causes a browser crash.
|
||||
|
@ -65,7 +65,7 @@ add_chat_task(function* testTearoffChat() {
|
||||
Assert.equal(chatbox.getAttribute("label"), chatTitle, "window should have same title as chat");
|
||||
|
||||
yield ContentTask.spawn(chatbox.content, null, function* () {
|
||||
div = content.document.getElementById("testdiv");
|
||||
let div = content.document.getElementById("testdiv");
|
||||
is(div.getAttribute("test"), "1", "docshell should have been swapped");
|
||||
div.setAttribute("test", "2");
|
||||
});
|
||||
|
@ -491,7 +491,6 @@ skip-if = os == "linux" # Bug 1073339 - Investigate autocomplete test unreliabil
|
||||
[browser_utilityOverlay.js]
|
||||
[browser_viewSourceInTabOnViewSource.js]
|
||||
[browser_visibleFindSelection.js]
|
||||
[browser_visibleLabel.js]
|
||||
[browser_visibleTabs.js]
|
||||
[browser_visibleTabs_bookmarkAllPages.js]
|
||||
skip-if = true # Bug 1005420 - fails intermittently. also with e10s enabled: bizarre problem with hidden tab having _mouseenter called, via _setPositionalAttributes, and tab not being found resulting in 'candidate is undefined'
|
||||
|
@ -1,94 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* Tests:
|
||||
* verify that the visibleLabel attribute works
|
||||
* verify the TabLabelModified event works for both existing and new tabs
|
||||
*/
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
registerCleanupFunction(function() {
|
||||
gBrowser.removeCurrentTab({animate: false});
|
||||
});
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank",
|
||||
{skipAnimation: true});
|
||||
tab.linkedBrowser.addEventListener("load", function onLoad(event) {
|
||||
event.currentTarget.removeEventListener("load", onLoad, true);
|
||||
executeSoon(afterLoad);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function afterLoad() {
|
||||
let tab = gBrowser.selectedTab;
|
||||
let xulLabel = document.getAnonymousElementByAttribute(tab, "anonid",
|
||||
"tab-label");
|
||||
// Verify we're starting out on the right foot
|
||||
is(tab.label, "New Tab", "Initial tab label is default");
|
||||
is(xulLabel.value, "New Tab", "Label element is default");
|
||||
is(tab.visibleLabel, "New Tab", "visibleLabel is default");
|
||||
|
||||
// Check that a normal label setting works correctly
|
||||
tab.label = "Hello, world!";
|
||||
is(tab.label, "Hello, world!", "tab label attribute set via tab.label");
|
||||
is(xulLabel.value, "Hello, world!", "xul:label set via tab.label");
|
||||
is(tab.visibleLabel, "Hello, world!", "visibleLabel set via tab.label");
|
||||
|
||||
// Check that setting visibleLabel only affects the label element
|
||||
tab.visibleLabel = "Goodnight, Irene";
|
||||
is(tab.label, "Hello, world!", "Tab.label unaffected by visibleLabel setter");
|
||||
is(xulLabel.value, "Goodnight, Irene",
|
||||
"xul:label set by visibleLabel setter");
|
||||
is(tab.visibleLabel, "Goodnight, Irene",
|
||||
"visibleLabel attribute set by visibleLabel setter");
|
||||
|
||||
// Check that setting the label property hits everything
|
||||
tab.label = "One more label";
|
||||
is(tab.label, "One more label",
|
||||
"Tab label set via label property after diverging from visibleLabel");
|
||||
is(xulLabel.value, "One more label",
|
||||
"xul:label set via label property after diverging from visibleLabel");
|
||||
is(tab.visibleLabel, "One more label",
|
||||
"visibleLabel set from label property after diverging from visibleLabel");
|
||||
|
||||
tab.addEventListener("TabLabelModified", overrideTabLabel, true);
|
||||
tab.label = "This won't be the visibleLabel";
|
||||
}
|
||||
|
||||
function overrideTabLabel(aEvent) {
|
||||
aEvent.target.removeEventListener("TabLabelModified", overrideTabLabel, true);
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
aEvent.target.visibleLabel = "Handler set this as the visible label";
|
||||
executeSoon(checkTabLabelModified);
|
||||
}
|
||||
|
||||
function checkTabLabelModified() {
|
||||
let tab = gBrowser.selectedTab;
|
||||
let xulLabel = document.getAnonymousElementByAttribute(tab, "anonid",
|
||||
"tab-label");
|
||||
|
||||
is(tab.label, "This won't be the visibleLabel",
|
||||
"Tab label set via label property that triggered event");
|
||||
is(xulLabel.value, "Handler set this as the visible label",
|
||||
"xul:label set by TabLabelModified handler");
|
||||
is(tab.visibleLabel, "Handler set this as the visible label",
|
||||
"visibleLabel set by TabLabelModified handler");
|
||||
|
||||
gBrowser.removeCurrentTab({animate: false});
|
||||
executeSoon(checkTabLabelModifiedOnNewTab);
|
||||
}
|
||||
|
||||
function checkTabLabelModifiedOnNewTab() {
|
||||
gBrowser.tabContainer.addEventListener("TabLabelModified",
|
||||
handleTabLabelModifiedOnNewTab, true);
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank",
|
||||
{skipAnimation: true});
|
||||
}
|
||||
|
||||
function handleTabLabelModifiedOnNewTab(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabLabelModified",
|
||||
handleTabLabelModifiedOnNewTab, true);
|
||||
ok(true, "Event received from new tab default being set");
|
||||
executeSoon(finish);
|
||||
}
|
@ -184,8 +184,6 @@ const CustomizableWidgets = [
|
||||
|
||||
let options = PlacesUtils.history.getNewQueryOptions();
|
||||
options.excludeQueries = true;
|
||||
options.includeHidden = false;
|
||||
options.resultType = options.RESULTS_AS_URI;
|
||||
options.queryType = options.QUERY_TYPE_HISTORY;
|
||||
options.sortingMode = options.SORT_BY_DATE_DESCENDING;
|
||||
options.maxResults = kMaxResults;
|
||||
|
@ -77,7 +77,7 @@ run-if = e10s
|
||||
[browser_cleaner.js]
|
||||
[browser_cookies.js]
|
||||
[browser_crashedTabs.js]
|
||||
skip-if = true # bug 1236414
|
||||
skip-if = !e10s || !crashreporter
|
||||
[browser_unrestored_crashedTabs.js]
|
||||
skip-if = !e10s || !crashreporter
|
||||
[browser_revive_crashed_bg_tabs.js]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
requestLongerTimeout(2);
|
||||
requestLongerTimeout(10);
|
||||
|
||||
const PAGE_1 = "data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
|
||||
const PAGE_2 = "data:text/html,<html><body>Another%20regular,%20everyday,%20normal%20page.";
|
||||
@ -17,9 +17,6 @@ registerCleanupFunction(() => {
|
||||
// Allow tabs to restore on demand so we can test pending states
|
||||
Services.prefs.clearUserPref("browser.sessionstore.restore_on_demand");
|
||||
|
||||
// Running this test in ASAN is slow.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
function clickButton(browser, id) {
|
||||
info("Clicking " + id);
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
This is the pdf.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 1.4.42
|
||||
Current extension version is: 1.4.64
|
||||
|
@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
|
||||
// Use strict in our context only - users might not want it
|
||||
'use strict';
|
||||
|
||||
var pdfjsVersion = '1.4.42';
|
||||
var pdfjsBuild = '4c59712';
|
||||
var pdfjsVersion = '1.4.64';
|
||||
var pdfjsBuild = '2f145d8';
|
||||
|
||||
var pdfjsFilePath =
|
||||
typeof document !== 'undefined' && document.currentScript ?
|
||||
@ -6258,9 +6258,9 @@ PDFJS.getDocument = function getDocument(src,
|
||||
throw new Error('Loading aborted');
|
||||
}
|
||||
var messageHandler = new MessageHandler(docId, workerId, worker.port);
|
||||
messageHandler.send('Ready', null);
|
||||
var transport = new WorkerTransport(messageHandler, task, rangeTransport);
|
||||
task._transport = transport;
|
||||
messageHandler.send('Ready', null);
|
||||
});
|
||||
}).catch(task._capability.reject);
|
||||
|
||||
@ -7102,7 +7102,7 @@ var PDFWorker = (function PDFWorkerClosure() {
|
||||
|
||||
_initialize: function PDFWorker_initialize() {
|
||||
// If worker support isn't disabled explicit and the browser has worker
|
||||
// support, create a new web worker and test if it/the browser fullfills
|
||||
// support, create a new web worker and test if it/the browser fulfills
|
||||
// all requirements to run parts of pdf.js in a web worker.
|
||||
// Right now, the requirement is, that an Uint8Array is still an
|
||||
// Uint8Array as it arrives on the worker. (Chrome added this with v.15.)
|
||||
|
119
browser/extensions/pdfjs/content/build/pdf.worker.js
vendored
119
browser/extensions/pdfjs/content/build/pdf.worker.js
vendored
@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
|
||||
// Use strict in our context only - users might not want it
|
||||
'use strict';
|
||||
|
||||
var pdfjsVersion = '1.4.42';
|
||||
var pdfjsBuild = '4c59712';
|
||||
var pdfjsVersion = '1.4.64';
|
||||
var pdfjsBuild = '2f145d8';
|
||||
|
||||
var pdfjsFilePath =
|
||||
typeof document !== 'undefined' && document.currentScript ?
|
||||
@ -29687,15 +29687,21 @@ var Type1Parser = (function Type1ParserClosure() {
|
||||
}
|
||||
|
||||
function decrypt(data, key, discardNumber) {
|
||||
var r = key | 0, c1 = 52845, c2 = 22719;
|
||||
var count = data.length;
|
||||
if (discardNumber >= data.length) {
|
||||
return new Uint8Array(0);
|
||||
}
|
||||
var r = key | 0, c1 = 52845, c2 = 22719, i, j;
|
||||
for (i = 0; i < discardNumber; i++) {
|
||||
r = ((data[i] + r) * c1 + c2) & ((1 << 16) - 1);
|
||||
}
|
||||
var count = data.length - discardNumber;
|
||||
var decrypted = new Uint8Array(count);
|
||||
for (var i = 0; i < count; i++) {
|
||||
for (i = discardNumber, j = 0; j < count; i++, j++) {
|
||||
var value = data[i];
|
||||
decrypted[i] = value ^ (r >> 8);
|
||||
decrypted[j] = value ^ (r >> 8);
|
||||
r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
|
||||
}
|
||||
return Array.prototype.slice.call(decrypted, discardNumber);
|
||||
return decrypted;
|
||||
}
|
||||
|
||||
function decryptAscii(data, key, discardNumber) {
|
||||
@ -33249,15 +33255,15 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
case 'DeviceCmykCS':
|
||||
return this.singletons.cmyk;
|
||||
case 'CalGrayCS':
|
||||
whitePoint = IR[1].WhitePoint;
|
||||
blackPoint = IR[1].BlackPoint;
|
||||
gamma = IR[1].Gamma;
|
||||
whitePoint = IR[1];
|
||||
blackPoint = IR[2];
|
||||
gamma = IR[3];
|
||||
return new CalGrayCS(whitePoint, blackPoint, gamma);
|
||||
case 'CalRGBCS':
|
||||
whitePoint = IR[1].WhitePoint;
|
||||
blackPoint = IR[1].BlackPoint;
|
||||
gamma = IR[1].Gamma;
|
||||
var matrix = IR[1].Matrix;
|
||||
whitePoint = IR[1];
|
||||
blackPoint = IR[2];
|
||||
gamma = IR[3];
|
||||
var matrix = IR[4];
|
||||
return new CalRGBCS(whitePoint, blackPoint, gamma, matrix);
|
||||
case 'PatternCS':
|
||||
var basePatternCS = IR[1];
|
||||
@ -33276,11 +33282,11 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
var tintFnIR = IR[3];
|
||||
|
||||
return new AlternateCS(numComps, ColorSpace.fromIR(alt),
|
||||
PDFFunction.fromIR(tintFnIR));
|
||||
PDFFunction.fromIR(tintFnIR));
|
||||
case 'LabCS':
|
||||
whitePoint = IR[1].WhitePoint;
|
||||
blackPoint = IR[1].BlackPoint;
|
||||
var range = IR[1].Range;
|
||||
whitePoint = IR[1];
|
||||
blackPoint = IR[2];
|
||||
var range = IR[3];
|
||||
return new LabCS(whitePoint, blackPoint, range);
|
||||
default:
|
||||
error('Unknown name ' + name);
|
||||
@ -33324,7 +33330,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
} else if (isArray(cs)) {
|
||||
mode = xref.fetchIfRef(cs[0]).name;
|
||||
this.mode = mode;
|
||||
var numComps, params, alt;
|
||||
var numComps, params, alt, whitePoint, blackPoint, gamma;
|
||||
|
||||
switch (mode) {
|
||||
case 'DeviceGray':
|
||||
@ -33337,11 +33343,18 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
case 'CMYK':
|
||||
return 'DeviceCmykCS';
|
||||
case 'CalGray':
|
||||
params = xref.fetchIfRef(cs[1]).getAll();
|
||||
return ['CalGrayCS', params];
|
||||
params = xref.fetchIfRef(cs[1]);
|
||||
whitePoint = params.get('WhitePoint');
|
||||
blackPoint = params.get('BlackPoint');
|
||||
gamma = params.get('Gamma');
|
||||
return ['CalGrayCS', whitePoint, blackPoint, gamma];
|
||||
case 'CalRGB':
|
||||
params = xref.fetchIfRef(cs[1]).getAll();
|
||||
return ['CalRGBCS', params];
|
||||
params = xref.fetchIfRef(cs[1]);
|
||||
whitePoint = params.get('WhitePoint');
|
||||
blackPoint = params.get('BlackPoint');
|
||||
gamma = params.get('Gamma');
|
||||
var matrix = params.get('Matrix');
|
||||
return ['CalRGBCS', whitePoint, blackPoint, gamma, matrix];
|
||||
case 'ICCBased':
|
||||
var stream = xref.fetchIfRef(cs[1]);
|
||||
var dict = stream.dict;
|
||||
@ -33393,8 +33406,11 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
var tintFnIR = PDFFunction.getIR(xref, xref.fetchIfRef(cs[3]));
|
||||
return ['AlternateCS', numComps, alt, tintFnIR];
|
||||
case 'Lab':
|
||||
params = xref.fetchIfRef(cs[1]).getAll();
|
||||
return ['LabCS', params];
|
||||
params = xref.fetchIfRef(cs[1]);
|
||||
whitePoint = params.get('WhitePoint');
|
||||
blackPoint = params.get('BlackPoint');
|
||||
var range = params.get('Range');
|
||||
return ['LabCS', whitePoint, blackPoint, range];
|
||||
default:
|
||||
error('unimplemented color space object "' + mode + '"');
|
||||
}
|
||||
@ -35949,17 +35965,19 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
processed[resources.objId] = true;
|
||||
}
|
||||
|
||||
var nodes = [resources];
|
||||
var nodes = [resources], xref = this.xref;
|
||||
while (nodes.length) {
|
||||
var key;
|
||||
var key, i, ii;
|
||||
var node = nodes.shift();
|
||||
// First check the current resources for blend modes.
|
||||
var graphicStates = node.get('ExtGState');
|
||||
if (isDict(graphicStates)) {
|
||||
graphicStates = graphicStates.getAll();
|
||||
for (key in graphicStates) {
|
||||
var graphicState = graphicStates[key];
|
||||
var bm = graphicState['BM'];
|
||||
var graphicStatesKeys = graphicStates.getKeys();
|
||||
for (i = 0, ii = graphicStatesKeys.length; i < ii; i++) {
|
||||
key = graphicStatesKeys[i];
|
||||
|
||||
var graphicState = graphicStates.get(key);
|
||||
var bm = graphicState.get('BM');
|
||||
if (isName(bm) && bm.name !== 'Normal') {
|
||||
return true;
|
||||
}
|
||||
@ -35970,9 +35988,20 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
if (!isDict(xObjects)) {
|
||||
continue;
|
||||
}
|
||||
xObjects = xObjects.getAll();
|
||||
for (key in xObjects) {
|
||||
var xObject = xObjects[key];
|
||||
var xObjectsKeys = xObjects.getKeys();
|
||||
for (i = 0, ii = xObjectsKeys.length; i < ii; i++) {
|
||||
key = xObjectsKeys[i];
|
||||
|
||||
var xObject = xObjects.getRaw(key);
|
||||
if (isRef(xObject)) {
|
||||
if (processed[xObject.toString()]) {
|
||||
// The XObject has already been processed, and by avoiding a
|
||||
// redundant `xref.fetch` we can *significantly* reduce the load
|
||||
// time for badly generated PDF files (fixes issue6961.pdf).
|
||||
continue;
|
||||
}
|
||||
xObject = xref.fetch(xObject);
|
||||
}
|
||||
if (!isStream(xObject)) {
|
||||
continue;
|
||||
}
|
||||
@ -36266,11 +36295,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
xref, stateManager) {
|
||||
// This array holds the converted/processed state data.
|
||||
var gStateObj = [];
|
||||
var gStateMap = gState.map;
|
||||
var gStateKeys = gState.getKeys();
|
||||
var self = this;
|
||||
var promise = Promise.resolve();
|
||||
for (var key in gStateMap) {
|
||||
var value = gStateMap[key];
|
||||
for (var i = 0, ii = gStateKeys.length; i < ii; i++) {
|
||||
var key = gStateKeys[i];
|
||||
var value = gState.get(key);
|
||||
switch (key) {
|
||||
case 'Type':
|
||||
break;
|
||||
@ -36303,12 +36333,11 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
gStateObj.push([key, false]);
|
||||
break;
|
||||
}
|
||||
var dict = xref.fetchIfRef(value);
|
||||
if (isDict(dict)) {
|
||||
promise = promise.then(function () {
|
||||
if (isDict(value)) {
|
||||
promise = promise.then(function (dict) {
|
||||
return self.handleSMask(dict, resources, operatorList,
|
||||
task, stateManager);
|
||||
});
|
||||
}.bind(this, value));
|
||||
gStateObj.push([key, true]);
|
||||
} else {
|
||||
warn('Unsupported SMask type');
|
||||
@ -36340,7 +36369,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
}
|
||||
}
|
||||
return promise.then(function () {
|
||||
if (gStateObj.length >= 0) {
|
||||
if (gStateObj.length > 0) {
|
||||
operatorList.addOp(OPS.setGState, [gStateObj]);
|
||||
}
|
||||
});
|
||||
@ -37885,13 +37914,13 @@ var TranslatedFont = (function TranslatedFontClosure() {
|
||||
|
||||
var translatedFont = this.font;
|
||||
var loadCharProcsPromise = Promise.resolve();
|
||||
var charProcs = this.dict.get('CharProcs').getAll();
|
||||
var charProcs = this.dict.get('CharProcs');
|
||||
var fontResources = this.dict.get('Resources') || resources;
|
||||
var charProcKeys = Object.keys(charProcs);
|
||||
var charProcKeys = charProcs.getKeys();
|
||||
var charProcOperatorList = Object.create(null);
|
||||
for (var i = 0, n = charProcKeys.length; i < n; ++i) {
|
||||
loadCharProcsPromise = loadCharProcsPromise.then(function (key) {
|
||||
var glyphStream = charProcs[key];
|
||||
var glyphStream = charProcs.get(key);
|
||||
var operatorList = new OperatorList();
|
||||
return evaluator.getOperatorList(glyphStream, task, fontResources,
|
||||
operatorList).then(function () {
|
||||
|
@ -168,6 +168,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||
<!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
|
||||
<!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
|
||||
<!ENTITY showAllBookmarks2.label "Show All Bookmarks">
|
||||
<!ENTITY recentBookmarks.label "Recently Bookmarked">
|
||||
<!ENTITY unsortedBookmarksCmd.label "Unsorted Bookmarks">
|
||||
<!ENTITY bookmarksToolbarChevron.tooltip "Show more bookmarks">
|
||||
|
||||
|
10
build.gradle
10
build.gradle
@ -19,19 +19,11 @@ buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
|
||||
// For spoon-gradle-plugin SNAPSHOT release. This needs to go before
|
||||
// the snapshots repository, otherwise we find a remote 1.0.3-SNAPSHOT
|
||||
// that doesn't include nalexander's local changes.
|
||||
maven {
|
||||
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Unit testing support was added in 1.1.0. IntelliJ 14.1.4 and Android
|
||||
// Studio 1.2.1.1 appear to work fine with plugin version 1.3.0.
|
||||
classpath 'com.android.tools.build:gradle:1.3.0'
|
||||
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.3-SNAPSHOT') {
|
||||
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.4') {
|
||||
// Without these, we get errors linting.
|
||||
exclude module: 'guava'
|
||||
}
|
||||
|
24
configure.in
24
configure.in
@ -3758,6 +3758,7 @@ MOZ_SCTP=
|
||||
MOZ_ANDROID_OMX=
|
||||
MOZ_MEDIA_NAVIGATOR=
|
||||
MOZ_OMX_PLUGIN=
|
||||
MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE=
|
||||
MOZ_VPX_ERROR_CONCEALMENT=
|
||||
MOZ_WEBSPEECH=1
|
||||
MOZ_WEBSPEECH_MODELS=
|
||||
@ -5366,8 +5367,26 @@ if test -n "$MOZ_OMX_PLUGIN"; then
|
||||
dnl Only allow building OMX plugin on Gonk (B2G) or Android
|
||||
AC_DEFINE(MOZ_OMX_PLUGIN)
|
||||
else
|
||||
dnl fail if we're not building on Gonk or Android
|
||||
AC_MSG_ERROR([OMX media plugin can only be built on B2G or Android])
|
||||
dnl fail if we're not building on Gonk or Android
|
||||
AC_MSG_ERROR([OMX media plugin can only be built on B2G or Android])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable building mobile/android with Gradle
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(gradle-mobile-android-builds,
|
||||
[ --enable-gradle-mobile-android-builds Enable building mobile/android with Gradle],
|
||||
MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE=1,
|
||||
MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE=)
|
||||
|
||||
if test -n "$MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE"; then
|
||||
if test "$OS_TARGET" = "Android" -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
|
||||
dnl Only allow building mobile/android with Gradle.
|
||||
AC_DEFINE(MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE)
|
||||
else
|
||||
dnl fail if we're not building mobile/android.
|
||||
AC_MSG_ERROR([Can only build mobile/android with Gradle])
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -8900,6 +8919,7 @@ AC_SUBST(MOZ_DIRECTSHOW)
|
||||
AC_SUBST(MOZ_ANDROID_OMX)
|
||||
AC_SUBST(MOZ_APPLEMEDIA)
|
||||
AC_SUBST(MOZ_OMX_PLUGIN)
|
||||
AC_SUBST(MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE)
|
||||
AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
|
||||
AC_SUBST(VPX_AS)
|
||||
AC_SUBST_LIST(VPX_ASFLAGS)
|
||||
|
@ -5,10 +5,13 @@
|
||||
"use strict";
|
||||
|
||||
const l10n = require("gcli/l10n");
|
||||
const {
|
||||
getCssDocs,
|
||||
PAGE_LINK_URL
|
||||
} = require("devtools/client/shared/widgets/MdnDocsWidget");
|
||||
|
||||
var MdnDocsWidget;
|
||||
try {
|
||||
MdnDocsWidget = require("devtools/client/shared/widgets/MdnDocsWidget");
|
||||
} catch (e) {
|
||||
// DevTools MdnDocsWidget only available in Firefox Desktop
|
||||
}
|
||||
|
||||
exports.items = [{
|
||||
name: "mdn",
|
||||
@ -26,10 +29,14 @@ exports.items = [{
|
||||
description: l10n.lookup("mdnCssProp")
|
||||
}],
|
||||
exec: function(args) {
|
||||
return getCssDocs(args.property).then(result => {
|
||||
if (!MdnDocsWidget) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return MdnDocsWidget.getCssDocs(args.property).then(result => {
|
||||
return {
|
||||
data: result,
|
||||
url: PAGE_LINK_URL + args.property,
|
||||
url: MdnDocsWidget.PAGE_LINK_URL + args.property,
|
||||
property: args.property
|
||||
};
|
||||
}, error => {
|
||||
|
@ -2,6 +2,12 @@
|
||||
# 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/.
|
||||
|
||||
# We call mach -> Make -> gradle -> mach, which races to find and
|
||||
# create .mozconfig files and to generate targets.
|
||||
ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
.NOTPARALLEL:
|
||||
endif
|
||||
|
||||
MOZ_BUILDID := $(shell awk '{print $$3}' $(DEPTH)/buildid.h)
|
||||
|
||||
# Set the appropriate version code, based on the existance of the
|
||||
@ -201,9 +207,23 @@ endif # MOZ_INSTALL_TRACKING
|
||||
|
||||
library_jars := $(subst $(NULL) ,:,$(strip $(library_jars)))
|
||||
|
||||
gradle_dir := $(topobjdir)/gradle/build/mobile/android
|
||||
|
||||
ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
.gradle.deps: .aapt.deps FORCE
|
||||
@$(TOUCH) $@
|
||||
$(topsrcdir)/mach gradle \
|
||||
$(if $(MOZILLA_OFFICIAL),--no-daemon --offline --info) \
|
||||
app:assembleAutomationDebug app:assembleAutomationDebugAndroidTest -x lint
|
||||
|
||||
classes.dex: .gradle.deps
|
||||
$(REPORT_BUILD)
|
||||
cp $(gradle_dir)/app/intermediates/transforms/dex/automation/debug/folders/1000/1f/main/classes.dex $@
|
||||
else
|
||||
classes.dex: .proguard.deps
|
||||
$(REPORT_BUILD)
|
||||
$(DX) --dex --output=classes.dex jars-proguarded
|
||||
endif
|
||||
|
||||
ifdef MOZ_DISABLE_PROGUARD
|
||||
PROGUARD_PASSES=0
|
||||
@ -501,8 +521,13 @@ endef
|
||||
# .aapt.deps: $(all_resources)
|
||||
$(eval $(call aapt_command,.aapt.deps,$(all_resources),gecko.ap_,generated/,./))
|
||||
|
||||
# .aapt.nodeps: $(abspath $(CURDIR)/AndroidManifest.xml) FORCE
|
||||
$(eval $(call aapt_command,.aapt.nodeps,$(abspath $(CURDIR)/AndroidManifest.xml) FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/))
|
||||
ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
.aapt.nodeps: FORCE
|
||||
cp $(gradle_dir)/app/intermediates/res/resources-automation-debug.ap_ gecko-nodeps.ap_
|
||||
else
|
||||
# .aapt.nodeps: $(CURDIR)/AndroidManifest.xml FORCE
|
||||
$(eval $(call aapt_command,.aapt.nodeps,$(CURDIR)/AndroidManifest.xml FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/))
|
||||
endif
|
||||
|
||||
# Override the Java settings with some specific android settings
|
||||
include $(topsrcdir)/config/android-common.mk
|
||||
@ -532,7 +557,14 @@ gradle-targets: $(foreach f,$(constants_PP_JAVAFILES),$(f))
|
||||
gradle-targets: $(abspath AndroidManifest.xml)
|
||||
gradle-targets: $(ANDROID_GENERATED_RESFILES)
|
||||
|
||||
gradle-omnijar: $(ABS_DIST)/fennec/$(OMNIJAR_NAME)
|
||||
ifndef MOZILLA_OFFICIAL
|
||||
# Local developers update omni.ja during their builds. There's a
|
||||
# chicken-and-egg problem here.
|
||||
gradle-omnijar: $(abspath $(DIST)/fennec/$(OMNIJAR_NAME))
|
||||
else
|
||||
# In automation, omni.ja is built only during packaging.
|
||||
gradle-omnijar:
|
||||
endif
|
||||
|
||||
.PHONY: gradle-targets gradle-omnijar
|
||||
|
||||
@ -543,8 +575,8 @@ endif
|
||||
|
||||
# GeneratedJNIWrappers.cpp target also generates
|
||||
# GeneratedJNIWrappers.h and GeneratedJNINatives.h
|
||||
libs:: classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.txt
|
||||
$(INSTALL) classes.dex $(FINAL_TARGET)
|
||||
ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
libs:: jni-stubs.inc GeneratedJNIWrappers.cpp
|
||||
@(diff jni-stubs.inc $(topsrcdir)/mozglue/android/jni-stubs.inc >/dev/null && \
|
||||
diff GeneratedJNIWrappers.cpp $(topsrcdir)/widget/android/GeneratedJNIWrappers.cpp >/dev/null && \
|
||||
diff GeneratedJNIWrappers.h $(topsrcdir)/widget/android/GeneratedJNIWrappers.h >/dev/null && \
|
||||
@ -558,3 +590,9 @@ libs:: classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.t
|
||||
echo '* Repeat the build, and check in any changes. *' && \
|
||||
echo '*****************************************************' && \
|
||||
exit 1)
|
||||
endif
|
||||
|
||||
libs:: $(CURDIR)/fennec_ids.txt
|
||||
|
||||
libs:: classes.dex
|
||||
$(INSTALL) classes.dex $(FINAL_TARGET)
|
||||
|
@ -821,6 +821,7 @@ public class GeckoAppShell
|
||||
// This is the entry point from nsIShellService.
|
||||
@WrapForJNI
|
||||
public static void createShortcut(final String aTitle, final String aURI) {
|
||||
ThreadUtils.assertOnBackgroundThread();
|
||||
final BrowserDB db = GeckoProfile.get(getApplicationContext()).getDB();
|
||||
|
||||
final ContentResolver cr = getContext().getContentResolver();
|
||||
@ -840,7 +841,7 @@ public class GeckoAppShell
|
||||
OnFaviconLoadedListener listener = new OnFaviconLoadedListener() {
|
||||
@Override
|
||||
public void onFaviconLoaded(String url, String faviconURL, Bitmap favicon) {
|
||||
createShortcutWithBitmap(aTitle, url, favicon);
|
||||
doCreateShortcut(aTitle, url, favicon);
|
||||
}
|
||||
};
|
||||
|
||||
@ -853,18 +854,6 @@ public class GeckoAppShell
|
||||
Favicons.getPreferredSizeFaviconForPage(getApplicationContext(), aURI, touchIconURL, listener);
|
||||
}
|
||||
|
||||
private static void createShortcutWithBitmap(final String aTitle, final String aURI, final Bitmap aBitmap) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
doCreateShortcut(aTitle, aURI, aBitmap);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method only on the background thread.
|
||||
*/
|
||||
private static void doCreateShortcut(final String aTitle, final String aURI, final Bitmap aIcon) {
|
||||
// The intent to be launched by the shortcut.
|
||||
Intent shortcutIntent = new Intent();
|
||||
|
@ -10,5 +10,8 @@ import android.graphics.Bitmap;
|
||||
* Interface to be implemented by objects wishing to listen for favicon load completion events.
|
||||
*/
|
||||
public interface OnFaviconLoadedListener {
|
||||
/**
|
||||
* Called when favicon loading is complete. This will be run on the UI thread.
|
||||
*/
|
||||
void onFaviconLoaded(String url, String faviconURL, Bitmap favicon);
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import org.mozilla.gecko.AboutPages;
|
||||
import org.mozilla.gecko.AppConstants.Versions;
|
||||
import org.mozilla.gecko.BrowserApp;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.ReaderModeUtils;
|
||||
@ -21,17 +20,14 @@ import org.mozilla.gecko.SiteIdentity.TrackingMode;
|
||||
import org.mozilla.gecko.Tab;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
import org.mozilla.gecko.favicons.Favicons;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbarTabletBase.ForwardButtonAnimation;
|
||||
import org.mozilla.gecko.util.ColorUtils;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
import org.mozilla.gecko.util.StringUtils;
|
||||
import org.mozilla.gecko.widget.themed.ThemedLinearLayout;
|
||||
import org.mozilla.gecko.widget.themed.ThemedTextView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.SystemClock;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
@ -62,8 +58,7 @@ import android.widget.ImageButton;
|
||||
* {@code ToolbarDisplayLayout} is meant to be owned by {@code BrowserToolbar}
|
||||
* which is the main event bus for the toolbar subsystem.
|
||||
*/
|
||||
public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
implements Animation.AnimationListener {
|
||||
public class ToolbarDisplayLayout extends ThemedLinearLayout {
|
||||
|
||||
private static final String LOGTAG = "GeckoToolbarDisplayLayout";
|
||||
private boolean mTrackingProtectionEnabled;
|
||||
@ -108,22 +103,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
private OnTitleChangeListener mTitleChangeListener;
|
||||
|
||||
private final ImageButton mSiteSecurity;
|
||||
private boolean mSiteSecurityVisible;
|
||||
|
||||
// To de-bounce sets.
|
||||
private Bitmap mLastFavicon;
|
||||
private final ImageButton mFavicon;
|
||||
private int mFaviconSize;
|
||||
|
||||
private final ImageButton mStop;
|
||||
private OnStopListener mStopListener;
|
||||
|
||||
private final PageActionLayout mPageActionLayout;
|
||||
|
||||
private AlphaAnimation mLockFadeIn;
|
||||
private TranslateAnimation mTitleSlideLeft;
|
||||
private TranslateAnimation mTitleSlideRight;
|
||||
|
||||
private final SiteIdentityPopup mSiteIdentityPopup;
|
||||
private int mSecurityImageLevel;
|
||||
|
||||
@ -138,8 +123,6 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
private final int LEVEL_SHIELD_ENABLED = 5;
|
||||
private final int LEVEL_SHIELD_DISABLED = 6;
|
||||
|
||||
private PropertyAnimator mForwardAnim;
|
||||
|
||||
private final ForegroundColorSpan mUrlColor;
|
||||
private final ForegroundColorSpan mBlockedColor;
|
||||
private final ForegroundColorSpan mDomainColor;
|
||||
@ -163,24 +146,8 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
mDomainColor = new ForegroundColorSpan(ColorUtils.getColor(context, R.color.url_bar_domaintext));
|
||||
mPrivateDomainColor = new ForegroundColorSpan(ColorUtils.getColor(context, R.color.url_bar_domaintext_private));
|
||||
|
||||
mFavicon = (ImageButton) findViewById(R.id.favicon);
|
||||
mSiteSecurity = (ImageButton) findViewById(R.id.site_security);
|
||||
|
||||
if (HardwareUtils.isTablet()) {
|
||||
mSiteSecurity.setVisibility(View.VISIBLE);
|
||||
|
||||
// We don't show favicons in the toolbar on new tablet. Note that while we could
|
||||
// null the favicon reference, we don't do so to avoid excessive null-checking.
|
||||
removeView(mFavicon);
|
||||
} else {
|
||||
if (Versions.feature16Plus) {
|
||||
mFavicon.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
mFaviconSize = Math.round(Favicons.browserToolbarFaviconSize);
|
||||
}
|
||||
|
||||
mSiteSecurityVisible = (mSiteSecurity.getVisibility() == View.VISIBLE);
|
||||
|
||||
mSiteIdentityPopup = new SiteIdentityPopup(mActivity);
|
||||
mSiteIdentityPopup.setAnchor(this);
|
||||
mSiteIdentityPopup.setOnVisibilityChangeListener(mActivity);
|
||||
@ -193,15 +160,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
public void onAttachedToWindow() {
|
||||
mIsAttached = true;
|
||||
|
||||
Button.OnClickListener faviconListener = new Button.OnClickListener() {
|
||||
mSiteSecurity.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
mSiteIdentityPopup.show();
|
||||
}
|
||||
};
|
||||
|
||||
mFavicon.setOnClickListener(faviconListener);
|
||||
mSiteSecurity.setOnClickListener(faviconListener);
|
||||
});
|
||||
|
||||
mStop.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
@ -211,31 +175,11 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
// immediately based on the stopped tab.
|
||||
final Tab tab = mStopListener.onStop();
|
||||
if (tab != null) {
|
||||
updateUiMode(UIMode.DISPLAY, EnumSet.noneOf(UpdateFlags.class));
|
||||
updateUiMode(UIMode.DISPLAY);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
float slideWidth = getResources().getDimension(R.dimen.browser_toolbar_site_security_width);
|
||||
|
||||
LayoutParams siteSecParams = (LayoutParams) mSiteSecurity.getLayoutParams();
|
||||
final float scale = getResources().getDisplayMetrics().density;
|
||||
slideWidth += (siteSecParams.leftMargin + siteSecParams.rightMargin) * scale + 0.5f;
|
||||
|
||||
mLockFadeIn = new AlphaAnimation(0.0f, 1.0f);
|
||||
mLockFadeIn.setAnimationListener(this);
|
||||
|
||||
mTitleSlideLeft = new TranslateAnimation(slideWidth, 0, 0, 0);
|
||||
mTitleSlideLeft.setAnimationListener(this);
|
||||
|
||||
mTitleSlideRight = new TranslateAnimation(-slideWidth, 0, 0, 0);
|
||||
mTitleSlideRight.setAnimationListener(this);
|
||||
|
||||
final int lockAnimDuration = 300;
|
||||
mLockFadeIn.setDuration(lockAnimDuration);
|
||||
mTitleSlideLeft.setDuration(lockAnimDuration);
|
||||
mTitleSlideRight.setDuration(lockAnimDuration);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -244,37 +188,8 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
mIsAttached = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
if (animation.equals(mLockFadeIn)) {
|
||||
if (mSiteSecurityVisible)
|
||||
mSiteSecurity.setVisibility(View.VISIBLE);
|
||||
} else if (animation.equals(mTitleSlideLeft)) {
|
||||
// These two animations may be scheduled to start while the forward
|
||||
// animation is occurring. If we're showing the site security icon, make
|
||||
// sure it doesn't take any space during the forward transition.
|
||||
mSiteSecurity.setVisibility(View.GONE);
|
||||
} else if (animation.equals(mTitleSlideRight)) {
|
||||
// If we're hiding the icon, make sure that we keep its padding
|
||||
// in place during the forward transition
|
||||
mSiteSecurity.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
if (animation.equals(mTitleSlideRight)) {
|
||||
mSiteSecurity.startAnimation(mLockFadeIn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNextFocusDownId(int nextId) {
|
||||
mFavicon.setNextFocusDownId(nextId);
|
||||
mStop.setNextFocusDownId(nextId);
|
||||
mSiteSecurity.setNextFocusDownId(nextId);
|
||||
mPageActionLayout.setNextFocusDownId(nextId);
|
||||
@ -295,16 +210,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
updateTitle(tab);
|
||||
}
|
||||
|
||||
if (flags.contains(UpdateFlags.FAVICON)) {
|
||||
updateFavicon(tab);
|
||||
}
|
||||
|
||||
if (flags.contains(UpdateFlags.SITE_IDENTITY)) {
|
||||
updateSiteIdentity(tab, flags);
|
||||
updateSiteIdentity(tab);
|
||||
}
|
||||
|
||||
if (flags.contains(UpdateFlags.PROGRESS)) {
|
||||
updateProgress(tab, flags);
|
||||
updateProgress(tab);
|
||||
}
|
||||
|
||||
if (flags.contains(UpdateFlags.PRIVATE_MODE)) {
|
||||
@ -380,38 +291,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
return ReaderModeUtils.getUrlFromAboutReader(url);
|
||||
}
|
||||
|
||||
private void updateFavicon(Tab tab) {
|
||||
if (HardwareUtils.isTablet()) {
|
||||
// We don't display favicons in the toolbar on tablet.
|
||||
return;
|
||||
}
|
||||
|
||||
if (tab == null) {
|
||||
mFavicon.setImageDrawable(null);
|
||||
return;
|
||||
}
|
||||
|
||||
Bitmap image = tab.getFavicon();
|
||||
|
||||
if (image != null && image == mLastFavicon) {
|
||||
Log.d(LOGTAG, "Ignoring favicon: new image is identical to previous one.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache the original so we can debounce without scaling
|
||||
mLastFavicon = image;
|
||||
|
||||
Log.d(LOGTAG, "updateFavicon(" + image + ")");
|
||||
|
||||
if (image != null) {
|
||||
image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false);
|
||||
mFavicon.setImageBitmap(image);
|
||||
} else {
|
||||
mFavicon.setImageResource(R.drawable.favicon_globe);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSiteIdentity(Tab tab, EnumSet<UpdateFlags> flags) {
|
||||
private void updateSiteIdentity(Tab tab) {
|
||||
final SiteIdentity siteIdentity;
|
||||
if (tab == null) {
|
||||
siteIdentity = null;
|
||||
@ -468,24 +348,24 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
if (mSecurityImageLevel != imageLevel) {
|
||||
mSecurityImageLevel = imageLevel;
|
||||
mSiteSecurity.setImageLevel(mSecurityImageLevel);
|
||||
updatePageActions(flags);
|
||||
updatePageActions();
|
||||
}
|
||||
|
||||
mTrackingProtectionEnabled = trackingMode == TrackingMode.TRACKING_CONTENT_BLOCKED;
|
||||
}
|
||||
|
||||
private void updateProgress(Tab tab, EnumSet<UpdateFlags> flags) {
|
||||
private void updateProgress(Tab tab) {
|
||||
final boolean shouldShowThrobber = (tab != null &&
|
||||
tab.getState() == Tab.STATE_LOADING);
|
||||
|
||||
updateUiMode(shouldShowThrobber ? UIMode.PROGRESS : UIMode.DISPLAY, flags);
|
||||
updateUiMode(shouldShowThrobber ? UIMode.PROGRESS : UIMode.DISPLAY);
|
||||
|
||||
if (Tab.STATE_SUCCESS == tab.getState() && mTrackingProtectionEnabled) {
|
||||
mActivity.showTrackingProtectionPromptIfApplicable();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateUiMode(UIMode uiMode, EnumSet<UpdateFlags> flags) {
|
||||
private void updateUiMode(UIMode uiMode) {
|
||||
if (mUiMode == uiMode) {
|
||||
return;
|
||||
}
|
||||
@ -501,59 +381,21 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber stop");
|
||||
}
|
||||
|
||||
updatePageActions(flags);
|
||||
updatePageActions();
|
||||
}
|
||||
|
||||
private void updatePageActions(EnumSet<UpdateFlags> flags) {
|
||||
private void updatePageActions() {
|
||||
final boolean isShowingProgress = (mUiMode == UIMode.PROGRESS);
|
||||
|
||||
mStop.setVisibility(isShowingProgress ? View.VISIBLE : View.GONE);
|
||||
mPageActionLayout.setVisibility(!isShowingProgress ? View.VISIBLE : View.GONE);
|
||||
|
||||
boolean shouldShowSiteSecurity = (!isShowingProgress && mSecurityImageLevel > 0);
|
||||
|
||||
setSiteSecurityVisibility(shouldShowSiteSecurity, flags);
|
||||
|
||||
// We want title to fill the whole space available for it when there are icons
|
||||
// being shown on the right side of the toolbar as the icons already have some
|
||||
// padding in them. This is just to avoid wasting space when icons are shown.
|
||||
mTitle.setPadding(0, 0, (!isShowingProgress ? mTitlePadding : 0), 0);
|
||||
}
|
||||
|
||||
private void setSiteSecurityVisibility(boolean visible, EnumSet<UpdateFlags> flags) {
|
||||
// We don't hide site security on tablet.
|
||||
if (visible == mSiteSecurityVisible || HardwareUtils.isTablet()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mSiteSecurityVisible = visible;
|
||||
|
||||
mTitle.clearAnimation();
|
||||
mSiteSecurity.clearAnimation();
|
||||
|
||||
if (flags.contains(UpdateFlags.DISABLE_ANIMATIONS)) {
|
||||
mSiteSecurity.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
// If any of these animations were cancelled as a result of the
|
||||
// clearAnimation() calls above, we need to reset them.
|
||||
mLockFadeIn.reset();
|
||||
mTitleSlideLeft.reset();
|
||||
mTitleSlideRight.reset();
|
||||
|
||||
if (mForwardAnim != null) {
|
||||
long delay = mForwardAnim.getRemainingTime();
|
||||
mTitleSlideRight.setStartOffset(delay);
|
||||
mTitleSlideLeft.setStartOffset(delay);
|
||||
} else {
|
||||
mTitleSlideRight.setStartOffset(0);
|
||||
mTitleSlideLeft.setStartOffset(0);
|
||||
}
|
||||
|
||||
mTitle.startAnimation(visible ? mTitleSlideRight : mTitleSlideLeft);
|
||||
}
|
||||
|
||||
List<View> getFocusOrder() {
|
||||
return Arrays.asList(mSiteSecurity, mPageActionLayout, mStop);
|
||||
}
|
||||
@ -578,17 +420,12 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
}
|
||||
|
||||
void prepareForwardAnimation(PropertyAnimator anim, ForwardButtonAnimation animation, int width) {
|
||||
mForwardAnim = anim;
|
||||
|
||||
if (animation == ForwardButtonAnimation.HIDE) {
|
||||
// We animate these items individually, rather than this entire view,
|
||||
// so that we don't animate certain views, e.g. the stop button.
|
||||
anim.attach(mTitle,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
0);
|
||||
anim.attach(mFavicon,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
0);
|
||||
anim.attach(mSiteSecurity,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
0);
|
||||
@ -597,15 +434,11 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
// the animation starts, so we shift these items to the right so that they don't
|
||||
// appear to move initially.
|
||||
ViewHelper.setTranslationX(mTitle, width);
|
||||
ViewHelper.setTranslationX(mFavicon, width);
|
||||
ViewHelper.setTranslationX(mSiteSecurity, width);
|
||||
} else {
|
||||
anim.attach(mTitle,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
width);
|
||||
anim.attach(mFavicon,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
width);
|
||||
anim.attach(mSiteSecurity,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
width);
|
||||
@ -614,10 +447,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
|
||||
void finishForwardAnimation() {
|
||||
ViewHelper.setTranslationX(mTitle, 0);
|
||||
ViewHelper.setTranslationX(mFavicon, 0);
|
||||
ViewHelper.setTranslationX(mSiteSecurity, 0);
|
||||
|
||||
mForwardAnim = null;
|
||||
}
|
||||
|
||||
void prepareStartEditingAnimation() {
|
||||
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:maxLevel="0" android:drawable="@drawable/site_security_unknown"/>
|
||||
<item android:maxLevel="1" android:drawable="@drawable/lock_secure"/>
|
||||
<item android:maxLevel="2" android:drawable="@drawable/lock_secure"/>
|
||||
<item android:maxLevel="3" android:drawable="@drawable/warning_minor"/>
|
||||
<item android:maxLevel="4" android:drawable="@drawable/lock_disabled"/>
|
||||
<item android:maxLevel="5" android:drawable="@drawable/shield_enabled"/>
|
||||
<item android:maxLevel="6" android:drawable="@drawable/shield_disabled"/>
|
||||
|
||||
</level-list>
|
@ -5,7 +5,7 @@
|
||||
|
||||
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:maxLevel="0" android:drawable="@android:color/transparent"/>
|
||||
<item android:maxLevel="0" android:drawable="@drawable/site_security_unknown"/>
|
||||
<item android:maxLevel="1" android:drawable="@drawable/lock_secure"/>
|
||||
<item android:maxLevel="2" android:drawable="@drawable/lock_secure"/>
|
||||
<item android:maxLevel="3" android:drawable="@drawable/warning_minor"/>
|
||||
|
@ -106,7 +106,7 @@
|
||||
style="@style/UrlBar.Button"
|
||||
android:layout_alignLeft="@id/url_bar_entry"
|
||||
android:layout_alignRight="@id/url_bar_entry"
|
||||
android:paddingLeft="8dip"
|
||||
android:paddingLeft="1dip"
|
||||
android:paddingRight="4dip"/>
|
||||
|
||||
</merge>
|
||||
|
@ -6,13 +6,6 @@
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageButton android:id="@+id/favicon"
|
||||
style="@style/UrlBar.ImageButton"
|
||||
android:layout_width="@dimen/browser_toolbar_favicon_size"
|
||||
android:scaleType="fitCenter"
|
||||
android:paddingRight="4dip"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<!-- The site security icon is misaligned with the page title so
|
||||
we add a bottom margin to align their bottoms.
|
||||
Site security icon must have exact position and size as search icon in
|
||||
@ -30,7 +23,7 @@
|
||||
android:paddingBottom="@dimen/browser_toolbar_site_security_padding_vertical"
|
||||
android:src="@drawable/site_security_level"
|
||||
android:contentDescription="@string/site_security"
|
||||
android:visibility="gone"/>
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<org.mozilla.gecko.widget.FadedMultiColorTextView
|
||||
android:id="@+id/url_bar_title"
|
||||
|
@ -68,11 +68,11 @@
|
||||
<dimen name="overlay_prompt_container_width">@dimen/match_parent</dimen>
|
||||
|
||||
<!-- Site security icon -->
|
||||
<dimen name="browser_toolbar_site_security_height">@dimen/match_parent</dimen>
|
||||
<dimen name="browser_toolbar_site_security_width">12dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_margin_right">4dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_padding_vertical">0dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_padding_horizontal">0dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_height">32dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_width">32dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_margin_right">0dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_padding_vertical">7dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_padding_horizontal">7dp</dimen>
|
||||
|
||||
<!-- If one of these values changes, they all should. -->
|
||||
<dimen name="browser_toolbar_site_security_margin_bottom">.5dp</dimen>
|
||||
|
@ -30,6 +30,10 @@
|
||||
android:value="preferences_locale" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<CheckBoxPreference android:key="browser.chrome.dynamictoolbar"
|
||||
android:title="@string/pref_scroll_title_bar2"
|
||||
android:summary="@string/pref_scroll_title_bar_summary" />
|
||||
|
||||
<CheckBoxPreference android:key="android.not_a_preference.tab_queue"
|
||||
android:title="@string/pref_tab_queue_title"
|
||||
android:summary="@string/pref_tab_queue_summary"
|
||||
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.stanfy.spoon</groupId>
|
||||
<artifactId>spoon-gradle-plugin</artifactId>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<localCopy>true</localCopy>
|
||||
</snapshot>
|
||||
<lastUpdated>20150603215211</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.stanfy.spoon</groupId>
|
||||
<artifactId>spoon-gradle-plugin</artifactId>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
<name>Spoon Gradle Plugin</name>
|
||||
<description>Gradle plugin for Spoon</description>
|
||||
<url>https://github.com/stanfy/spoon-gradle-plugin</url>
|
||||
<inceptionYear>2013</inceptionYear>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>rmazur</id>
|
||||
<name>Roman Mazur</name>
|
||||
<email>rmazur@stanfy.com.ua</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:stanfy/spoon-gradle-plugin.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:stanfy/spoon-gradle-plugin.git</developerConnection>
|
||||
<url>https://github.com/stanfy/spoon-gradle-plugin</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spockframework</groupId>
|
||||
<artifactId>spock-core</artifactId>
|
||||
<version>0.7-groovy-2.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.spoon</groupId>
|
||||
<artifactId>spoon-runner</artifactId>
|
||||
<version>1.1.10</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.android.tools.build</groupId>
|
||||
<artifactId>gradle</artifactId>
|
||||
<version>1.1.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.stanfy.spoon</groupId>
|
||||
<artifactId>spoon-gradle-plugin</artifactId>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
</versions>
|
||||
<lastUpdated>20150603215211</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
@ -21,16 +21,6 @@ from mach.decorators import (
|
||||
Command,
|
||||
)
|
||||
|
||||
SUCCESS = '''
|
||||
You should be ready to build with Gradle and import into IntelliJ! Test with
|
||||
|
||||
./mach gradle build
|
||||
|
||||
and in IntelliJ select File > Import project... and choose
|
||||
|
||||
{topobjdir}/mobile/android/gradle
|
||||
'''
|
||||
|
||||
|
||||
# NOTE python/mach/mach/commands/commandinfo.py references this function
|
||||
# by name. If this function is renamed or removed, that file should
|
||||
|
@ -29,8 +29,9 @@ DIRS += [
|
||||
if CONFIG['MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER']:
|
||||
DIRS += ['bouncer'] # No ordering implied with respect to base.
|
||||
|
||||
TEST_DIRS += [
|
||||
'tests',
|
||||
]
|
||||
if not CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
|
||||
TEST_DIRS += [
|
||||
'tests',
|
||||
]
|
||||
|
||||
SPHINX_TREES['fennec'] = 'docs'
|
||||
|
@ -89,8 +89,9 @@ add_test(function test_telemetry_events() {
|
||||
["event", EVENT_TEST1, METHOD_NONE, [], undefined],
|
||||
]);
|
||||
|
||||
let clearMeasurements = false;
|
||||
let obs = getObserver();
|
||||
let measurements = removeNonTestMeasurements(obs.getUIMeasurements());
|
||||
let measurements = removeNonTestMeasurements(obs.getUIMeasurements(clearMeasurements));
|
||||
|
||||
measurements.forEach(function (m, i) {
|
||||
if (m.type === "event") {
|
||||
|
@ -107,7 +107,7 @@ class MozconfigLoader(ProcessExecutionMixin):
|
||||
if 'MOZ_MYCONFIG' in env:
|
||||
raise MozconfigFindException(MOZ_MYCONFIG_ERROR)
|
||||
|
||||
env_path = env.get('MOZCONFIG', None)
|
||||
env_path = env.get('MOZCONFIG', None) or None
|
||||
if env_path is not None:
|
||||
if not os.path.isabs(env_path):
|
||||
potential_roots = [self.topsrcdir, os.getcwd()]
|
||||
|
@ -14,10 +14,12 @@ include $(topsrcdir)/config/android-common.mk
|
||||
|
||||
stage-package:
|
||||
$(NSINSTALL) -D $(_DEST_DIR)
|
||||
ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
$(call RELEASE_SIGN_ANDROID_APK,\
|
||||
$(DEPTH)/mobile/android/tests/background/junit3/background-junit3-debug-unsigned-unaligned.apk,\
|
||||
$(_DEST_DIR)/background-junit3.apk)
|
||||
$(call RELEASE_SIGN_ANDROID_APK,\
|
||||
$(DEPTH)/mobile/android/tests/browser/junit3/browser-junit3-debug-unsigned-unaligned.apk,\
|
||||
$(_DEST_DIR)/browser-junit3.apk)
|
||||
endif
|
||||
@(cd $(DEPTH)/_tests/ && tar $(TAR_CREATE_FLAGS) - instrumentation) | (cd $(PKG_STAGE) && tar -xf -)
|
||||
|
@ -107,11 +107,15 @@ $(_DEST_DIR):
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
include $(topsrcdir)/config/android-common.mk
|
||||
|
||||
ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
robocop_apk := $(topobjdir)/mobile/android/tests/browser/robocop/robocop-debug-unsigned-unaligned.apk
|
||||
else
|
||||
robocop_apk := $(topobjdir)/gradle/build/mobile/android/app/outputs/apk/app-automation-debug-androidTest-unaligned.apk
|
||||
endif
|
||||
|
||||
stage-package-android:
|
||||
$(NSINSTALL) -D $(_DEST_DIR)
|
||||
$(call RELEASE_SIGN_ANDROID_APK,\
|
||||
$(DEPTH)/mobile/android/tests/browser/robocop/robocop-debug-unsigned-unaligned.apk,\
|
||||
$(_DEST_DIR)/robocop.apk)
|
||||
$(call RELEASE_SIGN_ANDROID_APK,$(robocop_apk),$(_DEST_DIR)/robocop.apk)
|
||||
|
||||
stage-package: stage-package-android
|
||||
endif
|
||||
|
@ -16,8 +16,7 @@
|
||||
//JMAHER: this is temporarily commented out because this hangs the fennec browser
|
||||
// dumpLog('\tBrowser outer width/height: ' + window.outerWidth + '/' + window.outerHeight);
|
||||
dumpLog('__metrics\n');
|
||||
goQuitApplication();
|
||||
window.close();
|
||||
goQuitApplication(true);
|
||||
">
|
||||
</body>
|
||||
</html>
|
||||
|
@ -9,7 +9,7 @@ var { interfaces: Ci } = Components;
|
||||
* fire the TalosQuitApplication custom event. This will
|
||||
* attempt to force-quit the browser.
|
||||
*/
|
||||
addEventListener("TalosQuitApplication", () => {
|
||||
addEventListener("TalosQuitApplication", event => {
|
||||
// If we're loaded in a low-priority background process, like
|
||||
// the background page thumbnailer, then we shouldn't be allowed
|
||||
// to quit the whole application. This is a workaround until
|
||||
@ -19,6 +19,6 @@ addEventListener("TalosQuitApplication", () => {
|
||||
.QueryInterface(Ci.nsISupportsPriority)
|
||||
.priority;
|
||||
if (priority != Ci.nsISupportsPriority.PRIORITY_LOWEST) {
|
||||
sendAsyncMessage("Talos:ForceQuit");
|
||||
sendAsyncMessage("Talos:ForceQuit", event.detail);
|
||||
}
|
||||
});
|
||||
|
@ -53,11 +53,23 @@ TalosPowersService.prototype = {
|
||||
|
||||
receiveMessage(message) {
|
||||
if (message.name == "Talos:ForceQuit") {
|
||||
this.forceQuit();
|
||||
this.forceQuit(message.data);
|
||||
}
|
||||
},
|
||||
|
||||
forceQuit() {
|
||||
forceQuit(messageData) {
|
||||
if (messageData && messageData.waitForSafeBrowsing) {
|
||||
let SafeBrowsing = Cu.import("resource://gre/modules/SafeBrowsing.jsm", {}).SafeBrowsing;
|
||||
|
||||
let whenDone = () => {
|
||||
this.forceQuit();
|
||||
};
|
||||
SafeBrowsing.addMozEntriesFinishedPromise.then(whenDone, whenDone);
|
||||
// Speed things up in case nobody else called this:
|
||||
SafeBrowsing.init();
|
||||
return;
|
||||
}
|
||||
|
||||
let enumerator = Services.wm.getEnumerator(null);
|
||||
while (enumerator.hasMoreElements()) {
|
||||
let domWindow = enumerator.getNext();
|
||||
|
@ -68,7 +68,7 @@ function canQuitApplication()
|
||||
return true;
|
||||
}
|
||||
|
||||
function goQuitApplication()
|
||||
function goQuitApplication(waitForSafeBrowsing)
|
||||
{
|
||||
const privs = 'UniversalPreferencesRead UniversalPreferencesWrite ' +
|
||||
'UniversalXPConnect';
|
||||
@ -82,6 +82,30 @@ function goQuitApplication()
|
||||
throw('goQuitApplication: privilege failure ' + ex);
|
||||
}
|
||||
|
||||
var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULRuntime);
|
||||
if (xulRuntime.processType == xulRuntime.PROCESS_TYPE_CONTENT) {
|
||||
// If we're running in a remote browser, emit an event for a
|
||||
// frame script to pick up to quit the whole browser.
|
||||
var event = new CustomEvent("TalosQuitApplication", {bubbles:true, detail: {waitForSafeBrowsing}});
|
||||
document.dispatchEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (waitForSafeBrowsing) {
|
||||
var SafeBrowsing = Components.utils.
|
||||
import("resource://gre/modules/SafeBrowsing.jsm", {}).SafeBrowsing;
|
||||
|
||||
var whenDone = () => {
|
||||
goQuitApplication(false);
|
||||
};
|
||||
|
||||
SafeBrowsing.addMozEntriesFinishedPromise.then(whenDone, whenDone);
|
||||
// Speed things up in case nobody else called this:
|
||||
SafeBrowsing.init();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!canQuitApplication())
|
||||
{
|
||||
return false;
|
||||
@ -90,20 +114,17 @@ function goQuitApplication()
|
||||
const kAppStartup = '@mozilla.org/toolkit/app-startup;1';
|
||||
const kAppShell = '@mozilla.org/appshell/appShellService;1';
|
||||
var appService;
|
||||
var forceQuit;
|
||||
|
||||
if (kAppStartup in Components.classes)
|
||||
{
|
||||
appService = Components.classes[kAppStartup].
|
||||
getService(Components.interfaces.nsIAppStartup);
|
||||
forceQuit = Components.interfaces.nsIAppStartup.eForceQuit;
|
||||
|
||||
}
|
||||
else if (kAppShell in Components.classes)
|
||||
{
|
||||
appService = Components.classes[kAppShell].
|
||||
getService(Components.interfaces.nsIAppShellService);
|
||||
forceQuit = Components.interfaces.nsIAppShellService.eForceQuit;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -130,11 +151,7 @@ function goQuitApplication()
|
||||
|
||||
try
|
||||
{
|
||||
appService.quit(forceQuit);
|
||||
// If we're running in a remote browser, emit an event for a
|
||||
// frame script to pick up to quit the whole browser.
|
||||
var event = new CustomEvent("TalosQuitApplication", {bubbles:true});
|
||||
document.dispatchEvent(event);
|
||||
appService.quit(appService.eForceQuit);
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
|
@ -245,11 +245,20 @@ function hookWindowCloseForPanelClose(targetWindow) {
|
||||
let _mozSocialDOMWindowClose;
|
||||
|
||||
if ("messageManager" in targetWindow) {
|
||||
let _mozSocialSwapped;
|
||||
let mm = targetWindow.messageManager;
|
||||
mm.sendAsyncMessage("Social:HookWindowCloseForPanelClose");
|
||||
mm.addMessageListener("DOMWindowClose", _mozSocialDOMWindowClose = function() {
|
||||
targetWindow.removeEventListener("SwapDocShells", _mozSocialSwapped);
|
||||
closePanel(targetWindow);
|
||||
});
|
||||
|
||||
targetWindow.addEventListener("SwapDocShells", _mozSocialSwapped = function(ev) {
|
||||
targetWindow.removeEventListener("SwapDocShells", _mozSocialSwapped);
|
||||
|
||||
targetWindow = ev.detail;
|
||||
targetWindow.messageManager.addMessageListener("DOMWindowClose", _mozSocialDOMWindowClose);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1244,7 +1244,9 @@ var Impl = {
|
||||
}
|
||||
|
||||
payloadObj.addonDetails = protect(() => AddonManagerPrivate.getTelemetryDetails());
|
||||
payloadObj.UIMeasurements = protect(() => UITelemetry.getUIMeasurements());
|
||||
|
||||
let clearUIsession = !(reason == REASON_GATHER_PAYLOAD || reason == REASON_GATHER_SUBSESSION_PAYLOAD);
|
||||
payloadObj.UIMeasurements = protect(() => UITelemetry.getUIMeasurements(clearUIsession));
|
||||
|
||||
if (this._slowSQLStartup &&
|
||||
Object.keys(this._slowSQLStartup).length != 0 &&
|
||||
|
@ -169,7 +169,7 @@ this.UITelemetry = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Called by TelemetryController to populate the simple measurement
|
||||
* Called by TelemetrySession to populate the simple measurement
|
||||
* blob. This function will iterate over all functions added
|
||||
* via addSimpleMeasureFunction and return an object with the
|
||||
* results of those functions.
|
||||
@ -215,11 +215,21 @@ this.UITelemetry = {
|
||||
delete this._simpleMeasureFunctions[aName];
|
||||
},
|
||||
|
||||
getUIMeasurements: function() {
|
||||
/**
|
||||
* Called by TelemetrySession to populate the UI measurement
|
||||
* blob.
|
||||
*
|
||||
* Optionally clears the set of measurements based on aClear.
|
||||
*/
|
||||
getUIMeasurements: function(aClear) {
|
||||
if (!this.enabled) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this._measurements.slice();
|
||||
let measurements = this._measurements.slice();
|
||||
if (aClear) {
|
||||
this._measurements = [];
|
||||
}
|
||||
return measurements;
|
||||
}
|
||||
};
|
||||
|
@ -36,6 +36,8 @@ Structure::
|
||||
// where manufacturer is truncated to 12 characters
|
||||
// & model is truncated to 19 characters
|
||||
"arch": <string>, // e.g. "arm", "x86"
|
||||
"profileDate": <pos integer>, // Profile creation date in days since
|
||||
// UNIX epoch.
|
||||
|
||||
"experiments": [<string>, …], // Optional, array of identifiers
|
||||
// for the active experiments
|
||||
|
@ -332,8 +332,14 @@ this.SafeBrowsing = {
|
||||
let dummyListener = {
|
||||
updateUrlRequested: function() { },
|
||||
streamFinished: function() { },
|
||||
updateError: function() { },
|
||||
updateSuccess: function() { }
|
||||
// We notify observers when we're done in order to be able to make perf
|
||||
// test results more consistent
|
||||
updateError: function() {
|
||||
Services.obs.notifyObservers(db, "mozentries-update-finished", "error");
|
||||
},
|
||||
updateSuccess: function() {
|
||||
Services.obs.notifyObservers(db, "mozentries-update-finished", "success");
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
@ -346,6 +352,18 @@ this.SafeBrowsing = {
|
||||
} catch(ex) {
|
||||
// beginUpdate will throw harmlessly if there's an existing update in progress, ignore failures.
|
||||
log("addMozEntries failed!", ex);
|
||||
Services.obs.notifyObservers(db, "mozentries-update-finished", "exception");
|
||||
}
|
||||
},
|
||||
|
||||
addMozEntriesFinishedPromise: new Promise(resolve => {
|
||||
let finished = (subject, topic, data) => {
|
||||
Services.obs.removeObserver(finished, "mozentries-update-finished");
|
||||
if (data == "error") {
|
||||
Cu.reportError("addMozEntries failed to update the db!");
|
||||
}
|
||||
resolve();
|
||||
};
|
||||
Services.obs.addObserver(finished, "mozentries-update-finished", false);
|
||||
}),
|
||||
};
|
||||
|
@ -1158,6 +1158,20 @@
|
||||
throw new Error("Can only swap docshells between browsers in the same process.");
|
||||
|
||||
// Give others a chance to swap state.
|
||||
// IMPORTANT: Since a swapDocShells call does not swap the messageManager
|
||||
// instances attached to a browser to aOtherBrowser, others
|
||||
// will need to add the message listeners to the new
|
||||
// messageManager.
|
||||
// This is not a bug in swapDocShells or the FrameLoader,
|
||||
// merely a design decision: If message managers were swapped,
|
||||
// so that no new listeners were needed, the new
|
||||
// aOtherBrowser.messageManager would have listeners pointing
|
||||
// to the JS global of the current browser, which would rather
|
||||
// easily create leaks while swapping.
|
||||
// IMPORTANT2: When the current browser element is removed from DOM,
|
||||
// which is quite common after a swpDocShells call, its
|
||||
// frame loader is destroyed, and that destroys the relevant
|
||||
// message manager, which will remove the listeners.
|
||||
let event = new CustomEvent("SwapDocShells", {"detail": aOtherBrowser});
|
||||
this.dispatchEvent(event);
|
||||
event = new CustomEvent("SwapDocShells", {"detail": this});
|
||||
|
@ -315,7 +315,7 @@ DIST_FILES += $(MOZ_CHILD_PROCESS_NAME)
|
||||
GECKO_APP_AP_PATH = $(topobjdir)/mobile/android/base
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
INNER_ROBOCOP_PACKAGE=echo
|
||||
INNER_ROBOCOP_PACKAGE=true
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
UPLOAD_EXTRA_FILES += robocop.apk
|
||||
UPLOAD_EXTRA_FILES += fennec_ids.txt
|
||||
@ -325,19 +325,26 @@ UPLOAD_EXTRA_FILES += geckoview_library/geckoview_assets.zip
|
||||
# Robocop/Robotium tests, Android Background tests, and Fennec need to
|
||||
# be signed with the same key, which means release signing them all.
|
||||
|
||||
ROBOCOP_PATH = $(topobjdir)/mobile/android/tests/browser/robocop
|
||||
ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
robocop_apk := $(topobjdir)/mobile/android/tests/browser/robocop/robocop-debug-unsigned-unaligned.apk
|
||||
else
|
||||
robocop_apk := $(topobjdir)/gradle/build/mobile/android/app/outputs/apk/app-automation-debug-androidTest-unaligned.apk
|
||||
endif
|
||||
|
||||
# Normally, $(NSINSTALL) would be used instead of cp, but INNER_ROBOCOP_PACKAGE
|
||||
# is used in a series of commands that run under a "cd something", while
|
||||
# $(NSINSTALL) is relative.
|
||||
INNER_ROBOCOP_PACKAGE= \
|
||||
cp $(GECKO_APP_AP_PATH)/fennec_ids.txt $(ABS_DIST) && \
|
||||
$(call RELEASE_SIGN_ANDROID_APK,$(ROBOCOP_PATH)/robocop-debug-unsigned-unaligned.apk,$(ABS_DIST)/robocop.apk)
|
||||
$(call RELEASE_SIGN_ANDROID_APK,$(robocop_apk),$(ABS_DIST)/robocop.apk)
|
||||
endif
|
||||
else
|
||||
INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Android Robocop for you'
|
||||
endif
|
||||
|
||||
ifdef MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER
|
||||
INNER_INSTALL_BOUNCER_PACKAGE=true
|
||||
ifdef ENABLE_TESTS
|
||||
UPLOAD_EXTRA_FILES += bouncer.apk
|
||||
|
||||
bouncer_package=$(ABS_DIST)/bouncer.apk
|
||||
@ -355,6 +362,9 @@ INNER_INSTALL_BOUNCER_PACKAGE=\
|
||||
diff -c $(PACKAGE).permissions $(bouncer_package).permissions || \
|
||||
(echo "*** Error: The permissions of the bouncer package differ from the permissions of the main package. Ensure the bouncer and main package Android manifests agree, rebuild mobile/android, and re-package." && exit 1))
|
||||
else
|
||||
INNER_INSTALL_BOUNCER_PACKAGE=echo 'Testing is disabled, so the install bouncer is disabled - No trampolines for you'
|
||||
endif # ENABLE_TESTS
|
||||
else
|
||||
INNER_INSTALL_BOUNCER_PACKAGE=echo 'Install bouncer is disabled - No trampolines for you'
|
||||
endif # MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER
|
||||
|
||||
@ -470,6 +480,15 @@ PKG_SUFFIX = .apk
|
||||
INNER_SZIP_LIBRARIES = \
|
||||
$(if $(ALREADY_SZIPPED),,$(foreach lib,$(SZIP_LIBRARIES),host/bin/szip $(MOZ_SZIP_FLAGS) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) && )) true
|
||||
|
||||
ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
|
||||
INNER_CHECK_R_TXT=echo 'No R.txt checking for you!'
|
||||
else
|
||||
INNER_CHECK_R_TXT=\
|
||||
((test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \
|
||||
diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \
|
||||
(echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1))
|
||||
endif
|
||||
|
||||
# Insert $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex into
|
||||
# $(ABS_DIST)/gecko.ap_, producing $(ABS_DIST)/gecko.apk.
|
||||
INNER_MAKE_APK = \
|
||||
@ -490,13 +509,11 @@ INNER_MAKE_APK = \
|
||||
$(ZIPALIGN) -f -v 4 $(ABS_DIST)/gecko.apk $(PACKAGE)
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
INNER_MAKE_PACKAGE = \
|
||||
INNER_MAKE_PACKAGE = \
|
||||
$(INNER_SZIP_LIBRARIES) && \
|
||||
make -C $(GECKO_APP_AP_PATH) gecko-nodeps.ap_ && \
|
||||
cp $(GECKO_APP_AP_PATH)/gecko-nodeps.ap_ $(ABS_DIST)/gecko.ap_ && \
|
||||
( (test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \
|
||||
diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \
|
||||
(echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1)) && \
|
||||
$(INNER_CHECK_R_TXT) && \
|
||||
$(INNER_MAKE_APK) && \
|
||||
$(INNER_ROBOCOP_PACKAGE) && \
|
||||
$(INNER_INSTALL_BOUNCER_PACKAGE) && \
|
||||
@ -505,7 +522,7 @@ INNER_MAKE_PACKAGE = \
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android/b2gdroid)
|
||||
INNER_MAKE_PACKAGE = \
|
||||
INNER_MAKE_PACKAGE = \
|
||||
$(INNER_SZIP_LIBRARIES) && \
|
||||
cp $(topobjdir)/mobile/android/b2gdroid/app/classes.dex $(ABS_DIST)/classes.dex && \
|
||||
cp $(topobjdir)/mobile/android/b2gdroid/app/b2gdroid-unsigned-unaligned.apk $(ABS_DIST)/gecko.ap_ && \
|
||||
|
Loading…
Reference in New Issue
Block a user