This commit is contained in:
Phil Ringnalda 2014-02-15 09:54:57 -08:00
Родитель 24cc811748 3176a5124d
Коммит b463b1af44
268 изменённых файлов: 5405 добавлений и 1221 удалений

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

@ -1761,28 +1761,6 @@ HyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame, int32_t aOffset,
return NS_OK;
}
// HyperTextAccessible
nsresult
HyperTextAccessible::RangeBoundToHypertextOffset(nsRange* aRange,
bool aIsStartBound,
bool aIsStartHTOffset,
int32_t* aOffset)
{
nsINode* node = nullptr;
int32_t nodeOffset = 0;
if (aIsStartBound) {
node = aRange->GetStartParent();
nodeOffset = aRange->StartOffset();
} else {
node = aRange->GetEndParent();
nodeOffset = aRange->EndOffset();
}
*aOffset = DOMPointToOffset(node, nodeOffset);
return NS_OK;
}
// HyperTextAccessible
nsresult
HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
@ -1825,11 +1803,9 @@ HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
int32_t startOffset = range->StartOffset();
if (nsContentUtils::ComparePoints(startNode, startOffset, aNode,
aNodeOffset) <= 0) {
rv = RangeBoundToHypertextOffset(range, true, true, &startHTOffset);
NS_ENSURE_SUCCESS(rv, rv);
startHTOffset = DOMPointToOffset(startNode, startOffset);
rv = RangeBoundToHypertextOffset(range, false, false, &endHTOffset);
NS_ENSURE_SUCCESS(rv, rv);
endHTOffset = DOMPointToOffset(endNode, endOffset);
if (startHTOffset > *aHTStartOffset)
*aHTStartOffset = startHTOffset;
@ -1846,13 +1822,12 @@ HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
}
// This range came after the point.
rv = RangeBoundToHypertextOffset(range, true, false, &endHTOffset);
NS_ENSURE_SUCCESS(rv, rv);
endHTOffset = DOMPointToOffset(startNode, startOffset);
if (idx > 0) {
rv = RangeBoundToHypertextOffset(domSel->GetRangeAt(idx - 1), false,
true, &startHTOffset);
NS_ENSURE_SUCCESS(rv, rv);
nsRange* prevRange = domSel->GetRangeAt(idx - 1);
startHTOffset = DOMPointToOffset(prevRange->GetEndParent(),
prevRange->EndOffset());
}
if (startHTOffset > *aHTStartOffset)
@ -1868,9 +1843,9 @@ HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode,
// the point is not in a range, that we do not need to compute an end offset,
// and that we should use the end offset of the last range to compute the
// start offset of the text attribute range.
rv = RangeBoundToHypertextOffset(domSel->GetRangeAt(rangeCount - 1), false,
true, &startHTOffset);
NS_ENSURE_SUCCESS(rv, rv);
nsRange* prevRange = domSel->GetRangeAt(rangeCount - 1);
startHTOffset = DOMPointToOffset(prevRange->GetEndParent(),
prevRange->EndOffset());
if (startHTOffset > *aHTStartOffset)
*aHTStartOffset = startHTOffset;

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

@ -473,25 +473,6 @@ protected:
Accessible* aAccessible,
mozilla::a11y::DOMPoint* aPoint);
/**
* Return hyper text offset for the specified bound of the given DOM range.
* If the bound is outside of the hyper text then offset value is either
* 0 or number of characters of hyper text, it depends on type of requested
* offset. The method is a wrapper for DOMPointToOffset.
*
* @param aRange [in] the given range
* @param aIsStartBound [in] specifies whether the required range bound is
* start bound
* @param aIsStartOffset [in] the offset type, used when the range bound is
* outside of hyper text
* @param aHTOffset [out] the result offset
*/
nsresult RangeBoundToHypertextOffset(nsRange *aRange,
bool aIsStartBound,
bool aIsStartOffset,
int32_t *aHTOffset);
/**
* Set 'misspelled' text attribute and return range offsets where the
* attibute is stretched. If the text is not misspelled at the given offset

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

@ -879,7 +879,6 @@ var Input = {
JSON.stringify({ type: 'ToggleChrome:Focus' }));
break;
case aEvent.DOM_VK_RETURN:
case aEvent.DOM_VK_ENTER:
if (this.editState.editing)
return;
this.activateCurrent();

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

@ -69,7 +69,7 @@
this.invoke = function openSubMenu_invoke()
{
synthesizeKey("VK_ENTER", { });
synthesizeKey("VK_RETURN", { });
}
this.finalCheck = function openSubMenu_finalCheck(aEvent)

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

@ -69,8 +69,12 @@ let devtoolsWidgetPanel = {
Services.obs.addObserver(this, 'in-process-browser-or-app-frame-shown', false);
Services.obs.addObserver(this, 'message-manager-disconnect', false);
let systemapp = document.querySelector('#systemapp').contentWindow;
let frames = systemapp.document.querySelectorAll('iframe[mozapp]');
let systemapp = document.querySelector('#systemapp');
let manifestURL = systemapp.getAttribute("mozapp");
this.trackApp(manifestURL);
let frames =
systemapp.contentWindow.document.querySelectorAll('iframe[mozapp]');
for (let frame of frames) {
let manifestURL = frame.getAttribute("mozapp");
this.trackApp(manifestURL);

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

@ -235,6 +235,10 @@ SettingsListener.observe('devtools.overlay', false, (value) => {
}
});
SettingsListener.observe('devtools.eventlooplag.threshold', 100, function(value) {
Services.prefs.setIntPref('devtools.eventlooplag.threshold', value);
});
// =================== Debugger / ADB ====================
#ifdef MOZ_WIDGET_GONK
@ -678,11 +682,11 @@ SettingsListener.observe('apz.force-enable', false, function(value) {
SettingsListener.observe('apz.displayport.heuristics', 'default', function(value) {
// first reset everything to default
Services.prefs.setCharPref('apz.velocity_bias', '1.0');
Services.prefs.setBoolPref('apz.use_paint_duration', true);
Services.prefs.setCharPref('apz.x_skate_size_multiplier', '1.5');
Services.prefs.setCharPref('apz.y_skate_size_multiplier', '2.5');
Services.prefs.setBoolPref('apz.allow-checkerboarding', true);
Services.prefs.clearUserPref('apz.velocity_bias');
Services.prefs.clearUserPref('apz.use_paint_duration');
Services.prefs.clearUserPref('apz.x_skate_size_multiplier');
Services.prefs.clearUserPref('apz.y_skate_size_multiplier');
Services.prefs.clearUserPref('apz.allow-checkerboarding');
// and then set the things that we want to change
switch (value) {
case 'default':

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

@ -8,8 +8,6 @@ const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
const PDF_CONTENT_TYPE = "application/pdf";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

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

@ -565,6 +565,11 @@
@BINPATH@/components/MozKeyboard.js
@BINPATH@/components/InputMethod.manifest
#ifdef MOZ_DEBUG
@BINPATH@/components/TestInterfaceJS.js
@BINPATH@/components/TestInterfaceJS.manifest
#endif
; Modules
@BINPATH@/modules/*

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

@ -1152,7 +1152,7 @@ function triggerSecondaryCommand(popup, index) {
EventUtils.synthesizeKey("VK_DOWN", {});
// Activate
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
}, false);
// One down event to open the popup

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

@ -1871,7 +1871,6 @@
<handlers>
<!-- The _accept method checks for .defaultPrevented so that if focus is in a button,
enter activates the button and not this default action -->
<handler event="keypress" keycode="VK_ENTER" group="system" action="this._accept(event);"/>
<handler event="keypress" keycode="VK_RETURN" group="system" action="this._accept(event);"/>
</handlers>
</binding>

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

@ -1333,8 +1333,7 @@ let CustomizableUIInternal = {
maybeAutoHidePanel: function(aEvent) {
if (aEvent.type == "keypress") {
if (aEvent.keyCode != aEvent.DOM_VK_ENTER &&
aEvent.keyCode != aEvent.DOM_VK_RETURN) {
if (aEvent.keyCode != aEvent.DOM_VK_RETURN) {
return;
}
// If the user hit enter/return, we don't check preventDefault - it makes sense

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

@ -957,8 +957,7 @@ const DownloadsView = {
return;
}
if (aEvent.keyCode == KeyEvent.DOM_VK_ENTER ||
aEvent.keyCode == KeyEvent.DOM_VK_RETURN) {
if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN) {
goDoCommand("downloadsCmd_doDefault");
}
},
@ -1648,7 +1647,6 @@ const DownloadsSummary = {
onKeyDown: function DS_onKeyDown(aEvent)
{
if (aEvent.charCode == " ".charCodeAt(0) ||
aEvent.keyCode == KeyEvent.DOM_VK_ENTER ||
aEvent.keyCode == KeyEvent.DOM_VK_RETURN) {
DownloadsPanel.showDownloadsHistory();
}

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

@ -400,10 +400,10 @@ var gAdvancedPane = {
*/
clearCache: function ()
{
var cacheService = Components.classes["@mozilla.org/network/cache-service;1"]
.getService(Components.interfaces.nsICacheService);
var cache = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService);
try {
cacheService.evictEntries(Components.interfaces.nsICache.STORE_ANYWHERE);
cache.clear();
} catch(ex) {}
this.updateActualCacheSize();
},

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

@ -118,8 +118,7 @@ function GroupItem(listOfEls, options) {
var handleKeyPress = function (e) {
if (e.keyCode == KeyEvent.DOM_VK_ESCAPE ||
e.keyCode == KeyEvent.DOM_VK_RETURN ||
e.keyCode == KeyEvent.DOM_VK_ENTER) {
e.keyCode == KeyEvent.DOM_VK_RETURN) {
(self.$title)[0].blur();
self.$title
.addClass("transparentBorder")

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

@ -470,9 +470,8 @@ let Search = {
let matcher = this.createSearchTabMatcher();
let matches = matcher.matched();
let others = matcher.matchedTabsFromOtherWindows();
if ((event.keyCode == event.DOM_VK_RETURN ||
event.keyCode == event.DOM_VK_ENTER) &&
(matches.length > 0 || others.length > 0)) {
if (event.keyCode == event.DOM_VK_RETURN &&
(matches.length > 0 || others.length > 0)) {
this.hide(event);
if (matches.length > 0)
matches[0].zoomIn();

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

@ -16,7 +16,7 @@ function test() {
let groupItem = cw.GroupItems.groupItems[0];
let shield = groupItem.$titleShield[0];
let keys = ["RETURN", "ENTER", "ESCAPE"];
let keys = ["RETURN", "ESCAPE"];
ok(win.TabView.isVisible(), "tabview is visible");

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

@ -32,10 +32,10 @@ function test() {
finish();
});
EventUtils.synthesizeKey("VK_ENTER", {}, contentWindow);
EventUtils.synthesizeKey("VK_RETURN", {}, contentWindow);
});
});
EventUtils.synthesizeKey("VK_ENTER", {}, contentWindow);
EventUtils.synthesizeKey("VK_RETURN", {}, contentWindow);
});
}

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

@ -126,7 +126,7 @@ function cleanup(contentWindow) {
});
}
window.addEventListener("tabviewhidden", onTabViewHidden, false);
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
}
function whenWindowObservesOnce(win, topic, func) {

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

@ -128,5 +128,5 @@ function cleanup(contentWindow) {
finish();
}
window.addEventListener("tabviewhidden", onTabViewHidden, false);
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
}

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

@ -1099,7 +1099,6 @@ let UI = {
self.exit();
break;
case KeyEvent.DOM_VK_RETURN:
case KeyEvent.DOM_VK_ENTER:
activeGroupItem = GroupItems.getActiveGroupItem();
if (activeGroupItem) {
activeTab = self.getActiveTab();

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

@ -911,7 +911,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
* The keypress listener for the breakpoints conditional expression textbox.
*/
_onConditionalTextboxKeyPress: function(e) {
if (e.keyCode == e.DOM_VK_RETURN || e.keyCode == e.DOM_VK_ENTER) {
if (e.keyCode == e.DOM_VK_RETURN) {
this._hideConditionalPopup();
}
},
@ -2268,7 +2268,6 @@ WatchExpressionsView.prototype = Heritage.extend(WidgetMethods, {
_onKeyPress: function(e) {
switch(e.keyCode) {
case e.DOM_VK_RETURN:
case e.DOM_VK_ENTER:
case e.DOM_VK_ESCAPE:
e.stopPropagation();
DebuggerView.editor.focus();

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

@ -953,7 +953,6 @@ FilterView.prototype = {
// the escape key switches focus from the search container.
else switch (e.keyCode) {
case e.DOM_VK_RETURN:
case e.DOM_VK_ENTER:
var isReturnKey = true;
// If the shift key is pressed, focus on the previous result
actionToPerform = e.shiftKey ? "selectPrev" : "selectNext";

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

@ -118,7 +118,7 @@ function performTest() {
ok(isCaretPos(gPanel, 26, 11 + token.length),
"The editor didn't jump to the correct token (4).");
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
"The searchbox data wasn't parsed correctly.");
ok(isCaretPos(gPanel, 8, 12 + token.length),
@ -222,7 +222,7 @@ function performTest() {
ok(isCaretPos(gPanel, 8, 12 + token.length),
"The editor shouldn't jump to another token (20).");
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
is(gFiltering.searchData.toSource(), '["", [""]]',
"The searchbox data wasn't parsed correctly.");
ok(isCaretPos(gPanel, 8, 12 + token.length),
@ -259,7 +259,7 @@ function performTest() {
ok(isCaretPos(gPanel, 26, 11 + token.length),
"The editor didn't jump to the correct token (26).");
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
"The searchbox data wasn't parsed correctly.");
ok(isCaretPos(gPanel, 8, 12 + token.length),

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

@ -436,13 +436,13 @@ function showSource(aLabel) {
function saveSearch() {
let finished = once(gDebugger, "popuphidden");
// Either by pressing RETURN, ENTER, or clicking on an item in the popup,
// Either by pressing RETURN or clicking on an item in the popup,
// the popup should hide and the item should become selected.
let random = Math.random();
if (random >= 0.33) {
EventUtils.sendKey("RETURN", gDebugger);
} else if (random >= 0.66) {
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
} else {
EventUtils.sendMouseEvent({ type: "click" },
gFilteredFunctions.selectedItem.target,

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

@ -90,11 +90,11 @@ function performTest() {
is(gVariablesView._parent.scrollTop, 0,
"The 'variables' view shouldn't scroll when pressing the UP key.");
// Part 2: Make sure that ENTER/ESCAPE toggle input elements.
// Part 2: Make sure that RETURN/ESCAPE toggle input elements.
yield synthesizeKeyAndWaitForElement("VK_ENTER", {}, ".element-value-input", true);
yield synthesizeKeyAndWaitForElement("VK_RETURN", {}, ".element-value-input", true);
yield synthesizeKeyAndWaitForElement("VK_ESCAPE", {}, ".element-value-input", false);
yield synthesizeKeyAndWaitForElement("VK_ENTER", { shiftKey: true }, ".element-name-input", true);
yield synthesizeKeyAndWaitForElement("VK_RETURN", { shiftKey: true }, ".element-name-input", true);
yield synthesizeKeyAndWaitForElement("VK_ESCAPE", {}, ".element-name-input", false);
// Part 3: Test simple navigation.

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

@ -32,7 +32,7 @@ function test() {
is(value.hidden, false,
"The value element should not be hidden.");
for (let key of ["ESCAPE", "ENTER"]) {
for (let key of ["ESCAPE", "RETURN"]) {
EventUtils.sendMouseEvent({ type: "dblclick" }, name, win);
is(separator.hidden, true,

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

@ -57,7 +57,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([true, false, false, false]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([true, false, false, false]);
@ -73,7 +73,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([true, true, true, true]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([true, true, true, true]);
@ -89,7 +89,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([true, true, true, true]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([true, true, true, true]);
@ -108,7 +108,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([false, false, false, false]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([false, false, false, false]);
@ -125,7 +125,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([true, true, true, true]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([true, true, true, true]);
@ -141,7 +141,7 @@ function testVariablesAndPropertiesFiltering() {
},
function() {
assertExpansion([true, true, true, true]);
EventUtils.sendKey("ENTER", gDebugger);
EventUtils.sendKey("RETURN", gDebugger);
},
function() {
assertExpansion([true, true, true, true]);

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

@ -276,7 +276,6 @@ SelectorSearch.prototype = {
_onSearchKeypress: function SelectorSearch__onSearchKeypress(aEvent) {
let query = this.searchBox.value;
switch(aEvent.keyCode) {
case aEvent.DOM_VK_ENTER:
case aEvent.DOM_VK_RETURN:
if (query == this._lastSearched && this._searchResults) {
this._searchIndex = (this._searchIndex + 1) % this._searchResults.length;
@ -351,7 +350,6 @@ SelectorSearch.prototype = {
*/
_onListBoxKeypress: function SelectorSearch__onListBoxKeypress(aEvent) {
switch(aEvent.keyCode || aEvent.button) {
case aEvent.DOM_VK_ENTER:
case aEvent.DOM_VK_RETURN:
case aEvent.DOM_VK_TAB:
case 0: // left mouse button

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

@ -19,7 +19,7 @@ function test()
["i", "b1", false],
["v", "d1", true],
["VK_DOWN", "d2", true],
["VK_ENTER", "d1", true],
["VK_RETURN", "d1", true],
[".", "d1", false],
["c", "d1", false],
["1", "d2", true],

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

@ -32,7 +32,7 @@ const BORDER_RE = /^border(-(top|bottom|left|right))?$/ig;
const XHTML_NS = "http://www.w3.org/1999/xhtml";
const SPECTRUM_FRAME = "chrome://browser/content/devtools/spectrum-frame.xhtml";
const ESCAPE_KEYCODE = Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE;
const ENTER_KEYCODE = Ci.nsIDOMKeyEvent.DOM_VK_RETURN;
const RETURN_KEYCODE = Ci.nsIDOMKeyEvent.DOM_VK_RETURN;
const POPUP_EVENTS = ["shown", "hidden", "showing", "hiding"];
/**
@ -762,7 +762,7 @@ function SwatchBasedEditorTooltip(doc) {
// It will also close on <escape> and <enter>
this.tooltip = new Tooltip(doc, {
consumeOutsideClick: true,
closeOnKeys: [ESCAPE_KEYCODE, ENTER_KEYCODE],
closeOnKeys: [ESCAPE_KEYCODE, RETURN_KEYCODE],
noAutoFocus: false
});
@ -771,7 +771,7 @@ function SwatchBasedEditorTooltip(doc) {
this._onTooltipKeypress = (event, code) => {
if (code === ESCAPE_KEYCODE) {
this.revert();
} else if (code === ENTER_KEYCODE) {
} else if (code === RETURN_KEYCODE) {
this.commit();
}
};

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

@ -512,7 +512,6 @@ VariablesView.prototype = {
_onSearchboxKeyPress: function(e) {
switch(e.keyCode) {
case e.DOM_VK_RETURN:
case e.DOM_VK_ENTER:
this._onSearchboxInput();
return;
case e.DOM_VK_ESCAPE:
@ -861,7 +860,6 @@ VariablesView.prototype = {
return;
case e.DOM_VK_RETURN:
case e.DOM_VK_ENTER:
// Start editing the value or name of the Variable or Property.
if (item instanceof Variable) {
if (e.metaKey || e.altKey || e.shiftKey) {
@ -3941,7 +3939,6 @@ Editable.prototype = {
this._next();
break;
case e.DOM_VK_RETURN:
case e.DOM_VK_ENTER:
this._save();
break;
case e.DOM_VK_ESCAPE:

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

@ -172,7 +172,6 @@ function onEditorKeypress(ed, event) {
case event.DOM_VK_END:
case event.DOM_VK_BACK_SPACE:
case event.DOM_VK_DELETE:
case event.DOM_VK_ENTER:
case event.DOM_VK_RETURN:
private.doNotAutocomplete = true;
private.popup.hidePopup();

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

@ -180,12 +180,12 @@ function testPressingEnterCommitsChanges() {
cPicker.tooltip.once("hidden", () => {
is(contentWin.getComputedStyle(contentDoc.body).borderLeftColor,
"rgba(0, 255, 0, 0.5)", "The element's border was kept after ENTER");
"rgba(0, 255, 0, 0.5)", "The element's border was kept after RETURN");
is(swatch.style.backgroundColor, "rgba(0, 255, 0, 0.5)",
"The color swatch's background was kept after ENTER");
"The color swatch's background was kept after RETURN");
is(getRuleViewProperty("border").valueSpan.textContent,
"2em solid rgba(0, 255, 0, 0.5)",
"The text of the border css property was kept after ENTER");
"The text of the border css property was kept after RETURN");
endTests();
});

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

@ -25,7 +25,7 @@ function testCompletion(hud) {
EventUtils.synthesizeKey(";", {});
is(input.value, "var d = 5;", "var d = 5;");
is(jsterm.completeNode.value, "", "no completion");
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
is(jsterm.completeNode.value, "", "clear completion on execute()");
// Test typing 'var a = d' and press RETURN
@ -33,7 +33,7 @@ function testCompletion(hud) {
EventUtils.synthesizeKey("d", {});
is(input.value, "var a = d", "var a = d");
is(jsterm.completeNode.value, "", "no completion");
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
is(jsterm.completeNode.value, "", "clear completion on execute()");
jsterm = input = null;

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

@ -750,10 +750,10 @@ function updateVariablesViewProperty(aOptions)
switch (aOptions.field) {
case "name":
EventUtils.synthesizeKey("VK_ENTER", { shiftKey: true }, view.window);
EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true }, view.window);
break;
case "value":
EventUtils.synthesizeKey("VK_ENTER", {}, view.window);
EventUtils.synthesizeKey("VK_RETURN", {}, view.window);
break;
default:
throw new Error("options.field is incorrect");
@ -771,7 +771,7 @@ function updateVariablesViewProperty(aOptions)
aOptions.webconsole.jsterm.once("variablesview-fetched", aOptions.callback);
}
EventUtils.synthesizeKey("VK_ENTER", {}, view.window);
EventUtils.synthesizeKey("VK_RETURN", {}, view.window);
if (!aOptions.webconsole) {
executeSoon(aOptions.callback);

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

@ -584,6 +584,11 @@
@BINPATH@/components/MozKeyboard.js
@BINPATH@/components/InputMethod.manifest
#ifdef MOZ_DEBUG
@BINPATH@/components/TestInterfaceJS.js
@BINPATH@/components/TestInterfaceJS.manifest
#endif
; Modules
@BINPATH@/browser/modules/*
@BINPATH@/modules/*

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

@ -30,8 +30,6 @@ var APZCObserver = {
let os = Services.obs;
os.addObserver(this, "apzc-transform-begin", false);
// Fired by ContentAreaObserver
window.addEventListener("SizeChanged", this, true);
Elements.tabList.addEventListener("TabSelect", this, true);
Elements.browsers.addEventListener("pageshow", this, true);
messageManager.addMessageListener("Content:ZoomToRect", this);
@ -45,7 +43,6 @@ var APZCObserver = {
let os = Services.obs;
os.removeObserver(this, "apzc-transform-begin");
window.removeEventListener("SizeChanged", this, true);
Elements.tabList.removeEventListener("TabSelect", this, true);
Elements.browsers.removeEventListener("pageshow", this, true);
messageManager.removeMessageListener("Content:ZoomToRect", this);
@ -53,7 +50,6 @@ var APZCObserver = {
handleEvent: function APZC_handleEvent(aEvent) {
switch (aEvent.type) {
case "SizeChanged":
case 'TabSelect':
this._resetDisplayPort();
break;

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

@ -1386,6 +1386,4 @@ Desktop browser's sync prefs.
</vbox>
</box>
</stack>
<!-- XXX: Expose feedback string to SettingsCharm.js -->
<label value="&helpFeedbackPage.label;" id="feedback-label" href="https://input.mozilla.org/feedback/metrofirefox" hidden="true"/>
</window>

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

@ -54,11 +54,9 @@ var SettingsCharm = {
// Feedback
this.addEntry({
// feedbackLabel is a temporary measure to expose this string
// from the baseMenuOverlay.dtd
label: Elements.feedbackLabel.value,
label: Strings.browser.GetStringFromName("feedbackCharm"),
onselected: function() {
let url = Elements.feedbackLabel.getAttribute("href");
let url = Services.urlFormatter.formatURLPref("app.support.inputURL");
BrowserUI.addAndShowTab(url, Browser.selectedTab);
}
});

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

@ -46,6 +46,7 @@ clearPrivateData.message3=This will permanently delete the private data you have
aboutCharm1=About
optionsCharm=Options
searchCharm=Search
feedbackCharm=Feedback (online)
helpOnlineCharm=Help (online)
# General

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

@ -39,8 +39,6 @@
@AB_CD@.jar:
relativesrcdir browser/locales:
locale/browser/syncBrand.dtd (%chrome/browser/syncBrand.dtd)
# Temporary hack to provide a 'feedback' string
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
locale/browser/netError.dtd (%chrome/overrides/netError.dtd)
% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties)

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

@ -434,6 +434,7 @@ pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
// TODO: This is not the correct article for metro!!!
pref("app.sync.tutorialURL", "https://support.mozilla.org/kb/sync-firefox-between-desktop-and-mobile");
pref("app.support.baseURL", "https://support.mozilla.org/1/touch/%VERSION%/%OS%/%LOCALE%/");
pref("app.support.inputURL", "https://input.mozilla.org/feedback/metrofirefox");
pref("app.privacyURL", "http://www.mozilla.org/%LOCALE%/legal/privacy/firefox.html");
pref("app.creditsURL", "http://www.mozilla.org/credits/");
pref("app.channelURL", "http://www.mozilla.org/%LOCALE%/firefox/channel/");

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

@ -459,7 +459,7 @@ function triggerSecondaryCommand(popup, index) {
EventUtils.synthesizeKey("VK_DOWN", {});
// Activate
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
}, false);
// One down event to open the popup

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

@ -2364,8 +2364,8 @@ Element::PostHandleEventForLinks(nsEventChainPostVisitor& aVisitor)
if (shell) {
// single-click
nsEventStatus status = nsEventStatus_eIgnore;
InternalUIEvent actEvent(mouseEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
InternalUIEvent actEvent(mouseEvent->mFlags.mIsTrusted, NS_UI_ACTIVATE);
actEvent.detail = 1;
rv = shell->HandleDOMEventWithTarget(this, &actEvent, &status);
if (NS_SUCCEEDED(rv)) {

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

@ -115,6 +115,7 @@ support-files =
file_report_uri_missing_in_report_only_header.html^headers^
[test_CSP.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_CSP_bug663567.html]
[test_CSP_bug802872.html]
[test_CSP_bug885433.html]
@ -122,13 +123,17 @@ support-files =
[test_CSP_bug916446.html]
[test_CSP_evalscript.html]
[test_CSP_evalscript_getCRMFRequest.html]
skip-if = toolkit == 'android' #bug 824652
[test_CSP_frameancestors.html]
skip-if = toolkit == 'android'
[test_CSP_inlinescript.html]
skip-if = toolkit == 'android'
[test_CSP_inlinestyle.html]
[test_bothCSPheaders.html]
[test_bug836922_npolicies.html]
[test_bug886164.html]
[test_csp_redirects.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_CSP_bug910139.html]
[test_CSP_bug909029.html]
[test_policyuri_regression_from_multipolicy.html]

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

@ -226,8 +226,11 @@ support-files =
wholeTexty-helper.xml
[test_CrossSiteXHR.html]
skip-if = toolkit == 'android'
[test_CrossSiteXHR_cache.html]
skip-if = toolkit == 'android'
[test_CrossSiteXHR_origin.html]
skip-if = toolkit == 'android'
[test_DOMException.html]
[test_EventSource_redirects.html]
[test_NodeIterator_basics_filters.xhtml]
@ -247,6 +250,7 @@ support-files =
[test_base.xhtml]
[test_blobconstructor.html]
[test_bug166235.html]
skip-if = toolkit == 'android'
[test_bug199959.html]
[test_bug218236.html]
[test_bug218277.html]
@ -272,6 +276,7 @@ support-files =
[test_bug337631.html]
[test_bug338541.xhtml]
[test_bug338583.html]
skip-if = toolkit == 'android'
[test_bug338679.html]
[test_bug339494.html]
[test_bug339494.xhtml]
@ -379,6 +384,7 @@ support-files =
[test_bug461735.html]
[test_bug465767.html]
[test_bug466080.html]
skip-if = toolkit == 'android'
[test_bug466409.html]
[test_bug466751.xhtml]
[test_bug469020.html]
@ -386,7 +392,9 @@ support-files =
[test_bug473162-1.html]
[test_bug473162-2.html]
[test_bug475156.html]
skip-if = toolkit == 'android' #bug 855762
[test_bug482935.html]
skip-if = toolkit == 'android' #bug 855762
[test_bug484396.html]
[test_bug493881.html]
[test_bug493881.js]
@ -397,8 +405,11 @@ support-files =
[test_bug499656.xhtml]
[test_bug500937.html]
[test_bug503481.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug503481b.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug505783.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug51034.html]
[test_bug513194.html]
[test_bug5141.html]
@ -431,6 +442,7 @@ support-files =
[test_bug587931.html]
[test_bug588990.html]
[test_bug590812.html]
skip-if = toolkit == 'android' #bug 687032
[test_bug590870.html]
[test_bug592366.html]
[test_bug592829.html]
@ -509,6 +521,7 @@ support-files =
[test_bug819051.html]
[test_bug820909.html]
[test_bug827160.html]
skip-if = toolkit == 'android' #needs plugin support
[test_bug840098.html]
[test_bug868999.html]
[test_bug869000.html]
@ -526,7 +539,9 @@ support-files =
[test_caretPositionFromPoint.html]
[test_classList.html]
[test_copypaste.html]
skip-if = toolkit == 'android' #bug 904183
[test_copypaste.xhtml]
skip-if = toolkit == 'android' #bug 904183
[test_createHTMLDocument.html]
[test_declare_stylesheet_obsolete.html]
[test_domparser_null_char.html]
@ -534,6 +549,7 @@ support-files =
[test_elementTraversal.html]
[test_fileapi.html]
[test_fileapi_slice.html]
skip-if = toolkit == 'android' #bug 775227
[test_getElementById.html]
[test_html_colors_quirks.html]
[test_html_colors_standards.html]
@ -549,17 +565,26 @@ support-files =
[test_meta_viewport5.html]
[test_meta_viewport6.html]
[test_mixed_content_blocker.html]
skip-if = toolkit == 'android' #TIMED_OUT, SSL_REQUIRED
[test_mixed_content_blocker_bug803225.html]
skip-if = toolkit == 'android' #TIMED_OUT, SSL_REQUIRED
[test_mixed_content_blocker_frameNavigation.html]
skip-if = toolkit == 'android' #TIMED_OUT, SSL_REQUIRED
[test_mozfiledataurl.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_mutationobservers.html]
[test_nodelist_holes.html]
[test_object.html]
skip-if = toolkit == 'android'
[test_plugin_freezing.html]
skip-if = toolkit == 'android' #CLICK_TO_PLAY
[test_processing_instruction_update_stylesheet.xhtml]
[test_range_bounds.html]
skip-if = toolkit == 'android'
[test_reentrant_flush.html]
skip-if = toolkit == 'android' #RANDOM
[test_sync_xhr_timer.xhtml]
skip-if = toolkit == 'android' #RANDOM
[test_text_wholeText.html]
[test_textnode_normalize_in_selection.html]
[test_textnode_split_in_selection.html]
@ -570,13 +595,19 @@ support-files =
[test_w3element_traversal.xhtml]
[test_w3element_traversal_svg.html]
[test_websocket.html]
skip-if = toolkit == 'android'
[test_websocket_basic.html]
skip-if = toolkit == 'android'
[test_websocket_hello.html]
skip-if = toolkit == 'android'
[test_x-frame-options.html]
skip-if = toolkit == 'android'
[test_xbl_userdata.xhtml]
[test_xhr_abort_after_load.html]
skip-if = toolkit == 'android'
[test_xhr_forbidden_headers.html]
[test_xhr_progressevents.html]
skip-if = toolkit == 'android'
[test_xhr_send_readystate.html]
[test_xhr_withCredentials.html]
[test_file_from_blob.html]

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

@ -4,6 +4,10 @@ support-files =
file_check-binary-messages_wsh.py
[test_receive-arraybuffer.html]
skip-if = toolkit == 'android'
[test_receive-blob.html]
skip-if = toolkit == 'android'
[test_send-arraybuffer.html]
skip-if = toolkit == 'android'
[test_send-blob.html]
skip-if = toolkit == 'android'

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

@ -280,6 +280,17 @@ WebGLContext::DestroyResourcesAndContext()
gl->fDeleteBuffers(1, &mFakeVertexAttrib0BufferObject);
}
// disable all extensions except "WEBGL_lose_context". see bug #927969
// spec: http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
for (size_t i = 0; i < size_t(WebGLExtensionID_max); ++i) {
WebGLExtensionID extension = WebGLExtensionID(i);
if (!IsExtensionEnabled(extension) || (extension == WEBGL_lose_context))
continue;
mExtensions[extension] = nullptr;
}
// We just got rid of everything, so the context had better
// have been going away.
#ifdef DEBUG

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

@ -1975,6 +1975,7 @@ WebGLContext::Hint(GLenum target, GLenum mode)
if (!isValid)
return ErrorInvalidEnum("hint: invalid hint");
MakeContextCurrent();
gl->fHint(target, mode);
}
@ -3380,6 +3381,7 @@ WebGLContext::CompressedTexImage2D(GLenum target, GLint level, GLenum internalfo
return;
}
MakeContextCurrent();
gl->fCompressedTexImage2D(target, level, internalformat, width, height, border, byteLength, view.Data());
tex->SetImageInfo(target, level, width, height, internalformat, LOCAL_GL_UNSIGNED_BYTE,
WebGLImageDataStatus::InitializedImageData);
@ -3484,6 +3486,7 @@ WebGLContext::CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset,
tex->DoDeferredImageInitialization(target, level);
}
MakeContextCurrent();
gl->fCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, byteLength, view.Data());
return;

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

@ -229,8 +229,11 @@ HTMLButtonElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
if (aVisitor.mEventStatus != nsEventStatus_eConsumeNoDefault) {
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
if (mouseEvent && mouseEvent->IsLeftClickEvent()) {
// XXX Activating actually occurs even if it's caused by untrusted event.
// Therefore, shouldn't this be always trusted event?
InternalUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
NS_UI_ACTIVATE);
actEvent.detail = 1;
nsCOMPtr<nsIPresShell> shell = aVisitor.mPresContext->GetPresShell();
if (shell) {

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

@ -3760,8 +3760,11 @@ HTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
if (mouseEvent && mouseEvent->IsLeftClickEvent() &&
!ShouldPreventDOMActivateDispatch(aVisitor.mEvent->originalTarget)) {
// XXX Activating actually occurs even if it's caused by untrusted event.
// Therefore, shouldn't this be always trusted event?
InternalUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
NS_UI_ACTIVATE);
actEvent.detail = 1;
nsCOMPtr<nsIPresShell> shell = aVisitor.mPresContext->GetPresShell();
if (shell) {
@ -3993,8 +3996,7 @@ HTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
*/
if (aVisitor.mEvent->message == NS_KEY_PRESS &&
(keyEvent->keyCode == NS_VK_RETURN ||
keyEvent->keyCode == NS_VK_ENTER) &&
keyEvent->keyCode == NS_VK_RETURN &&
(IsSingleLineTextControl(false, mType) ||
mType == NS_FORM_INPUT_NUMBER ||
IsExperimentalMobileType(mType))) {
@ -6909,17 +6911,12 @@ HTMLInputElement::IsValidEmailAddress(const nsAString& aValue)
uint32_t atPos;
nsAutoCString value;
// This call also checks whether aValue contains a correctly-placed '@' sign.
if (!PunycodeEncodeEmailAddress(aValue, value, &atPos)) {
return false;
}
uint32_t length = value.Length();
// Email addresses must contain a '@', but can't begin or end with it.
if (atPos == (uint32_t)kNotFound || atPos == 0 || atPos == length - 1) {
return false;
}
uint32_t i = 0;
// Parsing the username.

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

@ -99,7 +99,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=722599
for (var i = 0; i < textInputTypes.length; ++i) {
input = document.getElementById("input_" + textInputTypes[i]);
input.focus();
synthesizeKey("VK_ENTER", {});
synthesizeKey("VK_RETURN", {});
is(textInputChange[i], 0, "Change event shouldn't be dispatched on " + textInputTypes[i] + " input element");
synthesizeKey("m", {});

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

@ -77,7 +77,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=851780
for (var i = 0; i < textTypes.length; ++i) {
input = document.getElementById("input_" + textTypes[i]);
input.focus();
synthesizeKey("VK_ENTER", {});
synthesizeKey("VK_RETURN", {});
is(textInput[i], 0, "input event shouldn't be dispatched on " + textTypes[i] + " input element");
synthesizeKey("m", {});

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

@ -171,6 +171,7 @@ support-files =
[test_bug182279.html]
[test_bug2082.html]
[test_bug209275.xhtml]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug237071.html]
[test_bug242709.html]
[test_bug24958.html]
@ -237,8 +238,10 @@ support-files =
[test_bug458037.xhtml]
[test_bug460568.html]
[test_bug481335.xhtml]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug500885.html]
[test_bug514856.html]
skip-if = toolkit == 'android'
[test_bug518122.html]
[test_bug519987.html]
[test_bug523771.html]
@ -254,6 +257,7 @@ support-files =
[test_bug556645.html]
[test_bug557087-1.html]
[test_bug557087-2.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug557087-3.html]
[test_bug557087-4.html]
[test_bug557087-5.html]
@ -306,11 +310,13 @@ support-files =
[test_bug610687.html]
[test_bug611189.html]
[test_bug612730.html]
skip-if = toolkit == 'android'
[test_bug613113.html]
[test_bug613722.html]
[test_bug613979.html]
[test_bug615595.html]
[test_bug615833.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug617528.html]
[test_bug618948.html]
[test_bug619278.html]
@ -387,18 +393,23 @@ support-files =
[test_embed_attributes_reflection.html]
[test_formData.html]
[test_formSubmission.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_formSubmission2.html]
skip-if = toolkit == 'android'
[test_formelements.html]
[test_fullscreen-api.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_hidden.html]
[test_html_attributes_reflection.html]
[test_htmlcollection.html]
[test_iframe_sandbox_general.html]
[test_iframe_sandbox_inheritance.html]
[test_iframe_sandbox_modal.html]
skip-if = toolkit == 'android' #modal tests fail on android
[test_iframe_sandbox_navigation.html]
[test_iframe_sandbox_navigation2.html]
[test_iframe_sandbox_plugins.html]
skip-if = toolkit == 'android'
[test_iframe_sandbox_popups.html]
[test_iframe_sandbox_popups_inheritance.html]
[test_iframe_sandbox_same_origin.html]
@ -414,6 +425,7 @@ support-files =
[test_nested_invalid_fieldsets.html]
[test_object_attributes_reflection.html]
[test_object_plugin_nav.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_ol_attributes_reflection.html]
[test_option_defaultSelected.html]
[test_option_selected_state.html]
@ -429,6 +441,7 @@ support-files =
[test_ul_attributes_reflection.html]
[test_undoManager.html]
[test_video_wakelock.html]
skip-if = toolkit == 'android' #bug 871015
[test_input_files_not_nsIFile.html]
[test_ignoreuserfocus.html]
[test_fragment_form_pointer.html]

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

@ -26,6 +26,7 @@ support-files =
[test_bug57600.html]
[test_bug196523.html]
[test_bug199692.html]
skip-if = toolkit == 'android' #bug 811644
[test_bug172261.html]
[test_bug255820.html]
[test_bug259332.html]
@ -36,8 +37,10 @@ support-files =
[test_bug340017.xhtml]
[test_bug359657.html]
[test_bug369370.html]
skip-if = toolkit == 'android'
[test_bug380383.html]
[test_bug391777.html]
skip-if = toolkit == 'android'
[test_bug402680.html]
[test_bug403868.html]
[test_bug403868.xhtml]
@ -50,8 +53,9 @@ skip-if = true # Disabled for timeouts.
[test_document-element-inserted.html]
[test_document.watch.html]
[test_bug445004.html]
skip-if = true # Disabled permanently (bug 559932).
skip-if = true || toolkit == 'android' # Disabled permanently (bug 559932).
[test_bug446483.html]
skip-if = toolkit == 'android'
[test_bug448564.html]
[test_bug478251.html]
[test_bug481440.html]
@ -65,6 +69,7 @@ skip-if = true # Disabled permanently (bug 559932).
[test_bug677495.html]
[test_bug677495-1.html]
[test_bug741266.html]
skip-if = toolkit == 'android'
[test_non-ascii-cookie.html]
[test_bug765780.html]
[test_bug871161.html]

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

@ -79,8 +79,8 @@ TextTrackCue::TextTrackCue(nsISupports* aGlobal,
}
}
/** Save a reference to our creating document so it's available
* even when unlinked during discard/teardown.
/** Save a reference to our creating document so we don't have to
* keep getting it from our window.
*/
nsresult
TextTrackCue::StashDocument(nsISupports* aGlobal)
@ -99,7 +99,11 @@ TextTrackCue::StashDocument(nsISupports* aGlobal)
already_AddRefed<DocumentFragment>
TextTrackCue::GetCueAsHTML()
{
MOZ_ASSERT(mDocument);
// mDocument may be null during cycle collector shutdown.
// See bug 941701.
if (!mDocument) {
return nullptr;
}
if (!sParserWrapper) {
nsresult rv;

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

@ -67,13 +67,19 @@ TextTrackList::AddTextTrack(TextTrackKind aKind,
const nsAString& aLanguage)
{
nsRefPtr<TextTrack> track = new TextTrack(mGlobal, this, aKind, aLabel, aLanguage);
if (mTextTracks.AppendElement(track)) {
CreateAndDispatchTrackEventRunner(track, NS_LITERAL_STRING("addtrack"));
}
AddTextTrack(track);
return track.forget();
}
void
TextTrackList::AddTextTrack(TextTrack* aTextTrack)
{
if (mTextTracks.AppendElement(aTextTrack)) {
aTextTrack->SetTextTrackList(this);
CreateAndDispatchTrackEventRunner(aTextTrack, NS_LITERAL_STRING("addtrack"));
}
}
TextTrack*
TextTrackList::GetTrackById(const nsAString& aId)
{

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

@ -51,10 +51,7 @@ public:
const nsAString& aLanguage);
TextTrack* GetTrackById(const nsAString& aId);
void AddTextTrack(TextTrack* aTextTrack) {
mTextTracks.AppendElement(aTextTrack);
aTextTrack->SetTextTrackList(this);
}
void AddTextTrack(TextTrack* aTextTrack);
void RemoveTextTrack(TextTrack* aTrack);
void DidSeek();

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

@ -81,7 +81,8 @@ GStreamerReader::GStreamerReader(AbstractMediaDecoder* aDecoder)
mVideoSinkBufferCount(0),
mAudioSinkBufferCount(0),
mGstThreadsMonitor("media.gst.threads"),
mReachedEos(false),
mReachedAudioEos(false),
mReachedVideoEos(false),
#if GST_VERSION_MAJOR >= 1
mConfigureAlignment(true),
#endif
@ -534,7 +535,8 @@ nsresult GStreamerReader::ResetDecode()
mVideoSinkBufferCount = 0;
mAudioSinkBufferCount = 0;
mReachedEos = false;
mReachedAudioEos = false;
mReachedVideoEos = false;
#if GST_VERSION_MAJOR >= 1
mConfigureAlignment = true;
#endif
@ -553,7 +555,7 @@ bool GStreamerReader::DecodeAudioData()
{
ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
if (mReachedEos) {
if (mReachedAudioEos && !mAudioSinkBufferCount) {
return false;
}
@ -637,7 +639,7 @@ bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
{
ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
if (mReachedEos) {
if (mReachedVideoEos && !mVideoSinkBufferCount) {
return false;
}
@ -691,7 +693,7 @@ bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
"frame has invalid timestamp");
timestamp = GST_TIME_AS_USECONDS(timestamp);
int64_t duration;
int64_t duration = 0;
if (GST_CLOCK_TIME_IS_VALID(GST_BUFFER_DURATION(buffer)))
duration = GST_TIME_AS_USECONDS(GST_BUFFER_DURATION(buffer));
else if (fpsNum && fpsDen)
@ -709,7 +711,7 @@ bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
if (!buffer)
/* no more frames */
return false;
return true;
#if GST_VERSION_MAJOR >= 1
if (mConfigureAlignment && buffer->pool) {
@ -1060,16 +1062,24 @@ void GStreamerReader::NewAudioBuffer()
void GStreamerReader::EosCb(GstAppSink* aSink, gpointer aUserData)
{
GStreamerReader* reader = reinterpret_cast<GStreamerReader*>(aUserData);
reader->Eos();
reader->Eos(aSink);
}
void GStreamerReader::Eos()
void GStreamerReader::Eos(GstAppSink* aSink)
{
/* We reached the end of the stream */
{
ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
/* Potentially unblock DecodeVideoFrame and DecodeAudioData */
mReachedEos = true;
if (aSink == mVideoAppSink) {
mReachedVideoEos = true;
} else if (aSink == mAudioAppSink) {
mReachedAudioEos = true;
} else {
// Assume this is an error causing an EOS.
mReachedAudioEos = true;
mReachedVideoEos = true;
}
mon.NotifyAll();
}

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

@ -154,7 +154,10 @@ private:
/* Called at end of stream, when decoding has finished */
static void EosCb(GstAppSink* aSink, gpointer aUserData);
void Eos();
/* Notifies that a sink will no longer receive any more data. If nullptr
* is passed to this, we'll assume all streams have reached EOS (for example
* an error has occurred). */
void Eos(GstAppSink* aSink = nullptr);
/* Called when an element is added inside playbin. We use it to find the
* decodebin instance.
@ -221,7 +224,8 @@ private:
/* bool used to signal when gst has detected the end of stream and
* DecodeAudioData and DecodeVideoFrame should not expect any more data
*/
bool mReachedEos;
bool mReachedAudioEos;
bool mReachedVideoEos;
#if GST_VERSION_MAJOR >= 1
bool mConfigureAlignment;
#endif

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

@ -23,7 +23,7 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
var trackList = video.textTracks;
is(trackList.length, 0, "Length should be 0.");
var evtTextTrack, numOfCalls = 0;
var evtTextTrack, numOfCalls = 0, tt;
trackList.onaddtrack = function(event) {
ok(event instanceof TrackEvent, "Fired event from onaddtrack should be a TrackEvent");
is(event.type, "addtrack", "Event type should be addtrack");
@ -32,26 +32,37 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
ok(!event.cancelable, "Event shouldn't be cancelable!");
evtTextTrack = event.track;
ok(textTrack[numOfCalls] === evtTextTrack, "Text tracks should be the same");
tt = textTrack[numOfCalls].track || textTrack[numOfCalls];
ok(tt === evtTextTrack, "Text tracks should be the same");
is(evtTextTrack.label, label[numOfCalls], "Label should be set to "+ label[numOfCalls]);
is(evtTextTrack.language, language[numOfCalls], "Language should be " + language[numOfCalls]);
is(evtTextTrack.kind, kind[numOfCalls], "Kind should be " + kind[numOfCalls]);
if (++numOfCalls == 3) {
if (++numOfCalls == 4) {
SimpleTest.finish();
}
};
var label = ["Oasis", "Coldplay", "t.A.T.u"];
language = ["en-CA", "en-GB", "ru" ];
kind = ["subtitles", "captions", "chapters"];
var label = ["Oasis", "Coldplay", "t.A.T.u", ""];
language = ["en-CA", "en-GB", "ru", ""];
kind = ["subtitles", "captions", "chapters", "subtitles"];
var textTrack = new Array(3);
var textTrack = new Array(4);
for (var i = 0; i < 3; ++i) {
textTrack[i] = video.addTextTrack(kind[i], label[i], language[i]);
is(trackList.length, i + 1, "Length should be " + (i+1));
}
video.src = "seek.webm";
video.preload = "auto";
var trackElement = document.createElement("track");
trackElement.src = "basic.vtt";
textTrack[3] = trackElement;
document.getElementById("content").appendChild(video);
video.appendChild(trackElement);
//TODO: Tests for removetrack event to be added along with bug 882677
}
);

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

@ -8,6 +8,7 @@ support-files =
[test_audio_capture_error.html]
[test_call_start_from_end_handler.html]
[test_nested_eventloop.html]
skip-if = toolkit == 'android'
[test_preference_enable.html]
[test_recognition_service_error.html]
[test_success_without_recognition_service.html]

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

@ -1,3 +1,4 @@
[DEFAULT]
[test_ipc.html]
skip-if = toolkit == 'android' #bug 857673

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

@ -1,4 +1,5 @@
[DEFAULT]
[test_bug486990.xul]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug749367.xul]

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

@ -46,7 +46,7 @@ support-files =
[test_bug404548.html]
[test_bug413310.html]
# Disabled for too many intermittent failures (bug 719186)
skip-if = true
skip-if = true || toolkit == 'android'
[test_bug475636.html]
[test_bug509055.html]
[test_bug511449.html]
@ -59,15 +59,19 @@ support-files = file_bug511449.html
[test_bug570341.html]
[test_bug580069.html]
[test_bug590573.html]
skip-if = toolkit == 'android' #bug 823022
[test_bug598895.html]
skip-if = toolkit == 'android'
[test_bug634834.html]
[test_bug637644.html]
skip-if = toolkit == 'android'
[test_bug640387_1.html]
[test_bug640387_2.html]
[test_bug653741.html]
[test_bug660404.html]
[test_bug662170.html]
[test_bug668513.html]
skip-if = toolkit == 'android' #RANDOM
[test_bug669671.html]
[test_bug675587.html]
[test_bug680257.html]
@ -78,5 +82,6 @@ support-files = file_bug511449.html
[test_bug728939.html]
[test_bug797909.html]
[test_framedhistoryframes.html]
skip-if = toolkit == 'android' #bug 784321
[test_pushState_after_document_open.html]
[test_windowedhistoryframes.html]

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

@ -20,14 +20,17 @@ support-files =
parent.html
[test_bug13871.html]
skip-if = toolkit == 'android' #RANDOM
[test_bug270414.html]
skip-if = toolkit == "android"
[test_bug278916.html]
[test_bug279495.html]
[test_bug344861.html]
skip-if = toolkit == 'android'
[test_bug386782.html]
[test_bug430624.html]
[test_bug430723.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_child.html]
[test_grandchild.html]
[test_not-opener.html]
@ -35,5 +38,6 @@ skip-if = toolkit == "android"
[test_popup-navigates-children.html]
[test_reserved.html]
[test_sessionhistory.html]
skip-if = toolkit == 'android' #RANDOM
[test_sibling-matching-parent.html]
[test_sibling-off-domain.html]

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

@ -2439,16 +2439,16 @@ onInstallSuccessAck: function onInstallSuccessAck(aManifestURL,
// respond Webapps:Install:Return:Ack, which calls onInstallSuccessAck.
this.broadcastMessage("Webapps:Install:Return:OK", aData);
}
if (!aData.isPackage) {
this.updateAppHandlers(null, app.manifest, app);
if (aInstallSuccessCallback) {
aInstallSuccessCallback(app.manifest);
}
}
Services.obs.notifyObservers(null, "webapps-installed",
JSON.stringify({ manifestURL: app.manifestURL }));
});
if (!aData.isPackage) {
this.updateAppHandlers(null, app.manifest, app);
if (aInstallSuccessCallback) {
aInstallSuccessCallback(app.manifest);
}
}
let dontNeedNetwork = false;
if (manifest.package_path) {
// If it is a local app then it must been installed from a local file

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

@ -48,24 +48,34 @@ public:
mStack.RemoveElementAt(mStack.Length() - 1);
}
nsIGlobalObject* Incumbent() {
ScriptSettingsStackEntry* Incumbent() {
if (!mStack.Length()) {
return nullptr;
}
return mStack.LastElement()->mGlobalObject;
return mStack.LastElement();
}
nsIGlobalObject* EntryPoint() {
nsIGlobalObject* IncumbentGlobal() {
ScriptSettingsStackEntry *entry = Incumbent();
return entry ? entry->mGlobalObject : nullptr;
}
ScriptSettingsStackEntry* EntryPoint() {
if (!mStack.Length())
return nullptr;
for (int i = mStack.Length() - 1; i >= 0; --i) {
if (mStack[i]->mIsCandidateEntryPoint) {
return mStack[i]->mGlobalObject;
return mStack[i];
}
}
MOZ_ASSUME_UNREACHABLE("Non-empty stack should always have an entry point");
}
nsIGlobalObject* EntryGlobal() {
ScriptSettingsStackEntry *entry = EntryPoint();
return entry ? entry->mGlobalObject : nullptr;
}
private:
// These pointers are caller-owned.
nsTArray<ScriptSettingsStackEntry*> mStack;
@ -102,10 +112,10 @@ BrokenGetEntryGlobal()
// We need the current JSContext in order to check the JS for
// scripted frames that may have appeared since anyone last
// manipulated the stack. If it's null, that means that there
// must be no entry point on the stack.
// must be no entry global on the stack.
JSContext *cx = nsContentUtils::GetCurrentJSContextForThread();
if (!cx) {
MOZ_ASSERT(ScriptSettingsStack::Ref().EntryPoint() == nullptr);
MOZ_ASSERT(ScriptSettingsStack::Ref().EntryGlobal() == nullptr);
return nullptr;
}
@ -121,11 +131,11 @@ GetIncumbentGlobal()
// We need the current JSContext in order to check the JS for
// scripted frames that may have appeared since anyone last
// manipulated the stack. If it's null, that means that there
// must be no entry point on the stack, and therefore no incumbent
// must be no entry global on the stack, and therefore no incumbent
// global either.
JSContext *cx = nsContentUtils::GetCurrentJSContextForThread();
if (!cx) {
MOZ_ASSERT(ScriptSettingsStack::Ref().EntryPoint() == nullptr);
MOZ_ASSERT(ScriptSettingsStack::Ref().EntryGlobal() == nullptr);
return nullptr;
}
@ -142,14 +152,53 @@ GetIncumbentGlobal()
// Ok, nothing from the JS engine. Let's use whatever's on the
// explicit stack.
return ScriptSettingsStack::Ref().Incumbent();
return ScriptSettingsStack::Ref().IncumbentGlobal();
}
nsIPrincipal*
GetWebIDLCallerPrincipal()
{
MOZ_ASSERT(NS_IsMainThread());
ScriptSettingsStackEntry *entry = ScriptSettingsStack::Ref().EntryPoint();
// If we have an entry point that is not the system singleton, we know it
// must be an AutoEntryScript.
if (!entry || entry->IsSystemSingleton()) {
return nullptr;
}
AutoEntryScript* aes = static_cast<AutoEntryScript*>(entry);
// We can't yet rely on the Script Settings Stack to properly determine the
// entry script, because there are still lots of places in the tree where we
// don't yet use an AutoEntryScript (bug 951991 tracks this work). In the
// mean time though, we can make some observations to hack around the
// problem:
//
// (1) All calls into JS-implemented WebIDL go through CallSetup, which goes
// through AutoEntryScript.
// (2) The top candidate entry point in the Script Settings Stack is the
// entry point if and only if no other JSContexts have been pushed on
// top of the push made by that entry's AutoEntryScript.
//
// Because of (1), all of the cases where we might return a non-null
// WebIDL Caller are guaranteed to have put an entry on the Script Settings
// Stack, so we can restrict our search to that. Moreover, (2) gives us a
// criterion to determine whether an entry in the Script Setting Stack means
// that we should return a non-null WebIDL Caller.
//
// Once we fix bug 951991, this can all be simplified.
if (!aes->mCxPusher.ref().IsStackTop()) {
return nullptr;
}
return aes->mWebIDLCallerPrincipal;
}
AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
bool aIsMainThread,
JSContext* aCx)
: mStack(ScriptSettingsStack::Ref())
, mEntry(aGlobalObject, /* aCandidate = */ true)
: ScriptSettingsStackEntry(aGlobalObject, /* aCandidate = */ true)
, mStack(ScriptSettingsStack::Ref())
{
MOZ_ASSERT(aGlobalObject);
if (!aCx) {
@ -167,29 +216,29 @@ AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
}
}
if (aIsMainThread) {
mCxPusher.Push(aCx);
mCxPusher.construct(aCx);
}
mAc.construct(aCx, aGlobalObject->GetGlobalJSObject());
mStack.Push(&mEntry);
mStack.Push(this);
}
AutoEntryScript::~AutoEntryScript()
{
MOZ_ASSERT(mStack.Incumbent() == mEntry.mGlobalObject);
MOZ_ASSERT(mStack.Incumbent() == this);
mStack.Pop();
}
AutoIncumbentScript::AutoIncumbentScript(nsIGlobalObject* aGlobalObject)
: mStack(ScriptSettingsStack::Ref())
, mEntry(aGlobalObject, /* aCandidate = */ false)
: ScriptSettingsStackEntry(aGlobalObject, /* aCandidate = */ false)
, mStack(ScriptSettingsStack::Ref())
, mCallerOverride(nsContentUtils::GetCurrentJSContextForThread())
{
mStack.Push(&mEntry);
mStack.Push(this);
}
AutoIncumbentScript::~AutoIncumbentScript()
{
MOZ_ASSERT(mStack.Incumbent() == mEntry.mGlobalObject);
MOZ_ASSERT(mStack.Incumbent() == this);
mStack.Pop();
}
@ -197,7 +246,8 @@ AutoSystemCaller::AutoSystemCaller(bool aIsMainThread)
: mStack(ScriptSettingsStack::Ref())
{
if (aIsMainThread) {
mCxPusher.PushNull();
mCxPusher.construct(static_cast<JSContext*>(nullptr),
/* aAllowNull = */ true);
}
mStack.PushSystem();
}

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

@ -12,6 +12,7 @@
#include "nsCxPusher.h"
#include "MainThreadUtils.h"
#include "nsIGlobalObject.h"
#include "nsIPrincipal.h"
#include "mozilla/Maybe.h"
@ -38,6 +39,32 @@ nsIGlobalObject* BrokenGetEntryGlobal();
// can mostly be inferred from the JS stack.
nsIGlobalObject* GetIncumbentGlobal();
// JS-implemented WebIDL presents an interesting situation with respect to the
// subject principal. A regular C++-implemented API can simply examine the
// compartment of the most-recently-executed script, and use that to infer the
// responsible party. However, JS-implemented APIs are run with system
// principal, and thus clobber the subject principal of the script that
// invoked the API. So we have to do some extra work to keep track of this
// information.
//
// We therefore implement the following behavior:
// * Each Script Settings Object has an optional WebIDL Caller Principal field.
// This defaults to null.
// * When we push an Entry Point in preparation to run a JS-implemented WebIDL
// callback, we grab the subject principal at the time of invocation, and
// store that as the WebIDL Caller Principal.
// * When non-null, callers can query this principal from script via an API on
// Components.utils.
nsIPrincipal* GetWebIDLCallerPrincipal();
// This may be used by callers that know that their incumbent global is non-
// null (i.e. they know there have been no System Caller pushes since the
// inner-most script execution).
inline JSObject& IncumbentJSGlobal()
{
return *GetIncumbentGlobal()->GetGlobalJSObject();
}
class ScriptSettingsStack;
struct ScriptSettingsStackEntry {
nsCOMPtr<nsIGlobalObject> mGlobalObject;
@ -71,7 +98,7 @@ private:
/*
* A class that represents a new script entry point.
*/
class AutoEntryScript {
class AutoEntryScript : protected ScriptSettingsStackEntry {
public:
AutoEntryScript(nsIGlobalObject* aGlobalObject,
bool aIsMainThread = NS_IsMainThread(),
@ -79,24 +106,28 @@ public:
JSContext* aCx = nullptr);
~AutoEntryScript();
void SetWebIDLCallerPrincipal(nsIPrincipal *aPrincipal) {
mWebIDLCallerPrincipal = aPrincipal;
}
private:
dom::ScriptSettingsStack& mStack;
dom::ScriptSettingsStackEntry mEntry;
nsCxPusher mCxPusher;
nsCOMPtr<nsIPrincipal> mWebIDLCallerPrincipal;
mozilla::Maybe<AutoCxPusher> mCxPusher;
mozilla::Maybe<JSAutoCompartment> mAc; // This can de-Maybe-fy when mCxPusher
// goes away.
friend nsIPrincipal* GetWebIDLCallerPrincipal();
};
/*
* A class that can be used to force a particular incumbent script on the stack.
*/
class AutoIncumbentScript {
class AutoIncumbentScript : protected ScriptSettingsStackEntry {
public:
AutoIncumbentScript(nsIGlobalObject* aGlobalObject);
~AutoIncumbentScript();
private:
dom::ScriptSettingsStack& mStack;
dom::ScriptSettingsStackEntry mEntry;
JS::AutoHideScriptedCaller mCallerOverride;
};
@ -111,7 +142,7 @@ public:
~AutoSystemCaller();
private:
dom::ScriptSettingsStack& mStack;
nsCxPusher mCxPusher;
mozilla::Maybe<AutoCxPusher> mCxPusher;
};
} // namespace dom

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

@ -1471,8 +1471,10 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
else
return NS_ERROR_FAILURE;
WidgetSimpleGestureEvent event(true, msg, widget, aDirection, aDelta);
WidgetSimpleGestureEvent event(true, msg, widget);
event.modifiers = GetWidgetModifiers(aModifiers);
event.direction = aDirection;
event.delta = aDelta;
event.clickCount = aClickCount;
event.time = PR_IntervalNow();

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

@ -7431,20 +7431,25 @@ JSObject* nsGlobalWindow::CallerGlobal()
// If somebody does sameOriginIframeWindow.postMessage(...), they probably
// expect the .source attribute of the resulting message event to be |window|
// rather than |sameOriginIframeWindow|, even though the transparent wrapper
// semantics of same-origin access will cause us to be in the iframe's cx at
// the time of the call. So we do some nasty poking in the JS engine and
// retrieve the global corresponding to the innermost scripted frame. Then,
// we verify that its principal is subsumed by the subject principal. If it
// isn't, something is screwy, and we want to clamp to the cx global.
JS::Rooted<JSObject*> scriptedGlobal(cx, JS_GetScriptedGlobal(cx));
JS::Rooted<JSObject*> cxGlobal(cx, JS::CurrentGlobalOrNull(cx));
nsIPrincipal* scriptedPrin = nsContentUtils::GetObjectPrincipal(scriptedGlobal);
nsIPrincipal* cxPrin = nsContentUtils::GetObjectPrincipal(cxGlobal);
if (!cxPrin->SubsumesConsideringDomain(scriptedPrin)) {
NS_WARNING("Something nasty is happening! Applying countermeasures...");
return cxGlobal;
}
return scriptedGlobal;
// semantics of same-origin access will cause us to be in the iframe's
// compartment at the time of the call. This means that we want the incumbent
// global here, rather than the global of the current compartment.
//
// There are various edge cases in which the incumbent global and the current
// global would not be same-origin. They include:
// * A privileged caller (System Principal or Expanded Principal) manipulating
// less-privileged content via Xray Waivers.
// * An unprivileged caller invoking a cross-origin function that was exposed
// to it by privileged code (i.e. Sandbox.importFunction).
//
// In these cases, we probably don't want the privileged global appearing in the
// .source attribute. So we fall back to the compartment global there.
JS::Rooted<JSObject*> incumbentGlobal(cx, &IncumbentJSGlobal());
JS::Rooted<JSObject*> compartmentGlobal(cx, JS::CurrentGlobalOrNull(cx));
nsIPrincipal* incumbentPrin = nsContentUtils::GetObjectPrincipal(incumbentGlobal);
nsIPrincipal* compartmentPrin = nsContentUtils::GetObjectPrincipal(compartmentGlobal);
return incumbentPrin->EqualsConsideringDomain(compartmentPrin) ? incumbentGlobal
: compartmentGlobal;
}
@ -8557,7 +8562,16 @@ nsGlobalWindow::GetFrameElement(ErrorResult& aError)
return nullptr;
}
return GetRealFrameElement(aError);
// Per HTML5, the frameElement getter returns null in cross-origin situations.
Element* element = GetRealFrameElement(aError);
if (aError.Failed() || !element) {
return nullptr;
}
if (!nsContentUtils::GetSubjectPrincipal()->
SubsumesConsideringDomain(element->NodePrincipal())) {
return nullptr;
}
return element;
}
Element*

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

@ -2084,11 +2084,6 @@ bool
NonVoidByteStringToJsval(JSContext *cx, const nsACString &str,
JS::MutableHandle<JS::Value> rval)
{
if (str.IsEmpty()) {
rval.set(JS_GetEmptyStringValue(cx));
return true;
}
// ByteStrings are not UTF-8 encoded.
JSString* jsStr = JS_NewStringCopyN(cx, str.Data(), str.Length());

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

@ -49,7 +49,8 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
ErrorResult& aRv,
ExceptionHandling aExceptionHandling,
JSCompartment* aCompartment)
JSCompartment* aCompartment,
bool aIsJSImplementedWebIDL)
: mCx(nullptr)
, mCompartment(aCompartment)
, mErrorResult(aRv)
@ -59,6 +60,14 @@ CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
if (mIsMainThread) {
nsContentUtils::EnterMicroTask();
}
// Compute the caller's subject principal (if necessary) early, before we
// do anything that might perturb the relevant state.
nsIPrincipal* webIDLCallerPrincipal = nullptr;
if (aIsJSImplementedWebIDL) {
webIDLCallerPrincipal = nsContentUtils::GetSubjectPrincipal();
}
// We need to produce a useful JSContext here. Ideally one that the callback
// is in some sense associated with, so that we can sort of treat it as a
// "script entry point". Though once we actually have script entry points,
@ -112,6 +121,7 @@ CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
}
mAutoEntryScript.construct(globalObject, mIsMainThread, cx);
mAutoEntryScript.ref().SetWebIDLCallerPrincipal(webIDLCallerPrincipal);
if (aCallback->IncumbentGlobalOrNull()) {
mAutoIncumbentScript.construct(aCallback->IncumbentGlobalOrNull());
}

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

@ -154,10 +154,11 @@ protected:
*/
public:
// If aExceptionHandling == eRethrowContentExceptions then aCompartment
// needs to be set to the caller's compartment.
// needs to be set to the compartment in which exceptions will be rethrown.
CallSetup(CallbackObject* aCallback, ErrorResult& aRv,
ExceptionHandling aExceptionHandling,
JSCompartment* aCompartment = nullptr);
JSCompartment* aCompartment = nullptr,
bool aIsJSImplementedWebIDL = false);
~CallSetup();
JSContext* GetContext() const

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

@ -11289,7 +11289,8 @@ class CallbackMember(CGNativeMember):
if self.rethrowContentException:
# getArgs doesn't add the aExceptionHandling argument but does add
# aCompartment for us.
callSetup += ", eRethrowContentExceptions, aCompartment"
callSetup += ", eRethrowContentExceptions, aCompartment, /* aIsJSImplementedWebIDL = */ "
callSetup += toStringBool(isJSImplementedDescriptor(self.descriptorProvider))
else:
callSetup += ", aExceptionHandling"
callSetup += ");"

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

@ -0,0 +1,51 @@
/* 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/. */
const Cu = Components.utils;
const Ci = Components.interfaces;
"use strict";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
var gGlobal = this;
function checkGlobal(obj) {
if (Object(obj) === obj && Cu.getGlobalForObject(obj) != gGlobal) {
// This message may not make it to the caller in a useful form, so dump
// as well.
var msg = "TestInterfaceJS received an object from a different scope!";
dump(msg + "\n");
throw new Error(msg);
}
}
function TestInterfaceJS(anyArg, objectArg) {}
TestInterfaceJS.prototype = {
classID: Components.ID("{2ac4e026-cf25-47d5-b067-78d553c3cad8}"),
contractID: "@mozilla.org/dom/test-interface-js;1",
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]),
__init: function (anyArg, objectArg) {
this._anyAttr = undefined;
this._objectAttr = null;
this._anyArg = anyArg;
this._objectArg = objectArg;
checkGlobal(anyArg);
checkGlobal(objectArg);
},
get anyArg() { return this._anyArg; },
get objectArg() { return this._objectArg; },
get anyAttr() { return this._anyAttr; },
set anyAttr(val) { checkGlobal(val); this._anyAttr = val; },
get objectAttr() { return this._objectAttr; },
set objectAttr(val) { checkGlobal(val); this._objectAttr = val; },
pingPongAny: function(any) { checkGlobal(any); return any; },
pingPongObject: function(obj) { checkGlobal(obj); return obj; },
getCallerPrincipal: function() { return Cu.getWebIDLCallerPrincipal().origin; }
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJS])

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

@ -0,0 +1,2 @@
component {2ac4e026-cf25-47d5-b067-78d553c3cad8} TestInterfaceJS.js
contract @mozilla.org/dom/test-interface-js;1 {2ac4e026-cf25-47d5-b067-78d553c3cad8}

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

@ -16,6 +16,10 @@ support-files =
[test_bug788369.html]
[test_bug852846.html]
[test_bug862092.html]
# When bug 923904 lands, this test can be turned on, but only for debug builds
# where we have our test component. So this should become skip-if = debug == false.
[test_bug923904.html]
skip-if = true
[test_barewordGetsWindow.html]
[test_callback_default_thisval.html]
[test_cloneAndImportNode.html]

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

@ -10,6 +10,11 @@ LIBXUL_LIBRARY = True
LIBRARY_NAME = 'dombindings_test_s'
EXTRA_COMPONENTS += [
'TestInterfaceJS.js',
'TestInterfaceJS.manifest',
]
MOCHITEST_MANIFESTS += ['mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']

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

@ -0,0 +1,66 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=923904
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 923904</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for cloning of |any| and |object| for JS-Implemented WebIDL. **/
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
function go() {
var someAny = { a: 11 };
var someObj = { b: 22, c: "str" };
var t = new TestInterfaceJS(someAny, someObj);
is(Object.getPrototypeOf(t), TestInterfaceJS.prototype, "Prototype setup works correctly");
is(t.anyArg.toSource(), someAny.toSource(), "anyArg comes back looking like what we sent");
is(t.objectArg.toSource(), someObj.toSource(), "objectArg comes back looking like what we sent");
isnot(t.anyArg, t.anyArg, "get a new anyArg each time");
isnot(t.objectArg, t.objectArg, "get a new objectArg each time");
t.anyAttr = 2;
is(t.anyAttr, 2, "ping-pong works");
testObjectCloned(t, 'anyAttr');
testObjectCloned(t, 'objectAttr');
is(someAny.toSource(), t.pingPongAny(someAny).toSource(), "ping-pong works with any");
is(someObj.toSource(), t.pingPongObject(someObj).toSource(), "ping-pong works with obj");
isnot(someAny, t.pingPongAny(someAny), "Clone works for ping-pong any");
isnot(someObj, t.pingPongObject(someObj), "Clone works for ping-pong obj");
SimpleTest.finish();
}
function testObjectCloned(iface, propname) {
var obj = { prop: 42 };
iface[propname] = obj;
is(iface[propname].prop, 42, "objects come back as well");
is(iface[propname].__proto__, Object.prototype, "vanilla object");
isnot(iface[propname], obj, "Should not be the original object");
isnot(iface[propname], iface[propname], "Should get cloned each time");
try {
iface[propname] = { stringProp: "hi", reflectorProp: document };
ok(false, "Should throw when trying to clone reflector");
} catch (e) {
ok(/cloned/.test(e), "Should throw clone error: " + e);
}
}
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=923904">Mozilla Bug 923904</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>

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

@ -75,8 +75,6 @@ const ContentPanning = {
},
handleEvent: function cp_handleEvent(evt) {
this._tryDelayMouseEvents();
if (evt.defaultPrevented || evt.multipleActionsPrevented) {
// clean up panning state even if touchend/mouseup has been preventDefault.
if(evt.type === 'touchend' || evt.type === 'mouseup') {
@ -185,6 +183,7 @@ const ContentPanning = {
}
this.position.set(screenX, screenY);
KineticPanning.reset();
KineticPanning.record(new Point(0, 0), evt.timeStamp);
// We prevent start events to avoid sending a focus event at the end of this
@ -235,9 +234,6 @@ const ContentPanning = {
}
} else if (this.target && click && !this.panning) {
this.notify(this._activationTimer);
this._delayEvents = true;
this._tryDelayMouseEvents();
}
this._finishPanning();
@ -268,24 +264,27 @@ const ContentPanning = {
KineticPanning.record(delta, evt.timeStamp);
let isPan = KineticPanning.isPan();
// If we've detected a pan gesture, cancel the active state of the
// current target.
if (!this.panning && isPan) {
this._resetActive();
}
// There's no possibility of us panning anything.
if (!this.scrollCallback) {
return;
}
let isPan = KineticPanning.isPan();
// If the application is not managed by the AsyncPanZoomController, then
// scroll manually.
if (docShell.asyncPanZoomEnabled === false) {
this.scrollCallback(delta.scale(-1));
}
// If we've detected a pan gesture, cancel the active state of the
// current target.
if (!this.panning && isPan) {
this.panning = true;
this._resetActive();
this._activationTimer.cancel();
}
@ -449,21 +448,6 @@ const ContentPanning = {
return this._activationDelayMs = delay;
},
get _activeDurationMs() {
let duration = Services.prefs.getIntPref('ui.touch_activation.duration_ms');
delete this._activeDurationMs;
return this._activeDurationMs = duration;
},
_tryDelayMouseEvents: function cp_tryDelayMouseEvents() {
let start = Date.now();
let thread = Services.tm.currentThread;
while (this._delayEvents && (Date.now() - start) < this._activeDurationMs) {
thread.processNextEvent(true);
}
this._delayEvents = false;
},
_resetActive: function cp_resetActive() {
let elt = this.pointerDownTarget || this.target;
let root = elt.ownerDocument || elt.document;
@ -597,7 +581,6 @@ const ContentPanning = {
},
_finishPanning: function() {
this._resetActive();
this.dragging = false;
delete this.primaryPointerId;
this._activationTimer.cancel();
@ -695,16 +678,20 @@ const KineticPanning = {
},
stop: function kp_stop() {
this.reset();
if (!this.target)
return;
this.momentums = [];
this.distance.set(0, 0);
this.target.onKineticEnd();
this.target = null;
},
reset: function kp_reset() {
this.momentums = [];
this.distance.set(0, 0);
},
momentums: [],
record: function kp_record(delta, timestamp) {
this.momentums.push({ 'time': this._getTime(timestamp),

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

@ -14,8 +14,7 @@ nsDOMSimpleGestureEvent::nsDOMSimpleGestureEvent(mozilla::dom::EventTarget* aOwn
WidgetSimpleGestureEvent* aEvent)
: nsDOMMouseEvent(aOwner, aPresContext,
aEvent ? aEvent :
new WidgetSimpleGestureEvent(false, 0, nullptr,
0, 0.0))
new WidgetSimpleGestureEvent(false, 0, nullptr))
{
NS_ASSERTION(mEvent->eventStructType == NS_SIMPLE_GESTURE_EVENT, "event type mismatch");

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

@ -25,7 +25,7 @@ using namespace mozilla;
nsDOMUIEvent::nsDOMUIEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, WidgetGUIEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new InternalUIEvent(false, 0, 0))
aEvent ? aEvent : new InternalUIEvent(false, 0))
, mClientPoint(0, 0), mLayerPoint(0, 0), mPagePoint(0, 0), mMovementPoint(0, 0)
, mIsPointerLocked(nsEventStateManager::sIsPointerLocked)
, mLastClientPoint(nsEventStateManager::sLastClientPoint)

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

@ -27,7 +27,6 @@ DEFINE_VK_INTERNAL2(_BACK, _BACK_SPACE),
DEFINE_VK_INTERNAL(_TAB),
DEFINE_VK_INTERNAL(_CLEAR),
DEFINE_VK_INTERNAL(_RETURN),
DEFINE_VK_INTERNAL(_ENTER),
DEFINE_VK_INTERNAL(_SHIFT),
DEFINE_VK_INTERNAL(_CONTROL),
DEFINE_VK_INTERNAL(_ALT),

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

@ -29,10 +29,11 @@ support-files =
[test_bug402089.html]
[test_bug405632.html]
[test_bug409604.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug412567.html]
[test_bug422132.html]
[test_bug426082.html]
skip-if = os == "win" # Intermittent failures, bug 921693
skip-if = os == "win" || toolkit == 'android' # Intermittent failures, bug 921693
[test_bug427537.html]
[test_bug428988.html]
[test_bug432698.html]
@ -42,43 +43,70 @@ skip-if = os == "win" # Intermittent failures, bug 921693
[test_bug450876.html]
[test_bug456273.html]
[test_bug457672.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug489671.html]
[test_bug493251.html]
[test_bug502818.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug508479.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug822898.html]
[test_bug517851.html]
[test_bug534833.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug545268.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug547996-1.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug547996-2.xhtml]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug556493.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug563329.html]
skip-if = true # Disabled due to timeouts.
[test_bug574663.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug591815.html]
[test_bug593959.html]
[test_bug603008.html]
skip-if = toolkit == 'android'
[test_bug605242.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug607464.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug613634.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug615597.html]
[test_bug624127.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug635465.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug641477.html]
[test_bug648573.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug650493.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug656379-1.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug656379-2.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug656954.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug659071.html]
[test_bug659350.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug662678.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug667612.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug667919-1.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug689564.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug698929.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_bug741666.html]
skip-if = toolkit == 'android'
[test_bug742376.html]
[test_bug812744.html]
[test_bug847597.html]
@ -91,14 +119,20 @@ skip-if = toolkit == "gonk"
[test_bug944011.html]
[test_bug946632.html]
[test_clickevent_on_input.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_continuous_wheel_events.html]
[test_dblclick_explicit_original_target.html]
[test_dom_keyboard_event.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_dom_mouse_event.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_dom_wheel_event.html]
[test_draggableprop.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_dragstart.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_eventctors.html]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_focus_disabled.html]
[test_messageEvent.html]
[test_moz_mouse_pixel_scroll_event.html]

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

@ -223,11 +223,11 @@ function testSynthesizedKeyLocation()
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
{ key: "VK_ENTER", isModifier: false,
{ key: "VK_RETURN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_ENTER", isModifier: false,
{ key: "VK_RETURN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},

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

@ -1,3 +1,4 @@
[DEFAULT]
[test_ipc.html]
skip-if = toolkit == 'android' #bug 783513

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

@ -72,7 +72,7 @@ function triggerSecondaryCommand(popup, index)
EventUtils.synthesizeKey("VK_DOWN", {});
// Activate
EventUtils.synthesizeKey("VK_ENTER", {});
EventUtils.synthesizeKey("VK_RETURN", {});
}, false);
// One down event to open the popup

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

@ -21,7 +21,9 @@ support-files =
[test_add_twice_failure.html]
[test_advance.html]
[test_app_isolation_inproc.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_app_isolation_oop.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_autoIncrement.html]
[test_autoIncrement_indexes.html]
[test_bfcache.html]
@ -41,6 +43,7 @@ support-files =
[test_deleteDatabase_interactions.html]
[test_error_events_abort_transactions.html]
[test_event_propagation.html]
skip-if = toolkit == 'android' #TIMED_OUT, bug 780855
[test_event_source.html]
[test_exceptions_in_events.html]
[test_file_array.html]
@ -102,6 +105,7 @@ support-files =
[test_setVersion_exclusion.html]
[test_success_events_after_abort.html]
[test_third_party.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_traffic_jam.html]
[test_transaction_abort.html]
[test_transaction_abort_hang.html]
@ -110,6 +114,9 @@ support-files =
[test_transaction_ordering.html]
[test_unique_index_update.html]
[test_webapp_clearBrowserData_inproc_inproc.html]
skip-if = toolkit == 'android' #No test app installed
[test_webapp_clearBrowserData_inproc_oop.html]
skip-if = toolkit == 'android' #No test app installed
[test_webapp_clearBrowserData_oop_inproc.html]
skip-if = toolkit == 'android' #No test app installed
[test_bug937006.html]

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

@ -5,7 +5,7 @@
#include "nsIDOMUIEvent.idl"
[scriptable, builtinclass, uuid(2bbf1087-e404-45a5-880a-4f3702aebd4e)]
[scriptable, builtinclass, uuid(d2b3e35f-8627-4732-a92d-cda54c8f8054)]
interface nsIDOMKeyEvent : nsIDOMUIEvent
{
const unsigned long DOM_VK_CANCEL = 0x03;
@ -14,7 +14,9 @@ interface nsIDOMKeyEvent : nsIDOMUIEvent
const unsigned long DOM_VK_TAB = 0x09;
const unsigned long DOM_VK_CLEAR = 0x0C;
const unsigned long DOM_VK_RETURN = 0x0D;
const unsigned long DOM_VK_ENTER = 0x0E;
// DOM_VK_ENTER has been never used for representing native key events.
// Therefore, it's removed for preventing developers being confused.
// const unsigned long DOM_VK_ENTER = 0x0E;
const unsigned long DOM_VK_SHIFT = 0x10;
const unsigned long DOM_VK_CONTROL = 0x11;
const unsigned long DOM_VK_ALT = 0x12;

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

@ -100,6 +100,8 @@ static const char BROWSER_ZOOM_TO_RECT[] = "browser-zoom-to-rect";
static const char BEFORE_FIRST_PAINT[] = "before-first-paint";
static bool sCpowsEnabled = false;
static int32_t sActiveDurationMs = 10;
static bool sActiveDurationMsSet = false;
NS_IMETHODIMP
ContentListener::HandleEvent(nsIDOMEvent* aEvent)
@ -291,6 +293,12 @@ TabChild::TabChild(ContentChild* aManager, const TabContext& aContext, uint32_t
, mContextMenuHandled(false)
, mWaitingTouchListeners(false)
{
if (!sActiveDurationMsSet) {
Preferences::AddIntVarCache(&sActiveDurationMs,
"ui.touch_activation.duration_ms",
sActiveDurationMs);
sActiveDurationMsSet = true;
}
}
NS_IMETHODIMP
@ -1618,14 +1626,22 @@ TabChild::RecvHandleSingleTap(const CSSIntPoint& aPoint, const ScrollableLayerGu
LayoutDevicePoint currentPoint = CSSPoint(aPoint) * mWidget->GetDefaultScale();;
int time = 0;
DispatchSynthesizedMouseEvent(NS_MOUSE_MOVE, time, currentPoint);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_DOWN, time, currentPoint);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_UP, time, currentPoint);
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
NewRunnableMethod(this, &TabChild::FireSingleTapEvent, currentPoint),
sActiveDurationMs);
return true;
}
void
TabChild::FireSingleTapEvent(LayoutDevicePoint aPoint)
{
int time = 0;
DispatchSynthesizedMouseEvent(NS_MOUSE_MOVE, time, aPoint);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_DOWN, time, aPoint);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_UP, time, aPoint);
}
bool
TabChild::RecvHandleLongTap(const CSSIntPoint& aPoint, const ScrollableLayerGuid& aGuid)
{

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

@ -511,6 +511,7 @@ private:
bool mUpdateHitRegion;
bool mContextMenuHandled;
bool mWaitingTouchListeners;
void FireSingleTapEvent(LayoutDevicePoint aPoint);
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
};

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

@ -1926,6 +1926,11 @@ TabParent::GetLoadContext()
return loadContext.forget();
}
/* Be careful if you call this method while proceding a real touch event. For
* example sending a touchstart during a real touchend may results into
* a busted mEventCaptureDepth and following touch events may not do what you
* expect.
*/
NS_IMETHODIMP
TabParent::InjectTouchEvent(const nsAString& aType,
uint32_t* aIdentifiers,
@ -1969,6 +1974,11 @@ TabParent::InjectTouchEvent(const nsAString& aType,
event.touches.AppendElement(t);
}
if ((msg == NS_TOUCH_END || msg == NS_TOUCH_CANCEL) && sEventCapturer) {
WidgetGUIEvent* guiEvent = event.AsGUIEvent();
TryCapture(*guiEvent);
}
SendRealTouchEvent(event);
return NS_OK;
}

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

@ -5,7 +5,7 @@
malformedURI=The URL is not valid and cannot be loaded.
fileNotFound=The file %S cannot be found. Please check the location and try again.
dnsNotFound=%S could not be found. Please check the name and try again.
unknownProtocolFound=One of the following %S is not a registered protocol or is not allowed in this context.
unknownProtocolFound=One of the following (%S) is not a registered protocol or is not allowed in this context.
connectionFailure=The connection was refused when attempting to contact %S.
netInterrupt=The connection to %S has terminated unexpectedly. Some data may have been transferred.
netTimeout=The operation timed out when attempting to contact %S.

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

@ -1,3 +1,4 @@
[DEFAULT]
[test_ipc.html]
skip-if = toolkit == 'android' #bug 910661

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

@ -1,4 +1,5 @@
[DEFAULT]
[test_sms_basics.html]
skip-if = toolkit == 'android' #Bug 909036
[test_smsfilter.html]

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

@ -1,5 +1,5 @@
[test_network_basics.html]
skip-if = toolkit == "gonk"
skip-if = toolkit == "gonk" || toolkit == 'android'
[test_tcpsocket_default_permissions.html]
skip-if = toolkit == "gonk"
[test_tcpsocket_enabled_no_perm.html]

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

@ -8,6 +8,7 @@ support-files =
[test_embed-apps.html]
[test_idle.html]
[test_permission_basics.html]
skip-if = toolkit == 'android'
[test_permissions.html]
[test_power.html]
[test_systemXHR.html]

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

@ -137,13 +137,13 @@ void NPN_ReleaseVariantValue(NPVariant *variant);
#define VOID_TO_NPVARIANT(_v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Void; \
(_v).value.objectValue = nullptr; \
(_v).value.objectValue = NULL; \
NP_END_MACRO
#define NULL_TO_NPVARIANT(_v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Null; \
(_v).value.objectValue = nullptr; \
(_v).value.objectValue = NULL; \
NP_END_MACRO
#define BOOLEAN_TO_NPVARIANT(_val, _v) \
@ -216,7 +216,7 @@ typedef void *NPIdentifier;
methods and properties can be identified by either strings or
integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be
compared using ==. In case of any errors, the requested
NPIdentifier(s) will be nullptr. NPIdentifier lifetime is controlled
NPIdentifier(s) will be NULL. NPIdentifier lifetime is controlled
by the browser. Plugins do not need to worry about memory management
with regards to NPIdentifiers.
*/
@ -283,7 +283,7 @@ typedef bool (*NPConstructFunctionPtr)(NPObject *npobj,
NPObject instance after the invalidate callback has been
called will result in undefined behavior, even if the native code
is still retaining those NPObject instances. (The runtime
will typically return immediately, with 0 or nullptr, from an
will typically return immediately, with 0 or NULL, from an
attempt to dispatch to a NPObject, but this behavior should not
be depended upon.)

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

@ -14,7 +14,7 @@ nsDOMTimeEvent::nsDOMTimeEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new InternalUIEvent(false, 0, 0)),
aEvent ? aEvent : new InternalUIEvent(false, 0)),
mDetail(0)
{
SetIsDOMBinding();

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше