Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge mozilla-central to autoland. a=merge CLOSED TREE
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianbrindusan committed Apr 24, 2018
2 parents 8a4b19d + 95f1118 commit 72693a6
Show file tree
Hide file tree
Showing 365 changed files with 8,311 additions and 24,753 deletions.
7 changes: 5 additions & 2 deletions accessible/generic/Accessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/EventStates.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/MouseEvents.h"
Expand Down Expand Up @@ -758,10 +759,12 @@ Accessible::TakeFocus()
}
}

nsCOMPtr<nsIDOMElement> element(do_QueryInterface(focusContent));
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm)
if (fm) {
AutoHandlingUserInputStatePusher inputStatePusher(true, nullptr, focusContent->OwnerDoc());
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(focusContent));
fm->SetFocus(element, 0);
}
}

void
Expand Down
2 changes: 2 additions & 0 deletions accessible/generic/DocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "nsFocusManager.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/EventStates.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/TextEditor.h"
Expand Down Expand Up @@ -325,6 +326,7 @@ DocAccessible::TakeFocus()
// Focus the document.
nsFocusManager* fm = nsFocusManager::GetFocusManager();
nsCOMPtr<nsIDOMElement> newFocus;
AutoHandlingUserInputStatePusher inputStatePusher(true, nullptr, mDocumentNode);
fm->MoveFocus(mDocumentNode->GetWindow(), nullptr,
nsFocusManager::MOVEFOCUS_ROOT, 0, getter_AddRefs(newFocus));
}
Expand Down
5 changes: 4 additions & 1 deletion accessible/tests/mochitest/jsat/test_content_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@
atEnd: true
},
{ focused: "input[type=text]" }),
new ExpectedTextSelectionChanged(0, 0)],
new ExpectedTextSelectionChanged(0, 0,
// Bug 1455749: Fix granularity control in text entries.
{ android_todo: true }
)],
[ContentMessages.simpleMovePrevious,
new ExpectedCursorChange(
[ "So we don't get dessert?", {string: "label"} ]),
Expand Down
4 changes: 0 additions & 4 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1273,11 +1273,7 @@ pref("browser.newtabpage.enabled", true);
// Activity Stream prefs that control to which page to redirect
pref("browser.newtabpage.activity-stream.prerender", true);
#ifndef RELEASE_OR_BETA
#ifdef MOZILLA_OFFICIAL
pref("browser.newtabpage.activity-stream.debug", false);
#else
pref("browser.newtabpage.activity-stream.debug", true);
#endif
#endif

pref("browser.library.activity-stream.enabled", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ skip-if = os == 'mac' # Save as PDF not supported on Mac OS X
[browser_ext_themes_validation.js]
[browser_ext_url_overrides_newtab.js]
[browser_ext_user_events.js]
skip-if = debug
skip-if = debug || os == "linux" #Bug 1381305
[browser_ext_webRequest.js]
[browser_ext_webNavigation_frameId0.js]
[browser_ext_webNavigation_getFrames.js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
"nsIAboutNewTabService");

const IS_RELEASE_OR_BETA = AppConstants.RELEASE_OR_BETA;
const MOZILLA_OFFICIAL = AppConstants.MOZILLA_OFFICIAL;

const ACTIVITY_STREAM_PRERENDER_URL = "resource://activity-stream/prerendered/en-US/activity-stream-prerendered.html";
const ACTIVITY_STREAM_PRERENDER_DEBUG_URL = "resource://activity-stream/prerendered/static/activity-stream-prerendered-debug.html";
Expand Down Expand Up @@ -135,16 +134,6 @@ add_task(function test_locale() {
"The locale for testing should be en-US");
});

add_task(async function test_debug_mode() {
if (!IS_RELEASE_OR_BETA && !MOZILLA_OFFICIAL) { // Check if local build
Assert.equal(aboutNewTabService.activityStreamDebug, true,
"Debug mode is set for builds that are not official");
} else {
Assert.equal(aboutNewTabService.activityStreamDebug, false,
"Debug mode is not set for any other builds");
}
});

/**
* Tests reponse to updates to prefs
*/
Expand Down Expand Up @@ -206,9 +195,6 @@ function setBoolPrefAndWaitForChange(pref, value, testMessage) {


function setupASPrerendered() {
// Don't run in debug mode regardless of build type
Services.prefs.setBoolPref(ACTIVITY_STREAM_DEBUG_PREF, false);

if (Services.prefs.getBoolPref(ACTIVITY_STREAM_PRERENDER_PREF)) {
return Promise.resolve();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@
// and check if it is rounded
for (let timeStampCode of timeStampCodesDOM) {
let timeStamp = eval(timeStampCode);

// Audio Contexts increment in intervals of (minimum) 5.4ms, so we don't
// clamp/jitter if the timer precision is les than that.
// (Technically on MBPs they increment in intervals of 2.6 but this is
// non-standard and will eventually be changed. We don't cover this situation
// because we don't really support arbitrary Timer Precision, especially in
// the 2.6 - 5.4ms interval.)
if (timeStampCode.includes("audioContext") && expectedPrecision < 5.4)
continue;

ok(isRounded(timeStamp, expectedPrecision),
"pref: " + prefname + " - '" +
"'" + timeStampCode +
Expand Down
2 changes: 1 addition & 1 deletion browser/modules/webrtcUI.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ function prompt(aBrowser, aRequest) {
stream.getTracks().forEach(t => t.stop());
return;
}
video.src = chromeWin.URL.createObjectURL(stream);
video.srcObject = stream;
video.stream = stream;
doc.getElementById("webRTC-preview").hidden = false;
video.onloadedmetadata = function(e) {
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/debugger/new/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ skip-if = (os == "win" && ccov) # Bug 1453549
skip-if = ccov # Bug 1441545
[browser_dbg-babel-stepping.js]
[browser_dbg-babel-preview.js]
skip-if = (os == "win" && ccov) # Bug 1448523
skip-if = (os == "win" && ccov) || (os == "win" && !debug) # Bug 1448523, Bug 1448450
[browser_dbg-breaking.js]
[browser_dbg-breaking-from-console.js]
[browser_dbg-breakpoints.js]
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/sourceeditor/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ code, and optionally help with indentation.

# Upgrade

Currently used version is 5.36.0. To upgrade: download a new version of
Currently used version is 5.37.0. To upgrade: download a new version of
CodeMirror from the project's page [1] and replace all JavaScript and
CSS files inside the codemirror directory [2].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@
CodeMirror.registerHelper("fold", "xml", function(cm, start) {
var iter = new Iter(cm, start.line, 0);
for (;;) {
var openTag = toNextTag(iter), end;
if (!openTag || !(end = toTagEnd(iter)) || iter.line != start.line) return;
var openTag = toNextTag(iter)
if (!openTag || iter.line != start.line) return
var end = toTagEnd(iter)
if (!end) return
if (!openTag[1] && end != "selfClose") {
var startPos = Pos(iter.line, iter.ch);
var endPos = findMatchingClose(iter, openTag[2]);
return endPos && {from: startPos, to: endPos.from};
return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
var state = cm.state.matchHighlighter;
cm.addOverlay(state.overlay = makeOverlay(query, hasBoundary, style));
if (state.options.annotateScrollbar && cm.showMatchesOnScrollbar) {
var searchFor = hasBoundary ? new RegExp("\\b" + query.replace(/[\\\[+*?(){|^$]/g, "\\$&") + "\\b") : query;
var searchFor = hasBoundary ? new RegExp("\\b" + query.replace(/[\\\[.+*?(){|^$]/g, "\\$&") + "\\b") : query;
state.matchesonscroll = cm.showMatchesOnScrollbar(searchFor, false,
{className: "CodeMirror-selection-highlight-scrollbar"});
}
Expand Down
Loading

0 comments on commit 72693a6

Please sign in to comment.