This commit is contained in:
Matthew Noorenberghe 2013-07-31 17:48:12 -07:00
Родитель 116c1b7c2a d9a90f1254
Коммит b7459452a2
307 изменённых файлов: 20501 добавлений и 1992 удалений

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

@ -1,4 +1,4 @@
{
"revision": "7e8284bea36c2d9307f919090922d3885f67eafc",
"revision": "3ed7544ee8f48cec10bff2515c9393a4dbf21ae2",
"repo_path": "/integration/gaia-central"
}

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

@ -67,6 +67,13 @@ pref("extensions.autoDisableScopes", 15);
// Dictionary download preference
pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
// At startup, should we check to see if the installation
// date is older than some threshold
pref("app.update.checkInstallTime", true);
// The number of days a binary is permitted to be old without checking is defined in
// firefox-branding.js (app.update.checkInstallTime.days)
// The minimum delay in seconds for the timer to fire.
// default=2 minutes
pref("app.update.timerMinimumDelay", 120);

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

@ -21,6 +21,11 @@ pref("app.update.url.manual", "https://www.mozilla.org/firefox/aurora/");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://www.mozilla.org/firefox/aurora/");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused

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

@ -18,6 +18,11 @@ pref("app.update.url.manual", "https://nightly.mozilla.org");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://nightly.mozilla.org");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused

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

@ -18,6 +18,11 @@ pref("app.update.url.manual", "https://www.mozilla.org/firefox/");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://www.mozilla.org/%LOCALE%/firefox/notes");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 63);
pref("browser.search.param.ms-pc", "MOZI");
pref("browser.search.param.yahoo-fr", "moz35");
pref("browser.search.param.yahoo-fr-cjkt", "moz35"); // now unused

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

@ -18,6 +18,11 @@ pref("app.update.url.manual", "https://nightly.mozilla.org");
// supplied in the "An update is available" page of the update wizard.
pref("app.update.url.details", "https://nightly.mozilla.org");
// The number of days a binary is permitted to be old
// without checking for an update. This assumes that
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused

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

@ -466,6 +466,30 @@ BrowserGlue.prototype = {
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
},
_checkForOldBuildUpdates: function () {
// check for update if our build is old
if (Services.prefs.getBoolPref("app.update.enabled") &&
Services.prefs.getBoolPref("app.update.checkInstallTime")) {
let buildID = Services.appinfo.appBuildID;
let today = new Date().getTime();
let buildDate = new Date(buildID.slice(0,4), // year
buildID.slice(4,6) - 1, // months are zero-based.
buildID.slice(6,8), // day
buildID.slice(8,10), // hour
buildID.slice(10,12), // min
buildID.slice(12,14)) // ms
.getTime();
const millisecondsIn24Hours = 86400000;
let acceptableAge = Services.prefs.getIntPref("app.update.checkInstallTime.days") * millisecondsIn24Hours;
if (buildDate + acceptableAge < today) {
Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService).checkForBackgroundUpdates();
}
}
},
_trackSlowStartup: function () {
if (Services.startup.interrupted ||
Services.prefs.getBoolPref("browser.slowStartup.notificationDisabled"))
@ -583,6 +607,8 @@ BrowserGlue.prototype = {
Date.now() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
this._resetUnusedProfileNotification();
}
this._checkForOldBuildUpdates();
},
/**

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

@ -1036,6 +1036,7 @@ SourceScripts.prototype = {
if (item) {
DebuggerView.Sources.callMethod("checkItem", item.target, !isBlackBoxed);
}
DebuggerView.Sources.maybeShowBlackBoxMessage();
},
/**

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

@ -19,6 +19,7 @@ function SourcesView() {
this._onSourceClick = this._onSourceClick.bind(this);
this._onBreakpointRemoved = this._onBreakpointRemoved.bind(this);
this._onSourceCheck = this._onSourceCheck.bind(this);
this._onStopBlackBoxing = this._onStopBlackBoxing.bind(this);
this._onBreakpointClick = this._onBreakpointClick.bind(this);
this._onBreakpointCheckboxClick = this._onBreakpointCheckboxClick.bind(this);
this._onConditionalPopupShowing = this._onConditionalPopupShowing.bind(this);
@ -48,12 +49,15 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
this._cmPopup = document.getElementById("sourceEditorContextMenu");
this._cbPanel = document.getElementById("conditional-breakpoint-panel");
this._cbTextbox = document.getElementById("conditional-breakpoint-panel-textbox");
this._editorDeck = document.getElementById("editor-deck");
this._stopBlackBoxButton = document.getElementById("black-boxed-message-button");
window.addEventListener("Debugger:EditorLoaded", this._onEditorLoad, false);
window.addEventListener("Debugger:EditorUnloaded", this._onEditorUnload, false);
this.widget.addEventListener("select", this._onSourceSelect, false);
this.widget.addEventListener("click", this._onSourceClick, false);
this.widget.addEventListener("check", this._onSourceCheck, false);
this._stopBlackBoxButton.addEventListener("click", this._onStopBlackBoxing, false);
this._cbPanel.addEventListener("popupshowing", this._onConditionalPopupShowing, false);
this._cbPanel.addEventListener("popupshown", this._onConditionalPopupShown, false);
this._cbPanel.addEventListener("popuphiding", this._onConditionalPopupHiding, false);
@ -77,6 +81,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
this.widget.removeEventListener("select", this._onSourceSelect, false);
this.widget.removeEventListener("click", this._onSourceClick, false);
this.widget.removeEventListener("check", this._onSourceCheck, false);
this._stopBlackBoxButton.removeEventListener("click", this._onStopBlackBoxing, false);
this._cbPanel.removeEventListener("popupshowing", this._onConditionalPopupShowing, false);
this._cbPanel.removeEventListener("popupshowing", this._onConditionalPopupShown, false);
this._cbPanel.removeEventListener("popuphiding", this._onConditionalPopupHiding, false);
@ -638,6 +643,18 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
if (DebuggerView.editorSource != selectedSource) {
DebuggerView.editorSource = selectedSource;
}
this.maybeShowBlackBoxMessage();
},
/**
* Show or hide the black box message vs. source editor depending on if the
* selected source is black boxed or not.
*/
maybeShowBlackBoxMessage: function () {
const source = DebuggerController.activeThread.source(
DebuggerView.editorSource);
this._editorDeck.selectedIndex = source.isBlackBoxed ? 1 : 0;
},
/**
@ -656,6 +673,14 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
DebuggerController.SourceScripts.blackBox(item.attachment.source, !checked);
},
/**
* The click listener for the stop black boxing button.
*/
_onStopBlackBoxing: function() {
DebuggerController.SourceScripts.blackBox(DebuggerView.editorSource,
false);
},
/**
* The click listener for a breakpoint container.
*/

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

@ -32,6 +32,8 @@
<commandset id="sourceEditorCommands"/>
<commandset id="debuggerCommands">
<command id="unBlackBoxButton"
oncommand="DebuggerView.Sources._onStopBlackBoxing()"/>
<command id="nextSourceCommand"
oncommand="DebuggerView.Sources.selectNextItem()"/>
<command id="prevSourceCommand"
@ -293,7 +295,19 @@
<vbox id="sources" flex="1"/>
</vbox>
<splitter class="devtools-side-splitter"/>
<vbox id="editor" flex="1"/>
<deck id="editor-deck" flex="1" selectedIndex="0">
<vbox id="editor" />
<vbox id="black-boxed-message" align="center">
<label id="black-boxed-message-label">
&debuggerUI.blackBoxMessage.label;
</label>
<button id="black-boxed-message-button"
class="devtools-toolbarbutton"
label="&debuggerUI.blackBoxMessage.unBlackBoxButton;"
image="chrome://browser/skin/devtools/blackBoxMessageEye.png"
command="unBlackBoxCommand"/>
</vbox>
</deck>
<splitter class="devtools-side-splitter"/>
<vbox id="instruments-pane" hidden="true">
<vbox id="expressions"/>

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

@ -16,6 +16,7 @@ MOCHITEST_BROWSER_TESTS = \
browser_dbg_blackboxing-02.js \
browser_dbg_blackboxing-03.js \
browser_dbg_blackboxing-04.js \
browser_dbg_blackboxing-05.js \
browser_dbg_clean-exit.js \
browser_dbg_cmd.js \
browser_dbg_cmd_blackbox.js \

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

@ -0,0 +1,86 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Test that we get a stack frame for each black boxed source, not a single one
* for all of them.
*/
const TAB_URL = EXAMPLE_URL + "binary_search.html";
var gPane = null;
var gTab = null;
var gDebuggee = null;
var gDebugger = null;
function test()
{
let scriptShown = false;
let framesAdded = false;
let resumed = false;
let testStarted = false;
debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) {
resumed = true;
gTab = aTab;
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.panelWin;
once(gDebugger, "Debugger:SourceShown", testSourceEditorShown);
});
}
function testSourceEditorShown() {
const deck = gDebugger.document.getElementById("editor-deck");
is(deck.selectedIndex, "0",
"The first item in the deck should be selected (the source editor)");
blackBoxSource();
}
function blackBoxSource() {
const { activeThread } = gDebugger.DebuggerController;
activeThread.addOneTimeListener("blackboxchange", testBlackBoxMessageShown);
getBlackBoxCheckbox().click();
}
function testBlackBoxMessageShown() {
const deck = gDebugger.document.getElementById("editor-deck");
is(deck.selectedIndex, "1",
"The second item in the deck should be selected (the black box message)");
clickStopBlackBoxingButton();
}
function clickStopBlackBoxingButton() {
const button = gDebugger.document.getElementById("black-boxed-message-button");
const { activeThread } = gDebugger.DebuggerController;
activeThread.addOneTimeListener("blackboxchange", testSourceEditorShownAgain);
button.click();
}
function testSourceEditorShownAgain() {
const deck = gDebugger.document.getElementById("editor-deck");
is(deck.selectedIndex, "0",
"The first item in the deck should be selected again (the source editor)");
closeDebuggerAndFinish();
}
function getBlackBoxCheckbox() {
return gDebugger.document.querySelector(
".side-menu-widget-item .side-menu-widget-item-checkbox");
}
function once(target, event, callback) {
target.addEventListener(event, function _listener(...args) {
target.removeEventListener(event, _listener, false);
callback.apply(null, args);
}, false);
}
registerCleanupFunction(function() {
removeTab(gTab);
gPane = null;
gTab = null;
gDebuggee = null;
gDebugger = null;
});

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

@ -114,8 +114,6 @@ function performReload(callback) {
function testStateBeforeReload() {
is(gSources.itemCount, 0,
"There should be no sources present in the sources list during reload.");
is(gControllerSources.getCache().length, 0,
"The sources cache should be empty during reload.");
is(gDebugger.SourceUtils._labelsCache, gPrevLabelsCache,
"The labels cache has been refreshed during reload and no new objects were created.");
is(gDebugger.SourceUtils._groupsCache, gPrevGroupsCache,

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

@ -419,8 +419,7 @@ var Scratchpad = {
this.writeAsErrorComment(aError.exception).then(resolve, reject);
}
else if (VariablesView.isPrimitive({ value: aResult })) {
this.writeAsComment(aResult.type || aResult);
resolve();
this._writePrimitiveAsComment(aResult).then(resolve, reject);
}
else {
this.deselect();
@ -488,13 +487,13 @@ var Scratchpad = {
this.writeAsErrorComment(aError.exception).then(resolve, reject);
}
else if (VariablesView.isPrimitive({ value: aResult })) {
this.writeAsComment(aResult.type || aResult);
resolve();
this._writePrimitiveAsComment(aResult).then(resolve, reject);
}
else {
let gripClient = new GripClient(this.debuggerClient, aResult);
gripClient.getDisplayString(aResponse => {
if (aResponse.error) {
reportError("display", aResponse);
reject(aResponse);
}
else {
@ -513,6 +512,41 @@ var Scratchpad = {
return deferred.promise;
},
/**
* Writes out a primitive value as a comment. This handles values which are
* to be printed directly (number, string) as well as grips to values
* (null, undefined, longString).
*
* @param any aValue
* The value to print.
* @return Promise
* The promise that resolves after the value has been printed.
*/
_writePrimitiveAsComment: function SP__writePrimitiveAsComment(aValue)
{
let deferred = promise.defer();
if (aValue.type == "longString") {
let client = this.webConsoleClient;
client.longString(aValue).substring(0, aValue.length, aResponse => {
if (aResponse.error) {
reportError("display", aResponse);
deferred.reject(aResponse);
}
else {
deferred.resolve(aResponse.substring);
}
});
}
else {
deferred.resolve(aValue.type || aValue);
}
return deferred.promise.then(aComment => {
this.writeAsComment(aComment);
});
},
/**
* Write out a value at the next line from the current insertion point.
* The comment block will always be preceded by a newline character.

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

@ -37,6 +37,7 @@ MOCHITEST_BROWSER_FILES = \
browser_scratchpad_bug_661762_wrong_window_focus.js \
browser_scratchpad_bug_644413_modeline.js \
browser_scratchpad_bug807924_cannot_convert_to_string.js \
browser_scratchpad_long_string.js \
head.js \
# Disable test due to bug 807234 becoming basically permanent

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

@ -0,0 +1,30 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test()
{
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
openScratchpad(runTests);
}, true);
content.location = "data:text/html;charset=utf8,<p>test long string in Scratchpad</p>";
}
function runTests()
{
let sp = gScratchpadWindow.Scratchpad;
sp.setText("'0'.repeat(10000)");
sp.display().then(() => {
is(sp.getText(), "'0'.repeat(10000)\n" +
"/*\n" + "0".repeat(10000) + "\n*/",
"display()ing a long string works");
finish();
});
}

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

@ -19,6 +19,16 @@
- the button that toggles the panes visible or hidden in the debugger UI. -->
<!ENTITY debuggerUI.panesButton.tooltip "Toggle panes">
<!-- LOCALIZATION NOTE (debuggerUI.blackBoxMessage.label): This is the message
- displayed to users when they select a black boxed source from the sources
- list in the debugger. -->
<!ENTITY debuggerUI.blackBoxMessage.label "This source is black boxed: its breakpoints are disabled, and stepping skips through it.">
<!-- LOCALIZATION NOTE (debuggerUI.blackBoxMessage.unBlackBoxButton): This is
- the text displayed in the button to stop black boxing the currently selected
- source. -->
<!ENTITY debuggerUI.blackBoxMessage.unBlackBoxButton "Stop black boxing this source">
<!-- LOCALIZATION NOTE (debuggerUI.optsButton.tooltip): This is the tooltip for
- the button that opens up an options context menu for the debugger UI. -->
<!ENTITY debuggerUI.optsButton.tooltip "Debugger Options">

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

@ -227,8 +227,8 @@ let Util = {
aElement instanceof Ci.nsIDOMHTMLDivElement ||
aElement instanceof Ci.nsIDOMHTMLLIElement ||
aElement instanceof Ci.nsIDOMHTMLPreElement ||
aElement instanceof HTMLHeadingElement ||
aElement instanceof HTMLTableCellElement ||
aElement instanceof Ci.nsIDOMHTMLHeadingElement ||
aElement instanceof Ci.nsIDOMHTMLTableCellElement ||
aElement instanceof Ci.nsIDOMHTMLBodyElement);
},

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

@ -1185,16 +1185,16 @@ var StartUI = {
ContextUI.dismissTabs();
},
onNarrowTitleClick: function onNarrowTitleClick(gridId) {
let grid = document.getElementById(gridId);
onNarrowTitleClick: function onNarrowTitleClick(sectionId) {
let section = document.getElementById(sectionId);
if (grid.hasAttribute("expanded"))
if (section.hasAttribute("expanded"))
return;
for (let expandedGrid of Elements.startUI.querySelectorAll("[expanded]"))
expandedGrid.removeAttribute("expanded")
for (let expandedSection of Elements.startUI.querySelectorAll(".meta-section[expanded]"))
expandedSection.removeAttribute("expanded")
grid.setAttribute("expanded", "true");
section.setAttribute("expanded", "true");
},
handleEvent: function handleEvent(aEvent) {

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

@ -197,31 +197,35 @@
<!-- portrait/landscape/filled view -->
<scrollbox id="start-scrollbox" observes="bcast_preciseInput" flex="1">
<vbox id="start-topsites" class="meta-section">
<vbox id="start-topsites" class="meta-section" expanded="true">
<label class="meta-section-title wide-title" value="&topSitesHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedTopSitesHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-topsites-grid')"/>
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1" expanded="true"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-topsites')">
&narrowTopSitesHeader.label;
</html:div>
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-bookmarks" class="meta-section">
<label class="meta-section-title wide-title" value="&bookmarksHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedBookmarksHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-bookmarks-grid')"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-bookmarks')">
&narrowBookmarksHeader.label;
</html:div>
<richgrid id="start-bookmarks-grid" set-name="bookmarks" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-history" class="meta-section">
<label class="meta-section-title wide-title" value="&recentHistoryHeader.label;"/>
<label class="meta-section-title narrow-title" value="&snappedRecentHistoryHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-history-grid')"/>
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-history')">
&narrowRecentHistoryHeader.label;
</html:div>
<richgrid id="start-history-grid" set-name="recentHistory" seltype="multiple" flex="1"/>
</vbox>
<vbox id="start-remotetabs" class="meta-section">
<label class="meta-section-title wide-title" value="&remoteTabsHeader.label;"/>
<label id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" value="&snappedRemoteTabsHeader.label;"
onclick="StartUI.onNarrowTitleClick('start-remotetabs-grid')"/>
<html:div id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-remotetabs')">
&narrowRemoteTabsHeader.label;
</html:div>
<richgrid id="start-remotetabs-grid" set-name="remoteTabs" seltype="multiple" flex="1"/>
</vbox>

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

@ -15,6 +15,7 @@ let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
let HTMLDocument = Ci.nsIDOMHTMLDocument;
let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
let HTMLBodyElement = Ci.nsIDOMHTMLBodyElement;
let HTMLLabelElement = Ci.nsIDOMHTMLLabelElement;
let HTMLButtonElement = Ci.nsIDOMHTMLButtonElement;
let HTMLOptGroupElement = Ci.nsIDOMHTMLOptGroupElement;
let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;

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

@ -25,17 +25,17 @@
<!ENTITY recentHistoryHeader.label "Recent History">
<!ENTITY remoteTabsHeader.label "Tabs from Other Devices">
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label): shortened version of startRemoteTabsHeader.label.
Needs to be two words or shorter to fit in narrow vertical space.-->
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label,
snappedBookmarksHeader.label,
snappedHistoryHeader.label,
snappedTopSitesHeader.label )
The '>' character is not part of the name, but is an indicator of more content. Please do not localize the '>' -->
<!ENTITY snappedRemoteTabsHeader.label "Remote Tabs >">
<!ENTITY snappedBookmarksHeader.label "Bookmarks >">
<!ENTITY snappedRecentHistoryHeader.label "Recent History >">
<!ENTITY snappedTopSitesHeader.label "Top Sites >">
<!-- LOCALIZATION NOTE (narrowTopSitesHeader.label,
narrowBookmarksHeader.label,
narrowHistoryHeader.label,
narrowRemoteTabsHeader.label )
are shortened versions of topSitesHeader.label, bookmarksHeader.label, recentHistoryHeader.label
and remoteTabsHeader.label. Need to be two words or shorter to fit in narrow vertical space.
-->
<!ENTITY narrowTopSitesHeader.label "Top Sites">
<!ENTITY narrowBookmarksHeader.label "Bookmarks">
<!ENTITY narrowRecentHistoryHeader.label "Recent History">
<!ENTITY narrowRemoteTabsHeader.label "Remote Tabs">
<!ENTITY downloadsHeader.label "Downloads">
<!ENTITY downloadShowPage.label "Go to Page">

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

@ -249,7 +249,7 @@ documenttab[selected] .documenttab-selection {
visibility: collapse;
}
#start-container[viewstate="snapped"] richgrid[expanded] {
#start-container[viewstate="snapped"] .meta-section[expanded] > richgrid {
visibility: visible;
}

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

@ -653,18 +653,31 @@ arrowbox {
max-width: 100%;
width: 100%;
}
.meta-section {
margin: 0 @metro_spacing_large@;
}
.meta-section-title {
font-size: @metro_font_large@;
font-weight: 100;
display: none;
cursor: default;
}
#start-container[viewstate="snapped"] .meta-section-title.narrow-title,
#start-container:not([viewstate="snapped"]) .meta-section-title.wide-title {
display: block;
}
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(ltr):after {
content: ">";
}
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(rtl):before {
content: "<";
}
/* App bars ----------------------------------------------------------------- */
appbar {
display: block;

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

@ -75,7 +75,7 @@ this.webappsUI = {
}
DOMApplicationRegistry.confirmInstall(aData, false, localDir);
installationSuccessNotification(app, aWindow);
installationSuccessNotification(aData, app, aWindow);
} else {
DOMApplicationRegistry.denyInstall(aData);
}
@ -101,7 +101,15 @@ this.webappsUI = {
}
}
function installationSuccessNotification(app, aWindow) {
function installationSuccessNotification(aData, app, aWindow) {
let launcher = {
observe: function(aSubject, aTopic) {
if (aTopic == "alertclickcallback") {
WebappOSUtils.launch(aData.app);
}
}
};
let bundle = aWindow.gNavigatorBundle;
if (("@mozilla.org/alerts-service;1" in Cc)) {
@ -113,7 +121,7 @@ function installationSuccessNotification(app, aWindow) {
notifier.showAlertNotification(app.iconURI.spec,
bundle.getString("webapps.install.success"),
app.appNameAsFilename,
false, null, null);
true, null, launcher);
} catch (ex) {}
}

Двоичные данные
browser/themes/linux/devtools/blackBoxMessageEye.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 836 B

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

@ -54,6 +54,25 @@
display: none;
}
/* Black box message */
#black-boxed-message {
padding: 100px 50px;
background-color: rgb(61, 69, 76);
color: white;
}
#black-boxed-message-label,
#black-boxed-message-button {
text-align: center;
font-size: 150%;
}
#black-boxed-message-button {
margin-top: 1em;
padding: .25em;
}
/* ListWidget items */
.list-widget-item {

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

@ -192,6 +192,7 @@ browser.jar:
skin/classic/browser/devtools/magnifying-glass.png (devtools/magnifying-glass.png)
skin/classic/browser/devtools/option-icon.png (devtools/option-icon.png)
skin/classic/browser/devtools/itemToggle.png (devtools/itemToggle.png)
skin/classic/browser/devtools/blackBoxMessageEye.png (devtools/blackBoxMessageEye.png)
skin/classic/browser/devtools/itemArrow-rtl.png (devtools/itemArrow-rtl.png)
skin/classic/browser/devtools/itemArrow-ltr.png (devtools/itemArrow-ltr.png)
skin/classic/browser/devtools/background-noise-toolbar.png (devtools/background-noise-toolbar.png)

Двоичные данные
browser/themes/osx/devtools/blackBoxMessageEye.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 836 B

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

@ -56,6 +56,25 @@
display: none;
}
/* Black box message */
#black-boxed-message {
padding: 100px 50px;
background-color: rgb(61, 69, 76);
color: white;
}
#black-boxed-message-label,
#black-boxed-message-button {
text-align: center;
font-size: 150%;
}
#black-boxed-message-button {
margin-top: 1em;
padding: .25em;
}
/* ListWidget items */
.list-widget-item {

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

@ -286,6 +286,7 @@ browser.jar:
skin/classic/browser/devtools/magnifying-glass.png (devtools/magnifying-glass.png)
skin/classic/browser/devtools/option-icon.png (devtools/option-icon.png)
skin/classic/browser/devtools/itemToggle.png (devtools/itemToggle.png)
skin/classic/browser/devtools/blackBoxMessageEye.png (devtools/blackBoxMessageEye.png)
skin/classic/browser/devtools/itemArrow-rtl.png (devtools/itemArrow-rtl.png)
skin/classic/browser/devtools/itemArrow-ltr.png (devtools/itemArrow-ltr.png)
skin/classic/browser/devtools/background-noise-toolbar.png (devtools/background-noise-toolbar.png)

Двоичные данные
browser/themes/windows/devtools/blackBoxMessageEye.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 836 B

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

@ -54,6 +54,25 @@
display: none;
}
/* Black box message */
#black-boxed-message {
padding: 100px 50px;
background-color: rgb(61, 69, 76);
color: white;
}
#black-boxed-message-label,
#black-boxed-message-button {
text-align: center;
font-size: 150%;
}
#black-boxed-message-button {
margin-top: 1em;
padding: .25em;
}
/* ListWidget items */
.list-widget-item {

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

@ -219,6 +219,7 @@ browser.jar:
skin/classic/browser/devtools/magnifying-glass.png (devtools/magnifying-glass.png)
skin/classic/browser/devtools/option-icon.png (devtools/option-icon.png)
skin/classic/browser/devtools/itemToggle.png (devtools/itemToggle.png)
skin/classic/browser/devtools/blackBoxMessageEye.png (devtools/blackBoxMessageEye.png)
skin/classic/browser/devtools/itemArrow-rtl.png (devtools/itemArrow-rtl.png)
skin/classic/browser/devtools/itemArrow-ltr.png (devtools/itemArrow-ltr.png)
skin/classic/browser/devtools/background-noise-toolbar.png (devtools/background-noise-toolbar.png)
@ -486,6 +487,7 @@ browser.jar:
skin/classic/aero/browser/devtools/magnifying-glass.png (devtools/magnifying-glass.png)
skin/classic/aero/browser/devtools/option-icon.png (devtools/option-icon.png)
skin/classic/aero/browser/devtools/itemToggle.png (devtools/itemToggle.png)
skin/classic/aero/browser/devtools/blackBoxMessageEye.png (devtools/blackBoxMessageEye.png)
skin/classic/aero/browser/devtools/itemArrow-rtl.png (devtools/itemArrow-rtl.png)
skin/classic/aero/browser/devtools/background-noise-toolbar.png (devtools/background-noise-toolbar.png)
skin/classic/aero/browser/devtools/itemArrow-ltr.png (devtools/itemArrow-ltr.png)

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

@ -61,6 +61,8 @@ def find_version(e):
args += ['-shared', '-Wl,-t']
p = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
candidates = [x for x in p.stdout if 'libstdc++.so' in x]
if not candidates:
return ''
assert len(candidates) == 1
libstdcxx = parse_ld_line(candidates[-1])

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

@ -4,7 +4,7 @@
# 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/.
if CONFIG['STDCXX_COMPAT']:
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'] or CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
DIRS += ['stdc++compat']
if CONFIG['USE_ELF_HACK']:

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

@ -14,11 +14,11 @@ STL_FLAGS =
NO_EXPAND_LIBS = 1
NO_PROFILE_GUIDED_OPTIMIZE = 1
$(NULL)
HOST_CPPSRCS = $(CPPSRCS)
ifdef MOZ_LIBSTDCXX_HOST_VERSION
HOST_CPPSRCS = stdc++compat.cpp
endif
include $(topsrcdir)/config/rules.mk
CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_HOST_VERSION)

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

@ -6,11 +6,10 @@
MODULE = 'build'
CPP_SOURCES += [
'stdc++compat.cpp',
]
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']:
LIBRARY_NAME = 'stdc++compat'
CPP_SOURCES += ['stdc++compat.cpp']
HOST_LIBRARY_NAME = 'host_stdc++compat'
LIBRARY_NAME = 'stdc++compat'
if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
HOST_LIBRARY_NAME = 'host_stdc++compat'

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

@ -17,7 +17,7 @@ VISIBILITY_FLAGS =
# STDCXX_COMPAT is not needed here, and will actually fail because
# libstdc++-compat is not built yet.
STDCXX_COMPAT =
MOZ_LIBSTDCXX_HOST_VERSION =
ifneq (WINNT,$(HOST_OS_ARCH))
HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)

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

@ -747,14 +747,18 @@ EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
endif
EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
ifdef STDCXX_COMPAT
ifneq (,$(MOZ_LIBSTDCXX_TARGET_VERSION)$(MOZ_LIBSTDCXX_HOST_VERSION))
ifneq ($(OS_ARCH),Darwin)
CHECK_STDCXX = objdump -p $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' > /dev/null && echo "TEST-UNEXPECTED-FAIL | | We don't want these libstdc++ symbols to be used:" && objdump -T $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' && exit 1 || exit 0
endif
ifdef MOZ_LIBSTDCXX_TARGET_VERSION
EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,stdc++compat,$(DEPTH)/build/unix/stdc++compat)
endif
ifdef MOZ_LIBSTDCXX_HOST_VERSION
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,host_stdc++compat,$(DEPTH)/build/unix/stdc++compat)
endif
endif
# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
# this file

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

@ -7534,10 +7534,8 @@ MOZ_ARG_ENABLE_BOOL(stdcxx-compat,
[ --enable-stdcxx-compat Enable compatibility with older libstdc++],
STDCXX_COMPAT=1)
AC_SUBST(STDCXX_COMPAT)
if test -n "$STDCXX_COMPAT"; then
eval $(CXX="$CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
eval $(CXX="$CXX" HOST_CXX="$HOST_CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
AC_SUBST(MOZ_LIBSTDCXX_TARGET_VERSION)
AC_SUBST(MOZ_LIBSTDCXX_HOST_VERSION)
fi

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

@ -27,8 +27,11 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLDataListElement,
nsIDOMHTMLDataListElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
@ -42,5 +45,13 @@ HTMLDataListElement::MatchOptions(nsIContent* aContent, int32_t aNamespaceID,
!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
}
NS_IMETHODIMP
HTMLDataListElement::GetOptions(nsIDOMHTMLCollection** aOptions)
{
NS_ADDREF(*aOptions = Options());
return NS_OK;
}
} // namespace dom
} // namespace mozilla

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

@ -7,13 +7,14 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLDataListElement.h"
#include "nsContentList.h"
namespace mozilla {
namespace dom {
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLDataListElement
{
public:
HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -34,6 +35,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLDataListElement
NS_DECL_NSIDOMHTMLDATALISTELEMENT
nsContentList* Options()
{
if (!mOptions) {

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

@ -31,13 +31,66 @@ NS_IMPL_ADDREF_INHERITED(HTMLFontElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
// QueryInterface implementation for HTMLFontElement
NS_INTERFACE_MAP_BEGIN(HTMLFontElement)
NS_INTERFACE_TABLE_HEAD(HTMLFontElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLFontElement, nsIDOMHTMLFontElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
NS_IMETHODIMP
HTMLFontElement::GetColor(nsAString& aColor)
{
nsString color;
GetColor(color);
aColor = color;
return NS_OK;
}
NS_IMETHODIMP
HTMLFontElement::SetColor(const nsAString& aColor)
{
ErrorResult rv;
SetColor(aColor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLFontElement::GetFace(nsAString& aFace)
{
nsString face;
GetFace(face);
aFace = face;
return NS_OK;
}
NS_IMETHODIMP
HTMLFontElement::SetFace(const nsAString& aFace)
{
ErrorResult rv;
SetFace(aFace, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLFontElement::GetSize(nsAString& aSize)
{
nsString size;
GetSize(size);
aSize = size;
return NS_OK;
}
NS_IMETHODIMP
HTMLFontElement::SetSize(const nsAString& aSize)
{
ErrorResult rv;
SetSize(aSize, rv);
return rv.ErrorCode();
}
bool
HTMLFontElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,

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

@ -7,12 +7,13 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLFontElement.h"
namespace mozilla {
namespace dom {
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLFontElement
{
public:
HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -33,6 +34,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLFontElement
NS_DECL_NSIDOMHTMLFONTELEMENT
void GetColor(nsString& aColor)
{
GetHTMLAttr(nsGkAtoms::color, aColor);

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

@ -26,8 +26,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLHeadingElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLHeadingElement, Element)
// QueryInterface implementation for HTMLHeadingElement
NS_INTERFACE_MAP_BEGIN(HTMLHeadingElement)
NS_INTERFACE_TABLE_HEAD(HTMLHeadingElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLHeadingElement,
nsIDOMHTMLHeadingElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
@ -39,6 +42,9 @@ HTMLHeadingElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
return HTMLHeadingElementBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_STRING_ATTR(HTMLHeadingElement, Align, align)
bool
HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,

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

@ -7,13 +7,14 @@
#define mozilla_dom_HTMLHeadingElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLHeadingElement.h"
#include "nsGenericHTMLElement.h"
namespace mozilla {
namespace dom {
class HTMLHeadingElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLHeadingElement
{
public:
HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -34,6 +35,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLHeadingElement
NS_DECL_NSIDOMHTMLHEADINGELEMENT
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
@ -43,15 +47,8 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
void GetAlign(nsAString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
}
void SetAlign(const nsAString& aAlign, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::align, aAlign, aRv);
}
// The XPCOM versions of GetAlign and SetAlign are fine for us for
// use from WebIDL.
protected:
virtual JSObject* WrapNode(JSContext *aCx,

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

@ -35,13 +35,49 @@ NS_IMPL_ADDREF_INHERITED(HTMLLabelElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLLabelElement, Element)
// QueryInterface implementation for HTMLLabelElement
NS_INTERFACE_MAP_BEGIN(HTMLLabelElement)
NS_INTERFACE_TABLE_HEAD(HTMLLabelElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLLabelElement,
nsIDOMHTMLLabelElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
// nsIDOMHTMLLabelElement
NS_IMPL_ELEMENT_CLONE(HTMLLabelElement)
NS_IMETHODIMP
HTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
{
return nsGenericHTMLFormElement::GetForm(aForm);
}
NS_IMETHODIMP
HTMLLabelElement::GetControl(nsIDOMHTMLElement** aElement)
{
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(GetLabeledElement());
element.forget(aElement);
return NS_OK;
}
NS_IMETHODIMP
HTMLLabelElement::SetHtmlFor(const nsAString& aHtmlFor)
{
ErrorResult rv;
SetHtmlFor(aHtmlFor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLLabelElement::GetHtmlFor(nsAString& aHtmlFor)
{
nsString htmlFor;
GetHtmlFor(htmlFor);
aHtmlFor = htmlFor;
return NS_OK;
}
void
HTMLLabelElement::Focus(ErrorResult& aError)
{

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

@ -11,12 +11,13 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLLabelElement.h"
namespace mozilla {
namespace dom {
class HTMLLabelElement MOZ_FINAL : public nsGenericHTMLFormElement,
public nsIDOMHTMLElement
public nsIDOMHTMLLabelElement
{
public:
HTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -37,6 +38,9 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLLabelElement
NS_DECL_NSIDOMHTMLLABELELEMENT
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC

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

@ -25,13 +25,30 @@ NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
// QueryInterface implementation for HTMLLegendElement
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
NS_INTERFACE_TABLE_HEAD(HTMLLegendElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLLegendElement, nsIDOMHTMLLegendElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
// nsIDOMHTMLLegendElement
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
NS_IMETHODIMP
HTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm)
{
Element* form = GetFormElement();
return form ? CallQueryInterface(form, aForm) : NS_OK;
}
NS_IMPL_STRING_ATTR(HTMLLegendElement, Align, align)
// this contains center, because IE4 does
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },

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

@ -7,6 +7,7 @@
#define mozilla_dom_HTMLLegendElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLLegendElement.h"
#include "nsGenericHTMLElement.h"
#include "mozilla/dom/HTMLFormElement.h"
@ -14,7 +15,7 @@ namespace mozilla {
namespace dom {
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLLegendElement
{
public:
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -34,6 +35,9 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLLegendElement
NS_DECL_NSIDOMHTMLLEGENDELEMENT
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
@ -82,11 +86,7 @@ public:
already_AddRefed<HTMLFormElement> GetForm();
void GetAlign(nsAString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
}
// The XPCOM GetAlign is OK for us
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);

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

@ -29,8 +29,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
NS_INTERFACE_MAP_BEGIN(HTMLMeterElement)
NS_INTERFACE_TABLE_HEAD(HTMLMeterElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLMeterElement,
nsIDOMHTMLMeterElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
@ -220,6 +223,88 @@ HTMLMeterElement::Optimum() const
return std::min(optimum, max);
}
/*
* XPCOM methods
*/
NS_IMETHODIMP
HTMLMeterElement::GetMin(double* aValue)
{
*aValue = Min();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetMin(double aValue)
{
return SetDoubleAttr(nsGkAtoms::min, aValue);
}
NS_IMETHODIMP
HTMLMeterElement::GetMax(double* aValue)
{
*aValue = Max();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetMax(double aValue)
{
return SetDoubleAttr(nsGkAtoms::max, aValue);
}
NS_IMETHODIMP
HTMLMeterElement::GetValue(double* aValue)
{
*aValue = Value();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetValue(double aValue)
{
return SetDoubleAttr(nsGkAtoms::value, aValue);
}
NS_IMETHODIMP
HTMLMeterElement::GetLow(double* aValue)
{
*aValue = Low();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetLow(double aValue)
{
return SetDoubleAttr(nsGkAtoms::low, aValue);
}
NS_IMETHODIMP
HTMLMeterElement::GetHigh(double* aValue)
{
*aValue = High();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetHigh(double aValue)
{
return SetDoubleAttr(nsGkAtoms::high, aValue);
}
NS_IMETHODIMP
HTMLMeterElement::GetOptimum(double* aValue)
{
*aValue = Optimum();
return NS_OK;
}
NS_IMETHODIMP
HTMLMeterElement::SetOptimum(double aValue)
{
return SetDoubleAttr(nsGkAtoms::optimum, aValue);
}
nsEventStates
HTMLMeterElement::GetOptimumState() const
{

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

@ -7,6 +7,7 @@
#define mozilla_dom_HTMLMeterElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLMeterElement.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValue.h"
#include "nsAttrValueInlines.h"
@ -18,7 +19,7 @@ namespace mozilla {
namespace dom {
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLMeterElement
{
public:
HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@ -36,6 +37,9 @@ public:
/* nsIDOMHTMLElement */
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
/* nsIDOMHTMLMeterElement */
NS_DECL_NSIDOMHTMLMETERELEMENT
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
@ -51,42 +55,42 @@ public:
double Value() const;
void SetValue(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::value, aValue);
aRv = SetValue(aValue);
}
/* @return the minimum value */
double Min() const;
void SetMin(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::min, aValue);
aRv = SetMin(aValue);
}
/* @return the maximum value */
double Max() const;
void SetMax(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::max, aValue);
aRv = SetMax(aValue);
}
/* @return the low value */
double Low() const;
void SetLow(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::low, aValue);
aRv = SetLow(aValue);
}
/* @return the high value */
double High() const;
void SetHigh(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::high, aValue);
aRv = SetHigh(aValue);
}
/* @return the optimum value */
double Optimum() const;
void SetOptimum(double aValue, ErrorResult& aRv)
{
aRv = SetDoubleAttr(nsGkAtoms::optimum, aValue);
aRv = SetOptimum(aValue);
}
protected:

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

@ -26,13 +26,20 @@ NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
// QueryInterface implementation for HTMLModElement
NS_INTERFACE_MAP_BEGIN(HTMLModElement)
NS_INTERFACE_TABLE_HEAD(HTMLModElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLModElement,
nsIDOMHTMLModElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLModElement)
NS_IMPL_URI_ATTR(HTMLModElement, Cite, cite)
NS_IMPL_STRING_ATTR(HTMLModElement, DateTime, datetime)
JSObject*
HTMLModElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
{

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

@ -8,13 +8,14 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLModElement.h"
#include "nsGkAtoms.h"
namespace mozilla {
namespace dom {
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLModElement
{
public:
HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@ -32,6 +33,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLModElement
NS_DECL_NSIDOMHTMLMODELEMENT
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
@ -44,10 +48,7 @@ public:
{
SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
}
void GetDateTime(nsAString& aDateTime)
{
GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
}
// XPCOM GetDateTime is fine.
void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);

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

@ -53,7 +53,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLOutputElement, Element)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLOutputElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
NS_INTERFACE_TABLE_INHERITED2(HTMLOutputElement,
NS_INTERFACE_TABLE_INHERITED3(HTMLOutputElement,
nsIDOMHTMLOutputElement,
nsIMutationObserver,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
@ -61,12 +62,20 @@ NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLOutputElement)
void
NS_IMPL_STRING_ATTR(HTMLOutputElement, Name, name)
// nsIConstraintValidation
NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(HTMLOutputElement)
NS_IMETHODIMP
HTMLOutputElement::SetCustomValidity(const nsAString& aError)
{
nsIConstraintValidation::SetCustomValidity(aError);
UpdateState(true);
return NS_OK;
}
NS_IMETHODIMP
@ -140,20 +149,49 @@ HTMLOutputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
return rv;
}
void
HTMLOutputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
NS_IMETHODIMP
HTMLOutputElement::GetForm(nsIDOMHTMLFormElement** aForm)
{
mValueModeFlag = eModeValue;
aRv = nsContentUtils::SetNodeTextContent(this, aValue, true);
return nsGenericHTMLFormElement::GetForm(aForm);
}
void
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
NS_IMETHODIMP
HTMLOutputElement::GetType(nsAString& aType)
{
aType.AssignLiteral("output");
return NS_OK;
}
NS_IMETHODIMP
HTMLOutputElement::GetValue(nsAString& aValue)
{
nsContentUtils::GetNodeTextContent(this, true, aValue);
return NS_OK;
}
NS_IMETHODIMP
HTMLOutputElement::SetValue(const nsAString& aValue)
{
mValueModeFlag = eModeValue;
return nsContentUtils::SetNodeTextContent(this, aValue, true);
}
NS_IMETHODIMP
HTMLOutputElement::GetDefaultValue(nsAString& aDefaultValue)
{
aDefaultValue = mDefaultValue;
return NS_OK;
}
NS_IMETHODIMP
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue)
{
mDefaultValue = aDefaultValue;
if (mValueModeFlag == eModeDefault) {
aRv = nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
return nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
}
return NS_OK;
}
nsDOMSettableTokenList*
@ -165,6 +203,13 @@ HTMLOutputElement::HtmlFor()
return mTokenList;
}
NS_IMETHODIMP
HTMLOutputElement::GetHtmlFor(nsISupports** aResult)
{
NS_ADDREF(*aResult = HtmlFor());
return NS_OK;
}
void HTMLOutputElement::DescendantsChanged()
{
if (mValueModeFlag == eModeDefault) {

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

@ -8,6 +8,7 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLOutputElement.h"
#include "nsStubMutationObserver.h"
#include "nsIConstraintValidation.h"
@ -15,7 +16,7 @@ namespace mozilla {
namespace dom {
class HTMLOutputElement MOZ_FINAL : public nsGenericHTMLFormElement,
public nsIDOMHTMLElement,
public nsIDOMHTMLOutputElement,
public nsStubMutationObserver,
public nsIConstraintValidation
{
@ -37,6 +38,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLOutputElement
NS_DECL_NSIDOMHTMLOUTPUTELEMENT
// nsIFormControl
NS_IMETHOD_(uint32_t) GetType() const { return NS_FORM_OUTPUT; }
NS_IMETHOD Reset() MOZ_OVERRIDE;
@ -75,40 +79,31 @@ public:
// WebIDL
nsDOMSettableTokenList* HtmlFor();
// nsGenericHTMLFormElement::GetForm is fine.
void GetName(nsAString& aName)
{
GetHTMLAttr(nsGkAtoms::name, aName);
}
using nsGenericHTMLFormElement::GetForm;
// XPCOM GetName is fine.
void SetName(const nsAString& aName, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::name, aName, aRv);
}
void GetType(nsAString& aType)
// XPCOM GetType is fine.
// XPCOM GetDefaultValue is fine.
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
{
aType.AssignLiteral("output");
aRv = SetDefaultValue(aDefaultValue);
}
void GetDefaultValue(nsAString& aDefaultValue)
// XPCOM GetValue is fine.
void SetValue(const nsAString& aValue, ErrorResult& aRv)
{
aDefaultValue = mDefaultValue;
aRv = SetValue(aValue);
}
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv);
void GetValue(nsAString& aValue)
{
nsContentUtils::GetNodeTextContent(this, true, aValue);
}
void SetValue(const nsAString& aValue, ErrorResult& aRv);
// nsIConstraintValidation::WillValidate is fine.
// nsIConstraintValidation::Validity() is fine.
// nsIConstraintValidation::GetValidationMessage() is fine.
// nsIConstraintValidation::CheckValidity() is fine.
void SetCustomValidity(const nsAString& aError);
using nsIConstraintValidation::CheckValidity;
// nsIConstraintValidation::SetCustomValidity() is fine.
protected:
enum ValueModeFlag {

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

@ -31,8 +31,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLProgressElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLProgressElement, Element)
NS_INTERFACE_MAP_BEGIN(HTMLProgressElement)
NS_INTERFACE_TABLE_HEAD(HTMLProgressElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLProgressElement,
nsIDOMHTMLProgressElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLProgressElement)
@ -64,6 +67,13 @@ HTMLProgressElement::ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
aValue, aResult);
}
NS_IMETHODIMP
HTMLProgressElement::GetValue(double* aValue)
{
*aValue = Value();
return NS_OK;
}
double
HTMLProgressElement::Value() const
{
@ -76,6 +86,21 @@ HTMLProgressElement::Value() const
return std::min(attrValue->GetDoubleValue(), Max());
}
NS_IMETHODIMP
HTMLProgressElement::SetValue(double aValue)
{
ErrorResult rv;
SetValue(aValue, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLProgressElement::GetMax(double* aValue)
{
*aValue = Max();
return NS_OK;
}
double
HTMLProgressElement::Max() const
{
@ -88,6 +113,21 @@ HTMLProgressElement::Max() const
return attrMax->GetDoubleValue();
}
NS_IMETHODIMP
HTMLProgressElement::SetMax(double aValue)
{
ErrorResult rv;
SetMax(aValue, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLProgressElement::GetPosition(double* aPosition)
{
*aPosition = Position();
return NS_OK;
}
double
HTMLProgressElement::Position() const
{

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

@ -7,6 +7,7 @@
#define mozilla_dom_HTMLProgressElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLProgressElement.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValue.h"
#include "nsAttrValueInlines.h"
@ -17,7 +18,7 @@ namespace mozilla {
namespace dom {
class HTMLProgressElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLProgressElement
{
public:
HTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@ -35,6 +36,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLProgressElement
NS_DECL_NSIDOMHTMLPROGRESSELEMENT
nsEventStates IntrinsicState() const MOZ_OVERRIDE;
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;

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

@ -34,7 +34,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLSharedElement, Element)
// QueryInterface implementation for HTMLSharedElement
NS_INTERFACE_MAP_BEGIN(HTMLSharedElement)
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
nsIDOMHTMLBaseElement)
nsIDOMHTMLParamElement)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLParamElement, param)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLBaseElement, base)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDirectoryElement, dir)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
@ -46,6 +47,15 @@ NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLSharedElement)
// nsIDOMHTMLParamElement
NS_IMPL_STRING_ATTR(HTMLSharedElement, Name, name)
NS_IMPL_STRING_ATTR(HTMLSharedElement, Type, type)
NS_IMPL_STRING_ATTR(HTMLSharedElement, Value, value)
NS_IMPL_STRING_ATTR(HTMLSharedElement, ValueType, valuetype)
// nsIDOMHTMLDirectoryElement
NS_IMPL_BOOL_ATTR(HTMLSharedElement, Compact, compact)
// nsIDOMHTMLQuoteElement
NS_IMPL_URI_ATTR(HTMLSharedElement, Cite, cite)

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

@ -6,6 +6,7 @@
#ifndef mozilla_dom_HTMLSharedElement_h
#define mozilla_dom_HTMLSharedElement_h
#include "nsIDOMHTMLParamElement.h"
#include "nsIDOMHTMLBaseElement.h"
#include "nsIDOMHTMLDirectoryElement.h"
#include "nsIDOMHTMLQuoteElement.h"
@ -22,6 +23,7 @@ namespace mozilla {
namespace dom {
class HTMLSharedElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLParamElement,
public nsIDOMHTMLBaseElement,
public nsIDOMHTMLDirectoryElement,
public nsIDOMHTMLQuoteElement,
@ -47,9 +49,15 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLParamElement
NS_DECL_NSIDOMHTMLPARAMELEMENT
// nsIDOMHTMLBaseElement
NS_DECL_NSIDOMHTMLBASEELEMENT
// nsIDOMHTMLDirectoryElement
NS_DECL_NSIDOMHTMLDIRECTORYELEMENT
// nsIDOMHTMLQuoteElement
NS_DECL_NSIDOMHTMLQUOTEELEMENT
@ -90,7 +98,7 @@ public:
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE
{
return static_cast<nsIDOMHTMLBaseElement*>(this);
return static_cast<nsIDOMHTMLParamElement*>(this);
}
// WebIDL API

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

@ -32,6 +32,7 @@ NS_INTERFACE_MAP_BEGIN(HTMLSharedListElement)
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
nsIDOMHTMLOListElement)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDListElement, dl)
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
NS_ELEMENT_INTERFACE_MAP_END

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

@ -9,6 +9,7 @@
#include "mozilla/Util.h"
#include "nsIDOMHTMLOListElement.h"
#include "nsIDOMHTMLDListElement.h"
#include "nsIDOMHTMLUListElement.h"
#include "nsGenericHTMLElement.h"
@ -17,6 +18,7 @@ namespace dom {
class HTMLSharedListElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLOListElement,
public nsIDOMHTMLDListElement,
public nsIDOMHTMLUListElement
{
public:
@ -41,6 +43,9 @@ public:
// nsIDOMHTMLOListElement
NS_DECL_NSIDOMHTMLOLISTELEMENT
// nsIDOMHTMLDListElement
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
// nsIDOMHTMLUListElement
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT

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

@ -34,8 +34,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableCellElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLTableCellElement, Element)
// QueryInterface implementation for HTMLTableCellElement
NS_INTERFACE_MAP_BEGIN(HTMLTableCellElement)
NS_INTERFACE_TABLE_HEAD(HTMLTableCellElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLTableCellElement,
nsIDOMHTMLTableCellElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
@ -101,6 +104,13 @@ HTMLTableCellElement::CellIndex() const
return -1;
}
NS_IMETHODIMP
HTMLTableCellElement::GetCellIndex(int32_t* aCellIndex)
{
*aCellIndex = CellIndex();
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
{
@ -117,6 +127,238 @@ HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetAbbr(const nsAString& aAbbr)
{
ErrorResult rv;
SetAbbr(aAbbr, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetAbbr(nsAString& aAbbr)
{
nsString abbr;
GetAbbr(abbr);
aAbbr = abbr;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetAxis(const nsAString& aAxis)
{
ErrorResult rv;
SetAxis(aAxis, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetAxis(nsAString& aAxis)
{
nsString axis;
GetAxis(axis);
aAxis = axis;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetAlign(const nsAString& aAlign)
{
ErrorResult rv;
SetAlign(aAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetAlign(nsAString& aAlign)
{
nsString align;
GetAlign(align);
aAlign = align;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetVAlign(const nsAString& aVAlign)
{
ErrorResult rv;
SetVAlign(aVAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetVAlign(nsAString& aVAlign)
{
nsString vAlign;
GetVAlign(vAlign);
aVAlign = vAlign;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetCh(const nsAString& aCh)
{
ErrorResult rv;
SetCh(aCh, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetCh(nsAString& aCh)
{
nsString ch;
GetCh(ch);
aCh = ch;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetChOff(const nsAString& aChOff)
{
ErrorResult rv;
SetChOff(aChOff, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetChOff(nsAString& aChOff)
{
nsString chOff;
GetChOff(chOff);
aChOff = chOff;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetBgColor(const nsAString& aBgColor)
{
ErrorResult rv;
SetBgColor(aBgColor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetBgColor(nsAString& aBgColor)
{
nsString bgColor;
GetBgColor(bgColor);
aBgColor = bgColor;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetHeight(const nsAString& aHeight)
{
ErrorResult rv;
SetHeight(aHeight, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetHeight(nsAString& aHeight)
{
nsString height;
GetHeight(height);
aHeight = height;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetWidth(const nsAString& aWidth)
{
ErrorResult rv;
SetWidth(aWidth, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetWidth(nsAString& aWidth)
{
nsString width;
GetWidth(width);
aWidth = width;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetNoWrap(bool aNoWrap)
{
ErrorResult rv;
SetNoWrap(aNoWrap, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetNoWrap(bool* aNoWrap)
{
*aNoWrap = NoWrap();
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetScope(const nsAString& aScope)
{
ErrorResult rv;
SetScope(aScope, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetScope(nsAString& aScope)
{
nsString scope;
GetScope(scope);
aScope = scope;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetHeaders(const nsAString& aHeaders)
{
ErrorResult rv;
SetHeaders(aHeaders, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetHeaders(nsAString& aHeaders)
{
nsString headers;
GetHeaders(headers);
aHeaders = headers;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetColSpan(int32_t aColSpan)
{
ErrorResult rv;
SetColSpan(aColSpan, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetColSpan(int32_t* aColSpan)
{
*aColSpan = ColSpan();
return NS_OK;
}
NS_IMETHODIMP
HTMLTableCellElement::SetRowSpan(int32_t aRowSpan)
{
ErrorResult rv;
SetRowSpan(aRowSpan, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableCellElement::GetRowSpan(int32_t* aRowSpan)
{
*aRowSpan = RowSpan();
return NS_OK;
}
void
HTMLTableCellElement::GetAlign(nsString& aValue)
{
@ -202,7 +444,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{

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

@ -7,6 +7,9 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableCellElement.h"
class nsIDOMHTMLTableRowElement;
namespace mozilla {
namespace dom {
@ -14,7 +17,7 @@ namespace dom {
class HTMLTableElement;
class HTMLTableCellElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLTableCellElement
{
public:
HTMLTableCellElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -35,6 +38,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLTableCellElement
NS_DECL_NSIDOMHTMLTABLECELLELEMENT
uint32_t ColSpan() const
{
return GetIntAttr(nsGkAtoms::colspan, 1);

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

@ -34,12 +34,115 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableColElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element)
// QueryInterface implementation for HTMLTableColElement
NS_INTERFACE_MAP_BEGIN(HTMLTableColElement)
NS_INTERFACE_TABLE_HEAD(HTMLTableColElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLTableColElement,
nsIDOMHTMLTableColElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLTableColElement)
NS_IMETHODIMP
HTMLTableColElement::SetSpan(int32_t aSpan)
{
ErrorResult rv;
SetSpan(aSpan, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetSpan(int32_t* aSpan)
{
*aSpan = Span();
return NS_OK;
}
NS_IMETHODIMP
HTMLTableColElement::SetAlign(const nsAString& aAlign)
{
ErrorResult rv;
SetAlign(aAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetAlign(nsAString& aAlign)
{
nsString align;
GetAlign(align);
aAlign = align;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableColElement::SetVAlign(const nsAString& aVAlign)
{
ErrorResult rv;
SetVAlign(aVAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetVAlign(nsAString& aVAlign)
{
nsString vAlign;
GetVAlign(vAlign);
aVAlign = vAlign;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableColElement::SetCh(const nsAString& aCh)
{
ErrorResult rv;
SetCh(aCh, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetCh(nsAString& aCh)
{
nsString ch;
GetCh(ch);
aCh = ch;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableColElement::SetChOff(const nsAString& aChOff)
{
ErrorResult rv;
SetChOff(aChOff, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetChOff(nsAString& aChOff)
{
nsString chOff;
GetChOff(chOff);
aChOff = chOff;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableColElement::SetWidth(const nsAString& aWidth)
{
ErrorResult rv;
SetWidth(aWidth, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableColElement::GetWidth(nsAString& aWidth)
{
nsString width;
GetWidth(width);
aWidth = width;
return NS_OK;
}
bool
HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,

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

@ -7,12 +7,13 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableColElement.h"
namespace mozilla {
namespace dom {
class HTMLTableColElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLTableColElement
{
public:
HTMLTableColElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -33,6 +34,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLTableColElement
NS_DECL_NSIDOMHTMLTABLECOLELEMENT
uint32_t Span() const
{
return GetIntAttr(nsGkAtoms::span, 1);

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

@ -6,6 +6,7 @@
#include "mozilla/Util.h"
#include "mozilla/dom/HTMLTableElement.h"
#include "nsIDOMHTMLTableSectionElement.h"
#include "nsAttrValueInlines.h"
#include "nsRuleData.h"
#include "nsHTMLStyleSheet.h"
@ -343,6 +344,219 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
// in fact, they are integers or they are meaningless. so we store them
// here as ints.
NS_IMETHODIMP
HTMLTableElement::SetAlign(const nsAString& aAlign)
{
ErrorResult rv;
SetAlign(aAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetAlign(nsAString& aAlign)
{
nsString align;
GetAlign(align);
aAlign = align;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetBgColor(const nsAString& aBgColor)
{
ErrorResult rv;
SetBgColor(aBgColor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetBgColor(nsAString& aBgColor)
{
nsString bgColor;
GetBgColor(bgColor);
aBgColor = bgColor;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetBorder(const nsAString& aBorder)
{
ErrorResult rv;
SetBorder(aBorder, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetBorder(nsAString& aBorder)
{
nsString border;
GetBorder(border);
aBorder = border;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetCellPadding(const nsAString& aCellPadding)
{
ErrorResult rv;
SetCellPadding(aCellPadding, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetCellPadding(nsAString& aCellPadding)
{
nsString cellPadding;
GetCellPadding(cellPadding);
aCellPadding = cellPadding;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetCellSpacing(const nsAString& aCellSpacing)
{
ErrorResult rv;
SetCellSpacing(aCellSpacing, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetCellSpacing(nsAString& aCellSpacing)
{
nsString cellSpacing;
GetCellSpacing(cellSpacing);
aCellSpacing = cellSpacing;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetFrame(const nsAString& aFrame)
{
ErrorResult rv;
SetFrame(aFrame, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetFrame(nsAString& aFrame)
{
nsString frame;
GetFrame(frame);
aFrame = frame;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetRules(const nsAString& aRules)
{
ErrorResult rv;
SetRules(aRules, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetRules(nsAString& aRules)
{
nsString rules;
GetRules(rules);
aRules = rules;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetSummary(const nsAString& aSummary)
{
ErrorResult rv;
SetSummary(aSummary, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetSummary(nsAString& aSummary)
{
nsString summary;
GetSummary(summary);
aSummary = summary;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetWidth(const nsAString& aWidth)
{
ErrorResult rv;
SetWidth(aWidth, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetWidth(nsAString& aWidth)
{
nsString width;
GetWidth(width);
aWidth = width;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::GetCaption(nsIDOMHTMLTableCaptionElement** aValue)
{
nsCOMPtr<nsIDOMHTMLTableCaptionElement> caption = GetCaption();
caption.forget(aValue);
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement* aValue)
{
HTMLTableCaptionElement* caption =
static_cast<HTMLTableCaptionElement*>(aValue);
SetCaption(caption);
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement** aValue)
{
NS_IF_ADDREF(*aValue = GetTHead());
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement* aValue)
{
HTMLTableSectionElement* section =
static_cast<HTMLTableSectionElement*>(aValue);
ErrorResult rv;
SetTHead(section, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement** aValue)
{
NS_IF_ADDREF(*aValue = GetTFoot());
return NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement* aValue)
{
HTMLTableSectionElement* section =
static_cast<HTMLTableSectionElement*>(aValue);
ErrorResult rv;
SetTFoot(section, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue)
{
NS_ADDREF(*aValue = Rows());
return NS_OK;
}
nsIHTMLCollection*
HTMLTableElement::Rows()
{
@ -353,6 +567,13 @@ HTMLTableElement::Rows()
return mRows;
}
NS_IMETHODIMP
HTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue)
{
NS_ADDREF(*aValue = TBodies());
return NS_OK;
}
nsIHTMLCollection*
HTMLTableElement::TBodies()
{
@ -389,7 +610,14 @@ HTMLTableElement::CreateTHead()
return head.forget();
}
void
NS_IMETHODIMP
HTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue)
{
nsRefPtr<nsGenericHTMLElement> thead = CreateTHead();
return thead ? CallQueryInterface(thead, aValue) : NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::DeleteTHead()
{
HTMLTableSectionElement* tHead = GetTHead();
@ -398,6 +626,8 @@ HTMLTableElement::DeleteTHead()
nsINode::RemoveChild(*tHead, rv);
MOZ_ASSERT(!rv.Failed());
}
return NS_OK;
}
already_AddRefed<nsGenericHTMLElement>
@ -420,7 +650,14 @@ HTMLTableElement::CreateTFoot()
return foot.forget();
}
void
NS_IMETHODIMP
HTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
{
nsRefPtr<nsGenericHTMLElement> tfoot = CreateTFoot();
return tfoot ? CallQueryInterface(tfoot, aValue) : NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::DeleteTFoot()
{
HTMLTableSectionElement* tFoot = GetTFoot();
@ -429,6 +666,8 @@ HTMLTableElement::DeleteTFoot()
nsINode::RemoveChild(*tFoot, rv);
MOZ_ASSERT(!rv.Failed());
}
return NS_OK;
}
already_AddRefed<nsGenericHTMLElement>
@ -451,7 +690,14 @@ HTMLTableElement::CreateCaption()
return caption.forget();
}
void
NS_IMETHODIMP
HTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue)
{
nsRefPtr<nsGenericHTMLElement> caption = CreateCaption();
return caption ? CallQueryInterface(caption, aValue) : NS_OK;
}
NS_IMETHODIMP
HTMLTableElement::DeleteCaption()
{
HTMLTableCaptionElement* caption = GetCaption();
@ -460,6 +706,8 @@ HTMLTableElement::DeleteCaption()
nsINode::RemoveChild(*caption, rv);
MOZ_ASSERT(!rv.Failed());
}
return NS_OK;
}
already_AddRefed<nsGenericHTMLElement>
@ -495,7 +743,7 @@ already_AddRefed<nsGenericHTMLElement>
HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
{
/* get the ref row at aIndex
if there is one,
if there is one,
get its parent
insert the new row just before the ref row
else
@ -600,6 +848,14 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
return newRow.forget();
}
NS_IMETHODIMP
HTMLTableElement::InsertRow(int32_t aIndex, nsIDOMHTMLElement** aValue)
{
ErrorResult rv;
nsRefPtr<nsGenericHTMLElement> newRow = InsertRow(aIndex, rv);
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(newRow, aValue);
}
void
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
{
@ -630,6 +886,14 @@ HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
row->RemoveFromParent();
}
NS_IMETHODIMP
HTMLTableElement::DeleteRow(int32_t aValue)
{
ErrorResult rv;
DeleteRow(aValue, rv);
return rv.ErrorCode();
}
static const nsAttrValue::EnumTable kFrameTable[] = {
{ "void", NS_STYLE_TABLE_FRAME_NONE },
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },

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

@ -39,6 +39,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLTableElement
NS_DECL_NSIDOMHTMLTABLEELEMENT
HTMLTableCaptionElement* GetCaption() const
{
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
@ -51,13 +54,8 @@ public:
nsINode::AppendChild(*aCaption, rv);
}
}
void DeleteTFoot();
already_AddRefed<nsGenericHTMLElement> CreateCaption();
void DeleteCaption();
HTMLTableSectionElement* GetTHead() const
{
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
@ -76,8 +74,6 @@ public:
}
already_AddRefed<nsGenericHTMLElement> CreateTHead();
void DeleteTHead();
HTMLTableSectionElement* GetTFoot() const
{
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));

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

@ -35,8 +35,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableRowElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLTableRowElement, Element)
// QueryInterface implementation for HTMLTableRowElement
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLTableRowElement,
nsIDOMHTMLTableRowElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
@ -44,16 +47,12 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableRowElement)
// protected method
HTMLTableSectionElement*
already_AddRefed<nsIDOMHTMLTableSectionElement>
HTMLTableRowElement::GetSection() const
{
nsIContent* parent = GetParent();
if (parent->IsHTML() && (parent->Tag() == nsGkAtoms::thead ||
parent->Tag() == nsGkAtoms::tbody ||
parent->Tag() == nsGkAtoms::tfoot)) {
return static_cast<HTMLTableSectionElement*>(parent);
}
return nullptr;
nsCOMPtr<nsIDOMHTMLTableSectionElement> section =
do_QueryInterface(GetParent());
return section.forget();
}
// protected method
@ -95,15 +94,25 @@ HTMLTableRowElement::RowIndex() const
return -1;
}
NS_IMETHODIMP
HTMLTableRowElement::GetRowIndex(int32_t* aValue)
{
*aValue = RowIndex();
return NS_OK;
}
int32_t
HTMLTableRowElement::SectionRowIndex() const
{
HTMLTableSectionElement* section = GetSection();
nsCOMPtr<nsIDOMHTMLTableSectionElement> section = GetSection();
if (!section) {
return -1;
}
nsCOMPtr<nsIHTMLCollection> coll = section->Rows();
nsCOMPtr<nsIDOMHTMLCollection> rows;
section->GetRows(getter_AddRefs(rows));
nsCOMPtr<nsIHTMLCollection> coll = do_QueryInterface(rows);
uint32_t numRows = coll->Length();
for (uint32_t i = 0; i < numRows; i++) {
if (coll->GetElementAt(i) == this) {
@ -114,6 +123,13 @@ HTMLTableRowElement::SectionRowIndex() const
return -1;
}
NS_IMETHODIMP
HTMLTableRowElement::GetSectionRowIndex(int32_t* aValue)
{
*aValue = SectionRowIndex();
return NS_OK;
}
static bool
IsCell(nsIContent *aContent, int32_t aNamespaceID,
nsIAtom* aAtom, void *aData)
@ -141,6 +157,13 @@ HTMLTableRowElement::Cells()
return mCells;
}
NS_IMETHODIMP
HTMLTableRowElement::GetCells(nsIDOMHTMLCollection** aValue)
{
NS_ADDREF(*aValue = Cells());
return NS_OK;
}
already_AddRefed<nsGenericHTMLElement>
HTMLTableRowElement::InsertCell(int32_t aIndex,
ErrorResult& aError)
@ -188,6 +211,14 @@ HTMLTableRowElement::InsertCell(int32_t aIndex,
return cell.forget();
}
NS_IMETHODIMP
HTMLTableRowElement::InsertCell(int32_t aIndex, nsIDOMHTMLElement** aValue)
{
ErrorResult rv;
nsRefPtr<nsGenericHTMLElement> cell = InsertCell(aIndex, rv);
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(cell, aValue);
}
void
HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
{
@ -220,6 +251,99 @@ HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
nsINode::RemoveChild(*cell, aError);
}
NS_IMETHODIMP
HTMLTableRowElement::DeleteCell(int32_t aValue)
{
ErrorResult rv;
DeleteCell(aValue, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::SetAlign(const nsAString& aAlign)
{
ErrorResult rv;
SetAlign(aAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::GetAlign(nsAString& aAlign)
{
nsString align;
GetAlign(align);
aAlign = align;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableRowElement::SetVAlign(const nsAString& aVAlign)
{
ErrorResult rv;
SetVAlign(aVAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::GetVAlign(nsAString& aVAlign)
{
nsString vAlign;
GetVAlign(vAlign);
aVAlign = vAlign;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableRowElement::SetCh(const nsAString& aCh)
{
ErrorResult rv;
SetCh(aCh, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::GetCh(nsAString& aCh)
{
nsString ch;
GetCh(ch);
aCh = ch;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableRowElement::SetChOff(const nsAString& aChOff)
{
ErrorResult rv;
SetChOff(aChOff, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::GetChOff(nsAString& aChOff)
{
nsString chOff;
GetChOff(chOff);
aChOff = chOff;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableRowElement::SetBgColor(const nsAString& aBgColor)
{
ErrorResult rv;
SetBgColor(aBgColor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableRowElement::GetBgColor(nsAString& aBgColor)
{
nsString bgColor;
GetBgColor(bgColor);
aBgColor = bgColor;
return NS_OK;
}
bool
HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,

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

@ -7,17 +7,17 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableRowElement.h"
class nsIDOMHTMLTableElement;
class nsIDOMHTMLTableSectionElement;
class nsContentList;
namespace mozilla {
namespace dom {
class HTMLTableSectionElement;
class HTMLTableRowElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLTableRowElement
{
public:
HTMLTableRowElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -39,6 +39,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLTableRowElement
NS_DECL_NSIDOMHTMLTABLEROWELEMENT
int32_t RowIndex() const;
int32_t SectionRowIndex() const;
nsIHTMLCollection* Cells();
@ -105,7 +108,7 @@ protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
HTMLTableSectionElement* GetSection() const;
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection() const;
HTMLTableElement* GetTable() const;
nsRefPtr<nsContentList> mCells;
};

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

@ -35,13 +35,84 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableSectionElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLTableSectionElement, Element)
// QueryInterface implementation for HTMLTableSectionElement
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLTableSectionElement,
nsIDOMHTMLTableSectionElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement)
NS_IMETHODIMP
HTMLTableSectionElement::SetAlign(const nsAString& aAlign)
{
ErrorResult rv;
SetAlign(aAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableSectionElement::GetAlign(nsAString& aAlign)
{
nsString align;
GetAlign(align);
aAlign = align;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableSectionElement::SetVAlign(const nsAString& aVAlign)
{
ErrorResult rv;
SetVAlign(aVAlign, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableSectionElement::GetVAlign(nsAString& aVAlign)
{
nsString vAlign;
GetVAlign(vAlign);
aVAlign = vAlign;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableSectionElement::SetCh(const nsAString& aCh)
{
ErrorResult rv;
SetCh(aCh, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableSectionElement::GetCh(nsAString& aCh)
{
nsString ch;
GetCh(ch);
aCh = ch;
return NS_OK;
}
NS_IMETHODIMP
HTMLTableSectionElement::SetChOff(const nsAString& aChOff)
{
ErrorResult rv;
SetChOff(aChOff, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLTableSectionElement::GetChOff(nsAString& aChOff)
{
nsString chOff;
GetChOff(chOff);
aChOff = chOff;
return NS_OK;
}
nsIHTMLCollection*
HTMLTableSectionElement::Rows()
{
@ -56,6 +127,13 @@ HTMLTableSectionElement::Rows()
return mRows;
}
NS_IMETHODIMP
HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue)
{
NS_ADDREF(*aValue = Rows());
return NS_OK;
}
already_AddRefed<nsGenericHTMLElement>
HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
{
@ -94,6 +172,15 @@ HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
return rowContent.forget();
}
NS_IMETHODIMP
HTMLTableSectionElement::InsertRow(int32_t aIndex,
nsIDOMHTMLElement** aValue)
{
ErrorResult rv;
nsRefPtr<nsGenericHTMLElement> row = InsertRow(aIndex, rv);
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(row, aValue);
}
void
HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
{
@ -126,6 +213,14 @@ HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
nsINode::RemoveChild(*row, aError);
}
NS_IMETHODIMP
HTMLTableSectionElement::DeleteRow(int32_t aValue)
{
ErrorResult rv;
DeleteRow(aValue, rv);
return rv.ErrorCode();
}
bool
HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
@ -160,7 +255,7 @@ HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
@ -199,7 +294,7 @@ NS_IMETHODIMP_(bool)
HTMLTableSectionElement::IsAttributeMapped(const nsIAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ &nsGkAtoms::align },
{ &nsGkAtoms::valign },
{ &nsGkAtoms::height },
{ nullptr }

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

@ -7,13 +7,14 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableSectionElement.h"
#include "nsContentList.h" // For ctor.
namespace mozilla {
namespace dom {
class HTMLTableSectionElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
public nsIDOMHTMLTableSectionElement
{
public:
HTMLTableSectionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -33,6 +34,9 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLTableSectionElement
NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT
nsIHTMLCollection* Rows();
already_AddRefed<nsGenericHTMLElement>
InsertRow(int32_t aIndex, ErrorResult& aError);

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

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsDocument.h"
#include "mozilla/dom/HTMLUnknownElement.h"
#include "HTMLUnknownElement.h"
#include "mozilla/dom/HTMLElementBinding.h"
NS_IMPL_NS_NEW_HTML_ELEMENT(Unknown)
@ -35,8 +35,11 @@ HTMLUnknownElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
}
// QueryInterface implementation for HTMLUnknownElement
NS_INTERFACE_MAP_BEGIN(HTMLUnknownElement)
NS_INTERFACE_TABLE_HEAD(HTMLUnknownElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLUnknownElement,
nsIDOMHTMLUnknownElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLUnknownElement)

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

@ -2,17 +2,18 @@
/* 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/. */
#ifndef mozilla_dom_HTMLUnknownElement_h
#define mozilla_dom_HTMLUnknownElement_h
#ifndef HTMLUnknownElement_h___
#define HTMLUnknownElement_h___
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLUnknownElement.h"
namespace mozilla {
namespace dom {
class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement
, public nsIDOMHTMLElement
, public nsIDOMHTMLUnknownElement
{
public:
HTMLUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -47,4 +48,4 @@ protected:
} // namespace dom
} // namespace mozilla
#endif /* mozilla_dom_HTMLUnknownElement_h */
#endif /* HTMLUnknownElement_h___ */

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

@ -244,9 +244,13 @@ for (var tag of allTags) {
if (classInfoString != 'HTMLUnknownElement') {
is(node instanceof HTMLUnknownElement, false,
tagName(tag) + " is an instance of HTMLUnknownElement");
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, false,
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
} else {
is(node instanceof HTMLUnknownElement, true,
tagName(tag) + " is an instance of HTMLUnknownElement");
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, true,
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
}
// Check that each node QIs to all the things we expect it to QI to

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

@ -184,7 +184,6 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
if (NS_SUCCEEDED(rv)) {
// Successfully get the copy of final container data from writer.
reloop = false;
break;
}
} else {
// No more headers, starts to encode tracks.
@ -219,7 +218,6 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
if (NS_SUCCEEDED(rv)) {
// Successfully get the copy of final container data from writer.
reloop = false;
break;
}
mState = (mAudioEncoder->IsEncodingComplete()) ? ENCODE_DONE : ENCODE_TRACK;

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

@ -183,7 +183,7 @@ OpusTrackEncoder::GetHeader(nsTArray<uint8_t>* aOutput)
}
}
if (mCanceled) {
if (mCanceled || mDoneEncoding) {
return NS_ERROR_FAILURE;
}
@ -242,7 +242,7 @@ OpusTrackEncoder::GetEncodedTrack(nsTArray<uint8_t>* aOutput,
mReentrantMonitor.Wait();
}
if (mCanceled) {
if (mCanceled || mDoneEncoding) {
return NS_ERROR_FAILURE;
}

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

@ -16,7 +16,8 @@
namespace mozilla {
#define MAX_FRAMES_TO_DROP 48000
static const int DEFAULT_CHANNELS = 1;
static const int DEFAULT_SAMPLING_RATE = 16000;
void
AudioTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
@ -34,16 +35,25 @@ AudioTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
AudioSegment::ChunkIterator iter(*audio);
while (!iter.IsEnded()) {
AudioChunk chunk = *iter;
if (chunk.mBuffer) {
Init(chunk.mChannelData.Length(), aTrackRate);
break;
// The number of channels is determined by the first non-null chunk, and
// thus the audio encoder is initialized at this time.
if (!chunk.IsNull()) {
nsresult rv = Init(chunk.mChannelData.Length(), aTrackRate);
if (NS_SUCCEEDED(rv)) {
break;
}
} else {
mSilentDuration += chunk.mDuration;
}
iter.Next();
}
}
// Append and consume this raw segment.
AppendAudioSegment(audio);
if (mInitialized) {
AppendAudioSegment(audio);
}
// The stream has stopped and reached the end of track.
if (aTrackEvents == MediaStreamListener::TRACK_EVENT_ENDED) {
@ -57,35 +67,42 @@ AudioTrackEncoder::NotifyRemoved(MediaStreamGraph* aGraph)
{
// In case that MediaEncoder does not receive a TRACK_EVENT_ENDED event.
LOG("[AudioTrackEncoder]: NotifyRemoved.");
// If source audio chunks are completely silent till the end of encoding,
// initialize the encoder with default channel counts and sampling rate, and
// append this many null data to the segment of track encoder.
if (!mInitialized && mSilentDuration > 0) {
Init(DEFAULT_CHANNELS, DEFAULT_SAMPLING_RATE);
mRawSegment->AppendNullData(mSilentDuration);
mSilentDuration = 0;
}
NotifyEndOfStream();
}
nsresult
AudioTrackEncoder::AppendAudioSegment(MediaSegment* aSegment)
{
// Drop the in-coming segment if buffer(mRawSegment) is overflow.
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
AudioSegment* audio = static_cast<AudioSegment*>(aSegment);
AudioSegment::ChunkIterator iter(*audio);
if (mRawSegment->GetDuration() < MAX_FRAMES_TO_DROP) {
while(!iter.IsEnded()) {
AudioChunk chunk = *iter;
if (chunk.mBuffer) {
mRawSegment->AppendAndConsumeChunk(&chunk);
}
iter.Next();
}
if (mRawSegment->GetDuration() >= GetPacketDuration()) {
mReentrantMonitor.NotifyAll();
}
// Append this many null data to our queued segment if there is a complete
// silence before the audio track encoder has initialized.
if (mSilentDuration > 0) {
mRawSegment->AppendNullData(mSilentDuration);
mSilentDuration = 0;
}
#ifdef DEBUG
else {
LOG("[AudioTrackEncoder]: A segment has dropped!");
while (!iter.IsEnded()) {
AudioChunk chunk = *iter;
// Append and consume both non-null and null chunks.
mRawSegment->AppendAndConsumeChunk(&chunk);
iter.Next();
}
if (mRawSegment->GetDuration() >= GetPacketDuration()) {
mReentrantMonitor.NotifyAll();
}
#endif
return NS_OK;
}

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

@ -74,6 +74,7 @@ public:
, mRawSegment(new AudioSegment())
, mEndOfStream(false)
, mCanceled(false)
, mSilentDuration(0)
{}
void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
@ -176,6 +177,12 @@ protected:
* mReentrantMonitor.
*/
bool mCanceled;
/**
* The total duration of null chunks we have received from MediaStreamGraph
* before initializing the audio track encoder.
*/
TrackTicks mSilentDuration;
};
class VideoTrackEncoder : public TrackEncoder

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

@ -37,6 +37,7 @@ function goToNext(v) {
function initTest(test, token) {
var v = document.createElement('video');
v.preload = "metadata";
v.token = token;
manager.started(token);
v._state = 0;

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

@ -72,6 +72,7 @@ function ended(e) {
function startTest(test, token) {
var v = document.createElement('video');
v.preload = "metadata";
v.token = token;
manager.started(token);

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

@ -45,6 +45,7 @@ function stopped(event) {
function startTest(test, token) {
var v = document.createElement('video');
v.preload = "metadata";
v.token = token;
manager.started(token);
v.src = test.name;

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

@ -45,10 +45,10 @@ function onMetaData(id) {
]]>
</script>
<video id='a1' onloadedmetadata="onMetaData('a1');"><sauce/><source type="bad" src="404" onerror="onError(event, 'a1');"/></video>
<video id='a2' onloadedmetadata="onMetaData('a2');"><source onerror="onError(event, 'a2');"/></video>
<video id='a3' onloadedmetadata="onMetaData('a3');"><html:source onerror="onError(event, 'a3');"/></video>
<video id='a4' onloadedmetadata="onMetaData('a4');"><svg:source/><source onerror="onError(event, 'a4');" type="bad" src="404"/></video>
<video id="a1" preload="metadata" onloadedmetadata="onMetaData('a1');"><sauce/><source type="bad" src="404" onerror="onError(event, 'a1');"/></video>
<video id="a2" preload="metadata" onloadedmetadata="onMetaData('a2');"><source onerror="onError(event, 'a2');"/></video>
<video id="a3" preload="metadata" onloadedmetadata="onMetaData('a3');"><html:source onerror="onError(event, 'a3');"/></video>
<video id="a4" preload="metadata" onloadedmetadata="onMetaData('a4');"><svg:source/><source onerror="onError(event, 'a4');" type="bad" src="404"/></video>
<script class="testbody" type="text/javascript">
<![CDATA[

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

@ -47,6 +47,7 @@ function initTest(test, token) {
var v = document.createElement(type);
if (!v.canPlayType(test.type))
return;
v.preload = "metadata";
v.token = token;
manager.started(token);
v._name = test.name;

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

@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=686137
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686137">Mozilla Bug 686137</a>
<audio id='a1' controls muted></audio>
<audio id="a1" controls muted preload="metadata"></audio>
<pre id="test">
<script class="testbody" type="text/javascript">

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration1.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration2.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration3.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration4.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration5.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration6.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -25,6 +25,7 @@ SimpleTest.waitForExplicitFinish();
</script>
</pre>
<video id='v'
preload="metadata"
src='contentDuration7.sjs'
onloadedmetadata='on_metadataloaded();'></video>
</body>

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

@ -11,8 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=448600
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448600">Mozilla Bug 448600</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
@ -25,16 +24,6 @@ function e(id) {
return document.getElementById(id);
}
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
var branch = prefService.getBranch("media.");
var gOldOggPref = branch.getBoolPref("ogg.enabled");
var gOldWavePref = branch.getBoolPref("wave.enabled");
branch.setBoolPref("ogg.enabled", false);
branch.setBoolPref("wave.enabled", false);
var gLoadError = new Object();
gLoadError['video1'] = 0;
@ -59,11 +48,6 @@ function finishTest() {
is(gLoadError['video1'], 2, "Expect one error per invalid source child on video1");
is(gLoadError['video2'], 1, "Expect one error on video2");
is(gLoadError['video3'], 1, "Expect one error on video3");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
branch.setBoolPref("ogg.enabled", gOldOggPref);
branch.setBoolPref("wave.enabled", gOldWavePref);
SimpleTest.finish();
}
@ -78,13 +62,15 @@ function videoError(event, id) {
</script>
<!-- We make the resource URIs unique to ensure that they are (re)loaded with the new disable-decoder prefs. -->
<video id="video1">
<source type="video/ogg" src="320x240.ogv?decoder_disabled=1" onerror="videoError(event, 'video1');"/>
<source type="audio/wave" src="r11025_u8_c1.wav?decoder_disabled=1" id='s2' onerror="videoError(event, 'video1');"/>
</video>
<div id="content">
</div>
<script>
function makeVideos() {
document.getElementById('content').innerHTML = '<video id="video1" preload="metadata"><source type="video/ogg" src="320x240.ogv?decoder_disabled=1" onerror="videoError(event, \'video1\');"/><source type="audio/wave" src="r11025_u8_c1.wav?decoder_disabled=1" id=\'s2\' onerror="videoError(event, \'video1\');"/></video><video id="video2" preload="metadata" src="320x240.ogv?decoder_disabled=2" onerror="videoError(event, \'video2\');"></video><video id="video3" preload="metadata" src="r11025_u8_c1.wav?decoder_disabled=2" onerror="videoError(event, \'video3\');"></video>';
}
<video id="video2" src="320x240.ogv?decoder_disabled=2" onerror="videoError(event, 'video2');"></video>
<video id="video3" src="r11025_u8_c1.wav?decoder_disabled=2" onerror="videoError(event, 'video3');"></video>
SpecialPowers.pushPrefEnv({"set": [["media.ogg.enabled", false], ["media.wave.enabled", false]]}, makeVideos);
</script>
</pre>

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

@ -101,6 +101,7 @@ function createTestArray() {
function startTest(test, token) {
var v = document.createElement('video');
manager.started(token);
v.preload = "metadata";
v.src = test.name;
v.token = token;
v.controls = true;

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

@ -65,6 +65,7 @@ function startTest(test, token) {
}
var v = document.createElement('video');
manager.started(token);
v.preload = "metadata";
v.src = test.name;
v.token = token;
v.controls = true;

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

@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=490705
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=490705">Mozilla Bug 490705</a>
<!-- mute audio, since there is no need to hear the sound for these tests -->
<audio id='a1' controls></audio>
<audio id="a1" preload="metadata" controls></audio>
<pre id="test">
<script class="testbody" type="text/javascript">

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

@ -14,6 +14,7 @@ var manager = new MediaTestManager;
function maketest(attach_media, name, type, check_metadata) {
return function (token) {
var e = document.createElement('video');
e.preload = "metadata";
manager.started(token);
var errorRun = false;
if (check_metadata) {

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

@ -14,6 +14,7 @@ var manager = new MediaTestManager;
function startTest(test, token) {
var v = document.createElement('video');
v.preload = "metadata";
v.token = token;
manager.started(token);
v.src = test.name;

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

@ -14,6 +14,7 @@ var manager = new MediaTestManager;
function startTest(test, token) {
var v = document.createElement('video');
v.preload = "metadata";
v.token = token;
manager.started(token);

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