Merge latest green b2g-inbound changeset and mozilla-central

This commit is contained in:
Ed Morley 2013-08-15 11:58:48 +01:00
commit ac93237f7c
416 changed files with 5182 additions and 3076 deletions

View File

@ -13,7 +13,6 @@ LIBRARY_NAME = accessibility_toolkit_msaa_s
EXPORT_LIBRARY = 1
LIBXUL_LIBRARY = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -1,4 +1,3 @@
#
# 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/.
@ -47,18 +46,6 @@ ifneq ($(A11Y_LOG),0)
DEFINES += -DA11Y_LOG
endif
xpcAccEvents.h: $(srcdir)/AccEvents.conf \
$(srcdir)/AccEventGen.py \
$(LIBXUL_DIST)/sdk/bin/header.py \
$(LIBXUL_DIST)/sdk/bin/xpidl.py \
$(DEPTH)/js/src/js-confdefs.h
$(PYTHON) $(topsrcdir)/config/pythonpath.py \
-I$(LIBXUL_DIST)/sdk/bin \
$(srcdir)/AccEventGen.py \
-I $(DEPTH)/dist/idl \
--header-output xpcAccEvents.h \
$(srcdir)/AccEvents.conf
xpcAccEvents.cpp: $(srcdir)/AccEvents.conf \
$(srcdir)/AccEventGen.py \
$(LIBXUL_DIST)/sdk/bin/header.py \
@ -73,6 +60,8 @@ xpcAccEvents.cpp: $(srcdir)/AccEvents.conf \
--makedepend-output $(MDDEPDIR)/xpcAccEvents.pp \
$(srcdir)/AccEvents.conf
xpcAccEvents.h: xpcAccEvents.cpp
GARBAGE += \
xpcAccEvents.cpp \
xpcAccEvents.h \

View File

@ -55,6 +55,7 @@ FilePicker.prototype = {
init: function(parent, title, mode) {
this.mParent = parent;
this.mMode = mode;
if (mode != Ci.nsIFilePicker.modeOpen &&
mode != Ci.nsIFilePicker.modeOpenMultiple) {
@ -74,6 +75,10 @@ FilePicker.prototype = {
return this.mFilesEnumerator ? this.mFilesEnumerator.mFiles[0] : null;
},
get mode() {
return this.mMode;
},
appendFilters: function(filterMask) {
// Ci.nsIFilePicker.filterHTML is not supported
// Ci.nsIFilePicker.filterText is not supported

View File

@ -38,13 +38,15 @@ MOCHITEST_FILES = \
video.ogg \
$(NULL)
# test_contextmenu.html is disabled on Linux due to bug 513558
# test_contextmenu.html and test_contextmenu_input are disabled on Linux due to bug 513558
ifndef MOZ_WIDGET_GTK
MOCHITEST_FILES += \
audio.ogg \
privateBrowsingMode.js \
subtst_contextmenu.html \
contextmenu_common.js \
test_contextmenu.html \
test_contextmenu_input.html \
$(NULL)
endif

View File

@ -0,0 +1,186 @@
var lastElement;
function openContextMenuFor(element, shiftkey, waitForSpellCheck) {
// Context menu should be closed before we open it again.
is(SpecialPowers.wrap(contextMenu).state, "closed", "checking if popup is closed");
if (lastElement)
lastElement.blur();
element.focus();
// Some elements need time to focus and spellcheck before any tests are
// run on them.
function actuallyOpenContextMenuFor() {
lastElement = element;
var eventDetails = { type : "contextmenu", button : 2, shiftKey : shiftkey };
synthesizeMouse(element, 2, 2, eventDetails, element.ownerDocument.defaultView);
}
if (waitForSpellCheck)
onSpellCheck(element, actuallyOpenContextMenuFor);
else
actuallyOpenContextMenuFor();
}
function closeContextMenu() {
contextMenu.hidePopup();
}
function getVisibleMenuItems(aMenu, aData) {
var items = [];
var accessKeys = {};
for (var i = 0; i < aMenu.childNodes.length; i++) {
var item = aMenu.childNodes[i];
if (item.hidden)
continue;
var key = item.accessKey;
if (key)
key = key.toLowerCase();
var isGenerated = item.hasAttribute("generateditemid");
if (item.nodeName == "menuitem") {
var isSpellSuggestion = item.className == "spell-suggestion";
if (isSpellSuggestion) {
is(item.id, "", "child menuitem #" + i + " is a spelling suggestion");
} else if (isGenerated) {
is(item.id, "", "child menuitem #" + i + " is a generated item");
} else {
ok(item.id, "child menuitem #" + i + " has an ID");
}
var label = item.getAttribute("label");
ok(label.length, "menuitem " + item.id + " has a label");
if (isSpellSuggestion) {
is(key, "", "Spell suggestions shouldn't have an access key");
items.push("*" + label);
} else if (isGenerated) {
items.push("+" + label);
} else if (item.id.indexOf("spell-check-dictionary-") != 0 &&
item.id != "spell-no-suggestions") {
ok(key, "menuitem " + item.id + " has an access key");
if (accessKeys[key])
ok(false, "menuitem " + item.id + " has same accesskey as " + accessKeys[key]);
else
accessKeys[key] = item.id;
}
if (!isSpellSuggestion && !isGenerated) {
items.push(item.id);
}
if (isGenerated) {
var p = {};
p.type = item.getAttribute("type");
p.icon = item.getAttribute("image");
p.checked = item.hasAttribute("checked");
p.disabled = item.hasAttribute("disabled");
items.push(p);
} else {
items.push(!item.disabled);
}
} else if (item.nodeName == "menuseparator") {
ok(true, "--- seperator id is " + item.id);
items.push("---");
items.push(null);
} else if (item.nodeName == "menu") {
if (isGenerated) {
item.id = "generated-submenu-" + aData.generatedSubmenuId++;
}
ok(item.id, "child menu #" + i + " has an ID");
if (!isGenerated) {
ok(key, "menu has an access key");
if (accessKeys[key])
ok(false, "menu " + item.id + " has same accesskey as " + accessKeys[key]);
else
accessKeys[key] = item.id;
}
items.push(item.id);
items.push(!item.disabled);
// Add a dummy item to that the indexes in checkMenu are the same
// for expectedItems and actualItems.
items.push([]);
items.push(null);
} else {
ok(false, "child #" + i + " of menu ID " + aMenu.id +
" has an unknown type (" + item.nodeName + ")");
}
}
return items;
}
function checkContextMenu(expectedItems) {
is(contextMenu.state, "open", "checking if popup is open");
var data = { generatedSubmenuId: 1 };
checkMenu(contextMenu, expectedItems, data);
}
/*
* checkMenu - checks to see if the specified <menupopup> contains the
* expected items and state.
* expectedItems is a array of (1) item IDs and (2) a boolean specifying if
* the item is enabled or not (or null to ignore it). Submenus can be checked
* by providing a nested array entry after the expected <menu> ID.
* For example: ["blah", true, // item enabled
* "submenu", null, // submenu
* ["sub1", true, // submenu contents
* "sub2", false], null, // submenu contents
* "lol", false] // item disabled
*
*/
function checkMenu(menu, expectedItems, data) {
var actualItems = getVisibleMenuItems(menu, data);
//ok(false, "Items are: " + actualItems);
for (var i = 0; i < expectedItems.length; i+=2) {
var actualItem = actualItems[i];
var actualEnabled = actualItems[i + 1];
var expectedItem = expectedItems[i];
var expectedEnabled = expectedItems[i + 1];
if (expectedItem instanceof Array) {
ok(true, "Checking submenu...");
var menuID = expectedItems[i - 2]; // The last item was the menu ID.
var submenu = menu.getElementsByAttribute("id", menuID)[0];
ok(submenu, "got a submenu element of id='" + menuID + "'");
if (submenu) {
is(submenu.nodeName, "menu", "submenu element of id='" + menuID +
"' has expected nodeName");
checkMenu(submenu.menupopup, expectedItem, data);
}
} else {
is(actualItem, expectedItem,
"checking item #" + i/2 + " (" + expectedItem + ") name");
if (typeof expectedEnabled == "object" && expectedEnabled != null ||
typeof actualEnabled == "object" && actualEnabled != null) {
ok(!(actualEnabled == null), "actualEnabled is not null");
ok(!(expectedEnabled == null), "expectedEnabled is not null");
is(typeof actualEnabled, typeof expectedEnabled, "checking types");
if (typeof actualEnabled != typeof expectedEnabled ||
actualEnabled == null || expectedEnabled == null)
continue;
is(actualEnabled.type, expectedEnabled.type,
"checking item #" + i/2 + " (" + expectedItem + ") type attr value");
var icon = actualEnabled.icon;
if (icon) {
var tmp = "";
var j = icon.length - 1;
while (j && icon[j] != "/") {
tmp = icon[j--] + tmp;
}
icon = tmp;
}
is(icon, expectedEnabled.icon,
"checking item #" + i/2 + " (" + expectedItem + ") icon attr value");
is(actualEnabled.checked, expectedEnabled.checked,
"checking item #" + i/2 + " (" + expectedItem + ") has checked attr");
is(actualEnabled.disabled, expectedEnabled.disabled,
"checking item #" + i/2 + " (" + expectedItem + ") has disabled attr");
} else if (expectedEnabled != null)
is(actualEnabled, expectedEnabled,
"checking item #" + i/2 + " (" + expectedItem + ") enabled state");
}
}
// Could find unexpected extra items at the end...
is(actualItems.length, expectedItems.length, "checking expected number of menu entries");
}

View File

@ -23,7 +23,6 @@ Browser context menu subtest.
<iframe id="test-image-in-iframe" src="ctxmenu-image.png" width="98" height="98" style="border: 1px solid black"></iframe>
<textarea id="test-textarea">chssseesbbbie</textarea> <!-- a weird word which generates only one suggestion -->
<div id="test-contenteditable" contenteditable="true">chssseefsbbbie</div> <!-- a more weird word which generates no suggestions -->
<input id="test-input-spellcheck" type="text" spellcheck="true" autofocus value="prodkjfgigrty"> <!-- this one also generates one suggestion -->
<div id="test-dom-full-screen">DOM full screen FTW</div>
<div contextmenu="myMenu">
<p id="test-pagemenu" hopeless="true">I've got a context menu!</p>

View File

@ -16,41 +16,14 @@ Browser context menu tests.
<pre id="test">
<script> var perWindowPrivateBrowsing = false; </script>
<script type="text/javascript" src="privateBrowsingMode.js"></script>
<script type="text/javascript" src="contextmenu_common.js"></script>
<script class="testbody" type="text/javascript">
/** Test for Login Manager: multiple login autocomplete. **/
SpecialPowers.Cu.import("resource://gre/modules/InlineSpellChecker.jsm", window);
SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
const Ci = SpecialPowers.Ci;
function openContextMenuFor(element, shiftkey, waitForSpellCheck) {
// Context menu should be closed before we open it again.
is(SpecialPowers.wrap(contextMenu).state, "closed", "checking if popup is closed");
if (lastElement)
lastElement.blur();
element.focus();
// Some elements need time to focus and spellcheck before any tests are
// run on them.
function actuallyOpenContextMenuFor() {
lastElement = element;
var eventDetails = { type : "contextmenu", button : 2, shiftKey : shiftkey };
synthesizeMouse(element, 2, 2, eventDetails, element.ownerDocument.defaultView);
}
if (waitForSpellCheck)
onSpellCheck(element, actuallyOpenContextMenuFor);
else
actuallyOpenContextMenuFor();
}
function closeContextMenu() {
contextMenu.hidePopup();
}
function executeCopyCommand(command, expectedValue)
{
// Just execute the command directly rather than simulating a context menu
@ -91,165 +64,6 @@ function selectInputText(element) {
element.select();
}
function getVisibleMenuItems(aMenu, aData) {
var items = [];
var accessKeys = {};
for (var i = 0; i < aMenu.childNodes.length; i++) {
var item = aMenu.childNodes[i];
if (item.hidden)
continue;
var key = item.accessKey;
if (key)
key = key.toLowerCase();
var isGenerated = item.hasAttribute("generateditemid");
if (item.nodeName == "menuitem") {
var isSpellSuggestion = item.className == "spell-suggestion";
if (isSpellSuggestion) {
is(item.id, "", "child menuitem #" + i + " is a spelling suggestion");
} else if (isGenerated) {
is(item.id, "", "child menuitem #" + i + " is a generated item");
} else {
ok(item.id, "child menuitem #" + i + " has an ID");
}
var label = item.getAttribute("label");
ok(label.length, "menuitem " + item.id + " has a label");
if (isSpellSuggestion) {
is(key, "", "Spell suggestions shouldn't have an access key");
items.push("*" + label);
} else if (isGenerated) {
items.push("+" + label);
} else if (item.id.indexOf("spell-check-dictionary-") != 0 &&
item.id != "spell-no-suggestions") {
ok(key, "menuitem " + item.id + " has an access key");
if (accessKeys[key])
ok(false, "menuitem " + item.id + " has same accesskey as " + accessKeys[key]);
else
accessKeys[key] = item.id;
}
if (!isSpellSuggestion && !isGenerated) {
items.push(item.id);
}
if (isGenerated) {
var p = {};
p.type = item.getAttribute("type");
p.icon = item.getAttribute("image");
p.checked = item.hasAttribute("checked");
p.disabled = item.hasAttribute("disabled");
items.push(p);
} else {
items.push(!item.disabled);
}
} else if (item.nodeName == "menuseparator") {
ok(true, "--- seperator id is " + item.id);
items.push("---");
items.push(null);
} else if (item.nodeName == "menu") {
if (isGenerated) {
item.id = "generated-submenu-" + aData.generatedSubmenuId++;
}
ok(item.id, "child menu #" + i + " has an ID");
if (!isGenerated) {
ok(key, "menu has an access key");
if (accessKeys[key])
ok(false, "menu " + item.id + " has same accesskey as " + accessKeys[key]);
else
accessKeys[key] = item.id;
}
items.push(item.id);
items.push(!item.disabled);
// Add a dummy item to that the indexes in checkMenu are the same
// for expectedItems and actualItems.
items.push([]);
items.push(null);
} else {
ok(false, "child #" + i + " of menu ID " + aMenu.id +
" has an unknown type (" + item.nodeName + ")");
}
}
return items;
}
function checkContextMenu(expectedItems) {
is(contextMenu.state, "open", "checking if popup is open");
var data = { generatedSubmenuId: 1 };
checkMenu(contextMenu, expectedItems, data);
}
/*
* checkMenu - checks to see if the specified <menupopup> contains the
* expected items and state.
* expectedItems is a array of (1) item IDs and (2) a boolean specifying if
* the item is enabled or not (or null to ignore it). Submenus can be checked
* by providing a nested array entry after the expected <menu> ID.
* For example: ["blah", true, // item enabled
* "submenu", null, // submenu
* ["sub1", true, // submenu contents
* "sub2", false], null, // submenu contents
* "lol", false] // item disabled
*
*/
function checkMenu(menu, expectedItems, data) {
var actualItems = getVisibleMenuItems(menu, data);
//ok(false, "Items are: " + actualItems);
for (var i = 0; i < expectedItems.length; i+=2) {
var actualItem = actualItems[i];
var actualEnabled = actualItems[i + 1];
var expectedItem = expectedItems[i];
var expectedEnabled = expectedItems[i + 1];
if (expectedItem instanceof Array) {
ok(true, "Checking submenu...");
var menuID = expectedItems[i - 2]; // The last item was the menu ID.
var submenu = menu.getElementsByAttribute("id", menuID)[0];
ok(submenu, "got a submenu element of id='" + menuID + "'");
if (submenu) {
is(submenu.nodeName, "menu", "submenu element of id='" + menuID +
"' has expected nodeName");
checkMenu(submenu.menupopup, expectedItem, data);
}
} else {
is(actualItem, expectedItem,
"checking item #" + i/2 + " (" + expectedItem + ") name");
if (typeof expectedEnabled == "object" && expectedEnabled != null ||
typeof actualEnabled == "object" && actualEnabled != null) {
ok(!(actualEnabled == null), "actualEnabled is not null");
ok(!(expectedEnabled == null), "expectedEnabled is not null");
is(typeof actualEnabled, typeof expectedEnabled, "checking types");
if (typeof actualEnabled != typeof expectedEnabled ||
actualEnabled == null || expectedEnabled == null)
continue;
is(actualEnabled.type, expectedEnabled.type,
"checking item #" + i/2 + " (" + expectedItem + ") type attr value");
var icon = actualEnabled.icon;
if (icon) {
var tmp = "";
var j = icon.length - 1;
while (j && icon[j] != "/") {
tmp = icon[j--] + tmp;
}
icon = tmp;
}
is(icon, expectedEnabled.icon,
"checking item #" + i/2 + " (" + expectedItem + ") icon attr value");
is(actualEnabled.checked, expectedEnabled.checked,
"checking item #" + i/2 + " (" + expectedItem + ") has checked attr");
is(actualEnabled.disabled, expectedEnabled.disabled,
"checking item #" + i/2 + " (" + expectedItem + ") has disabled attr");
} else if (expectedEnabled != null)
is(actualEnabled, expectedEnabled,
"checking item #" + i/2 + " (" + expectedItem + ") enabled state");
}
}
// Could find unexpected extra items at the end...
is(actualItems.length, expectedItems.length, "checking expected number of menu entries");
}
/*
* runTest
*
@ -322,27 +136,10 @@ function runTest(testNum) {
// Context menu for text mailto-link
checkContextMenu(["context-copyemail", true].concat(inspectItems));
closeContextMenu();
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 5:
// Context menu for text input field
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", false,
"---", null,
"spell-check-enabled", true
].concat(inspectItems));
closeContextMenu();
openContextMenuFor(img); // Invoke context menu for next test.
break;
case 6:
case 5:
// Context menu for an image
checkContextMenu(["context-viewimage", true,
"context-copyimage-contents", true,
@ -357,7 +154,7 @@ function runTest(testNum) {
openContextMenuFor(canvas); // Invoke context menu for next test.
break;
case 7:
case 6:
// Context menu for a canvas
checkContextMenu(["context-viewimage", true,
"context-saveimage", true,
@ -368,7 +165,7 @@ function runTest(testNum) {
openContextMenuFor(video_ok); // Invoke context menu for next test.
break;
case 8:
case 7:
// Context menu for a video (with a VALID media source)
checkContextMenu(["context-media-play", true,
"context-media-mute", true,
@ -392,7 +189,7 @@ function runTest(testNum) {
openContextMenuFor(audio_in_video); // Invoke context menu for next test.
break;
case 9:
case 8:
// Context menu for a video (with an audio-only file)
checkContextMenu(["context-media-play", true,
"context-media-mute", true,
@ -412,7 +209,7 @@ function runTest(testNum) {
openContextMenuFor(video_bad); // Invoke context menu for next test.
break;
case 10:
case 9:
// Context menu for a video (with an INVALID media source)
checkContextMenu(["context-media-play", false,
"context-media-mute", false,
@ -436,7 +233,7 @@ function runTest(testNum) {
openContextMenuFor(video_bad2); // Invoke context menu for next test.
break;
case 11:
case 10:
// Context menu for a video (with an INVALID media source)
checkContextMenu(["context-media-play", false,
"context-media-mute", false,
@ -460,7 +257,7 @@ function runTest(testNum) {
openContextMenuFor(iframe); // Invoke context menu for next test.
break;
case 12:
case 11:
// Context menu for an iframe
checkContextMenu(["context-back", false,
"context-forward", false,
@ -493,7 +290,7 @@ function runTest(testNum) {
openContextMenuFor(video_in_iframe); // Invoke context menu for next test.
break;
case 13:
case 12:
// Context menu for a video in an iframe
checkContextMenu(["context-media-play", true,
"context-media-mute", true,
@ -529,7 +326,7 @@ function runTest(testNum) {
openContextMenuFor(image_in_iframe); // Invoke context menu for next test.
break;
case 14:
case 13:
// Context menu for an image in an iframe
checkContextMenu(["context-viewimage", true,
"context-copyimage-contents", true,
@ -556,7 +353,7 @@ function runTest(testNum) {
openContextMenuFor(textarea, false, true); // Invoke context menu for next test, but wait for the spellcheck.
break;
case 15:
case 14:
// Context menu for textarea
checkContextMenu(["*chubbiness", true, // spelling suggestion
"spell-add-to-dictionary", true,
@ -581,14 +378,14 @@ function runTest(testNum) {
openContextMenuFor(text); // Invoke context menu for next test.
break;
case 16:
case 15:
// Re-check context menu for plain text to make sure it hasn't changed
checkContextMenu(plainTextItems);
closeContextMenu();
openContextMenuFor(textarea, false, true); // Invoke context menu for next test.
break;
case 17:
case 16:
// Context menu for textarea after a word has been added
// to the dictionary
checkContextMenu(["spell-undo-add-to-dictionary", true,
@ -613,7 +410,7 @@ function runTest(testNum) {
openContextMenuFor(contenteditable, false, true);
break;
case 18:
case 17:
// Context menu for contenteditable
checkContextMenu(["spell-no-suggestions", false,
"spell-add-to-dictionary", true,
@ -634,42 +431,17 @@ function runTest(testNum) {
"spell-add-dictionaries", true], null
].concat(inspectItems));
closeContextMenu();
openContextMenuFor(inputspell, false, true); // Invoke context menu for next test.
break;
case 19:
// Context menu for spell-check input
checkContextMenu(["*prodigality", true, // spelling suggestion
"spell-add-to-dictionary", true,
"---", null,
"context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", true,
"---", null,
"spell-check-enabled", true,
"spell-dictionaries", true,
["spell-check-dictionary-en-US", true,
"---", null,
"spell-add-dictionaries", true], null
].concat(inspectItems));
closeContextMenu();
openContextMenuFor(link); // Invoke context menu for next test.
break;
case 20:
case 18:
executeCopyCommand("cmd_copyLink", "http://mozilla.com/");
closeContextMenu();
openContextMenuFor(pagemenu); // Invoke context menu for next test.
break;
case 21:
case 19:
// Context menu for element with assigned content context menu
checkContextMenu(["+Plain item", {type: "", icon: "", checked: false, disabled: false},
"+Disabled item", {type: "", icon: "", checked: false, disabled: true},
@ -720,7 +492,7 @@ function runTest(testNum) {
full_screen_element.mozRequestFullScreen();
break;
case 22:
case 20:
// Context menu for DOM Fullscreen mode (NOTE: this is *NOT* on an img)
checkContextMenu(["context-leave-dom-fullscreen", true,
"---", null,
@ -749,7 +521,7 @@ function runTest(testNum) {
subwindow.document.mozCancelFullScreen();
break;
case 23:
case 21:
// Context menu for element with assigned content context menu
// The shift key should bypass content context menu processing
checkContextMenu(["context-back", false,
@ -770,7 +542,7 @@ function runTest(testNum) {
openContextMenuFor(selecttext); // Invoke context menu for next test.
return;
case 24:
case 22:
// Context menu for selected text
if (SpecialPowers.Services.appinfo.OS == "Darwin") {
// This test is only enabled on Mac due to bug 736399.
@ -786,7 +558,7 @@ function runTest(testNum) {
openContextMenuFor(selecttextlink); // Invoke context menu for next test.
return;
case 25:
case 23:
// Context menu for selected text which matches valid URL pattern
if (SpecialPowers.Services.appinfo.OS == "Darwin") {
// This test is only enabled on Mac due to bug 736399.
@ -826,7 +598,7 @@ function runTest(testNum) {
openContextMenuFor(imagelink)
break;
case 26:
case 24:
// Context menu for image link
if (perWindowPrivateBrowsing) {
checkContextMenu(["context-openlinkintab", true,
@ -869,7 +641,7 @@ function runTest(testNum) {
openContextMenuFor(select_inputtext); // Invoke context menu for next test.
return;
case 27:
case 25:
// Context menu for selected text in input
checkContextMenu(["context-undo", false,
"---", null,
@ -888,7 +660,7 @@ function runTest(testNum) {
openContextMenuFor(select_inputtext_password); // Invoke context menu for next test.
return;
case 28:
case 26:
// Context menu for selected text in input[type="password"]
checkContextMenu(["context-undo", false,
"---", null,
@ -911,7 +683,7 @@ function runTest(testNum) {
openContextMenuFor(plugin);
return;
case 29:
case 27:
// Context menu for click-to-play blocked plugin
checkContextMenu(["context-ctp-play", true,
"context-ctp-hide", true,
@ -942,7 +714,7 @@ function runTest(testNum) {
openContextMenuFor(longdesc);
return;
case 30:
case 28:
// Context menu for an image with longdesc
checkContextMenu(["context-viewimage", true,
"context-copyimage-contents", true,
@ -958,7 +730,7 @@ function runTest(testNum) {
openContextMenuFor(srcdoc);
return;
case 31:
case 29:
// Context menu for an iframe with srcdoc attribute set
checkContextMenu(["context-back", false,
"context-forward", false,
@ -990,7 +762,6 @@ function runTest(testNum) {
/*
* Other things that would be nice to test:
* - spelling / misspelled word (in text input?)
* - check state of disabled items
* - test execution of menu items (maybe as a separate test?)
*/
@ -1006,10 +777,10 @@ function runTest(testNum) {
var testNum = 1;
var subwindow, chromeWin, contextMenu, lastElement;
var subwindow, chromeWin, contextMenu;
var text, link, mailto, input, img, canvas, video_ok, video_bad, video_bad2,
iframe, video_in_iframe, image_in_iframe, textarea, contenteditable,
inputspell, pagemenu, dom_full_screen, plainTextItems, audio_in_video,
pagemenu, dom_full_screen, plainTextItems, audio_in_video,
selecttext, selecttextlink, imagelink, select_inputtext, select_inputtext_password,
plugin, longdesc, iframe;
@ -1052,7 +823,6 @@ function startTest() {
textarea = subwindow.document.getElementById("test-textarea");
contenteditable = subwindow.document.getElementById("test-contenteditable");
contenteditable.focus(); // content editable needs to be focused to enable spellcheck
inputspell = subwindow.document.getElementById("test-input-spellcheck");
pagemenu = subwindow.document.getElementById("test-pagemenu");
dom_full_screen = subwindow.document.getElementById("test-dom-full-screen");
selecttext = subwindow.document.getElementById("test-select-text");

View File

@ -0,0 +1,338 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Tests for browser context menu</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
Browser context menu tests for input.
<p id="display"></p>
<div id="content">
</div>
<pre id="test">
<script type="text/javascript" src="contextmenu_common.js"></script>
<script class="testbody" type="text/javascript">
const Ci = SpecialPowers.Ci;
/*
* runTest
*
* Called by a popupshowing event handler. Each test checks for expected menu
* contents, closes the popup, and finally triggers the popup on a new element
* (thus kicking off another cycle).
*
*/
function runTest(testNum) {
ok(true, "Starting test #" + testNum);
switch (testNum) {
case 1:
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 2:
// Context menu for text input field.
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", false,
"---", null,
"spell-check-enabled", true,
"---", null,
"context-inspect", true]);
closeContextMenu();
input.setAttribute('spellcheck', 'true');
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 3:
var value = SpecialPowers.Services.appinfo.OS != "Darwin";
// Context menu for spell-check input.
checkContextMenu(["context-undo", value,
"---", null,
"context-cut", value,
"context-copy", value,
"context-paste", null, // ignore clipboard state
"context-delete", value,
"---", null,
"context-selectall", value,
"---", null,
"spell-check-enabled", true,
"spell-dictionaries", true,
[/*"spell-check-dictionary-en-US", true,*/
"---", null,
"spell-add-dictionaries", true], null,
"---", null,
"context-inspect", true]);
closeContextMenu();
input.removeAttribute('spellcheck');
openContextMenuFor(inputspellwrong); // Invoke context menu for next test.
break;
case 4:
var value = SpecialPowers.Services.appinfo.OS != "Darwin";
// Context menu for spell-check input with a unknwon word.
checkContextMenu([/*"*prodigality", true,*/ // spelling suggestion
/*"spell-add-to-dictionary", true,*/
/*"---", null,*/
"context-undo", value,
"---", null,
"context-cut", value,
"context-copy", value,
"context-paste", null, // ignore clipboard state
"context-delete", value,
"---", null,
"context-selectall", true,
"---", null,
"spell-check-enabled", true,
"spell-dictionaries", true,
[/*"spell-check-dictionary-en-US", true,*/
"---", null,
"spell-add-dictionaries", true], null,
"---", null,
"context-inspect", true]);
closeContextMenu();
openContextMenuFor(inputspellcorrect); // Invoke context menu for next test.
break;
case 5:
var value = SpecialPowers.Services.appinfo.OS != "Darwin";
// Context menu for spell-check input with a known word.
checkContextMenu(["context-undo", value,
"---", null,
"context-cut", value,
"context-copy", value,
"context-paste", null, // ignore clipboard state
"context-delete", value,
"---", null,
"context-selectall", true,
"---", null,
"spell-check-enabled", true,
"spell-dictionaries", true,
[/*"spell-check-dictionary-en-US", true,*/
"---", null,
"spell-add-dictionaries", true], null,
"---", null,
"context-inspect", true]);
closeContextMenu();
input.disabled = true;
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 6:
// Context menu for disabled input.
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", true,
"---", null,
"spell-check-enabled", true,
"---", null,
"context-inspect", true]);
closeContextMenu();
input.disabled = false;
input.type = 'password';
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 7: // password
case 8: // email
case 9: // url
case 10: // tel
// Context menu for tel, password, email and url input fields.
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", false,
"---", null,
"context-inspect", true]);
closeContextMenu();
if (testNum == 7) {
input.type = 'email';
} else if (testNum == 8) {
input.type = 'url';
} else if (testNum == 9) {
input.type = 'tel';
} else if (testNum == 10) {
input.type = 'date';
}
openContextMenuFor(input); // Invoke context menu for next test.
break;
case 11: // type='date'
case 12: // type='time'
case 13: // type='number'
case 14: // type='color'
case 15: // type='range'
checkContextMenu(["context-back", false,
"context-forward", false,
"context-reload", true,
"---", null,
"context-bookmarkpage", true,
"context-savepage", true,
"---", null,
"context-viewbgimage", false,
"context-selectall", null,
"---", null,
"context-viewsource", true,
"context-viewinfo", true,
"---", null,
"context-inspect", true]);
closeContextMenu();
if (testNum == 11) {
input.type = 'time';
} else if (testNum == 12) {
input.type = 'number';
} else if (testNum == 13) {
input.type = 'color';
} else if (testNum == 14) {
input.type = 'range';
} else {
input.type = 'search';
}
openContextMenuFor(input);
break;
case 16: // type='search'
// Context menu for search input fields.
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", false,
"---", null,
"spell-check-enabled", true,
"---", null,
"context-inspect", true]);
closeContextMenu();
// Add some todos to make sure all input fields got a test.
var todos = [ "datetime", "month", "week", "datetime-local" ];
todos.forEach(function(type) {
input.type = type;
todo_is(input.type, type, "TODO: add test for " + type + " input fields");
});
input.type = 'text';
input.readOnly = true;
openContextMenuFor(input);
break;
case 17:
// Context menu for a read-only input.
checkContextMenu(["context-undo", false,
"---", null,
"context-cut", false,
"context-copy", false,
"context-paste", null, // ignore clipboard state
"context-delete", false,
"---", null,
"context-selectall", false,
"---", null,
"context-inspect", true]);
closeContextMenu();
// Clean-up.
subwindow.close();
SimpleTest.finish();
return;
default:
ok(false, "Unexpected invocation of test #" + testNum);
subwindow.close();
SimpleTest.finish();
return;
}
}
var gTestNum = 1;
var subwindow, chromeWin, contextMenu;
var input, inputspellwrong, inputspellcorrect;
function startTest() {
chromeWin = SpecialPowers.wrap(subwindow)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow);
contextMenu = chromeWin.document.getElementById("contentAreaContextMenu");
ok(contextMenu, "Got context menu XUL");
if (chromeWin.document.getElementById("Browser:Stop").getAttribute("disabled") != "true") {
SimpleTest.executeSoon(startTest);
return;
}
var inputs = subwindow.document.getElementsByTagName('input');
input = inputs[0];
inputspellwrong = inputs[1];
inputspellcorrect = inputs[2];
contextMenu.addEventListener("popupshown", function() { runTest(++gTestNum); }, false);
runTest(1);
}
// We open this in a separate window, because the Mochitests run inside a frame.
// The frame causes an extra menu item, and prevents running the test
// standalone (ie, clicking the test name in the Mochitest window) to see
// success/failure messages.
var painted = false, loaded = false;
function waitForEvents(event)
{
if (event.type == "MozAfterPaint")
painted = true;
else if (event.type == "load")
loaded = true;
if (painted && loaded) {
subwindow.removeEventListener("MozAfterPaint", waitForEvents, false);
subwindow.onload = null;
startTest();
}
}
var subwindow = window.open("data:text/html,<!DOCTYPE html><input><input spellcheck='true' value='prodkjfgigrty'><input spellcheck='true' value='foo'><input readonly spellcheck='false'>", "contextmenu-subtext", "width=600,height=700");
subwindow.addEventListener("MozAfterPaint", waitForEvents, false);
subwindow.onload = waitForEvents;
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>

View File

@ -7,7 +7,3 @@
DIRS += ['src']
TEST_DIRS += ['tests']
XPIDL_FLAGS += [
'-I$(topsrcdir)/browser/components/',
]

View File

@ -4,10 +4,6 @@
# 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/.
XPIDL_FLAGS += [
'-I$(topsrcdir)/browser/components',
]
EXTRA_COMPONENTS += [
'BrowserPlaces.manifest',
'PlacesProtocolHandler.js',

View File

@ -375,6 +375,12 @@ let SessionStoreInternal = {
throw new Error("SessionStore.init() must be called with a valid window.");
}
this._disabledForMultiProcess = Services.prefs.getBoolPref("browser.tabs.remote");
if (this._disabledForMultiProcess) {
this._deferredInitialized.resolve();
return;
}
TelemetryTimestamps.add("sessionRestoreInitialized");
OBSERVING.forEach(function(aTopic) {
Services.obs.addObserver(this, aTopic, true);
@ -382,7 +388,6 @@ let SessionStoreInternal = {
this._initPrefs();
this._initialized = true;
this._disabledForMultiProcess = this._prefBranch.getBoolPref("tabs.remote");
// this pref is only read at startup, so no need to observe it
this._sessionhistory_max_entries =
@ -567,9 +572,6 @@ let SessionStoreInternal = {
* Handle notifications
*/
observe: function ssi_observe(aSubject, aTopic, aData) {
if (this._disabledForMultiProcess)
return;
switch (aTopic) {
case "domwindowopened": // catch new windows
this.onOpen(aSubject);
@ -1487,6 +1489,9 @@ let SessionStoreInternal = {
},
setNumberOfTabsClosedLast: function ssi_setNumberOfTabsClosedLast(aWindow, aNumber) {
if (this._disabledForMultiProcess)
return;
if ("__SSi" in aWindow) {
return NumberOfTabsClosedLastPerWindow.set(aWindow, aNumber);
}
@ -1496,6 +1501,9 @@ let SessionStoreInternal = {
/* Used to undo batch tab-close operations. Defaults to 1. */
getNumberOfTabsClosedLast: function ssi_getNumberOfTabsClosedLast(aWindow) {
if (this._disabledForMultiProcess)
return 0;
if ("__SSi" in aWindow) {
// Blank tabs cannot be undo-closed, so the number returned by
// the NumberOfTabsClosedLastPerWindow can be greater than the

View File

@ -498,6 +498,55 @@ notification {
-moz-box-flex: 9999;
}
/* ensure the notification children pick up snapped-view box property overrides */
.notification-button.box-inherit {
-moz-margin-start: inherit;
-moz-margin-end: inherit;
width: inherit;
display: inherit;
overflow: inherit;
}
@media (max-width: 330px) {
/* notifications need layout tweaks in narrow viewport
*/
.notification-button {
display: block;
width: calc(100% - 40px);
overflow: visible;
-moz-margin-start: 40px;
-moz-margin-end: 0;
}
.notification-inner {
display: block;
padding: @metro_spacing_xnormal@;
}
.notification-inner > [anonid="details"] {
display: inline-block;
width: calc(100% - 48px);
}
.notification-inner > .messageCloseButton {
display: inline-block;
vertical-align: top;
-moz-margin-start: 8px;
-moz-margin-end: 0;
}
.notification-inner > [anonid="details"] > .messageImage {
display: inline;
vertical-align: top;
-moz-margin-start: 0;
-moz-margin-end: 8px;
}
.notification-inner > [anonid="details"] > .messageText {
display: inline-block;
width: calc(100% - 40px);
overflow: visible;
}
}
/* Prompts ----------------------------------------------------------------- */
.mainContainer {

View File

@ -14,7 +14,6 @@ LIBRARY_NAME = chrome_s
MSVC_ENABLE_PGO := 1
LIBXUL_LIBRARY = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -10,15 +10,13 @@
# We check the following things in headers.
#
# - No cyclic dependencies.
#
#
# - No normal header should #include a inlines.h/-inl.h file.
#
#
# - #ifndef wrappers should have the right form. (XXX: not yet implemented)
# - Every header file should have one.
# - It should be in the vanilla form and have no tokens before/after it so
# that GCC and clang can avoid multiple-inclusion.
# - The guard name used should be appropriate for the filename.
#
#
# We check the following things in all files.
#
# - #includes should have full paths, e.g. "jit/Ion.h", not "Ion.h".
@ -26,11 +24,15 @@
# - #includes should use the appropriate form for system headers (<...>) and
# local headers ("...").
#
# - #includes should be ordered correctly. (XXX: not yet implemented; see bug
# 888088)
# - #includes should be ordered correctly.
# - Each one should be in the correct section.
# - Alphabetical order should be used within sections.
# - Sections should be in the right order.
# Note that the presence of #if/#endif blocks complicates things, to the
# point that it's not always clear where a conditionally-compiled #include
# statement should go, even to a human. Therefore, we check the #include
# statements within each #if/#endif block (including nested ones) in
# isolation, but don't try to do any order checking between such blocks.
#----------------------------------------------------------------------------
from __future__ import print_function
@ -87,6 +89,16 @@ included_inclnames_to_ignore = set([
'vtune/VTuneWrapper.h' # VTune
])
# These files have additional constraints on where they are #included, so we
# ignore #includes of them when checking #include ordering.
oddly_ordered_inclnames = set([
'ctypes/typedefs.h', # Included multiple times in the body of ctypes/CTypes.h
'jsautokw.h', # Included in the body of frontend/TokenStream.h
'jswin.h', # Must be #included before <psapi.h>
'winbase.h', # Must precede other system headers(?)
'windef.h' # Must precede other system headers(?)
])
# The files in tests/style/ contain code that fails this checking in various
# ways. Here is the output we expect. If the actual output differs from
# this, one of the following must have happened.
@ -99,21 +111,42 @@ expected_output = '''\
js/src/tests/style/BadIncludes2.h:1: error:
vanilla header includes an inline-header file "tests/style/BadIncludes2-inl.h"
js/src/tests/style/BadIncludes.h:1: error:
js/src/tests/style/BadIncludes.h:3: error:
the file includes itself
js/src/tests/style/BadIncludes.h:3: error:
js/src/tests/style/BadIncludes.h:6: error:
"BadIncludes2.h" is included using the wrong path;
did you forget a prefix, or is the file not yet committed?
js/src/tests/style/BadIncludes.h:4: error:
js/src/tests/style/BadIncludes.h:8: error:
<tests/style/BadIncludes2.h> should be included using
the #include "..." form
js/src/tests/style/BadIncludes.h:5: error:
js/src/tests/style/BadIncludes.h:10: error:
"stdio.h" is included using the wrong path;
did you forget a prefix, or is the file not yet committed?
js/src/tests/style/BadIncludesOrder-inl.h:5:6: error:
"vm/Interpreter-inl.h" should be included after "jsscriptinlines.h"
js/src/tests/style/BadIncludesOrder-inl.h:6:7: error:
"jsscriptinlines.h" should be included after "js/Value.h"
js/src/tests/style/BadIncludesOrder-inl.h:7:8: error:
"js/Value.h" should be included after "ds/LifoAlloc.h"
js/src/tests/style/BadIncludesOrder-inl.h:8:9: error:
"ds/LifoAlloc.h" should be included after "jsapi.h"
js/src/tests/style/BadIncludesOrder-inl.h:9:10: error:
"jsapi.h" should be included after <stdio.h>
js/src/tests/style/BadIncludesOrder-inl.h:10:11: error:
<stdio.h> should be included after "mozilla/HashFunctions.h"
js/src/tests/style/BadIncludesOrder-inl.h:27:28: error:
"jsobj.h" should be included after "jsfun.h"
(multiple files): error:
header files form one or more cycles
@ -143,8 +176,8 @@ def out(*lines):
def error(filename, linenum, *lines):
location = filename
if linenum != None:
location += ":" + str(linenum)
if linenum is not None:
location += ':' + str(linenum)
out(location + ': error:')
for line in (lines):
out(' ' + line)
@ -163,10 +196,10 @@ class FileKind(object):
def get(filename):
if filename.endswith('.c'):
return FileKind.C
if filename.endswith('.cpp'):
return FileKind.CPP
if filename.endswith(('inlines.h', '-inl.h')):
return FileKind.INL_H
@ -183,7 +216,7 @@ class FileKind(object):
def get_all_filenames():
"""Get a list of all the files in the (Mercurial or Git) repository."""
'''Get a list of all the files in the (Mercurial or Git) repository.'''
cmds = [['hg', 'manifest', '-q'], ['git', 'ls-files']]
for cmd in cmds:
try:
@ -263,54 +296,198 @@ def check_style():
return ok
def module_name(name):
'''Strip the trailing .cpp, .h, inlines.h or -inl.h from a filename.'''
return name.replace('inlines.h', '').replace('-inl.h', '').replace('.h', '').replace('.cpp', '')
class Include(object):
'''Important information for a single #include statement.'''
def __init__(self, inclname, linenum, is_system):
self.inclname = inclname
self.linenum = linenum
self.is_system = is_system
def isLeaf(self):
return True
def section(self, module):
'''Identify which section inclname belongs to.
The section numbers are as follows.
0. Module header (e.g. jsfoo.h or jsfooinlines.h within jsfoo.cpp)
1. mozilla/Foo.h
2. <foo.h> or <foo>
3. jsfoo.h, prmjtime.h, etc
4. foo/Bar.h
5. jsfooinlines.h
6. foo/Bar-inl.h
7. non-.h, e.g. *.tbl, *.msg
'''
if self.is_system:
return 2
if not self.inclname.endswith('.h'):
return 7
# A couple of modules have the .h file in js/ and the .cpp file elsewhere and so need special
# handling.
if module == module_name(self.inclname) or \
module == 'jsmemorymetrics' and self.inclname == 'js/MemoryMetrics.h' or \
module == 'vm/PropertyKey' and self.inclname == 'js/PropertyKey.h':
return 0
if '/' in self.inclname:
if self.inclname.startswith('mozilla/'):
return 1
if self.inclname.endswith('-inl.h'):
return 6
return 4
if self.inclname.endswith('inlines.h'):
return 5
return 3
def quote(self):
if self.is_system:
return '<' + self.inclname + '>'
else:
return '"' + self.inclname + '"'
class HashIfBlock(object):
'''Important information about a #if/#endif block.
A #if/#endif block is the contents of a #if/#endif (or similar) section.
The top-level block, which is not within a #if/#endif pair, is also
considered a block.
Each leaf is either an Include (representing a #include), or another
nested HashIfBlock.'''
def __init__(self):
self.kids = []
def isLeaf(self):
return False
def do_file(filename, inclname, file_kind, f, all_inclnames, included_h_inclnames):
block_stack = [HashIfBlock()]
# Extract the #include statements as a tree of IBlocks and IIncludes.
for linenum, line in enumerate(f, start=1):
# Look for a |#include "..."| line.
m = re.match(r'\s*#\s*include\s+"([^"]*)"', line)
if m is not None:
included_inclname = m.group(1)
block_stack[-1].kids.append(Include(m.group(1), linenum, False))
if included_inclname not in included_inclnames_to_ignore:
included_kind = FileKind.get(included_inclname)
# Look for a |#include <...>| line.
m = re.match(r'\s*#\s*include\s+<([^>]*)>', line)
if m is not None:
block_stack[-1].kids.append(Include(m.group(1), linenum, True))
# Look for a |#{if,ifdef,ifndef}| line.
m = re.match(r'\s*#\s*(if|ifdef|ifndef)\b', line)
if m is not None:
# Open a new block.
new_block = HashIfBlock()
block_stack[-1].kids.append(new_block)
block_stack.append(new_block)
# Look for a |#{elif,else}| line.
m = re.match(r'\s*#\s*(elif|else)\b', line)
if m is not None:
# Close the current block, and open an adjacent one.
block_stack.pop()
new_block = HashIfBlock()
block_stack[-1].kids.append(new_block)
block_stack.append(new_block)
# Look for a |#endif| line.
m = re.match(r'\s*#\s*endif\b', line)
if m is not None:
# Close the current block.
block_stack.pop()
def check_include_statement(include):
'''Check the style of a single #include statement.'''
if include.is_system:
# Check it is not a known local file (in which case it's probably a system header).
if include.inclname in included_inclnames_to_ignore or \
include.inclname in all_inclnames:
error(filename, include.linenum,
include.quote() + ' should be included using',
'the #include "..." form')
else:
if include.inclname not in included_inclnames_to_ignore:
included_kind = FileKind.get(include.inclname)
# Check the #include path has the correct form.
if included_inclname not in all_inclnames:
error(filename, linenum,
'"' + included_inclname + '" is included ' + 'using the wrong path;',
if include.inclname not in all_inclnames:
error(filename, include.linenum,
include.quote() + ' is included ' + 'using the wrong path;',
'did you forget a prefix, or is the file not yet committed?')
# Record inclusions of .h files for cycle detection later.
# (Exclude .tbl and .msg files.)
elif included_kind == FileKind.H or included_kind == FileKind.INL_H:
included_h_inclnames.add(included_inclname)
included_h_inclnames.add(include.inclname)
# Check a H file doesn't #include an INL_H file.
if file_kind == FileKind.H and included_kind == FileKind.INL_H:
error(filename, linenum,
'vanilla header includes an inline-header file "' + included_inclname + '"')
error(filename, include.linenum,
'vanilla header includes an inline-header file ' + include.quote())
# Check a file doesn't #include itself. (We do this here because the
# cycle detection below doesn't detect this case.)
if inclname == included_inclname:
error(filename, linenum, 'the file includes itself')
# Check a file doesn't #include itself. (We do this here because the cycle
# detection below doesn't detect this case.)
if inclname == include.inclname:
error(filename, include.linenum, 'the file includes itself')
# Look for a |#include <...>| line.
m = re.match(r'\s*#\s*include\s+<([^>]*)>', line)
if m is not None:
included_inclname = m.group(1)
module = module_name(inclname)
# Check it is not a known local file (in which case it's
# probably a system header).
if included_inclname in included_inclnames_to_ignore or \
included_inclname in all_inclnames:
error(filename, linenum,
'<' + included_inclname + '> should be included using',
'the #include "..." form')
def check_includes_order(include1, include2):
'''Check the ordering of two #include statements.'''
if include1.inclname in oddly_ordered_inclnames or \
include2.inclname in oddly_ordered_inclnames:
return
section1 = include1.section(module)
section2 = include2.section(module)
if (section1 > section2) or \
((section1 == section2) and (include1.inclname.lower() > include2.inclname.lower())):
error(filename, str(include1.linenum) + ':' + str(include2.linenum),
include1.quote() + ' should be included after ' + include2.quote())
# The #include statements in the files in assembler/ and yarr/ have all manner of implicit
# ordering requirements. Boo. Ignore them.
skip_order_checking = inclname.startswith(('assembler/', 'yarr/'))
# Check the extracted #include statements, both individually, and the ordering of
# adjacent pairs that live in the same block.
def pair_traverse(prev, this):
if this.isLeaf():
check_include_statement(this)
if prev is not None and prev.isLeaf() and not skip_order_checking:
check_includes_order(prev, this)
else:
for prev2, this2 in zip([None] + this.kids[0:-1], this.kids):
pair_traverse(prev2, this2)
pair_traverse(None, block_stack[-1])
def find_cycles(all_inclnames, edges):
"""Find and draw any cycles."""
'''Find and draw any cycles.'''
SCCs = tarjan(all_inclnames, edges)
# The various sorted() calls below ensure the output is deterministic.
@ -392,5 +569,5 @@ def main():
sys.exit(0 if ok else 1)
if __name__ == "__main__":
if __name__ == '__main__':
main()

View File

@ -62,10 +62,9 @@ check-variable = $(if $(filter-out 0 1,$(words $($(x))z)),$(error Spaces are not
$(foreach x,$(CHECK_VARS),$(check-variable))
core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
core_realpath = $(if $(realpath $(1)),$(realpath $(1)),$(call core_abspath,$(1)))
core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))
ifndef INCLUDED_FUNCTIONS_MK
include $(topsrcdir)/config/makefiles/functions.mk
endif
RM = rm -f
@ -365,7 +364,6 @@ MY_RULES := $(DEPTH)/config/myrules.mk
# Default command macros; can be overridden in <arch>.mk.
#
CCC = $(CXX)
XPIDL_LINK = $(PYTHON) $(LIBXUL_DIST)/sdk/bin/xpt.py link
# Java macros
JAVA_GEN_DIR = _javagen
@ -522,12 +520,8 @@ endif
endif
# Default location of include files
IDL_DIR = $(DIST)/idl
XPIDL_FLAGS += -I$(srcdir) -I$(IDL_DIR)
ifdef LIBXUL_SDK
XPIDL_FLAGS += -I$(LIBXUL_SDK)/idl
endif
IDL_PARSER_DIR = $(topsrcdir)/xpcom/idl-parser
IDL_PARSER_CACHE_DIR = $(DEPTH)/xpcom/idl-parser
SDK_LIB_DIR = $(DIST)/sdk/lib
SDK_BIN_DIR = $(DIST)/sdk/bin

View File

@ -0,0 +1,22 @@
#
# 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/.
#
# functions.mk
#
# Defines functions that are needed by various Makefiles throughout the build
# system, which are needed before config.mk can be included.
#
# Define an include-at-most-once flag
ifdef INCLUDED_FUNCTIONS_MK
$(error Do not include functions.mk twice!)
endif
INCLUDED_FUNCTIONS_MK = 1
core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
core_realpath = $(if $(realpath $(1)),$(realpath $(1)),$(call core_abspath,$(1)))
core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))

View File

@ -15,17 +15,19 @@ SUPPRESS_DEFAULT_RULES := 1
include $(topsrcdir)/config/rules.mk
# We don't print the build status messages unless we're in a top level build
# otherwise the output is unexpected and it confuses downstream parsers.
define make_subtier_dir
@echo "BUILDSTATUS SUBTIER_START precompile $(1)"
$(MAKE) -C $(2) $(3)
+$(MAKE) -C $(2) $(3)
@echo "BUILDSTATUS SUBTIER_FINISH precompile $(1)"
endef
export::
@echo "BUILDSTATUS SUBTIERS IPDL WebIDL"
@echo "BUILDSTATUS SUBTIERS IPDL WebIDL XPIDL"
export:: ipdl webidl xpidl-parser
export:: ipdl webidl xpidl-parser xpidl
ipdl:
$(call make_subtier_dir,IPDL,$(DEPTH)/ipc/ipdl,ipdl)
@ -35,3 +37,7 @@ webidl:
xpidl-parser:
$(call make_subtier_dir,XPIDLParser,$(DEPTH)/xpcom/idl-parser,xpidl-parser)
xpidl: xpidl-parser
$(call py_action,process_install_manifest,$(DIST)/idl $(DEPTH)/_build_manifests/install/dist_idl)
$(call make_subtier_dir,XPIDL,$(DEPTH)/config/makefiles/xpidl,xpidl)

View File

@ -36,6 +36,7 @@ endif #} NO_XPCSHELL_MANIFEST_CHECK
# Execute all tests in the $(XPCSHELL_TESTS) directories.
# See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
xpcshell-tests:
$(info Please consider running xpcshell tests via |mach xpcshell-test|. mach is more powerful, easier to use, and will be the only supported way to run tests in the future. Consider switching to mach today!)
$(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
-I$(DEPTH)/build \
-I$(topsrcdir)/build \
@ -71,6 +72,7 @@ xpcshell-tests-remote:
# start the test. Instead, present the xpcshell prompt so the user can
# attach a debugger and then start the test.
check-interactive:
$(info Please consider running xpcshell tests via mach: |mach xpcshell-test --interactive path/to/test|.)
$(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
-I$(DEPTH)/build \
-I$(topsrcdir)/build \
@ -88,6 +90,7 @@ check-interactive:
# Execute a single test, specified in $(SOLO_FILE)
check-one:
$(info Please consider running xpcshell tests via mach: |mach xpcshell-test path/to/test|.)
$(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
-I$(DEPTH)/build \
-I$(topsrcdir)/build \

View File

@ -0,0 +1,85 @@
# 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/.
DEPTH := @DEPTH@
topsrcdir := @top_srcdir@
srcdir := @srcdir@
VPATH := @srcdir@
include $(DEPTH)/config/autoconf.mk
SUPPRESS_DEFAULT_RULES := 1
STANDALONE_MAKEFILE := 1
NO_MAKEFILE_RULE := 1
include $(topsrcdir)/config/rules.mk
# Building XPIDLs effectively consists of two steps:
#
# 1) Staging all .idl files to a common directory.
# 2) Doing everything with the .idl files.
#
# Each .idl file is processed into a .h file and typelib information.
# The .h file shares the same stem as the input file and is installed
# in the common headers include directory.
#
# XPIDL files are logically grouped together by modules. The typelib
# information for all XPIDLs in the same module is linked together into
# an .xpt file having the name of the module.
#
# As an optimization to reduce overall CPU usage, we process all .idl
# belonging to a module with a single command invocation. This prevents
# redundant parsing of .idl files and significantly reduces CPU cycles.
#
# Future improvement: Headers are currently written to a local directory then
# installed in the distribution directory. It is preferable to write headers
# directly into the distribution directory. However, PGO builds remove the dist
# directory via rm -rf (with no regards to manifests). Since the cost of
# processing XPIDL files is not trivial, it is preferrable to cache the headers
# and reinstall them rather than regenerate them. Ideally the dist pruning is
# performed with manifests. At that time we can write headers directly to the
# dist directory.
# For dependency files.
idl_deps_dir := .deps
# Where generated headers go.
idl_headers_dir := headers
# Where we put our final, linked .xpt files.
idl_xpt_dir := xpt
dist_idl_dir := $(DIST)/idl
dist_include_dir := $(DIST)/include
process_py := $(topsrcdir)/python/mozbuild/mozbuild/action/xpidl-process.py
# TODO we should use py_action, but that would require extra directories to be
# in the virtualenv.
idlprocess := $(PYTHON_PATH) $(PLY_INCLUDE) -I$(IDL_PARSER_DIR) -I$(IDL_PARSER_CACHE_DIR) \
$(process_py) --cache-dir $(IDL_PARSER_CACHE_DIR) $(dist_idl_dir) \
$(idl_headers_dir) $(idl_xpt_dir) $(idl_deps_dir)
xpidl_headers := @xpidl_headers@
xpidl_modules := @xpidl_modules@
@xpidl_rules@
dist_headers := $(addprefix $(dist_include_dir)/,$(xpidl_headers))
linked_xpt_files := $(addprefix $(idl_xpt_dir)/,$(addsuffix .xpt,$(xpidl_modules)))
depends_files := $(foreach root,$(xpidl_modules),$(idl_deps_dir)/$(root).pp)
$(dist_headers): $(dist_include_dir)/%.h: $(idl_headers_dir)/%.h
$(INSTALL) $< $(dist_include_dir)
xpidl:: $(linked_xpt_files) $(dist_headers)
$(linked_xpt_files): $(process_py) $(call mkdir_deps,$(idl_deps_dir) $(idl_headers_dir) $(idl_xpt_dir))
ifdef .PYMAKE
-includedeps $(depends_files)
else
-include $(depends_files)
endif
.PHONY: xpidl

View File

@ -33,6 +33,10 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
XPIDL_MODULE \
$(NULL)
_DEPRECATED_VARIABLES := \
XPIDL_FLAGS \
$(NULL)
ifndef EXTERNALLY_MANAGED_MAKE_FILE
# Using $(firstword) may not be perfect. But it should be good enough for most
# scenarios.
@ -42,6 +46,10 @@ $(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES),$(if $($(var)),\
$(error Variable $(var) is defined in $(_current_makefile). It should only be defined in moz.build files),\
))
$(foreach var,$(_DEPRECATED_VARIABLES),$(if $($(var)),\
$(error Variable $(var) is defined in $(_current_makefile). This variable has been deprecated. It does nothing. It must be removed in order to build)\
))
ifneq (,$(XPIDLSRCS)$(SDK_XPIDLSRCS))
$(error XPIDLSRCS and SDK_XPIDLSRCS have been merged and moved to moz.build files as the XPIDL_SOURCES variable. You must move these variables out of $(_current_makefile))
endif
@ -417,8 +425,6 @@ ifeq ($(SOLARIS_SUNPRO_CXX),1)
GARBAGE_DIRS += SunWS_cache
endif
XPIDL_GEN_DIR = _xpidlgen
ifdef MOZ_UPDATE_XTERM
# Its good not to have a newline at the end of the titlebar string because it
# makes the make -s output easier to read. Echo -n does not work on all
@ -1388,98 +1394,23 @@ endif
endif
################################################################################
# Export the elements of $(XPIDLSRCS)
# generating .h and .xpt files and moving them to the appropriate places.
ifneq ($(XPIDLSRCS),) #{
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
ifndef XPIDL_MODULE
XPIDL_MODULE = $(MODULE)
endif
ifeq ($(XPIDL_MODULE),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
export:: FORCE
@echo
@echo "*** Error processing XPIDLSRCS:"
@echo "Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
@echo "so we have a module name to use when creating MODULE.xpt."
@echo; sleep 2; false
endif
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(DIST)/include;
# warn against overriding existing .h file.
XPIDL_DEPS = \
$(LIBXUL_DIST)/sdk/bin/header.py \
$(LIBXUL_DIST)/sdk/bin/typelib.py \
$(LIBXUL_DIST)/sdk/bin/xpidl.py \
$(NULL)
xpidl-preqs = \
$(call mkdir_deps,$(XPIDL_GEN_DIR)) \
$(call mkdir_deps,$(MDDEPDIR)) \
$(NULL)
$(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
$(REPORT_BUILD)
$(PYTHON_PATH) \
$(PLY_INCLUDE) \
$(LIBXUL_DIST)/sdk/bin/header.py $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
@if test -n "$(findstring $*.h, $(EXPORTS))"; \
then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
# generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
# into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
$(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
$(REPORT_BUILD)
$(PYTHON_PATH) \
$(PLY_INCLUDE) \
-I$(topsrcdir)/xpcom/typelib/xpt/tools \
$(LIBXUL_DIST)/sdk/bin/typelib.py $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
# no need to link together if XPIDLSRCS contains only XPIDL_MODULE
ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
XPT_PY = $(filter %/xpt.py,$(XPIDL_LINK))
xpidl-idl2xpt = $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
xpidl-module-deps = $(xpidl-idl2xpt) $(GLOBAL_DEPS) $(XPT_PY)
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(xpidl-module-deps)
$(XPIDL_LINK) $@ $(xpidl-idl2xpt)
$(XPT_PY):
$(MAKE) -C $(DEPTH)/xpcom/typelib/xpt/tools libs
endif # XPIDL_MODULE.xpt != XPIDLSRCS
# Install a linked .xpt into the appropriate place.
# This should ideally be performed by the non-recursive idl make file. Some day.
ifdef XPT_NAME #{
ifndef NO_DIST_INSTALL
XPIDL_MODULE_FILES := $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
XPIDL_MODULE_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += XPIDL_MODULE
_XPT_NAME_FILES := $(DEPTH)/config/makefiles/xpidl/xpt/$(XPT_NAME)
_XPT_NAME_DEST := $(FINAL_TARGET)/components
INSTALL_TARGETS += _XPT_NAME
ifndef NO_INTERFACES_MANIFEST
libs:: $(call mkdir_deps,$(FINAL_TARGET)/components)
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPT_NAME)"
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "manifest components/interfaces.manifest"
endif
endif
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
ifndef NO_DIST_INSTALL
XPIDL_HEADERS_FILES := $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
XPIDL_HEADERS_DEST := $(DIST)/include
XPIDL_HEADERS_TARGET := export
INSTALL_TARGETS += XPIDL_HEADERS
XPIDLSRCS_FILES := $(XPIDLSRCS)
XPIDLSRCS_DEST := $(IDL_DIR)
XPIDLSRCS_TARGET := export
INSTALL_TARGETS += XPIDLSRCS
endif
endif #} XPIDLSRCS
endif #} XPT_NAME
################################################################################
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
@ -1691,7 +1622,7 @@ endif
# it.
ifneq (,$(filter-out all chrome default export realchrome tools clean clobber clobber_all distclean realclean,$(MAKECMDGOALS)))
MDDEPEND_FILES := $(strip $(wildcard $(foreach file,$(sort $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS) $(XPIDLSRCS:.idl=.h) $(XPIDLSRCS:.idl=.xpt)),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
MDDEPEND_FILES := $(strip $(wildcard $(foreach file,$(sort $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS)),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
ifneq (,$(MDDEPEND_FILES))
ifdef .PYMAKE
@ -1884,7 +1815,6 @@ FREEZE_VARIABLES = \
CSRCS \
CPPSRCS \
EXPORTS \
XPIDLSRCS \
DIRS \
LIBRARY \
MODULE \

View File

@ -6996,10 +6996,13 @@ if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
elif test "$GNU_CC"; then
# Prevent the following GCC warnings from being treated as errors:
# -Wuninitialized - too many false positives
# -Wmaybe-uninitialized - too many false positives
# -Wdeprecated-declarations - we don't want our builds held hostage when a
# platform-specific API becomes deprecated.
MOZ_C_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_c_has_noerror_uninitialized)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_cxx_has_noerror_uninitialized)
MOZ_C_SUPPORTS_WARNING(-W, no-error=maybe-uninitialized, ac_c_has_noerror_maybe_uninitialized)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=maybe-uninitialized, ac_cxx_has_noerror_maybe_uninitialized)
MOZ_C_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_c_has_noerror_deprecated_declarations)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_cxx_has_noerror_deprecated_declarations)
fi

View File

@ -23,7 +23,6 @@ endif
GQI_SRCS = contentbase.gqi
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -1,3 +1,4 @@
conformance/limits/gl-max-texture-dimensions.html
conformance/misc/type-conversion-test.html
conformance/reading/read-pixels-test.html
conformance/textures/texture-mips.html

View File

@ -15,7 +15,6 @@ MSVC_ENABLE_PGO := 1
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -263,10 +263,9 @@ NS_IMPL_ISUPPORTS1(HTMLInputElementState, HTMLInputElementState)
NS_DEFINE_STATIC_IID_ACCESSOR(HTMLInputElementState, NS_INPUT_ELEMENT_STATE_IID)
HTMLInputElement::nsFilePickerShownCallback::nsFilePickerShownCallback(
HTMLInputElement* aInput, nsIFilePicker* aFilePicker, bool aMulti)
HTMLInputElement* aInput, nsIFilePicker* aFilePicker)
: mFilePicker(aFilePicker)
, mInput(aInput)
, mMulti(aMulti)
{
}
@ -319,9 +318,13 @@ HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult)
return NS_OK;
}
int16_t mode;
mFilePicker->GetMode(&mode);
bool multi = mode == static_cast<int16_t>(nsIFilePicker::modeOpenMultiple);
// Collect new selected filenames
nsCOMArray<nsIDOMFile> newFiles;
if (mMulti) {
if (multi) {
nsCOMPtr<nsISimpleEnumerator> iter;
nsresult rv = mFilePicker->GetDomfiles(getter_AddRefs(iter));
NS_ENSURE_SUCCESS(rv, rv);
@ -581,7 +584,7 @@ HTMLInputElement::InitFilePicker()
const nsCOMArray<nsIDOMFile>& oldFiles = GetFilesInternal();
nsCOMPtr<nsIFilePickerShownCallback> callback =
new HTMLInputElement::nsFilePickerShownCallback(this, filePicker, multi);
new HTMLInputElement::nsFilePickerShownCallback(this, filePicker);
if (oldFiles.Count()) {
nsString path;

View File

@ -1242,8 +1242,7 @@ private:
{
public:
nsFilePickerShownCallback(HTMLInputElement* aInput,
nsIFilePicker* aFilePicker,
bool aMulti);
nsIFilePicker* aFilePicker);
virtual ~nsFilePickerShownCallback()
{ }
@ -1254,7 +1253,6 @@ private:
private:
nsCOMPtr<nsIFilePicker> mFilePicker;
nsRefPtr<HTMLInputElement> mInput;
bool mMulti;
};
};

View File

@ -2597,12 +2597,14 @@ public:
void DoNotifyFinished()
{
if (mElement) {
nsRefPtr<HTMLMediaElement> deathGrip = mElement;
mElement->PlaybackEnded();
}
}
void UpdateReadyStateForData()
{
if (mElement && mHaveCurrentData) {
nsRefPtr<HTMLMediaElement> deathGrip = mElement;
mElement->UpdateReadyStateForData(
mBlocked ? MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE_BUFFERING :
MediaDecoderOwner::NEXT_FRAME_AVAILABLE);
@ -2625,6 +2627,7 @@ public:
mPendingNotifyOutput = false;
}
if (mElement && mHaveCurrentData) {
nsRefPtr<HTMLMediaElement> deathGrip = mElement;
mElement->FireTimeUpdate(true);
}
}
@ -2632,6 +2635,7 @@ public:
{
mHaveCurrentData = true;
if (mElement) {
nsRefPtr<HTMLMediaElement> deathGrip = mElement;
mElement->FirstFrameLoaded(false);
}
UpdateReadyStateForData();

View File

@ -148,7 +148,6 @@ MOCHITEST_FILES = \
test_bug569955.html \
test_bug573969.html \
test_bug561640.html \
test_bug566064.html \
test_bug582412-1.html \
test_bug582412-2.html \
test_bug558788-1.html \

View File

@ -69,12 +69,14 @@ reflectBoolean({
reflectString({
element: document.createElement("button"),
attribute: "formTarget",
otherValues: [ "_blank", "_self", "_parent", "_top" ],
});
// .name
reflectString({
element: document.createElement("button"),
attribute: "name",
otherValues: [ "isindex", "_charset_" ]
});
// .type
@ -93,6 +95,42 @@ reflectString({
attribute: "value",
});
// .willValidate
ok("willValidate" in document.createElement("button"),
"willValidate should be an IDL attribute of the button element");
is(typeof(document.createElement("button").willValidate), "boolean",
"button.willValidate should be a boolean");
// .validity
ok("validity" in document.createElement("button"),
"validity should be an IDL attribute of the button element");
is(typeof(document.createElement("button").validity), "object",
"button.validity should be an object");
ok(document.createElement("button").validity instanceof ValidityState,
"button.validity sohuld be an instance of ValidityState");
// .validationMessage
ok("validationMessage" in document.createElement("button"),
"validationMessage should be an IDL attribute of the button element");
is(typeof(document.createElement("button").validationMessage), "string",
"button.validationMessage should be a string");
// .checkValidity()
ok("checkValidity" in document.createElement("button"),
"checkValidity() should be a method of the button element");
is(typeof(document.createElement("button").checkValidity), "function",
"button.checkValidity should be a function");
// .setCustomValidity()
ok("setCustomValidity" in document.createElement("button"),
"setCustomValidity() should be a method of the button element");
is(typeof(document.createElement("button").setCustomValidity), "function",
"button.setCustomValidity should be a function");
// .labels
todo("labels" in document.createElement("button"),
"button.labels isn't implemented yet");
</script>
</pre>
</body>

View File

@ -13,7 +13,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=546995
<p id="display"></p>
<div id="content" style="display: none">
<select id='s'></select>
<button id='b'></button>
</div>
<pre id="test">
<script type="application/javascript">
@ -34,7 +33,6 @@ function checkAutofocusIDLAttribute(element)
// TODO: keygen should be added when correctly implemented, see bug 101019.
checkAutofocusIDLAttribute(document.getElementById('s'));
checkAutofocusIDLAttribute(document.getElementById('b'));
</script>
</pre>

View File

@ -1,59 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=566064
-->
<head>
<title>Test for Bug 566064</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=566064">Mozilla Bug 566064</a>
<p id="display"></p>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 566064 **/
// This test is only checking the IDL/content attribute of 'formtarget'.
// The behavior is tested in test_bug566046.html.
function isFormTargetEquals(aElement, aValue, aShouldBeNull)
{
if (aShouldBeNull) {
contentAtttributeValue = null;
} else {
contentAtttributeValue = aValue;
}
is(aElement.formTarget, aValue,
"formTarget IDL attribute value should be " + aValue);
is(aElement.getAttribute('formtarget'), contentAtttributeValue,
"formTarget content attribute value should be " + contentAtttributeValue);
}
function checkFormTarget(aElement)
{
isFormTargetEquals(aElement, "", true);
aElement.formTarget = "foo";
isFormTargetEquals(aElement, "foo");
aElement.setAttribute("formtarget", "bar");
isFormTargetEquals(aElement, "bar");
aElement.removeAttribute("formtarget");
isFormTargetEquals(aElement, "", true);
}
var button = document.createElement('button');
ok('formTarget' in button, "formTarget is a HTMLButtonElement property");
checkFormTarget(button);
</script>
</pre>
</body>
</html>

View File

@ -14,8 +14,6 @@ LIBRARY_NAME = gkcontentmathml_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -14,7 +14,6 @@ MSVC_ENABLE_PGO := 1
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS := 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -33,7 +33,7 @@ load 876249.html
load 876252.html
load 876834.html
load 877820.html
load 878014.html
skip-if(B2G) load 878014.html # timeout-prone, bug 833371
load 878328.html
load 878407.html
load 878478.html
@ -44,7 +44,7 @@ load 880342-1.html
load 880342-2.html
load 880384.html
load 880404.html
load 880724.html
skip-if(B2G) load 880724.html # timeout-prone, bug 833371
load 881775.html
load 882956.html
test-pref(media.webvtt.enabled,true) load 882549.html

View File

@ -20,6 +20,10 @@
namespace mozilla {
namespace dom {
// The maximum latency, in seconds, that we can live with before dropping
// buffers.
static const float MAX_LATENCY_S = 0.5;
NS_IMPL_CYCLE_COLLECTION_CLASS(ScriptProcessorNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ScriptProcessorNode)
@ -90,9 +94,11 @@ private:
};
public:
SharedBuffers()
SharedBuffers(float aSampleRate)
: mOutputQueue("SharedBuffers::outputQueue")
, mDelaySoFar(TRACK_TICKS_MAX)
, mSampleRate(aSampleRate)
, mDroppingBuffers(false)
{
}
@ -102,6 +108,29 @@ public:
{
MOZ_ASSERT(NS_IsMainThread());
TimeStamp now = TimeStamp::Now();
if (mLastEventTime.IsNull()) {
mLastEventTime = now;
} else {
// When the main thread is blocked, and all the event are processed in a
// burst after the main thread unblocks, the |(now - mLastEventTime)|
// interval will be very short. |latency - bufferDuration| will be
// negative, effectively moving back mLatency to a smaller and smaller
// value, until it crosses zero, at which point we stop dropping buffers
// and resume normal operation.
float latency = (now - mLastEventTime).ToSeconds();
float bufferDuration = aBufferSize / mSampleRate;
mLatency += latency - bufferDuration;
mLastEventTime = now;
if (mLatency > MAX_LATENCY_S || (mDroppingBuffers && mLatency > 0.0)) {
mDroppingBuffers = true;
return;
} else {
mDroppingBuffers = false;
}
}
MutexAutoLock lock(mOutputQueue.Lock());
for (uint32_t offset = 0; offset < aBufferSize; offset += WEBAUDIO_BLOCK_SIZE) {
AudioChunk& chunk = mOutputQueue.Produce();
@ -158,6 +187,16 @@ private:
// caused by the main thread lagging behind in producing output buffers.
// TRACK_TICKS_MAX means that we have not received our first buffer yet.
TrackTicks mDelaySoFar;
// The samplerate of the context.
float mSampleRate;
// This is the latency caused by the buffering. If this grows too high, we
// will drop buffers until it is acceptable.
float mLatency;
// This is the time at which we last produced a buffer, to detect if the main
// thread has been blocked.
TimeStamp mLastEventTime;
// True if we should be dropping buffers.
bool mDroppingBuffers;
};
class ScriptProcessorNodeEngine : public AudioNodeEngine
@ -386,7 +425,7 @@ ScriptProcessorNode::ScriptProcessorNode(AudioContext* aContext,
aNumberOfInputChannels,
mozilla::dom::ChannelCountMode::Explicit,
mozilla::dom::ChannelInterpretation::Speakers)
, mSharedBuffers(new SharedBuffers())
, mSharedBuffers(new SharedBuffers(aContext->SampleRate()))
, mBufferSize(aBufferSize ?
aBufferSize : // respect what the web developer requested
4096) // choose our own buffer size -- 4KB for now

View File

@ -31,8 +31,9 @@ NS_IMPL_ISUPPORTS1(MediaEngineDefaultVideoSource, nsITimerCallback)
*/
MediaEngineDefaultVideoSource::MediaEngineDefaultVideoSource()
: mTimer(nullptr)
: mTimer(nullptr), mMonitor("Fake video")
{
mImageContainer = layers::LayerManager::CreateImageContainer();
mState = kReleased;
}
@ -120,32 +121,8 @@ MediaEngineDefaultVideoSource::Start(SourceMediaStream* aStream, TrackID aID)
return NS_ERROR_FAILURE;
}
mSource = aStream;
// Allocate a single blank Image
ImageFormat format = PLANAR_YCBCR;
mImageContainer = layers::LayerManager::CreateImageContainer();
nsRefPtr<layers::Image> image = mImageContainer->CreateImage(&format, 1);
mImage = static_cast<layers::PlanarYCbCrImage*>(image.get());
layers::PlanarYCbCrImage::Data data;
// Allocate a single blank Image
mCb = 16;
mCr = 16;
AllocateSolidColorFrame(data, mOpts.mWidth, mOpts.mHeight, 0x80, mCb, mCr);
// SetData copies data, so we can free the frame
mImage->SetData(data);
ReleaseFrame(data);
// AddTrack takes ownership of segment
VideoSegment *segment = new VideoSegment();
segment->AppendFrame(image.forget(), USECS_PER_S / mOpts.mFPS,
gfxIntSize(mOpts.mWidth, mOpts.mHeight));
mSource->AddTrack(aID, VIDEO_RATE, 0, segment);
// We aren't going to add any more tracks
mSource->AdvanceKnownTracksTime(STREAM_TIME_MAX);
aStream->AddTrack(aID, VIDEO_RATE, 0, new VideoSegment());
aStream->AdvanceKnownTracksTime(STREAM_TIME_MAX);
// Remember TrackID so we can end it later
mTrackID = aID;
@ -238,20 +215,47 @@ MediaEngineDefaultVideoSource::Notify(nsITimer* aTimer)
// SetData copies data, so we can free the frame
ReleaseFrame(data);
// AddTrack takes ownership of segment
VideoSegment segment;
segment.AppendFrame(ycbcr_image.forget(), USECS_PER_S / mOpts.mFPS,
gfxIntSize(mOpts.mWidth, mOpts.mHeight));
mSource->AppendToTrack(mTrackID, &segment);
MonitorAutoLock lock(mMonitor);
// implicitly releases last image
mImage = ycbcr_image.forget();
return NS_OK;
}
void
MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
StreamTime aDesiredTime)
SourceMediaStream *aSource,
TrackID aID,
StreamTime aDesiredTime,
TrackTicks &aLastEndTime)
{
// Ignore - we push video data
// AddTrack takes ownership of segment
VideoSegment segment;
MonitorAutoLock lock(mMonitor);
if (mState != kStarted) {
return;
}
// Note: we're not giving up mImage here
nsRefPtr<layers::Image> image = mImage;
TrackTicks target = TimeToTicksRoundUp(USECS_PER_S, aDesiredTime);
TrackTicks delta = target - aLastEndTime;
if (delta > 0) {
// NULL images are allowed
if (image) {
segment.AppendFrame(image.forget(), delta,
gfxIntSize(mOpts.mWidth, mOpts.mHeight));
} else {
segment.AppendFrame(nullptr, delta, gfxIntSize(0,0));
}
// This can fail if either a) we haven't added the track yet, or b)
// we've removed or finished the track.
if (aSource->AppendToTrack(aID, &segment)) {
aLastEndTime = target;
}
}
}
@ -269,13 +273,6 @@ MediaEngineDefaultAudioSource::MediaEngineDefaultAudioSource()
MediaEngineDefaultAudioSource::~MediaEngineDefaultAudioSource()
{}
void
MediaEngineDefaultAudioSource::NotifyPull(MediaStreamGraph* aGraph,
StreamTime aDesiredTime)
{
// Ignore - we push audio data
}
void
MediaEngineDefaultAudioSource::GetName(nsAString& aName)
{
@ -335,7 +332,7 @@ MediaEngineDefaultAudioSource::Start(SourceMediaStream* aStream, TrackID aID)
// Remember TrackID so we can finish later
mTrackID = aID;
// 1 Audio frame per Video frame
// 1 Audio frame per 10ms
mTimer->InitWithCallback(this, MediaEngine::DEFAULT_AUDIO_TIMER_MS,
nsITimer::TYPE_REPEATING_SLACK);
mState = kStarted;

View File

@ -10,6 +10,7 @@
#include "nsCOMPtr.h"
#include "DOMMediaStream.h"
#include "nsComponentManagerUtils.h"
#include "mozilla/Monitor.h"
#include "VideoUtils.h"
#include "MediaEngine.h"
@ -48,12 +49,11 @@ public:
virtual nsresult Config(bool aEchoOn, uint32_t aEcho,
bool aAgcOn, uint32_t aAGC,
bool aNoiseOn, uint32_t aNoise) { return NS_OK; };
virtual void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime);
virtual void NotifyPull(MediaStreamGraph* aGraph,
SourceMediaStream *aSource,
TrackID aId,
StreamTime aDesiredTime,
TrackTicks &aLastEndTime) {}
TrackTicks &aLastEndTime);
virtual bool IsFake() {
return true;
@ -67,10 +67,15 @@ protected:
TrackID mTrackID;
nsCOMPtr<nsITimer> mTimer;
// mMonitor protects mImage access/changes, and transitions of mState
// from kStarted to kStopped (which are combined with EndTrack() and
// image changes). Note that mSources is not accessed from other threads
// for video and is not protected.
Monitor mMonitor;
nsRefPtr<layers::Image> mImage;
nsRefPtr<layers::ImageContainer> mImageContainer;
SourceMediaStream* mSource;
layers::PlanarYCbCrImage* mImage;
MediaEnginePrefs mOpts;
int mCb;
int mCr;
@ -94,7 +99,6 @@ public:
virtual nsresult Config(bool aEchoOn, uint32_t aEcho,
bool aAgcOn, uint32_t aAGC,
bool aNoiseOn, uint32_t aNoise) { return NS_OK; };
virtual void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime);
virtual void NotifyPull(MediaStreamGraph* aGraph,
SourceMediaStream *aSource,
TrackID aId,

View File

@ -19,6 +19,5 @@ LIBXUL_LIBRARY := 1
LOCAL_INCLUDES += $(VPATH:%=-I%)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -22,6 +22,5 @@ LIBXUL_LIBRARY = 1
LOCAL_INCLUDES += $(VPATH:%=-I%)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -14,9 +14,7 @@ LIBRARY_NAME = gkconsmil_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
include $(topsrcdir)/config/config.mk
INCLUDES += \
LOCAL_INCLUDES += \
-I$(srcdir)/../base/src \
-I$(srcdir)/../../layout/style \
-I$(srcdir)/../events/src \

View File

@ -40,10 +40,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SMILBoolType() {}
~SMILBoolType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SMILBoolType() {}
};
} // namespace mozilla

View File

@ -41,10 +41,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SMILEnumType() {}
~SMILEnumType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SMILEnumType() {}
};
} // namespace mozilla

View File

@ -37,7 +37,7 @@ public:
}
private:
SMILIntegerType() {}
MOZ_CONSTEXPR SMILIntegerType() {}
};
} // namespace mozilla

View File

@ -41,10 +41,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SMILStringType() {}
~SMILStringType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SMILStringType() {}
};
} // namespace mozilla

View File

@ -6,6 +6,7 @@
#ifndef NS_ISMILTYPE_H_
#define NS_ISMILTYPE_H_
#include "mozilla/Attributes.h"
#include "nscore.h"
class nsSMILValue;
@ -207,13 +208,6 @@ protected:
const nsSMILValue& aEndVal,
double aUnitDistance,
nsSMILValue& aResult) const = 0;
/**
* Protected destructor, to ensure that no one accidentally deletes an
* instance of this class.
* (The only instances in existence should be singletons - one per subclass.)
*/
~nsISMILType() {}
};
#endif // NS_ISMILTYPE_H_

View File

@ -29,22 +29,20 @@ struct ValueWrapper {
nsStyleAnimation::Value mCSSValue;
};
// Helper "zero" values of various types
// -------------------------------------
static const nsStyleAnimation::Value
sZeroCoord(0, nsStyleAnimation::Value::CoordConstructor);
static const nsStyleAnimation::Value
sZeroPercent(0.0f, nsStyleAnimation::Value::PercentConstructor);
static const nsStyleAnimation::Value
sZeroFloat(0.0f, nsStyleAnimation::Value::FloatConstructor);
static const nsStyleAnimation::Value
sZeroColor(NS_RGB(0,0,0), nsStyleAnimation::Value::ColorConstructor);
// Helper Methods
// --------------
static const nsStyleAnimation::Value*
GetZeroValueForUnit(nsStyleAnimation::Unit aUnit)
{
static const nsStyleAnimation::Value
sZeroCoord(0, nsStyleAnimation::Value::CoordConstructor);
static const nsStyleAnimation::Value
sZeroPercent(0.0f, nsStyleAnimation::Value::PercentConstructor);
static const nsStyleAnimation::Value
sZeroFloat(0.0f, nsStyleAnimation::Value::FloatConstructor);
static const nsStyleAnimation::Value
sZeroColor(NS_RGB(0,0,0), nsStyleAnimation::Value::ColorConstructor);
NS_ABORT_IF_FALSE(aUnit != nsStyleAnimation::eUnit_Null,
"Need non-null unit for a zero value");
switch (aUnit) {
@ -93,12 +91,14 @@ FinalizeStyleAnimationValues(const nsStyleAnimation::Value*& aValue1,
// eUnit_Float) mixed with unitless 0 length (parsed as eUnit_Coord). These
// won't interoperate in nsStyleAnimation, since their Units don't match.
// In this case, we replace the eUnit_Coord 0 value with eUnit_Float 0 value.
if (*aValue1 == sZeroCoord &&
const nsStyleAnimation::Value& zeroCoord =
*GetZeroValueForUnit(nsStyleAnimation::eUnit_Coord);
if (*aValue1 == zeroCoord &&
aValue2->GetUnit() == nsStyleAnimation::eUnit_Float) {
aValue1 = &sZeroFloat;
} else if (*aValue2 == sZeroCoord &&
aValue1 = GetZeroValueForUnit(nsStyleAnimation::eUnit_Float);
} else if (*aValue2 == zeroCoord &&
aValue1->GetUnit() == nsStyleAnimation::eUnit_Float) {
aValue2 = &sZeroFloat;
aValue2 = GetZeroValueForUnit(nsStyleAnimation::eUnit_Float);
}
return true;

View File

@ -98,10 +98,8 @@ public:
static bool ValueToString(const nsSMILValue& aValue, nsAString& aString);
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
nsSMILCSSValueType() {}
~nsSMILCSSValueType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR nsSMILCSSValueType() {}
};
#endif // NS_SMILCSSVALUETYPE_H_

View File

@ -39,10 +39,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
nsSMILFloatType() {}
~nsSMILFloatType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR nsSMILFloatType() {}
};
#endif // NS_SMILFLOATTYPE_H_

View File

@ -42,10 +42,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
nsSMILNullType() {}
~nsSMILNullType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR nsSMILNullType() {}
};
#endif // NS_SMILNULLTYPE_H_

View File

@ -14,8 +14,6 @@ LIBRARY_NAME = gkcontentsvg_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -43,10 +43,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGIntegerPairSMILType() {}
~SVGIntegerPairSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGIntegerPairSMILType() {}
};
} // namespace mozilla

View File

@ -91,10 +91,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGLengthListSMILType() {}
~SVGLengthListSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGLengthListSMILType() {}
};
} // namespace mozilla

View File

@ -71,10 +71,8 @@ public:
float aRotateAngle);
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGMotionSMILType() {}
~SVGMotionSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGMotionSMILType() {}
};
} // namespace mozilla

View File

@ -45,10 +45,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGNumberListSMILType() {}
~SVGNumberListSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGNumberListSMILType() {}
};
} // namespace mozilla

View File

@ -38,10 +38,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGNumberPairSMILType() {}
~SVGNumberPairSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGNumberPairSMILType() {}
};
} // namespace mozilla

View File

@ -58,10 +58,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGOrientSMILType() {}
~SVGOrientSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGOrientSMILType() {}
};
} // namespace mozilla

View File

@ -49,10 +49,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGPathSegListSMILType() {}
~SVGPathSegListSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGPathSegListSMILType() {}
};
} // namespace mozilla

View File

@ -45,10 +45,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGPointListSMILType() {}
~SVGPointListSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGPointListSMILType() {}
};
} // namespace mozilla

View File

@ -121,10 +121,8 @@ public:
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGTransformListSMILType() {}
~SVGTransformListSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGTransformListSMILType() {}
};
} // end namespace mozilla

View File

@ -38,10 +38,8 @@ protected:
nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
// and prevent others from deleting my singleton.
SVGViewBoxSMILType() {}
~SVGViewBoxSMILType() {}
// Private constructor: prevent instances beyond my singleton.
MOZ_CONSTEXPR SVGViewBoxSMILType() {}
};
} // namespace mozilla

View File

@ -3653,7 +3653,6 @@ XULDocument::ExecuteScript(nsIScriptContext * aContext,
JS::Rooted<JS::Value> unused(cx);
if (!JS_ExecuteScript(cx, global, aScriptObject, unused.address()))
nsJSUtils::ReportPendingException(cx);
aContext->ScriptEvaluated(true);
return NS_OK;
}

View File

@ -19,7 +19,6 @@ ifdef MOZ_TOOLKIT_SEARCH
DEFINES += -DMOZ_TOOLKIT_SEARCH
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -15,9 +15,3 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_activities'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/base',
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]

View File

@ -16,7 +16,6 @@ FAIL_ON_WARNINGS := 1
include $(topsrcdir)/dom/dom-config.mk
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -13,10 +13,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_alarm'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'
EXPORTS.mozilla.dom.alarm += [

View File

@ -24,7 +24,6 @@ LIBXUL_LIBRARY = 1
EXPORT_LIBRARY = 1
FAIL_ON_WARNINGS := 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -29,7 +29,6 @@ ifdef MOZ_B2G_FM
DEFINES += -DMOZ_B2G_FM
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -14,11 +14,6 @@ XPIDL_SOURCES += [
'nsISiteSpecificUserAgent.idl',
]
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'
EXPORTS += [

View File

@ -28,8 +28,8 @@ class nsIDOMWindow;
class nsIURI;
#define NS_ISCRIPTCONTEXT_IID \
{ 0xfd05ba99, 0x2906, 0x4c51, \
{ 0x89, 0xb3, 0xbc, 0xdf, 0xf6, 0x3b, 0xf2, 0xde } }
{ 0x6219173f, 0x4a61, 0x4c99, \
{ 0xb1, 0xfd, 0x8e, 0x7a, 0xf0, 0xdc, 0xe0, 0x56 } }
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
know what language we have is a little silly... */
@ -130,19 +130,6 @@ public:
*/
virtual void GC(JS::gcreason::Reason aReason) = 0;
/**
* Inform the context that a script was evaluated.
* A GC may be done if "necessary."
* This call is necessary if script evaluation is done
* without using the EvaluateScript method.
* @param aTerminated If true then do script termination handling. Within DOM
* this will always be true, but outside callers (such as xpconnect) who
* may do script evaluations nested inside inside DOM script evaluations
* can pass false to avoid premature termination handling.
* @return NS_OK if the method is successful
*/
virtual void ScriptEvaluated(bool aTerminated) = 0;
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
JS::Handle<JSScript*> aScriptObject) = 0;

View File

@ -104,8 +104,6 @@ static PRLogModuleInfo* gJSDiagnostics;
#define NS_FULL_GC_DELAY 60000 // ms
#define NS_MAX_COMPARTMENT_GC_COUNT 20
// Maximum amount of time that should elapse between incremental GC slices
#define NS_INTERSLICE_GC_DELAY 100 // ms
@ -167,7 +165,6 @@ static uint32_t sCCollectedWaitingForGC;
static uint32_t sLikelyShortLivingObjectsNeedingGC;
static bool sPostGCEventsToConsole;
static bool sPostGCEventsToObserver;
static bool sDisableExplicitCompartmentGC;
static uint32_t sCCTimerFireCount = 0;
static uint32_t sMinForgetSkippableTime = UINT32_MAX;
static uint32_t sMaxForgetSkippableTime = 0;
@ -175,7 +172,6 @@ static uint32_t sTotalForgetSkippableTime = 0;
static uint32_t sRemovedPurples = 0;
static uint32_t sForgetSkippableBeforeCC = 0;
static uint32_t sPreviousSuspectedCount = 0;
static uint32_t sCompartmentGCCount = NS_MAX_COMPARTMENT_GC_COUNT;
static uint32_t sCleanupsSinceLastGC = UINT32_MAX;
static bool sNeedsFullCC = false;
static nsJSContext *sContextList = nullptr;
@ -692,8 +688,6 @@ static const char js_typeinfer_str[] = JS_OPTIONS_DOT_STR "typeinferenc
static const char js_jit_hardening_str[] = JS_OPTIONS_DOT_STR "jit_hardening";
static const char js_memlog_option_str[] = JS_OPTIONS_DOT_STR "mem.log";
static const char js_memnotify_option_str[] = JS_OPTIONS_DOT_STR "mem.notify";
static const char js_disable_explicit_compartment_gc[] =
JS_OPTIONS_DOT_STR "mem.disable_explicit_compartment_gc";
static const char js_asmjs_content_str[] = JS_OPTIONS_DOT_STR "asmjs";
static const char js_baselinejit_content_str[] = JS_OPTIONS_DOT_STR "baselinejit.content";
static const char js_baselinejit_chrome_str[] = JS_OPTIONS_DOT_STR "baselinejit.chrome";
@ -711,8 +705,6 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
sPostGCEventsToConsole = Preferences::GetBool(js_memlog_option_str);
sPostGCEventsToObserver = Preferences::GetBool(js_memnotify_option_str);
sDisableExplicitCompartmentGC =
Preferences::GetBool(js_disable_explicit_compartment_gc);
bool strict = Preferences::GetBool(js_strict_option_str);
if (strict)
@ -819,8 +811,7 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
nsJSContext::nsJSContext(JSRuntime *aRuntime, bool aGCOnDestruction,
nsIScriptGlobalObject* aGlobalObject)
: mActive(false)
, mGCOnDestruction(aGCOnDestruction)
: mGCOnDestruction(aGCOnDestruction)
, mGlobalObjectRef(aGlobalObject)
{
mNext = sContextList;
@ -930,8 +921,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsJSContext)
NS_INTERFACE_MAP_ENTRY(nsIScriptContext)
NS_INTERFACE_MAP_ENTRY(nsIXPCScriptNotify)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptContext)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
@ -961,22 +951,15 @@ nsJSContext::EvaluateString(const nsAString& aScript,
JS::Value* aRetValue)
{
NS_ENSURE_TRUE(mIsInitialized, NS_ERROR_NOT_INITIALIZED);
nsresult rv;
if (!mScriptsEnabled) {
return NS_OK;
}
{
AutoCxPusher pusher(mContext);
nsJSUtils::EvaluateOptions evalOptions;
evalOptions.setCoerceToString(aCoerceToString);
rv = nsJSUtils::EvaluateString(mContext, aScript, aScopeObject,
AutoCxPusher pusher(mContext);
nsJSUtils::EvaluateOptions evalOptions;
evalOptions.setCoerceToString(aCoerceToString);
return nsJSUtils::EvaluateString(mContext, aScript, aScopeObject,
aCompileOptions, evalOptions, aRetValue);
}
// ScriptEvaluated needs to come after we pop the stack
ScriptEvaluated(true);
return rv;
}
#ifdef DEBUG
@ -1896,19 +1879,6 @@ nsJSContext::IsContextInitialized()
return mIsInitialized;
}
void
nsJSContext::ScriptEvaluated(bool aTerminated)
{
if (GetNativeGlobal()) {
JSAutoCompartment ac(mContext, GetNativeGlobal());
JS_MaybeGC(mContext);
}
if (aTerminated) {
mActive = true;
}
}
bool
nsJSContext::GetScriptsEnabled()
{
@ -1942,14 +1912,6 @@ nsJSContext::SetProcessingScriptTag(bool aFlag)
mProcessingScriptTag = aFlag;
}
NS_IMETHODIMP
nsJSContext::ScriptExecuted()
{
ScriptEvaluated(!::JS_IsRunning(mContext));
return NS_OK;
}
void
FullGCTimerFired(nsITimer* aTimer, void* aClosure)
{
@ -1995,34 +1957,6 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
return;
}
// Use zone GC when we're not asked to do a shrinking GC nor
// global GC and compartment GC has been called less than
// NS_MAX_COMPARTMENT_GC_COUNT times after the previous global GC.
if (!sDisableExplicitCompartmentGC &&
aShrinking != ShrinkingGC && aCompartment != NonCompartmentGC &&
sCompartmentGCCount < NS_MAX_COMPARTMENT_GC_COUNT) {
JS::PrepareForFullGC(nsJSRuntime::sRuntime);
for (nsJSContext* cx = sContextList; cx; cx = cx->mNext) {
if (!cx->mActive && cx->mContext) {
if (JSObject* global = cx->GetNativeGlobal()) {
JS::SkipZoneForGC(JS::GetObjectZone(global));
}
}
cx->mActive = false;
}
if (JS::IsGCScheduled(nsJSRuntime::sRuntime)) {
if (aIncremental == IncrementalGC) {
JS::IncrementalGC(nsJSRuntime::sRuntime, aReason, aSliceMillis);
} else {
JS::GCForReason(nsJSRuntime::sRuntime, aReason);
}
}
return;
}
for (nsJSContext* cx = sContextList; cx; cx = cx->mNext) {
cx->mActive = false;
}
JS::PrepareForFullGC(nsJSRuntime::sRuntime);
if (aIncremental == IncrementalGC) {
JS::IncrementalGC(nsJSRuntime::sRuntime, aReason, aSliceMillis);
@ -2517,7 +2451,6 @@ nsJSContext::KillCCTimer()
void
nsJSContext::GC(JS::gcreason::Reason aReason)
{
mActive = true;
PokeGC(aReason);
}
@ -2609,7 +2542,6 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
nsJSContext::MaybePokeCC();
if (aDesc.isCompartment_) {
++sCompartmentGCCount;
if (!sFullGCTimer && !sShuttingDown) {
CallCreateInstance("@mozilla.org/timer;1", &sFullGCTimer);
JS::gcreason::Reason reason = JS::gcreason::FULL_GC_TIMER;
@ -2619,7 +2551,6 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
nsITimer::TYPE_ONE_SHOT);
}
} else {
sCompartmentGCCount = 0;
nsJSContext::KillFullGCTimer();
// Avoid shrinking during heavy activity, which is suggested by
@ -2714,7 +2645,6 @@ nsJSRuntime::Startup()
sCCollectedWaitingForGC = 0;
sLikelyShortLivingObjectsNeedingGC = 0;
sPostGCEventsToConsole = false;
sDisableExplicitCompartmentGC = false;
sNeedsFullCC = false;
gNameSpaceManager = nullptr;
sRuntimeService = nullptr;

View File

@ -12,7 +12,6 @@
#include "jsapi.h"
#include "jsfriendapi.h"
#include "nsIObserver.h"
#include "nsIXPCScriptNotify.h"
#include "prtime.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIXPConnect.h"
@ -32,8 +31,7 @@ template <class> class Maybe;
// a page) and doing the actual GC.
#define NS_GC_DELAY 4000 // ms
class nsJSContext : public nsIScriptContext,
public nsIXPCScriptNotify
class nsJSContext : public nsIScriptContext
{
public:
nsJSContext(JSRuntime* aRuntime, bool aGCOnDestruction,
@ -63,7 +61,6 @@ public:
virtual nsresult InitContext() MOZ_OVERRIDE;
virtual bool IsContextInitialized() MOZ_OVERRIDE;
virtual void ScriptEvaluated(bool aTerminated) MOZ_OVERRIDE;
virtual bool GetScriptsEnabled() MOZ_OVERRIDE;
virtual void SetScriptsEnabled(bool aEnabled, bool aFireTimeouts) MOZ_OVERRIDE;
@ -82,8 +79,6 @@ public:
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
JS::MutableHandle<JSScript*> aResult) MOZ_OVERRIDE;
NS_DECL_NSIXPCSCRIPTNOTIFY
static void LoadStart();
static void LoadEnd();
@ -167,7 +162,6 @@ private:
nsrefcnt GetCCRefcnt();
JSContext *mContext;
bool mActive;
bool mIsInitialized;
bool mScriptsEnabled;

View File

@ -19,7 +19,6 @@ LOCAL_INCLUDES = \
-I$(topsrcdir)/content/events/src \
$(NULL)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -104,13 +104,6 @@ CallbackObject::CallSetup::CallSetup(JS::Handle<JSObject*> aCallback,
xpc_UnmarkGrayObject(aCallback);
mRootedCallable.construct(cx, aCallback);
// After this point we guarantee calling ScriptEvaluated() if we
// have an nsIScriptContext.
// XXXbz Why, if, say CheckFunctionAccess fails? I know that's how
// nsJSContext::CallEventHandler used to work, but is it required?
// FIXME: Bug 807369.
mCtx = ctx;
// Check that it's ok to run this callback at all.
// FIXME: Bug 807371: we want a less silly check here.
// Make sure to unwrap aCallback before passing it in, because
@ -164,10 +157,8 @@ CallbackObject::CallSetup::~CallSetup()
}
}
// If we have an mCtx, we need to call ScriptEvaluated() on it. But we have
// to do that after we pop the JSContext stack (see bug 295983). And to get
// our nesting right we have to destroy our JSAutoCompartment first. But be
// careful: it might not have been constructed at all!
// To get our nesting right we have to destroy our JSAutoCompartment first.
// But be careful: it might not have been constructed at all!
mAc.destroyIfConstructed();
// XXXbz For that matter why do we need to manually call ScriptEvaluated at
@ -178,10 +169,6 @@ CallbackObject::CallSetup::~CallSetup()
// Popping an nsCxPusher is safe even if it never got pushed.
mCxPusher.Pop();
if (mCtx) {
mCtx->ScriptEvaluated(true);
}
}
already_AddRefed<nsISupports>

View File

@ -135,7 +135,6 @@ protected:
// Members which can go away whenever
JSContext* mCx;
nsCOMPtr<nsIScriptContext> mCtx;
// And now members whose construction/destruction order we need to control.

View File

@ -7,14 +7,14 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = dombindings_s
MSVC_ENABLE_PGO := 1
LIBXUL_LIBRARY = 1
EXPORT_LIBRARY = 1
FAIL_ON_WARNINGS := 1
include $(topsrcdir)/config/config.mk
# Need this to find all our DOM source files.
include $(topsrcdir)/dom/dom-config.mk

View File

@ -51,6 +51,5 @@ LOCAL_INCLUDES += $(VPATH:%=-I%)
endif # MOZ_B2G_BT
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -16,7 +16,6 @@ FAIL_ON_WARNINGS := 1
include $(topsrcdir)/dom/dom-config.mk
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -10,13 +10,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_camera'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/base',
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
'-I$(topsrcdir)/dom/media',
]
MODULE = 'dom'
EXPORTS += [

View File

@ -13,9 +13,3 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_cellbroadcast'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/base',
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]

View File

@ -22,6 +22,5 @@ LOCAL_INCLUDES = \
-I$(topsrcdir)/content/events/src \
$(NULL)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -16,6 +16,5 @@ MOCHITEST_FILES := \
$(NULL)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -13,12 +13,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_file'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/base',
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'
EXPORTS += [

View File

@ -11,10 +11,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_fm'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'
CPP_SOURCES += [

View File

@ -13,9 +13,3 @@ XPIDL_SOURCES += [
]
XPIDL_MODULE = 'dom_icc'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]

View File

@ -19,6 +19,5 @@ LOCAL_INCLUDES = \
-I$(topsrcdir)/content/events/src \
$(NULL)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -25,7 +25,6 @@ LOCAL_INCLUDES = \
$(NULL)
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -29,7 +29,6 @@ MOCHITEST_FILES = test_ipc.html
# We're copying tests from another directory so this check is wrong for us.
#NO_XPCSHELL_MANIFEST_CHECK = 1
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -14,11 +14,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_indexeddb'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'
EXPORTS.mozilla.dom.indexedDB += [

View File

@ -15,10 +15,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_apps'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'

View File

@ -59,9 +59,5 @@ if CONFIG['MOZ_WEBSPEECH']:
XPIDL_MODULE = 'dom_base'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'

View File

@ -12,10 +12,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_contacts'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'

View File

@ -29,9 +29,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_core'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

View File

@ -33,10 +33,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_css'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/stylesheets',
]
MODULE = 'dom'

View File

@ -11,10 +11,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_devicestorage'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/events',
]
MODULE = 'dom'

View File

@ -59,9 +59,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_events'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

View File

@ -15,9 +15,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_geolocation'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

View File

@ -68,10 +68,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_html'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
'-I$(topsrcdir)/dom/interfaces/core',
]
MODULE = 'dom'

View File

@ -10,9 +10,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_json'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

View File

@ -10,9 +10,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_notification'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

View File

@ -11,9 +11,5 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_offline'
XPIDL_FLAGS += [
'-I$(topsrcdir)/dom/interfaces/base',
]
MODULE = 'dom'

Some files were not shown because too many files have changed in this diff Show More