зеркало из https://github.com/mozilla/gecko-dev.git
merge fx-team to mozilla-central a=merge
This commit is contained in:
Коммит
868b17897f
|
@ -302,8 +302,11 @@ HistoryDownloadElementShell.prototype = {
|
|||
|
||||
if (this.element.selected) {
|
||||
goUpdateDownloadCommands();
|
||||
}
|
||||
} else {
|
||||
// If a state change occurs in an item that is not currently selected,
|
||||
// this is the only command that may be affected.
|
||||
goUpdateCommand("downloadsCmd_clearDownloads");
|
||||
}
|
||||
},
|
||||
|
||||
onChanged() {
|
||||
|
@ -1136,8 +1139,7 @@ DownloadsPlacesView.prototype = {
|
|||
// nsIController
|
||||
supportsCommand(aCommand) {
|
||||
// Firstly, determine if this is a command that we can handle.
|
||||
if (!aCommand.startsWith("cmd_") &&
|
||||
!aCommand.startsWith("downloadsCmd_")) {
|
||||
if (!DownloadsViewUI.isCommandName(aCommand)) {
|
||||
return false;
|
||||
}
|
||||
if (!(aCommand in this) &&
|
||||
|
@ -1418,11 +1420,11 @@ for (let methodName of ["load", "applyFilter", "selectNode", "selectItems"]) {
|
|||
function goUpdateDownloadCommands() {
|
||||
function updateCommandsForObject(object) {
|
||||
for (let name in object) {
|
||||
if (name.startsWith("cmd_") || name.startsWith("downloadsCmd_")) {
|
||||
if (DownloadsViewUI.isCommandName(name)) {
|
||||
goUpdateCommand(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
updateCommandsForObject(this);
|
||||
updateCommandsForObject(DownloadsPlacesView.prototype);
|
||||
updateCommandsForObject(HistoryDownloadElementShell.prototype);
|
||||
}
|
||||
|
|
|
@ -177,6 +177,15 @@ richlistitem.download button {
|
|||
display: none;
|
||||
}
|
||||
|
||||
/* Make the panel wide enough to show the download list items without improperly
|
||||
truncating them. */
|
||||
#downloadsPanel-multiView > .panel-viewcontainer,
|
||||
#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack,
|
||||
#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack > .panel-mainview {
|
||||
overflow: visible;
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
/* Show the "show blocked info" button. */
|
||||
#downloadsPanel-mainView .download-state[state="8"] .downloadShowBlockedInfo {
|
||||
display: inline;
|
||||
|
@ -186,12 +195,12 @@ richlistitem.download button {
|
|||
|
||||
/* The subview should be off to the right and not visible at all. */
|
||||
#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack[viewtype=main] > .panel-subviews {
|
||||
transform: translateX(100%);
|
||||
transform: translateX(101%);
|
||||
transition: transform var(--panelui-subview-transition-duration);
|
||||
}
|
||||
|
||||
#downloadsPanel-multiView > .panel-viewcontainer > .panel-viewstack[viewtype=main] > .panel-subviews:-moz-locale-dir(rtl) {
|
||||
transform: translateX(-100%);
|
||||
transform: translateX(-101%);
|
||||
}
|
||||
|
||||
/** When the subview is showing... **/
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
onkeydown="DownloadsSummary.onKeyDown(event);"
|
||||
onclick="DownloadsSummary.onClick(event);">
|
||||
<image class="downloadTypeIcon" />
|
||||
<vbox>
|
||||
<vbox id="downloadsSummaryChildBox">
|
||||
<description id="downloadsSummaryDescription"
|
||||
style="min-width: &downloadsSummary.minWidth2;"/>
|
||||
<progressmeter id="downloadsSummaryProgress"
|
||||
|
|
|
@ -135,12 +135,7 @@ var pktUI = (function() {
|
|||
openTabWithUrl('https://' + site + '/firefox_learnmore?src=ff_ext&s=ffi&t=buttonclick', true);
|
||||
|
||||
// force the panel closed before it opens
|
||||
// wrapped in setTimeout to avoid race condition after logging out
|
||||
// if this test goes to 100%, we should move this logic up before
|
||||
// the panel is actually opened
|
||||
setTimeout(function() {
|
||||
getPanel().hidePopup();
|
||||
}, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -332,7 +327,9 @@ var pktUI = (function() {
|
|||
* Called when the signup and saved panel was hidden
|
||||
*/
|
||||
function panelDidHide() {
|
||||
|
||||
// clear the onShow and onHide values
|
||||
_currentPanelDidShow = null;
|
||||
_currentPanelDidHide = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,11 +32,23 @@
|
|||
}
|
||||
|
||||
#downloadsSummary {
|
||||
padding: 8px 38px 8px 12px;
|
||||
--summary-padding-end: 38px;
|
||||
--summary-padding-start: 12px;
|
||||
padding: 8px var(--summary-padding-end) 8px var(--summary-padding-start);
|
||||
cursor: pointer;
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
#downloadsSummary:-moz-locale-dir(rtl) {
|
||||
padding-right: var(--summary-padding-start);
|
||||
padding-left: var(--summary-padding-end);
|
||||
}
|
||||
|
||||
#downloadsSummaryChildBox {
|
||||
-moz-margin-start: var(--summary-padding-start);
|
||||
-moz-margin-end: var(--summary-padding-end);
|
||||
}
|
||||
|
||||
#downloadsSummary > .downloadTypeIcon {
|
||||
list-style-image: url("chrome://browser/skin/downloads/download-summary.png");
|
||||
}
|
||||
|
@ -87,7 +99,7 @@ richlistitem[type="download"]:last-child {
|
|||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
.downloadStackIcon {
|
||||
.downloadTypeIcon {
|
||||
--inline-offset: 8px;
|
||||
--block-offset: 4px;
|
||||
--icon-size: 32px;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
|
||||
MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['tests/mochitest/browser.ini']
|
||||
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
|
||||
|
||||
# Hack to make this file available as a resource:// URI.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
[browser_checkloaduri.js]
|
|
@ -0,0 +1,121 @@
|
|||
"use strict";
|
||||
|
||||
let ssm = Services.scriptSecurityManager;
|
||||
|
||||
const URLs = new Map([
|
||||
["http://www.example.com", [
|
||||
// For each of these entries, the booleans represent whether the parent URI can:
|
||||
// - load them
|
||||
// - load them without principal inheritance
|
||||
// - whether the URI can be created at all (some protocol handlers will
|
||||
// refuse to create certain variants)
|
||||
["http://www.example2.com", true, true, true],
|
||||
["feed:http://www.example2.com", false, false, true],
|
||||
["https://www.example2.com", true, true, true],
|
||||
["chrome://foo/content/bar.xul", false, false, true],
|
||||
["feed:chrome://foo/content/bar.xul", false, false, false],
|
||||
["view-source:http://www.example2.com", false, false, true],
|
||||
["view-source:feed:http://www.example2.com", false, false, true],
|
||||
["feed:view-source:http://www.example2.com", false, false, false],
|
||||
["data:text/html,Hi", true, false, true],
|
||||
["javascript:alert('hi')", true, false, true],
|
||||
]],
|
||||
["feed:http://www.example.com", [
|
||||
["http://www.example2.com", true, true, true],
|
||||
["feed:http://www.example2.com", true, true, true],
|
||||
["https://www.example2.com", true, true, true],
|
||||
["feed:https://www.example2.com", false, false, true],
|
||||
["chrome://foo/content/bar.xul", false, false, true],
|
||||
["feed:chrome://foo/content/bar.xul", false, false, false],
|
||||
["view-source:http://www.example2.com", false, false, true],
|
||||
["view-source:feed:http://www.example2.com", false, false, true],
|
||||
["feed:view-source:http://www.example2.com", false, false, false],
|
||||
["data:text/html,Hi", true, false, true],
|
||||
["javascript:alert('hi')", true, false, true],
|
||||
]],
|
||||
["view-source:http://www.example.com", [
|
||||
["http://www.example2.com", true, true, true],
|
||||
["feed:http://www.example2.com", false, false, true],
|
||||
["https://www.example2.com", true, true, true],
|
||||
["feed:https://www.example2.com", false, false, true],
|
||||
["chrome://foo/content/bar.xul", false, false, true],
|
||||
["feed:chrome://foo/content/bar.xul", false, false, false],
|
||||
["view-source:http://www.example2.com", true, true, true],
|
||||
["view-source:feed:http://www.example2.com", false, false, true],
|
||||
["feed:view-source:http://www.example2.com", false, false, false],
|
||||
["data:text/html,Hi", true, false, true],
|
||||
["javascript:alert('hi')", true, false, true],
|
||||
]],
|
||||
]);
|
||||
|
||||
function testURL(source, target, canLoad, canLoadWithoutInherit, canCreate, flags) {
|
||||
let threw = false;
|
||||
let targetURI;
|
||||
try {
|
||||
targetURI = makeURI(target);
|
||||
} catch (ex) {
|
||||
ok(!canCreate, "Shouldn't be passing URIs that we can't create. Failed to create: " + target);
|
||||
return;
|
||||
}
|
||||
ok(canCreate, "Created a URI for " + target + " which should " +
|
||||
(canCreate ? "" : "not ") + "be possible.");
|
||||
try {
|
||||
ssm.checkLoadURIWithPrincipal(source, targetURI, flags);
|
||||
} catch (ex) {
|
||||
info(ex.message);
|
||||
threw = true;
|
||||
}
|
||||
let inheritDisallowed = flags & ssm.DISALLOW_INHERIT_PRINCIPAL;
|
||||
let shouldThrow = inheritDisallowed ? !canLoadWithoutInherit : !canLoad;
|
||||
ok(threw == shouldThrow,
|
||||
"Should " + (shouldThrow ? "" : "not ") + "throw an error when loading " +
|
||||
target + " from " + source.URI.spec +
|
||||
(inheritDisallowed ? " without" : " with") + " principal inheritance.");
|
||||
}
|
||||
|
||||
add_task(function* () {
|
||||
let baseFlags = ssm.STANDARD | ssm.DONT_REPORT_ERRORS;
|
||||
for (let [sourceString, targetsAndExpectations] of URLs) {
|
||||
let source = ssm.createCodebasePrincipal(makeURI(sourceString), {});
|
||||
for (let [target, canLoad, canLoadWithoutInherit, canCreate] of targetsAndExpectations) {
|
||||
testURL(source, target, canLoad, canLoadWithoutInherit, canCreate, baseFlags);
|
||||
testURL(source, target, canLoad, canLoadWithoutInherit, canCreate,
|
||||
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
|
||||
}
|
||||
}
|
||||
|
||||
// Now test blob URIs, which we need to do in-content.
|
||||
yield BrowserTestUtils.withNewTab("http://www.example.com/", function* (browser) {
|
||||
yield ContentTask.spawn(
|
||||
browser,
|
||||
testURL.toString(),
|
||||
function* (testURLFn) {
|
||||
let testURL = eval("(" + testURLFn + ")");
|
||||
let ssm = Services.scriptSecurityManager;
|
||||
let baseFlags = ssm.STANDARD | ssm.DONT_REPORT_ERRORS;
|
||||
let makeURI = Cu.import("resource://gre/modules/BrowserUtils.jsm", {}).BrowserUtils.makeURI;
|
||||
let b = new content.Blob(["I am a blob"]);
|
||||
let contentBlobURI = content.URL.createObjectURL(b);
|
||||
let contentPrincipal = content.document.nodePrincipal;
|
||||
// Loading this blob URI from the content page should work:
|
||||
testURL(contentPrincipal, contentBlobURI, true, true, true, baseFlags);
|
||||
testURL(contentPrincipal, contentBlobURI, true, true, true,
|
||||
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
|
||||
|
||||
testURL(contentPrincipal, "view-source:" + contentBlobURI, false, false, true,
|
||||
baseFlags);
|
||||
testURL(contentPrincipal, "view-source:" + contentBlobURI, false, false, true,
|
||||
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
|
||||
|
||||
// Feed URIs for blobs can't be created, so need to pass false as the fourth param.
|
||||
for (let prefix of ["feed:", "view-source:feed:", "feed:view-source:"]) {
|
||||
testURL(contentPrincipal, prefix + contentBlobURI, false, false, false,
|
||||
baseFlags);
|
||||
testURL(contentPrincipal, prefix + contentBlobURI, false, false, false,
|
||||
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
});
|
|
@ -570,7 +570,7 @@ HTMLTooltip.prototype = {
|
|||
// Use type="arrow" to prevent side effects (see Bug 1285206)
|
||||
panel.setAttribute("type", "arrow");
|
||||
|
||||
panel.setAttribute("level", "float");
|
||||
panel.setAttribute("level", "top");
|
||||
panel.setAttribute("class", "tooltip-xul-wrapper");
|
||||
|
||||
return panel;
|
||||
|
|
|
@ -1031,7 +1031,6 @@ void HTMLMediaElement::NoSupportedMediaSourceError()
|
|||
DispatchAsyncEvent(NS_LITERAL_STRING("error"));
|
||||
ChangeDelayLoadStatus(false);
|
||||
UpdateAudioChannelPlayingState();
|
||||
OpenUnsupportedMediaWithExtenalAppIfNeeded();
|
||||
}
|
||||
|
||||
typedef void (HTMLMediaElement::*SyncSectionFn)();
|
||||
|
@ -2698,10 +2697,6 @@ HTMLMediaElement::PlayInternal(bool aCallerIsChrome)
|
|||
UpdateSrcMediaStreamPlaying();
|
||||
UpdateAudioChannelPlayingState();
|
||||
|
||||
// The check here is to handle the case that the media element starts playing
|
||||
// after it loaded fail. eg. preload the data before playing.
|
||||
OpenUnsupportedMediaWithExtenalAppIfNeeded();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3202,26 +3197,28 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
|
|||
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
|
||||
aChannel->GetContentType(mMimeType);
|
||||
NS_ASSERTION(!mMimeType.IsEmpty(), "We should have the Content-Type.");
|
||||
nsAutoCString mimeType;
|
||||
|
||||
aChannel->GetContentType(mimeType);
|
||||
NS_ASSERTION(!mimeType.IsEmpty(), "We should have the Content-Type.");
|
||||
|
||||
DecoderDoctorDiagnostics diagnostics;
|
||||
RefPtr<MediaDecoder> decoder =
|
||||
DecoderTraits::CreateDecoder(mMimeType, this, &diagnostics);
|
||||
DecoderTraits::CreateDecoder(mimeType, this, &diagnostics);
|
||||
diagnostics.StoreFormatDiagnostics(OwnerDoc(),
|
||||
NS_ConvertASCIItoUTF16(mMimeType),
|
||||
NS_ConvertASCIItoUTF16(mimeType),
|
||||
decoder != nullptr,
|
||||
__func__);
|
||||
if (!decoder) {
|
||||
nsAutoString src;
|
||||
GetCurrentSrc(src);
|
||||
NS_ConvertUTF8toUTF16 mimeUTF16(mMimeType);
|
||||
NS_ConvertUTF8toUTF16 mimeUTF16(mimeType);
|
||||
const char16_t* params[] = { mimeUTF16.get(), src.get() };
|
||||
ReportLoadError("MediaLoadUnsupportedMimeType", params, ArrayLength(params));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("%p Created decoder %p for type %s", this, decoder.get(), mMimeType.get()));
|
||||
LOG(LogLevel::Debug, ("%p Created decoder %p for type %s", this, decoder.get(), mimeType.get()));
|
||||
|
||||
RefPtr<MediaResource> resource =
|
||||
MediaResource::Create(decoder->GetResourceCallback(), aChannel);
|
||||
|
@ -3237,7 +3234,7 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
|
|||
// We postpone the |FinishDecoderSetup| function call until we get
|
||||
// |OnConnected| signal from MediaStreamController which is held by
|
||||
// RtspMediaResource.
|
||||
if (DecoderTraits::DecoderWaitsForOnConnected(mMimeType)) {
|
||||
if (DecoderTraits::DecoderWaitsForOnConnected(mimeType)) {
|
||||
decoder->SetResource(resource);
|
||||
SetDecoder(decoder);
|
||||
if (aListener) {
|
||||
|
@ -5935,43 +5932,6 @@ HTMLMediaElement::IsAudible() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLMediaElement::HaveFailedWithSourceNotSupportedError() const
|
||||
{
|
||||
if (!mError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t errorCode;
|
||||
mError->GetCode(&errorCode);
|
||||
return (mNetworkState == nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE &&
|
||||
errorCode == nsIDOMMediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLMediaElement::OpenUnsupportedMediaWithExtenalAppIfNeeded()
|
||||
{
|
||||
if (!Preferences::GetBool("media.openUnsupportedTypeWithExternalApp")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HaveFailedWithSourceNotSupportedError()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If media doesn't start playing, we don't need to open it.
|
||||
if (mPaused) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Open unsupported type \'%s\' with external apps.",
|
||||
mMimeType.get()));
|
||||
nsContentUtils::DispatchTrustedEvent(OwnerDoc(), static_cast<nsIContent*>(this),
|
||||
NS_LITERAL_STRING("OpenMediaWithExternalApp"),
|
||||
true,
|
||||
true);
|
||||
}
|
||||
|
||||
static const char* VisibilityString(Visibility aVisibility) {
|
||||
switch(aVisibility) {
|
||||
case Visibility::UNTRACKED: {
|
||||
|
|
|
@ -1193,9 +1193,6 @@ protected:
|
|||
bool IsAllowedToPlay();
|
||||
|
||||
bool IsAudible() const;
|
||||
bool HaveFailedWithSourceNotSupportedError() const;
|
||||
|
||||
void OpenUnsupportedMediaWithExtenalAppIfNeeded();
|
||||
|
||||
class nsAsyncEventRunner;
|
||||
using nsGenericHTMLElement::DispatchEvent;
|
||||
|
@ -1636,8 +1633,6 @@ private:
|
|||
|
||||
// True if media element is audible for users.
|
||||
bool mAudible;
|
||||
|
||||
nsAutoCString mMimeType;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
<!-- We have our own l10n system & don't use the platform's plurals. -->
|
||||
<issue id="PluralsCandidate" severity="ignore" />
|
||||
|
||||
<!-- We don't want to have to follow the SDK release schedule: we can keep
|
||||
the warning in order to not forget that there's a new SDK, but there's
|
||||
no need to break on update. -->
|
||||
<issue id="OldTargetApi" severity="warning" />
|
||||
|
||||
<!-- We want all lint warnings to be fatal errors.
|
||||
Right now, we set these to lint warnings so:
|
||||
|
||||
|
@ -136,7 +141,6 @@
|
|||
<issue id="NfcTechWhitespace" severity="error" />
|
||||
<issue id="NotSibling" severity="error" />
|
||||
<issue id="ObsoleteLayoutParam" severity="error" />
|
||||
<issue id="OldTargetApi" severity="error" />
|
||||
<issue id="OnClick" severity="error" />
|
||||
<issue id="Orientation" severity="error" />
|
||||
<issue id="Override" severity="error" />
|
||||
|
|
|
@ -920,5 +920,3 @@ pref("dom.presentation.discovery.legacy.enabled", true); // for TV 2.5 backward
|
|||
|
||||
pref("dom.audiochannel.audioCompeting", true);
|
||||
pref("dom.audiochannel.mediaControl", true);
|
||||
|
||||
pref("media.openUnsupportedTypeWithExternalApp", true);
|
||||
|
|
|
@ -1659,7 +1659,7 @@ public class GeckoAppShell
|
|||
ArrayList<String> directories = new ArrayList<String>();
|
||||
PackageManager pm = getApplicationContext().getPackageManager();
|
||||
List<ResolveInfo> plugins = pm.queryIntentServices(new Intent(PLUGIN_ACTION),
|
||||
PackageManager.GET_SERVICES | PackageManager.GET_META_DATA);
|
||||
PackageManager.GET_META_DATA);
|
||||
|
||||
synchronized (mPackageInfoCache) {
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.mozilla.gecko.util.GamepadUtils;
|
|||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
import org.mozilla.gecko.util.ThreadUtils.AssertBehavior;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.AudioManager;
|
||||
|
@ -468,6 +469,10 @@ class GeckoInputConnection
|
|||
}
|
||||
|
||||
// Android N: @Override // InputConnection
|
||||
// We need to suppress lint complaining about the lack override here in the meantime: it wants us to build
|
||||
// against sdk 24, even though we're using 23, and therefore complains about the lack of override.
|
||||
// Once we update to 24, we can use the actual override annotation and remove the lint suppression.
|
||||
@SuppressLint("Override")
|
||||
public Handler getHandler() {
|
||||
if (isPhysicalKeyboardPresent()) {
|
||||
return ThreadUtils.getUiHandler();
|
||||
|
|
|
@ -24,6 +24,8 @@ import android.view.View;
|
|||
import android.widget.AdapterView;
|
||||
import android.widget.HeaderViewListAdapter;
|
||||
import android.widget.ListAdapter;
|
||||
|
||||
import org.mozilla.gecko.reader.SavedReaderViewHelper;
|
||||
import org.mozilla.gecko.util.NetworkUtils;
|
||||
|
||||
/**
|
||||
|
@ -169,7 +171,16 @@ public class BookmarksListView extends HomeListView
|
|||
// Otherwise, just open the URL
|
||||
final String url = cursor.getString(cursor.getColumnIndexOrThrow(Bookmarks.URL));
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.LIST_ITEM, "bookmarks");
|
||||
final SavedReaderViewHelper rvh = SavedReaderViewHelper.getSavedReaderViewHelper(getContext());
|
||||
|
||||
final String extra;
|
||||
if (rvh.isURLCached(url)) {
|
||||
extra = "bookmarks-reader";
|
||||
} else {
|
||||
extra = "bookmarks";
|
||||
}
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.LIST_ITEM, extra);
|
||||
Telemetry.addToHistogram("FENNEC_LOAD_SAVED_PAGE", NetworkUtils.isConnected(getContext()) ? 2 : 3);
|
||||
|
||||
// This item is a TwoLinePageRow, so we allow switch-to-tab.
|
||||
|
|
|
@ -4693,7 +4693,6 @@ var BrowserEventHandler = {
|
|||
|
||||
BrowserApp.deck.addEventListener("DOMUpdatePageReport", PopupBlockerObserver.onUpdatePageReport, false);
|
||||
BrowserApp.deck.addEventListener("MozMouseHittest", this, true);
|
||||
BrowserApp.deck.addEventListener("OpenMediaWithExternalApp", this, true);
|
||||
|
||||
InitLater(() => BrowserApp.deck.addEventListener("click", InputWidgetHelper, true));
|
||||
InitLater(() => BrowserApp.deck.addEventListener("click", SelectHelper, true));
|
||||
|
@ -4717,9 +4716,6 @@ var BrowserEventHandler = {
|
|||
case 'MozMouseHittest':
|
||||
this._handleRetargetedTouchStart(aEvent);
|
||||
break;
|
||||
case 'OpenMediaWithExternalApp':
|
||||
ExternalApps.openExternal(aEvent.target);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -713,11 +713,33 @@ public class ActivityHandler extends HandlerThread implements IActivityHandler {
|
|||
}
|
||||
|
||||
private void readActivityState() {
|
||||
try {
|
||||
/**
|
||||
* Mozilla:
|
||||
* readObject is a generic object, and can therefore return arbitrary generic objects
|
||||
* that might not match the expected type. Therefore there will be an implicit cast
|
||||
* here, which can fail. Therefore we have to add the catch (ClassCastException)
|
||||
* Note: this has been fixed in upstream, we only need this for the version we are still shipping.
|
||||
*/
|
||||
activityState = Util.readObject(adjustConfig.context, ACTIVITY_STATE_FILENAME, ACTIVITY_STATE_NAME);
|
||||
} catch (ClassCastException e) {
|
||||
activityState = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void readAttribution() {
|
||||
try {
|
||||
/**
|
||||
* Mozilla: (same as in readActivityState() )
|
||||
* readObject is a generic object, and can therefore return arbitrary generic objects
|
||||
* that might not match the expected type. Therefore there will be an implicit cast
|
||||
* here, which can fail. Therefore we have to add the catch (ClassCastException)
|
||||
* Note: this has been fixed in upstream, we only need this for the version we are still shipping.
|
||||
*/
|
||||
attribution = Util.readObject(adjustConfig.context, ATTRIBUTION_FILENAME, ATTRIBUTION_NAME);
|
||||
} catch (ClassCastException e) {
|
||||
activityState = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void writeActivityState() {
|
||||
|
|
|
@ -5612,7 +5612,7 @@
|
|||
"releaseChannelCollection": "opt-out",
|
||||
"alert_emails": ["firefox-dev@mozilla.org"],
|
||||
"bug_numbers": [1207089],
|
||||
"expires_in_version": "50",
|
||||
"expires_in_version": "55",
|
||||
"kind": "enumerated",
|
||||
"keyed": true,
|
||||
"n_values": 40,
|
||||
|
@ -5621,7 +5621,7 @@
|
|||
"POPUP_NOTIFICATION_MAIN_ACTION_MS": {
|
||||
"alert_emails": ["firefox-dev@mozilla.org"],
|
||||
"bug_numbers": [1207089],
|
||||
"expires_in_version": "52",
|
||||
"expires_in_version": "55",
|
||||
"kind": "exponential",
|
||||
"keyed": true,
|
||||
"low": 100,
|
||||
|
@ -5632,7 +5632,7 @@
|
|||
"POPUP_NOTIFICATION_DISMISSAL_MS": {
|
||||
"alert_emails": ["firefox-dev@mozilla.org"],
|
||||
"bug_numbers": [1207089],
|
||||
"expires_in_version": "52",
|
||||
"expires_in_version": "55",
|
||||
"kind": "exponential",
|
||||
"keyed": true,
|
||||
"low": 200,
|
||||
|
|
Загрузка…
Ссылка в новой задаче