mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to b2g-inbound
This commit is contained in:
commit
282cfebe9d
4
CLOBBER
4
CLOBBER
@ -22,6 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Bug 1033481 - Use a .mozbuild file rather than a .mk in
|
||||
m/a/tests/background/junit3 -- doesn't clean the classes* directory
|
||||
when moving from in APK to in JAR building.
|
||||
Bug 1024707 - It seems like changing 3 uuids is just too much!
|
@ -167,7 +167,7 @@ endif
|
||||
endif
|
||||
|
||||
default all::
|
||||
$(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),$(if $(MOZ_PSEUDO_DERECURSE),compile ))libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS)))
|
||||
$(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),compile )libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS)))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@ -309,11 +309,9 @@ config/export:
|
||||
|
||||
endif
|
||||
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
# Interdependencies for parallel export.
|
||||
js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export
|
||||
accessible/xpcom/export: xpcom/xpidl/export
|
||||
ifdef ENABLE_CLANG_PLUGIN
|
||||
js/src/export config/export: build/clang-plugin/export
|
||||
endif
|
||||
endif
|
||||
|
@ -459,6 +459,18 @@ pref("services.push.retryBaseInterval", 5000);
|
||||
pref("services.push.pingInterval", 1800000); // 30 minutes
|
||||
// How long before a DOMRequest errors as timeout
|
||||
pref("services.push.requestTimeout", 10000);
|
||||
pref("services.push.pingInterval.default", 180000);// 3 min
|
||||
pref("services.push.pingInterval.mobile", 180000); // 3 min
|
||||
pref("services.push.pingInterval.wifi", 180000); // 3 min
|
||||
// Adaptive ping
|
||||
pref("services.push.adaptive.enabled", true);
|
||||
pref("services.push.adaptive.lastGoodPingInterval", 180000);// 3 min
|
||||
pref("services.push.adaptive.lastGoodPingInterval.mobile", 180000);// 3 min
|
||||
pref("services.push.adaptive.lastGoodPingInterval.wifi", 180000);// 3 min
|
||||
// Valid gap between the biggest good ping and the bad ping
|
||||
pref("services.push.adaptive.gap", 60000); // 1 minute
|
||||
// We limit the ping to this maximum value
|
||||
pref("services.push.adaptive.upperLimit", 1740000); // 29 min
|
||||
// enable udp wakeup support
|
||||
pref("services.push.udp.wakeupEnabled", true);
|
||||
// This value should be the prefix to be added to the current PDP context[1]
|
||||
|
@ -11,8 +11,11 @@ Cu.import("resource://services-common/utils.js");
|
||||
Cu.import("resource://testing-common/httpd.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsMgmtService",
|
||||
"resource://gre/modules/FxAccountsMgmtService.jsm",
|
||||
"FxAccountsMgmtService");
|
||||
"resource://gre/modules/FxAccountsMgmtService.jsm",
|
||||
"FxAccountsMgmtService");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsManager",
|
||||
"resource://gre/modules/FxAccountsManager.jsm");
|
||||
|
||||
// At end of test, restore original state
|
||||
const ORIGINAL_AUTH_URI = Services.prefs.getCharPref("identity.fxaccounts.auth.uri");
|
||||
@ -158,6 +161,22 @@ add_test(function test_invalidEmailCase_signIn() {
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function testHandleGetAssertionError_defaultCase() {
|
||||
do_test_pending();
|
||||
|
||||
FxAccountsManager.getAssertion(null).then(
|
||||
success => {
|
||||
// getAssertion should throw with invalid audience
|
||||
ok(false);
|
||||
},
|
||||
reason => {
|
||||
equal("INVALID_AUDIENCE", reason.error);
|
||||
do_test_finished();
|
||||
run_next_test();
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
// End of tests
|
||||
// Utility functions follow
|
||||
|
||||
|
@ -23,7 +23,9 @@ DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
||||
# Set MSVC dlls version to package, if any.
|
||||
ifdef WIN32_REDIST_DIR
|
||||
ifdef MOZ_NO_DEBUG_RTL
|
||||
DEFINES += -DMOZ_MSVC_REDIST=$(_MSC_VER)
|
||||
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
|
||||
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
|
||||
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -69,15 +69,9 @@
|
||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
||||
#endif
|
||||
#ifdef XP_WIN32
|
||||
#if MOZ_MSVC_REDIST == 1600
|
||||
@BINPATH@/msvcp100.dll
|
||||
@BINPATH@/msvcr100.dll
|
||||
#elif MOZ_MSVC_REDIST == 1700
|
||||
@BINPATH@/msvcp110.dll
|
||||
@BINPATH@/msvcr110.dll
|
||||
#elif MOZ_MSVC_REDIST == 1800
|
||||
@BINPATH@/msvcp120.dll
|
||||
@BINPATH@/msvcr120.dll
|
||||
#if MOZ_PACKAGE_MSVC_DLLS
|
||||
@BINPATH@/@MSVC_C_RUNTIME_DLL@
|
||||
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_SHARED_MOZGLUE
|
||||
|
@ -495,7 +495,10 @@ var gPluginHandler = {
|
||||
if (this.getPluginUI(plugin, "submitURLOptIn").checked)
|
||||
keyVals.PluginContentURL = plugin.ownerDocument.URL;
|
||||
}
|
||||
this.CrashSubmit.submit(pluginDumpID, { extraExtraKeyVals: keyVals });
|
||||
|
||||
let pluginProcessType = Services.crashmanager.PROCESS_TYPE_PLUGIN;
|
||||
this.CrashSubmit.submit(pluginDumpID, { processType: pluginProcessType,
|
||||
extraExtraKeyVals: keyVals });
|
||||
if (browserDumpID)
|
||||
this.CrashSubmit.submit(browserDumpID);
|
||||
},
|
||||
|
@ -41,6 +41,9 @@ function runTests() {
|
||||
yield whenPagesUpdated(null, true);
|
||||
yield addNewTabPageTab();
|
||||
checkGrid("2,1,3,4,,,,,");
|
||||
|
||||
// Make sure these added links have the right type
|
||||
is(getCell(1).site.link.type, "history", "added link is history");
|
||||
}
|
||||
|
||||
function link(id) {
|
||||
|
@ -22,26 +22,81 @@ loop.panel = (function(_, mozL10n) {
|
||||
var router;
|
||||
|
||||
/**
|
||||
* Do not disturb panel subview.
|
||||
* Availability drop down menu subview.
|
||||
*/
|
||||
var DoNotDisturb = React.createClass({displayName: 'DoNotDisturb',
|
||||
var AvailabilityDropdown = React.createClass({displayName: 'AvailabilityDropdown',
|
||||
getInitialState: function() {
|
||||
return {doNotDisturb: navigator.mozLoop.doNotDisturb};
|
||||
return {
|
||||
doNotDisturb: navigator.mozLoop.doNotDisturb,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
handleCheckboxChange: function() {
|
||||
// Note: side effect!
|
||||
navigator.mozLoop.doNotDisturb = !navigator.mozLoop.doNotDisturb;
|
||||
this.setState({doNotDisturb: navigator.mozLoop.doNotDisturb});
|
||||
showDropdownMenu: function() {
|
||||
this.setState({showMenu: true});
|
||||
},
|
||||
|
||||
hideDropdownMenu: function() {
|
||||
this.setState({showMenu: false});
|
||||
},
|
||||
|
||||
// XXX target event can either be the li, the span or the i tag
|
||||
// this makes it easier to figure out the target by making a
|
||||
// closure with the desired status already passed in.
|
||||
changeAvailability: function(newAvailabilty) {
|
||||
return function(event) {
|
||||
// Note: side effect!
|
||||
switch (newAvailabilty) {
|
||||
case 'available':
|
||||
this.setState({doNotDisturb: false});
|
||||
navigator.mozLoop.doNotDisturb = false;
|
||||
break;
|
||||
case 'do-not-disturb':
|
||||
this.setState({doNotDisturb: true});
|
||||
navigator.mozLoop.doNotDisturb = true;
|
||||
break;
|
||||
}
|
||||
this.hideDropdownMenu();
|
||||
}.bind(this);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// XXX https://github.com/facebook/react/issues/310 for === htmlFor
|
||||
var cx = React.addons.classSet;
|
||||
var availabilityStatus = cx({
|
||||
'status': true,
|
||||
'status-dnd': this.state.doNotDisturb,
|
||||
'status-available': !this.state.doNotDisturb
|
||||
});
|
||||
var availabilityDropdown = cx({
|
||||
'dnd-menu': true,
|
||||
'hide': !this.state.showMenu
|
||||
});
|
||||
var availabilityText = this.state.doNotDisturb ?
|
||||
__("display_name_dnd_status") :
|
||||
__("display_name_available_status");
|
||||
|
||||
return (
|
||||
React.DOM.p( {className:"dnd"},
|
||||
React.DOM.input( {type:"checkbox", checked:this.state.doNotDisturb,
|
||||
id:"dnd-component", onChange:this.handleCheckboxChange} ),
|
||||
React.DOM.label( {htmlFor:"dnd-component"}, __("do_not_disturb"))
|
||||
React.DOM.div( {className:"footer component-spacer"},
|
||||
React.DOM.div( {className:"do-not-disturb"},
|
||||
React.DOM.p( {className:"dnd-status", onClick:this.showDropdownMenu},
|
||||
React.DOM.span(null, availabilityText),
|
||||
React.DOM.i( {className:availabilityStatus})
|
||||
),
|
||||
React.DOM.ul( {className:availabilityDropdown,
|
||||
onMouseLeave:this.hideDropdownMenu},
|
||||
React.DOM.li( {onClick:this.changeAvailability("available"),
|
||||
className:"dnd-menu-item dnd-make-available"},
|
||||
React.DOM.i( {className:"status status-available"}),
|
||||
React.DOM.span(null, __("display_name_available_status"))
|
||||
),
|
||||
React.DOM.li( {onClick:this.changeAvailability("do-not-disturb"),
|
||||
className:"dnd-menu-item dnd-make-unavailable"},
|
||||
React.DOM.i( {className:"status status-dnd"}),
|
||||
React.DOM.span(null, __("display_name_dnd_status"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -60,7 +115,7 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
if (!this.state.seenToS) {
|
||||
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
||||
return React.DOM.p( {className:"tos",
|
||||
return React.DOM.p( {className:"terms-service",
|
||||
dangerouslySetInnerHTML:{__html: tosHTML}});
|
||||
} else {
|
||||
return React.DOM.div(null );
|
||||
@ -75,9 +130,9 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
React.DOM.div( {className:"share generate-url"},
|
||||
React.DOM.div( {className:"component-spacer share generate-url"},
|
||||
React.DOM.div( {className:"description"},
|
||||
React.DOM.p(null, this.props.summary)
|
||||
React.DOM.p( {className:"description-content"}, this.props.summary)
|
||||
),
|
||||
React.DOM.div( {className:"action"},
|
||||
this.props.children
|
||||
@ -88,61 +143,27 @@ loop.panel = (function(_, mozL10n) {
|
||||
});
|
||||
|
||||
var CallUrlResult = React.createClass({displayName: 'CallUrlResult',
|
||||
propTypes: {
|
||||
callUrl: React.PropTypes.string.isRequired,
|
||||
retry: React.PropTypes.func.isRequired
|
||||
},
|
||||
|
||||
handleButtonClick: function() {
|
||||
this.props.retry();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// XXX setting elem value from a state (in the callUrl input)
|
||||
// makes it immutable ie read only but that is fine in our case.
|
||||
// readOnly attr will suppress a warning regarding this issue
|
||||
// from the react lib.
|
||||
return (
|
||||
PanelLayout( {summary:__("share_link_url")},
|
||||
React.DOM.div( {className:"invite"},
|
||||
React.DOM.input( {type:"url", value:this.props.callUrl, readOnly:"true"} ),
|
||||
React.DOM.button( {onClick:this.handleButtonClick,
|
||||
className:"btn btn-success"}, __("new_url"))
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
var CallUrlForm = React.createClass({displayName: 'CallUrlForm',
|
||||
propTypes: {
|
||||
client: React.PropTypes.object.isRequired,
|
||||
notifier: React.PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
pending: false,
|
||||
disabled: true,
|
||||
callUrl: false
|
||||
callUrl: ''
|
||||
};
|
||||
},
|
||||
|
||||
retry: function() {
|
||||
this.setState(this.getInitialState());
|
||||
/**
|
||||
* Returns a random 5 character string used to identify
|
||||
* the conversation.
|
||||
* XXX this will go away once the backend changes
|
||||
*/
|
||||
conversationIdentifier: function() {
|
||||
return Math.random().toString(36).substring(5);
|
||||
},
|
||||
|
||||
handleTextChange: function(event) {
|
||||
this.setState({disabled: !event.currentTarget.value});
|
||||
},
|
||||
|
||||
handleFormSubmit: function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
componentDidMount: function() {
|
||||
this.setState({pending: true});
|
||||
|
||||
this.props.client.requestCallUrl(
|
||||
this.refs.caller.getDOMNode().value, this._onCallUrlReceived);
|
||||
this.props.client.requestCallUrl(this.conversationIdentifier(),
|
||||
this._onCallUrlReceived);
|
||||
},
|
||||
|
||||
_onCallUrlReceived: function(err, callUrlData) {
|
||||
@ -160,30 +181,17 @@ loop.panel = (function(_, mozL10n) {
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// If we have a call url, render result
|
||||
if (this.state.callUrl) {
|
||||
return (
|
||||
CallUrlResult( {callUrl:this.state.callUrl, retry:this.retry})
|
||||
);
|
||||
}
|
||||
|
||||
// If we don't display the form
|
||||
// XXX setting elem value from a state (in the callUrl input)
|
||||
// makes it immutable ie read only but that is fine in our case.
|
||||
// readOnly attr will suppress a warning regarding this issue
|
||||
// from the react lib.
|
||||
var cx = React.addons.classSet;
|
||||
return (
|
||||
PanelLayout( {summary:__("get_link_to_share")},
|
||||
React.DOM.form( {className:"invite", onSubmit:this.handleFormSubmit},
|
||||
|
||||
React.DOM.input( {type:"text", name:"caller", ref:"caller", required:"required",
|
||||
className:cx({'pending': this.state.pending}),
|
||||
onChange:this.handleTextChange,
|
||||
placeholder:__("call_identifier_textinput_placeholder")} ),
|
||||
|
||||
React.DOM.button( {type:"submit", className:"get-url btn btn-success",
|
||||
disabled:this.state.disabled},
|
||||
__("get_a_call_url")
|
||||
)
|
||||
),
|
||||
ToSView(null )
|
||||
PanelLayout( {summary:__("share_link_header_text")},
|
||||
React.DOM.div( {className:"invite"},
|
||||
React.DOM.input( {type:"url", value:this.state.callUrl, readOnly:"true",
|
||||
className:cx({'pending': this.state.pending})} )
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -201,9 +209,10 @@ loop.panel = (function(_, mozL10n) {
|
||||
render: function() {
|
||||
return (
|
||||
React.DOM.div(null,
|
||||
CallUrlForm( {client:this.props.client,
|
||||
CallUrlResult( {client:this.props.client,
|
||||
notifier:this.props.notifier} ),
|
||||
DoNotDisturb(null )
|
||||
ToSView(null ),
|
||||
AvailabilityDropdown(null )
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -229,7 +238,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
this._registerVisibilityChangeEvent();
|
||||
|
||||
this.on("panel:open panel:closed", this.reset, this);
|
||||
this.on("panel:open panel:closed", this.clearNotifications, this);
|
||||
this.on("panel:open", this.reset, this);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -242,6 +252,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
* @link http://www.w3.org/TR/page-visibility/
|
||||
*/
|
||||
_registerVisibilityChangeEvent: function() {
|
||||
// XXX pass in the visibility status to detect when to generate a new
|
||||
// panel view
|
||||
this.document.addEventListener("visibilitychange", function(event) {
|
||||
this.trigger(event.currentTarget.hidden ? "panel:closed"
|
||||
: "panel:open");
|
||||
@ -255,6 +267,10 @@ loop.panel = (function(_, mozL10n) {
|
||||
this.reset();
|
||||
},
|
||||
|
||||
clearNotifications: function() {
|
||||
this._notifier.clear();
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets this router to its initial state.
|
||||
*/
|
||||
@ -290,8 +306,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
return {
|
||||
init: init,
|
||||
DoNotDisturb: DoNotDisturb,
|
||||
CallUrlForm: CallUrlForm,
|
||||
AvailabilityDropdown: AvailabilityDropdown,
|
||||
CallUrlResult: CallUrlResult,
|
||||
PanelView: PanelView,
|
||||
PanelRouter: PanelRouter,
|
||||
ToSView: ToSView
|
||||
|
@ -22,27 +22,82 @@ loop.panel = (function(_, mozL10n) {
|
||||
var router;
|
||||
|
||||
/**
|
||||
* Do not disturb panel subview.
|
||||
* Availability drop down menu subview.
|
||||
*/
|
||||
var DoNotDisturb = React.createClass({
|
||||
var AvailabilityDropdown = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {doNotDisturb: navigator.mozLoop.doNotDisturb};
|
||||
return {
|
||||
doNotDisturb: navigator.mozLoop.doNotDisturb,
|
||||
showMenu: false
|
||||
};
|
||||
},
|
||||
|
||||
handleCheckboxChange: function() {
|
||||
// Note: side effect!
|
||||
navigator.mozLoop.doNotDisturb = !navigator.mozLoop.doNotDisturb;
|
||||
this.setState({doNotDisturb: navigator.mozLoop.doNotDisturb});
|
||||
showDropdownMenu: function() {
|
||||
this.setState({showMenu: true});
|
||||
},
|
||||
|
||||
hideDropdownMenu: function() {
|
||||
this.setState({showMenu: false});
|
||||
},
|
||||
|
||||
// XXX target event can either be the li, the span or the i tag
|
||||
// this makes it easier to figure out the target by making a
|
||||
// closure with the desired status already passed in.
|
||||
changeAvailability: function(newAvailabilty) {
|
||||
return function(event) {
|
||||
// Note: side effect!
|
||||
switch (newAvailabilty) {
|
||||
case 'available':
|
||||
this.setState({doNotDisturb: false});
|
||||
navigator.mozLoop.doNotDisturb = false;
|
||||
break;
|
||||
case 'do-not-disturb':
|
||||
this.setState({doNotDisturb: true});
|
||||
navigator.mozLoop.doNotDisturb = true;
|
||||
break;
|
||||
}
|
||||
this.hideDropdownMenu();
|
||||
}.bind(this);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// XXX https://github.com/facebook/react/issues/310 for === htmlFor
|
||||
var cx = React.addons.classSet;
|
||||
var availabilityStatus = cx({
|
||||
'status': true,
|
||||
'status-dnd': this.state.doNotDisturb,
|
||||
'status-available': !this.state.doNotDisturb
|
||||
});
|
||||
var availabilityDropdown = cx({
|
||||
'dnd-menu': true,
|
||||
'hide': !this.state.showMenu
|
||||
});
|
||||
var availabilityText = this.state.doNotDisturb ?
|
||||
__("display_name_dnd_status") :
|
||||
__("display_name_available_status");
|
||||
|
||||
return (
|
||||
<p className="dnd">
|
||||
<input type="checkbox" checked={this.state.doNotDisturb}
|
||||
id="dnd-component" onChange={this.handleCheckboxChange} />
|
||||
<label htmlFor="dnd-component">{__("do_not_disturb")}</label>
|
||||
</p>
|
||||
<div className="footer component-spacer">
|
||||
<div className="do-not-disturb">
|
||||
<p className="dnd-status" onClick={this.showDropdownMenu}>
|
||||
<span>{availabilityText}</span>
|
||||
<i className={availabilityStatus}></i>
|
||||
</p>
|
||||
<ul className={availabilityDropdown}
|
||||
onMouseLeave={this.hideDropdownMenu}>
|
||||
<li onClick={this.changeAvailability("available")}
|
||||
className="dnd-menu-item dnd-make-available">
|
||||
<i className="status status-available"></i>
|
||||
<span>{__("display_name_available_status")}</span>
|
||||
</li>
|
||||
<li onClick={this.changeAvailability("do-not-disturb")}
|
||||
className="dnd-menu-item dnd-make-unavailable">
|
||||
<i className="status status-dnd"></i>
|
||||
<span>{__("display_name_dnd_status")}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -60,7 +115,7 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
if (!this.state.seenToS) {
|
||||
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
||||
return <p className="tos"
|
||||
return <p className="terms-service"
|
||||
dangerouslySetInnerHTML={{__html: tosHTML}}></p>;
|
||||
} else {
|
||||
return <div />;
|
||||
@ -75,9 +130,9 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="share generate-url">
|
||||
<div className="component-spacer share generate-url">
|
||||
<div className="description">
|
||||
<p>{this.props.summary}</p>
|
||||
<p className="description-content">{this.props.summary}</p>
|
||||
</div>
|
||||
<div className="action">
|
||||
{this.props.children}
|
||||
@ -88,61 +143,27 @@ loop.panel = (function(_, mozL10n) {
|
||||
});
|
||||
|
||||
var CallUrlResult = React.createClass({
|
||||
propTypes: {
|
||||
callUrl: React.PropTypes.string.isRequired,
|
||||
retry: React.PropTypes.func.isRequired
|
||||
},
|
||||
|
||||
handleButtonClick: function() {
|
||||
this.props.retry();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// XXX setting elem value from a state (in the callUrl input)
|
||||
// makes it immutable ie read only but that is fine in our case.
|
||||
// readOnly attr will suppress a warning regarding this issue
|
||||
// from the react lib.
|
||||
return (
|
||||
<PanelLayout summary={__("share_link_url")}>
|
||||
<div className="invite">
|
||||
<input type="url" value={this.props.callUrl} readOnly="true" />
|
||||
<button onClick={this.handleButtonClick}
|
||||
className="btn btn-success">{__("new_url")}</button>
|
||||
</div>
|
||||
</PanelLayout>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
var CallUrlForm = React.createClass({
|
||||
propTypes: {
|
||||
client: React.PropTypes.object.isRequired,
|
||||
notifier: React.PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
pending: false,
|
||||
disabled: true,
|
||||
callUrl: false
|
||||
callUrl: ''
|
||||
};
|
||||
},
|
||||
|
||||
retry: function() {
|
||||
this.setState(this.getInitialState());
|
||||
/**
|
||||
* Returns a random 5 character string used to identify
|
||||
* the conversation.
|
||||
* XXX this will go away once the backend changes
|
||||
*/
|
||||
conversationIdentifier: function() {
|
||||
return Math.random().toString(36).substring(5);
|
||||
},
|
||||
|
||||
handleTextChange: function(event) {
|
||||
this.setState({disabled: !event.currentTarget.value});
|
||||
},
|
||||
|
||||
handleFormSubmit: function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
componentDidMount: function() {
|
||||
this.setState({pending: true});
|
||||
|
||||
this.props.client.requestCallUrl(
|
||||
this.refs.caller.getDOMNode().value, this._onCallUrlReceived);
|
||||
this.props.client.requestCallUrl(this.conversationIdentifier(),
|
||||
this._onCallUrlReceived);
|
||||
},
|
||||
|
||||
_onCallUrlReceived: function(err, callUrlData) {
|
||||
@ -160,30 +181,17 @@ loop.panel = (function(_, mozL10n) {
|
||||
},
|
||||
|
||||
render: function() {
|
||||
// If we have a call url, render result
|
||||
if (this.state.callUrl) {
|
||||
return (
|
||||
<CallUrlResult callUrl={this.state.callUrl} retry={this.retry}/>
|
||||
);
|
||||
}
|
||||
|
||||
// If we don't display the form
|
||||
// XXX setting elem value from a state (in the callUrl input)
|
||||
// makes it immutable ie read only but that is fine in our case.
|
||||
// readOnly attr will suppress a warning regarding this issue
|
||||
// from the react lib.
|
||||
var cx = React.addons.classSet;
|
||||
return (
|
||||
<PanelLayout summary={__("get_link_to_share")}>
|
||||
<form className="invite" onSubmit={this.handleFormSubmit}>
|
||||
|
||||
<input type="text" name="caller" ref="caller" required="required"
|
||||
className={cx({'pending': this.state.pending})}
|
||||
onChange={this.handleTextChange}
|
||||
placeholder={__("call_identifier_textinput_placeholder")} />
|
||||
|
||||
<button type="submit" className="get-url btn btn-success"
|
||||
disabled={this.state.disabled}>
|
||||
{__("get_a_call_url")}
|
||||
</button>
|
||||
</form>
|
||||
<ToSView />
|
||||
<PanelLayout summary={__("share_link_header_text")}>
|
||||
<div className="invite">
|
||||
<input type="url" value={this.state.callUrl} readOnly="true"
|
||||
className={cx({'pending': this.state.pending})} />
|
||||
</div>
|
||||
</PanelLayout>
|
||||
);
|
||||
}
|
||||
@ -201,9 +209,10 @@ loop.panel = (function(_, mozL10n) {
|
||||
render: function() {
|
||||
return (
|
||||
<div>
|
||||
<CallUrlForm client={this.props.client}
|
||||
<CallUrlResult client={this.props.client}
|
||||
notifier={this.props.notifier} />
|
||||
<DoNotDisturb />
|
||||
<ToSView />
|
||||
<AvailabilityDropdown />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -229,7 +238,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
this._registerVisibilityChangeEvent();
|
||||
|
||||
this.on("panel:open panel:closed", this.reset, this);
|
||||
this.on("panel:open panel:closed", this.clearNotifications, this);
|
||||
this.on("panel:open", this.reset, this);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -242,6 +252,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
* @link http://www.w3.org/TR/page-visibility/
|
||||
*/
|
||||
_registerVisibilityChangeEvent: function() {
|
||||
// XXX pass in the visibility status to detect when to generate a new
|
||||
// panel view
|
||||
this.document.addEventListener("visibilitychange", function(event) {
|
||||
this.trigger(event.currentTarget.hidden ? "panel:closed"
|
||||
: "panel:open");
|
||||
@ -255,6 +267,10 @@ loop.panel = (function(_, mozL10n) {
|
||||
this.reset();
|
||||
},
|
||||
|
||||
clearNotifications: function() {
|
||||
this._notifier.clear();
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets this router to its initial state.
|
||||
*/
|
||||
@ -290,8 +306,8 @@ loop.panel = (function(_, mozL10n) {
|
||||
|
||||
return {
|
||||
init: init,
|
||||
DoNotDisturb: DoNotDisturb,
|
||||
CallUrlForm: CallUrlForm,
|
||||
AvailabilityDropdown: AvailabilityDropdown,
|
||||
CallUrlResult: CallUrlResult,
|
||||
PanelView: PanelView,
|
||||
PanelRouter: PanelRouter,
|
||||
ToSView: ToSView
|
||||
|
@ -17,7 +17,7 @@ body {
|
||||
padding: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans;
|
||||
font-size: 14px;
|
||||
background: #f2f2f2;
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
button {
|
||||
@ -70,7 +70,15 @@ img {
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
background: #428BCA;
|
||||
background: #0095dd;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
background: #008acb;
|
||||
}
|
||||
|
||||
.btn-info:active {
|
||||
background: #006b9d;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
|
@ -3,9 +3,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Panel styles */
|
||||
|
||||
a {
|
||||
color: #0095DD;
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
@ -14,18 +13,16 @@ a {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.component-spacer {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.share {
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.share .description {
|
||||
background: #f7f7f7 url("../img/icon_32.png") no-repeat 1em 1.5em;
|
||||
border-bottom: 1px solid #c3c3c3;
|
||||
padding: 1em 1em 0 4em;
|
||||
background: #fbfbfb;
|
||||
}
|
||||
|
||||
.share .description .field {
|
||||
@ -43,21 +40,16 @@ a {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.description-content {
|
||||
margin: .5em 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
font-family: Open Sans,sans-serif;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.share .action {
|
||||
clear: right;
|
||||
padding: 1em;
|
||||
border-top: 1px solid #fafafa;
|
||||
}
|
||||
|
||||
.share .action p {
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
p.dnd {
|
||||
margin: 0 10px 10px 10px;
|
||||
/* The panel won't increase its height when using a bottom margin, while it
|
||||
works using a padding */
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.share .action input[type="text"],
|
||||
@ -65,10 +57,13 @@ p.dnd {
|
||||
border: 1px solid #ccc; /* Overriding background style for a text input (see
|
||||
below) resets its borders to a weird beveled style;
|
||||
defining a default 1px border solves the issue. */
|
||||
font-size: .9em;
|
||||
width: 65%;
|
||||
padding: .5em;
|
||||
margin-right: .35em;
|
||||
font-size: 1em;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
margin: 5px 0;
|
||||
border-radius: 2px;
|
||||
outline: 0;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.share .action input.pending {
|
||||
@ -84,15 +79,102 @@ p.dnd {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.tos {
|
||||
font-size: .6rem;
|
||||
color: #a8a8a8;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Specific cases */
|
||||
|
||||
.panel #messages .alert {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* DnD menu */
|
||||
|
||||
.dnd-status {
|
||||
border: 1px solid transparent;
|
||||
padding: 2px 4px;
|
||||
font-size: .9em;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.dnd-status:hover {
|
||||
border: 1px solid #DDD;
|
||||
background: #F1F1F1;
|
||||
}
|
||||
|
||||
.do-not-disturb {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dnd-menu {
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
left: 10px;
|
||||
background: #fdfdfd;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.3);
|
||||
list-style: none;
|
||||
padding: 5px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.dnd-menu-item {
|
||||
text-align: left;
|
||||
margin: .3em 0;
|
||||
padding: .2em .5em;
|
||||
cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
font-size: 1em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dnd-menu-item:hover {
|
||||
border: 1px solid #ccc;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
/* Status badges -- Available/Unavailable */
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 0 5px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.status-available {
|
||||
background: #6cb23e;
|
||||
}
|
||||
|
||||
.status-dnd {
|
||||
border: 1px solid #888;
|
||||
}
|
||||
|
||||
/* Terms of Service */
|
||||
|
||||
.terms-service {
|
||||
padding: 3px 10px 10px;
|
||||
background: #FFF;
|
||||
text-align: center;
|
||||
opacity: .5;
|
||||
transition: opacity .3s;
|
||||
font-family: 'Lucida Grande', sans-serif;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.terms-service a {
|
||||
color: #0095dd;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
.footer {
|
||||
font-size: 1em;
|
||||
border-top: 1px solid #D1D1D1;
|
||||
background: #EAEAEA;
|
||||
color: #7F7F7F;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: auto;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ describe("loop.panel", function() {
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(router.trigger);
|
||||
sinon.assert.calledWithExactly(router.trigger, "panel:open");
|
||||
sinon.assert.calledWith(router.trigger, "panel:open");
|
||||
});
|
||||
|
||||
it("should trigger panel:closed when the panel document is hidden",
|
||||
@ -158,37 +158,44 @@ describe("loop.panel", function() {
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(router.trigger);
|
||||
sinon.assert.calledWithExactly(router.trigger, "panel:closed");
|
||||
sinon.assert.calledWith(router.trigger, "panel:closed");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("loop.panel.DoNotDisturb", function() {
|
||||
describe("loop.panel.AvailabilityDropdown", function() {
|
||||
var view;
|
||||
|
||||
beforeEach(function() {
|
||||
view = TestUtils.renderIntoDocument(loop.panel.DoNotDisturb());
|
||||
view = TestUtils.renderIntoDocument(loop.panel.AvailabilityDropdown());
|
||||
});
|
||||
|
||||
describe("Checkbox change event", function() {
|
||||
describe("doNotDisturb preference change", function() {
|
||||
beforeEach(function() {
|
||||
navigator.mozLoop.doNotDisturb = false;
|
||||
|
||||
var checkbox = TestUtils.findRenderedDOMComponentWithTag(view, "input");
|
||||
TestUtils.Simulate.change(checkbox);
|
||||
navigator.mozLoop.doNotDisturb = true;
|
||||
});
|
||||
|
||||
it("should toggle the value of mozLoop.doNotDisturb", function() {
|
||||
expect(navigator.mozLoop.doNotDisturb).eql(true);
|
||||
var availableMenuOption = view.getDOMNode()
|
||||
.querySelector(".dnd-make-available");
|
||||
|
||||
TestUtils.Simulate.click(availableMenuOption);
|
||||
|
||||
expect(navigator.mozLoop.doNotDisturb).eql(false);
|
||||
});
|
||||
|
||||
it("should update the DnD checkbox value", function() {
|
||||
expect(view.getDOMNode().querySelector("input").checked).eql(true);
|
||||
it("should toggle the dropdown menu", function() {
|
||||
var availableMenuOption = view.getDOMNode()
|
||||
.querySelector(".dnd-status span");
|
||||
|
||||
TestUtils.Simulate.click(availableMenuOption);
|
||||
|
||||
expect(view.state.showMenu).eql(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("loop.panel.CallUrlForm", function() {
|
||||
describe("loop.panel.PanelView", function() {
|
||||
var fakeClient, callUrlData, view;
|
||||
|
||||
beforeEach(function() {
|
||||
@ -203,7 +210,7 @@ describe("loop.panel", function() {
|
||||
}
|
||||
};
|
||||
|
||||
view = TestUtils.renderIntoDocument(loop.panel.CallUrlForm({
|
||||
view = TestUtils.renderIntoDocument(loop.panel.PanelView({
|
||||
notifier: notifier,
|
||||
client: fakeClient
|
||||
}));
|
||||
@ -215,69 +222,71 @@ describe("loop.panel", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Form submit event", function() {
|
||||
});
|
||||
|
||||
function submitForm(callerValue) {
|
||||
// fill caller field
|
||||
TestUtils.Simulate.change(
|
||||
TestUtils.findRenderedDOMComponentWithTag(view, "input"), {
|
||||
target: {value: callerValue}
|
||||
});
|
||||
describe("loop.panel.CallUrlResult", function() {
|
||||
var fakeClient, callUrlData, view;
|
||||
|
||||
// submit form
|
||||
TestUtils.Simulate.submit(
|
||||
TestUtils.findRenderedDOMComponentWithTag(view, "form"));
|
||||
}
|
||||
beforeEach(function() {
|
||||
callUrlData = {
|
||||
call_url: "http://call.invalid/",
|
||||
expiresAt: 1000
|
||||
};
|
||||
|
||||
it("should reset all pending notifications", function() {
|
||||
submitForm("foo");
|
||||
fakeClient = {
|
||||
requestCallUrl: function(_, cb) {
|
||||
cb(null, callUrlData);
|
||||
}
|
||||
};
|
||||
|
||||
sinon.assert.calledOnce(notifier.clear, "clear");
|
||||
});
|
||||
view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
|
||||
notifier: notifier,
|
||||
client: fakeClient
|
||||
}));
|
||||
});
|
||||
|
||||
it("should request a call url to the server", function() {
|
||||
fakeClient.requestCallUrl = sandbox.stub();
|
||||
describe("Rendering the component should generate a call URL", function() {
|
||||
|
||||
submitForm("foo");
|
||||
it("should make a request to requestCallUrl", function() {
|
||||
sandbox.stub(fakeClient, "requestCallUrl");
|
||||
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
|
||||
notifier: notifier,
|
||||
client: fakeClient
|
||||
}));
|
||||
|
||||
sinon.assert.calledOnce(fakeClient.requestCallUrl);
|
||||
sinon.assert.calledWith(fakeClient.requestCallUrl, "foo");
|
||||
sinon.assert.calledOnce(view.props.client.requestCallUrl);
|
||||
sinon.assert.calledWithExactly(view.props.client.requestCallUrl,
|
||||
sinon.match.string, sinon.match.func);
|
||||
});
|
||||
|
||||
it("should set the call url form in a pending state", function() {
|
||||
// Cancel requestCallUrl effect to keep the state pending
|
||||
fakeClient.requestCallUrl = sandbox.stub();
|
||||
|
||||
submitForm("foo");
|
||||
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
|
||||
notifier: notifier,
|
||||
client: fakeClient
|
||||
}));
|
||||
|
||||
expect(view.state.pending).eql(true);
|
||||
});
|
||||
|
||||
it("should update state with the call url received", function() {
|
||||
submitForm("foo");
|
||||
|
||||
expect(view.state.pending).eql(false);
|
||||
expect(view.state.callUrl).eql(callUrlData.call_url);
|
||||
});
|
||||
|
||||
it("should clear the pending state when a response is received",
|
||||
function() {
|
||||
submitForm("foo");
|
||||
|
||||
expect(view.state.pending).eql(false);
|
||||
});
|
||||
|
||||
it("should update CallUrlResult with the call url", function() {
|
||||
submitForm("foo");
|
||||
|
||||
var urlField = view.getDOMNode().querySelector("input[type='url']");
|
||||
|
||||
expect(urlField.value).eql(callUrlData.call_url);
|
||||
});
|
||||
|
||||
it("should reset all pending notifications", function() {
|
||||
submitForm("foo");
|
||||
|
||||
sinon.assert.calledOnce(view.props.notifier.clear);
|
||||
});
|
||||
|
||||
@ -285,8 +294,10 @@ describe("loop.panel", function() {
|
||||
fakeClient.requestCallUrl = function(_, cb) {
|
||||
cb("fake error");
|
||||
};
|
||||
|
||||
submitForm("foo");
|
||||
var view = TestUtils.renderIntoDocument(loop.panel.CallUrlResult({
|
||||
notifier: notifier,
|
||||
client: fakeClient
|
||||
}));
|
||||
|
||||
sinon.assert.calledOnce(notifier.errorL10n);
|
||||
sinon.assert.calledWithExactly(notifier.errorL10n,
|
||||
@ -320,7 +331,7 @@ describe("loop.panel", function() {
|
||||
it("should render when the value of loop.seenToS is not set", function() {
|
||||
var view = TestUtils.renderIntoDocument(loop.panel.ToSView());
|
||||
|
||||
TestUtils.findRenderedDOMComponentWithClass(view, "tos");
|
||||
TestUtils.findRenderedDOMComponentWithClass(view, "terms-service");
|
||||
});
|
||||
|
||||
it("should not render when the value of loop.seenToS is set to 'seen'",
|
||||
|
@ -16,8 +16,8 @@ function test_getStrings() {
|
||||
|
||||
// XXX This depends on the L10n values, which I'd prefer not to do, but is the
|
||||
// simplest way for now.
|
||||
Assert.equal(MozLoopService.getStrings("get_link_to_share"),
|
||||
'{"textContent":"Get a link and invite someone to talk"}');
|
||||
Assert.equal(MozLoopService.getStrings("share_link_header_text"),
|
||||
'{"textContent":"Share this link to invite someone to talk:"}');
|
||||
}
|
||||
|
||||
function run_test()
|
||||
|
@ -157,6 +157,29 @@ var gAdvancedPane = {
|
||||
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* security.OCSP.enabled is an integer value for legacy reasons.
|
||||
* A value of 1 means OCSP is enabled. Any other value means it is disabled.
|
||||
*/
|
||||
readEnableOCSP: function ()
|
||||
{
|
||||
var preference = document.getElementById("security.OCSP.enabled");
|
||||
// This is the case if the preference is the default value.
|
||||
if (preference.value === undefined) {
|
||||
return true;
|
||||
}
|
||||
return preference.value == 1;
|
||||
},
|
||||
|
||||
/**
|
||||
* See documentation for readEnableOCSP.
|
||||
*/
|
||||
writeEnableOCSP: function ()
|
||||
{
|
||||
var checkbox = document.getElementById("enableOCSP");
|
||||
return checkbox.checked ? 1 : 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* When the user toggles the layers.acceleration.disabled pref,
|
||||
* sync its new value to the gfx.direct2d.disabled pref too.
|
||||
@ -822,15 +845,6 @@ var gAdvancedPane = {
|
||||
"", null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays a dialog in which OCSP preferences can be configured.
|
||||
*/
|
||||
showOCSP: function ()
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://mozapps/content/preferences/ocsp.xul",
|
||||
"", null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays a dialog from which the user can manage his security devices.
|
||||
*/
|
||||
|
@ -91,7 +91,7 @@
|
||||
|
||||
<preference id="browser.search.update" name="browser.search.update" type="bool"/>
|
||||
|
||||
<!-- Encryption tab -->
|
||||
<!-- Certificates tab -->
|
||||
<preference id="security.default_personal_cert" name="security.default_personal_cert" type="string"/>
|
||||
|
||||
<preference id="security.disable_button.openCertManager"
|
||||
@ -100,6 +100,9 @@
|
||||
<preference id="security.disable_button.openDeviceManager"
|
||||
name="security.disable_button.openDeviceManager"
|
||||
type="bool"/>
|
||||
<preference id="security.OCSP.enabled"
|
||||
name="security.OCSP.enabled"
|
||||
type="int"/>
|
||||
</preferences>
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
@ -417,14 +420,20 @@
|
||||
|
||||
<separator/>
|
||||
|
||||
<checkbox id="enableOCSP"
|
||||
label="&enableOCSP.label;"
|
||||
accesskey="&enableOCSP.accesskey;"
|
||||
onsyncfrompreference="return gAdvancedPane.readEnableOCSP();"
|
||||
onsynctopreference="return gAdvancedPane.writeEnableOCSP();"
|
||||
preference="security.OCSP.enabled"/>
|
||||
|
||||
<separator/>
|
||||
|
||||
<hbox>
|
||||
<button id="viewCertificatesButton"
|
||||
label="&viewCerts.label;" accesskey="&viewCerts.accesskey;"
|
||||
oncommand="gAdvancedPane.showCertificates();"
|
||||
preference="security.disable_button.openCertManager"/>
|
||||
<button id="verificationButton"
|
||||
label="&verify2.label;" accesskey="&verify2.accesskey;"
|
||||
oncommand="gAdvancedPane.showOCSP();"/>
|
||||
<button id="viewSecurityDevicesButton"
|
||||
label="&viewSecurityDevices.label;" accesskey="&viewSecurityDevices.accesskey;"
|
||||
oncommand="gAdvancedPane.showSecurityDevices();"
|
||||
|
@ -144,6 +144,28 @@ var gAdvancedPane = {
|
||||
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* security.OCSP.enabled is an integer value for legacy reasons.
|
||||
* A value of 1 means OCSP is enabled. Any other value means it is disabled.
|
||||
*/
|
||||
readEnableOCSP: function ()
|
||||
{
|
||||
var preference = document.getElementById("security.OCSP.enabled");
|
||||
// This is the case if the preference is the default value.
|
||||
if (preference.value === undefined) {
|
||||
return true;
|
||||
}
|
||||
return preference.value == 1;
|
||||
},
|
||||
|
||||
/**
|
||||
* See documentation for readEnableOCSP.
|
||||
*/
|
||||
writeEnableOCSP: function ()
|
||||
{
|
||||
var checkbox = document.getElementById("enableOCSP");
|
||||
return checkbox.checked ? 1 : 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* When the user toggles the layers.acceleration.disabled pref,
|
||||
@ -794,16 +816,6 @@ var gAdvancedPane = {
|
||||
"modal=yes", null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays a dialog in which OCSP preferences can be configured.
|
||||
*/
|
||||
showOCSP: function ()
|
||||
{
|
||||
openDialog("chrome://mozapps/content/preferences/ocsp.xul",
|
||||
"mozilla:crlmanager",
|
||||
"modal=yes", null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays a dialog from which the user can manage his security devices.
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@
|
||||
name="browser.search.update"
|
||||
type="bool"/>
|
||||
|
||||
<!-- Encryption tab -->
|
||||
<!-- Certificates tab -->
|
||||
<preference id="security.default_personal_cert"
|
||||
name="security.default_personal_cert"
|
||||
type="string"/>
|
||||
@ -115,9 +115,14 @@
|
||||
<preference id="security.disable_button.openCertManager"
|
||||
name="security.disable_button.openCertManager"
|
||||
type="bool"/>
|
||||
|
||||
<preference id="security.disable_button.openDeviceManager"
|
||||
name="security.disable_button.openDeviceManager"
|
||||
type="bool"/>
|
||||
|
||||
<preference id="security.OCSP.enabled"
|
||||
name="security.OCSP.enabled"
|
||||
type="int"/>
|
||||
</preferences>
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
@ -439,14 +444,20 @@
|
||||
|
||||
<separator/>
|
||||
|
||||
<checkbox id="enableOCSP"
|
||||
label="&enableOCSP.label;"
|
||||
accesskey="&enableOCSP.accesskey;"
|
||||
onsyncfrompreference="return gAdvancedPane.readEnableOCSP();"
|
||||
onsynctopreference="return gAdvancedPane.writeEnableOCSP();"
|
||||
preference="security.OCSP.enabled"/>
|
||||
|
||||
<separator/>
|
||||
|
||||
<hbox>
|
||||
<button id="viewCertificatesButton"
|
||||
label="&viewCerts.label;" accesskey="&viewCerts.accesskey;"
|
||||
oncommand="gAdvancedPane.showCertificates();"
|
||||
preference="security.disable_button.openCertManager"/>
|
||||
<button id="verificationButton"
|
||||
label="&verify2.label;" accesskey="&verify2.accesskey;"
|
||||
oncommand="gAdvancedPane.showOCSP();"/>
|
||||
<button id="viewSecurityDevicesButton"
|
||||
label="&viewSecurityDevices.label;" accesskey="&viewSecurityDevices.accesskey;"
|
||||
oncommand="gAdvancedPane.showSecurityDevices();"
|
||||
|
@ -36,7 +36,6 @@
|
||||
autocompletepopup="PopupAutoComplete"
|
||||
autocompletesearch="search-autocomplete"
|
||||
autocompletesearchparam="searchbar-history"
|
||||
timeout="250"
|
||||
maxrows="10"
|
||||
completeselectedindex="true"
|
||||
showcommentcolumn="true"
|
||||
@ -536,22 +535,7 @@
|
||||
<![CDATA[
|
||||
// Speculatively connect to the current engine's search URI (and
|
||||
// suggest URI, if different) to reduce request latency
|
||||
|
||||
const SUGGEST_TYPE = "application/x-suggestions+json";
|
||||
var engine = this.currentEngine;
|
||||
var connector =
|
||||
Services.io.QueryInterface(Components.interfaces.nsISpeculativeConnect);
|
||||
var searchURI = engine.getSubmission("dummy", null, "searchbar").uri;
|
||||
let callbacks = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIWebNavigation)
|
||||
.QueryInterface(Components.interfaces.nsILoadContext);
|
||||
connector.speculativeConnect(searchURI, callbacks);
|
||||
|
||||
if (engine.supportsResponseType(SUGGEST_TYPE)) {
|
||||
var suggestURI = engine.getSubmission("dummy", SUGGEST_TYPE, "searchbar").uri;
|
||||
if (suggestURI.prePath != searchURI.prePath)
|
||||
connector.speculativeConnect(suggestURI, callbacks);
|
||||
}
|
||||
this.currentEngine.speculativeConnect({window: window});
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
@ -2,54 +2,54 @@
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
browser_inspector_breadcrumbs.html
|
||||
browser_inspector_bug_650804_search.html
|
||||
browser_inspector_bug_831693_search_suggestions.html
|
||||
browser_inspector_cmd_inspect.html
|
||||
browser_inspector_dead_node_exception.html
|
||||
browser_inspector_destroyselection.html
|
||||
browser_inspector_highlighter.html
|
||||
browser_inspector_infobar.html
|
||||
browser_inspector_menu.html
|
||||
browser_inspector_select_last_selected.html
|
||||
browser_inspector_select_last_selected2.html
|
||||
browser_inspector_bug_848731_reset_selection_on_delete.html
|
||||
browser_inspector_bug_958456_highlight_comments.html
|
||||
doc_inspector_breadcrumbs.html
|
||||
doc_inspector_delete-selected-node-01.html
|
||||
doc_inspector_delete-selected-node-02.html
|
||||
doc_inspector_gcli-inspect-command.html
|
||||
doc_inspector_highlighter-comments.html
|
||||
doc_inspector_highlighter.html
|
||||
doc_inspector_infobar.html
|
||||
doc_inspector_menu.html
|
||||
doc_inspector_remove-iframe-during-load.html
|
||||
doc_inspector_search.html
|
||||
doc_inspector_search-suggestions.html
|
||||
doc_inspector_select-last-selected-01.html
|
||||
doc_inspector_select-last-selected-02.html
|
||||
head.js
|
||||
|
||||
[browser_inspector_basic_highlighter.js]
|
||||
[browser_inspector_breadcrumbs.js]
|
||||
[browser_inspector_bug_650804_search.js]
|
||||
[browser_inspector_bug_665880.js]
|
||||
[browser_inspector_bug_672902_keyboard_shortcuts.js]
|
||||
[browser_inspector_bug_674871.js]
|
||||
[browser_inspector_bug_699308_iframe_navigation.js]
|
||||
[browser_inspector_bug_817558_delete_node.js]
|
||||
[browser_inspector_bug_831693_combinator_suggestions.js]
|
||||
[browser_inspector_bug_831693_input_suggestion.js]
|
||||
# [browser_inspector_bug_831693_searchbox_panel_navigation.js]
|
||||
# Disabled for too many intermittent failures (bug 851349)
|
||||
[browser_inspector_bug_840156_destroy_after_navigation.js]
|
||||
[browser_inspector_cmd_inspect.js]
|
||||
[browser_inspector_dead_node_exception.js]
|
||||
[browser_inspector_destroyselection.js]
|
||||
[browser_inspector_highlighter.js]
|
||||
[browser_inspector_iframeTest.js]
|
||||
[browser_inspector_delete-selected-node-01.js]
|
||||
[browser_inspector_delete-selected-node-02.js]
|
||||
[browser_inspector_delete-selected-node-03.js]
|
||||
[browser_inspector_destroy-after-navigation.js]
|
||||
[browser_inspector_gcli-inspect-command.js]
|
||||
[browser_inspector_highlighter-01.js]
|
||||
[browser_inspector_highlighter-02.js]
|
||||
[browser_inspector_highlighter-03.js]
|
||||
[browser_inspector_highlighter-comments.js]
|
||||
[browser_inspector_highlighter-iframes.js]
|
||||
[browser_inspector_iframe-navigation.js]
|
||||
[browser_inspector_infobar.js]
|
||||
skip-if = true # Bug 1028609
|
||||
[browser_inspector_initialization.js]
|
||||
[browser_inspector_inspect-object-element.js]
|
||||
[browser_inspector_invalidate.js]
|
||||
[browser_inspector_keyboard-shortcuts.js]
|
||||
[browser_inspector_menu.js]
|
||||
[browser_inspector_navigation.js]
|
||||
[browser_inspector_pseudoClass_menu.js]
|
||||
[browser_inspector_pseudoclass_lock.js]
|
||||
[browser_inspector_picker-stop-on-destroy.js]
|
||||
[browser_inspector_picker-stop-on-tool-change.js]
|
||||
[browser_inspector_pseudoclass-lock.js]
|
||||
[browser_inspector_pseudoclass-menu.js]
|
||||
[browser_inspector_reload.js]
|
||||
[browser_inspector_remove-iframe-during-load.js]
|
||||
[browser_inspector_scrolling.js]
|
||||
[browser_inspector_select_last_selected.js]
|
||||
[browser_inspector_search-01.js]
|
||||
[browser_inspector_search-02.js]
|
||||
[browser_inspector_search-03.js]
|
||||
[browser_inspector_select-last-selected.js]
|
||||
# [browser_inspector_search-navigation.js]
|
||||
# Disabled for too many intermittent failures (bug 851349)
|
||||
[browser_inspector_sidebarstate.js]
|
||||
[browser_inspector_bug_848731_reset_selection_on_delete.js]
|
||||
[browser_inspector_bug_922125_destroy_on_navigate.js]
|
||||
[browser_inspector_bug_958456_highlight_comments.js]
|
||||
[browser_inspector_bug_958169_switch_to_inspector_on_pick.js]
|
||||
[browser_inspector_bug_961771_picker_stops_on_tool_select.js]
|
||||
[browser_inspector_bug_962478_picker_stops_on_destroy.js]
|
||||
[browser_inspector_switch-to-inspector-on-pick.js]
|
||||
[browser_inspector_update-on-navigation.js]
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
// Test that the breadcrumbs widget content is correct.
|
||||
|
||||
const TEST_URI = TEST_URL_ROOT + "browser_inspector_breadcrumbs.html";
|
||||
const TEST_URI = TEST_URL_ROOT + "doc_inspector_breadcrumbs.html";
|
||||
const NODES = [
|
||||
{nodeId: "#i1111", result: "i1 i11 i111 i1111"},
|
||||
{nodeId: "#i22", result: "i2 i22 i221"},
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
// Test to ensure inspector handles deletion of selected node correctly.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_destroyselection.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_delete-selected-node-01.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
let { inspector } = yield openInspectorForURL(TEST_URL);
|
@ -10,7 +10,7 @@
|
||||
// box model view, and breadcrumbs, reset accordingly to show the right node
|
||||
|
||||
const TEST_PAGE = TEST_URL_ROOT +
|
||||
"browser_inspector_bug_848731_reset_selection_on_delete.html";
|
||||
"doc_inspector_delete-selected-node-02.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
let { inspector } = yield openInspectorForURL(TEST_PAGE);
|
@ -6,7 +6,7 @@
|
||||
// Test to ensure inspector can handle destruction of selected node inside an
|
||||
// iframe.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_destroyselection.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_delete-selected-node-01.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
let { inspector } = yield openInspectorForURL(TEST_URL);
|
@ -5,7 +5,7 @@
|
||||
|
||||
// Testing that the gcli 'inspect' command works as it should.
|
||||
|
||||
const TEST_URI = TEST_URL_ROOT + "browser_inspector_cmd_inspect.html";
|
||||
const TEST_URI = TEST_URL_ROOT + "doc_inspector_gcli-inspect-command.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
return helpers.addTabWithToolbar(TEST_URI, function(options) {
|
@ -8,7 +8,7 @@
|
||||
|
||||
// Test that the highlighter is correctly displayed over a variety of elements
|
||||
|
||||
const TEST_URI = TEST_URL_ROOT + "browser_inspector_highlighter.html";
|
||||
const TEST_URI = TEST_URL_ROOT + "doc_inspector_highlighter.html";
|
||||
|
||||
let test = asyncTest(function*() {
|
||||
let { inspector } = yield openInspectorForURL(TEST_URI);
|
@ -9,7 +9,7 @@
|
||||
// highlighter, depending on the type of node hovered over.
|
||||
|
||||
const TEST_PAGE = TEST_URL_ROOT +
|
||||
"browser_inspector_bug_958456_highlight_comments.html";
|
||||
"doc_inspector_highlighter-comments.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
let { inspector } = yield openInspectorForURL(TEST_PAGE);
|
@ -5,7 +5,7 @@
|
||||
"use strict";
|
||||
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/inspector/" +
|
||||
"test/browser_inspector_infobar.html";
|
||||
"test/doc_inspector_infobar.html";
|
||||
const DOORHANGER_ARROW_HEIGHT = 5;
|
||||
|
||||
// Test that hovering over nodes in the markup-view shows the highlighter over
|
||||
|
@ -7,7 +7,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
// 1) menu items are disabled/enabled depending on the clicked node
|
||||
// 2) actions triggered by the items work correctly
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_menu.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_menu.html";
|
||||
const MENU_SENSITIVITY_TEST_DATA = [
|
||||
{
|
||||
desc: "doctype node",
|
||||
|
@ -8,7 +8,7 @@
|
||||
// Test that inspector updates when page is navigated.
|
||||
|
||||
const TEST_URL_FILE = "browser/browser/devtools/inspector/test/" +
|
||||
"browser_inspector_breadcrumbs.html";
|
||||
"doc_inspector_breadcrumbs.html";
|
||||
|
||||
const TEST_URL_1 = "http://test1.example.org/" + TEST_URL_FILE;
|
||||
const TEST_URL_2 = "http://test2.example.org/" + TEST_URL_FILE;
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Testing that the inspector doesn't go blank when navigating to a page that
|
||||
// deletes an iframe while loading.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_dead_node_exception.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_remove-iframe-during-load.html";
|
||||
|
||||
let test = asyncTest(function* () {
|
||||
let { inspector, toolbox } = yield openInspectorForURL("about:blank");
|
@ -6,7 +6,7 @@
|
||||
// Test that searching for nodes in the search field actually selects those
|
||||
// nodes.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_bug_650804_search.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_search.html";
|
||||
|
||||
// Indexes of the keys in the KEY_STATES array that should listen to "keypress"
|
||||
// event instead of "command". These are keys that don't change the content of
|
@ -6,7 +6,7 @@
|
||||
// Testing that searching for combining selectors using the inspector search
|
||||
// field produces correct suggestions.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_bug_831693_search_suggestions.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_search-suggestions.html";
|
||||
|
||||
// An array of (key, suggestions) pairs where key is a key to press and
|
||||
// suggestions is an array of suggestions that should be shown in the popup.
|
@ -6,7 +6,7 @@
|
||||
// Testing that searching for elements using the inspector search field
|
||||
// produces correct suggestions.
|
||||
|
||||
const TEST_URL = TEST_URL_ROOT + "browser_inspector_bug_650804_search.html";
|
||||
const TEST_URL = TEST_URL_ROOT + "doc_inspector_search.html";
|
||||
|
||||
// An array of (key, suggestions) pairs where key is a key to press and
|
||||
// suggestions is an array of suggestions that should be shown in the popup.
|
@ -67,7 +67,7 @@ function test()
|
||||
waitForFocus(setupTest, content);
|
||||
}, true);
|
||||
|
||||
content.location = "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_bug_831693_search_suggestions.html";
|
||||
content.location = "http://mochi.test:8888/browser/browser/devtools/inspector/test/doc_inspector_search-suggestions.html";
|
||||
|
||||
function $(id) {
|
||||
if (id == null) return null;
|
@ -6,8 +6,8 @@
|
||||
|
||||
// Checks that the expected default node is selected after a page navigation or
|
||||
// a reload.
|
||||
let PAGE_1 = TEST_URL_ROOT + "browser_inspector_select_last_selected.html";
|
||||
let PAGE_2 = TEST_URL_ROOT + "browser_inspector_select_last_selected2.html";
|
||||
let PAGE_1 = TEST_URL_ROOT + "doc_inspector_select-last-selected-01.html";
|
||||
let PAGE_2 = TEST_URL_ROOT + "doc_inspector_select-last-selected-02.html";
|
||||
|
||||
// An array of test cases with following properties:
|
||||
// - url: URL to navigate to. If URL == content.location, reload instead.
|
@ -14,6 +14,7 @@ let {OutputParser} = devtools.require("devtools/output-parser");
|
||||
|
||||
const COLOR_CLASS = "color-class";
|
||||
const URL_CLASS = "url-class";
|
||||
const CUBIC_BEZIER_CLASS = "bezier-class";
|
||||
|
||||
function test() {
|
||||
function countAll(fragment) {
|
||||
@ -25,12 +26,18 @@ function test() {
|
||||
function countUrls(fragment) {
|
||||
return fragment.querySelectorAll("." + URL_CLASS).length;
|
||||
}
|
||||
function countCubicBeziers(fragment) {
|
||||
return fragment.querySelectorAll("." + CUBIC_BEZIER_CLASS).length;
|
||||
}
|
||||
function getColor(fragment, index) {
|
||||
return fragment.querySelectorAll("." + COLOR_CLASS)[index||0].textContent;
|
||||
}
|
||||
function getUrl(fragment, index) {
|
||||
return fragment.querySelectorAll("." + URL_CLASS)[index||0].textContent;
|
||||
}
|
||||
function getCubicBezier(fragment, index) {
|
||||
return fragment.querySelectorAll("." + CUBIC_BEZIER_CLASS)[index||0].textContent;
|
||||
}
|
||||
|
||||
let testData = [
|
||||
{
|
||||
@ -225,6 +232,67 @@ function test() {
|
||||
is(countAll(fragment), 1);
|
||||
is(getUrl(fragment), "../../../look/at/this/folder/structure/../../red.blue.green.svg");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transition-timing-function",
|
||||
value: "linear",
|
||||
test: fragment => {
|
||||
is(countCubicBeziers(fragment), 1);
|
||||
is(getCubicBezier(fragment), "linear");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "animation-timing-function",
|
||||
value: "ease-in-out",
|
||||
test: fragment => {
|
||||
is(countCubicBeziers(fragment), 1);
|
||||
is(getCubicBezier(fragment), "ease-in-out");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "animation-timing-function",
|
||||
value: "cubic-bezier(.1, 0.55, .9, -3.45)",
|
||||
test: fragment => {
|
||||
is(countCubicBeziers(fragment), 1);
|
||||
is(getCubicBezier(fragment), "cubic-bezier(.1, 0.55, .9, -3.45)");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "animation",
|
||||
value: "move 3s cubic-bezier(.1, 0.55, .9, -3.45)",
|
||||
test: fragment => {
|
||||
is(countCubicBeziers(fragment), 1);
|
||||
is(getCubicBezier(fragment), "cubic-bezier(.1, 0.55, .9, -3.45)");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transition",
|
||||
value: "top 1s ease-in",
|
||||
test: fragment => {
|
||||
is(countCubicBeziers(fragment), 1);
|
||||
is(getCubicBezier(fragment), "ease-in");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transition",
|
||||
value: "top 3s steps(4, end)",
|
||||
test: fragment => {
|
||||
is(countAll(fragment), 0);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transition",
|
||||
value: "top 3s step-start",
|
||||
test: fragment => {
|
||||
is(countAll(fragment), 0);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transition",
|
||||
value: "top 3s step-end",
|
||||
test: fragment => {
|
||||
is(countAll(fragment), 0);
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@ -235,6 +303,7 @@ function test() {
|
||||
data.test(parser.parseCssProperty(data.name, data.value, {
|
||||
colorClass: COLOR_CLASS,
|
||||
urlClass: URL_CLASS,
|
||||
bezierClass: CUBIC_BEZIER_CLASS,
|
||||
defaultColorType: false
|
||||
}));
|
||||
}
|
||||
|
@ -55,10 +55,6 @@ ifdef NSS_DISABLE_DBM
|
||||
DEFINES += -DNSS_DISABLE_DBM=1
|
||||
endif
|
||||
|
||||
ifdef _MSC_VER
|
||||
DEFINES += -D_MSC_VER=$(_MSC_VER)
|
||||
endif
|
||||
|
||||
DEFINES += -DJAREXT=
|
||||
|
||||
ifdef MOZ_ANGLE_RENDERER
|
||||
@ -76,7 +72,9 @@ DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
||||
# Set MSVC dlls version to package, if any.
|
||||
ifdef WIN32_REDIST_DIR
|
||||
ifdef MOZ_NO_DEBUG_RTL
|
||||
DEFINES += -DMOZ_MSVC_REDIST=$(_MSC_VER)
|
||||
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
|
||||
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
|
||||
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -85,15 +85,9 @@
|
||||
#endif
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/plugin-hang-ui@BIN_SUFFIX@
|
||||
#if MOZ_MSVC_REDIST == 1600
|
||||
@BINPATH@/msvcp100.dll
|
||||
@BINPATH@/msvcr100.dll
|
||||
#elif MOZ_MSVC_REDIST == 1700
|
||||
@BINPATH@/msvcp110.dll
|
||||
@BINPATH@/msvcr110.dll
|
||||
#elif MOZ_MSVC_REDIST == 1800
|
||||
@BINPATH@/msvcp120.dll
|
||||
@BINPATH@/msvcr120.dll
|
||||
#if MOZ_PACKAGE_MSVC_DLLS
|
||||
@BINPATH@/@MSVC_C_RUNTIME_DLL@
|
||||
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MOZ_NATIVE_ICU
|
||||
|
@ -4,13 +4,11 @@
|
||||
|
||||
# Panel Strings
|
||||
|
||||
get_link_to_share=Get a link and invite someone to talk
|
||||
share_link_url=Share the link below with your friend to start your call!
|
||||
do_not_disturb=Do not disturb
|
||||
share_link_header_text=Share this link to invite someone to talk:
|
||||
|
||||
get_a_call_url=Get a call url
|
||||
new_url=New url
|
||||
call_identifier_textinput_placeholder=Identify this call
|
||||
# Status text
|
||||
display_name_dnd_status=Do Not Disturb
|
||||
display_name_available_status=Available
|
||||
|
||||
unable_retrieve_url=Sorry, we were unable to retrieve a call url.
|
||||
|
||||
@ -38,4 +36,4 @@ connection_error_see_console_notification=Call failed; see console for details.
|
||||
## part between {{..}}
|
||||
legal_text_and_links=By using this product you agree to the <a \
|
||||
target="_blank" href="{{terms_of_use_url}}">Terms of Use</a> and <a \
|
||||
href="{{privacy_notice_url}}">Privacy Notice</a>
|
||||
href="{{privacy_notice_url}}">Privacy Notice</a>.
|
||||
|
@ -128,9 +128,9 @@
|
||||
<!ENTITY certs.auto.accesskey "S">
|
||||
<!ENTITY certs.ask "Ask me every time">
|
||||
<!ENTITY certs.ask.accesskey "A">
|
||||
<!ENTITY enableOCSP.label "Query OCSP responder servers to confirm the current validity of certificates">
|
||||
<!ENTITY enableOCSP.accesskey "Q">
|
||||
<!ENTITY viewCerts.label "View Certificates">
|
||||
<!ENTITY viewCerts.accesskey "C">
|
||||
<!ENTITY verify2.label "Validation">
|
||||
<!ENTITY verify2.accesskey "V">
|
||||
<!ENTITY viewSecurityDevices.label "Security Devices">
|
||||
<!ENTITY viewSecurityDevices.accesskey "D">
|
||||
|
@ -309,7 +309,6 @@ function CreateSocialMarkWidget(aId, aProvider) {
|
||||
node.setAttribute('type', "socialmark");
|
||||
node.style.listStyleImage = "url(" + (aProvider.unmarkedIcon || aProvider.icon32URL || aProvider.iconURL) + ")";
|
||||
node.setAttribute("origin", aProvider.origin);
|
||||
node.setAttribute("oncommand", "this.markCurrentPage();");
|
||||
|
||||
let window = aDocument.defaultView;
|
||||
let menuLabel = window.gNavigatorBundle.getFormattedString("social.markpageMenu.label", [aProvider.name]);
|
||||
|
@ -199,6 +199,14 @@ a {
|
||||
border-color: #777;
|
||||
}
|
||||
|
||||
.theme-light .message:hover {
|
||||
background-color: rgba(76, 158, 217, 0.23) !important;
|
||||
}
|
||||
|
||||
.theme-dark .message:hover {
|
||||
background-color: rgba(29, 79, 115, 0.5) !important;
|
||||
}
|
||||
|
||||
.theme-light .message[severity=error] {
|
||||
background-color: rgba(255, 150, 150, 0.3);
|
||||
}
|
||||
|
@ -184,10 +184,6 @@ fi
|
||||
dnl A high level macro for selecting compiler options.
|
||||
AC_DEFUN([MOZ_COMPILER_OPTS],
|
||||
[
|
||||
if test "${MOZ_PSEUDO_DERECURSE-unset}" = unset; then
|
||||
MOZ_PSEUDO_DERECURSE=1
|
||||
fi
|
||||
|
||||
MOZ_DEBUGGING_OPTS
|
||||
MOZ_RTTI
|
||||
if test "$CLANG_CXX"; then
|
||||
|
@ -209,5 +209,3 @@ MOZ_RUN_CONFIG_STATUS()],
|
||||
define([AC_CONFIG_HEADER],
|
||||
[m4_fatal([Use CONFIGURE_DEFINE_FILES in moz.build files to produce header files.])
|
||||
])
|
||||
|
||||
AC_SUBST([MOZ_PSEUDO_DERECURSE])
|
||||
|
@ -20,7 +20,6 @@ export
|
||||
|
||||
compile
|
||||
Build the *compile* tier. The *compile* tier compiles all C/C++ files.
|
||||
Only applies to builds with ``MOZ_PSEUDO_DERECURSE``.
|
||||
|
||||
libs
|
||||
Build the *libs* tier. The *libs* tier performs linking and performs
|
||||
@ -36,7 +35,6 @@ binaries:
|
||||
build, but allows for much faster rebuilds of C/C++ code. For performance
|
||||
reasons, however, it skips nss, nspr, icu and ffi. This is targeted to
|
||||
improve local developer workflow when touching C/C++ code.
|
||||
Only applies to builds with ``MOZ_PSEUDO_DERECURSE``.
|
||||
|
||||
install-manifests
|
||||
Process install manifests. Install manifests handle the installation of
|
||||
|
@ -29,21 +29,3 @@ MACH_NO_WRITE_TIMES
|
||||
If defined, mach commands will not prefix output lines with the
|
||||
elapsed time since program start. This option is equivalent to
|
||||
passing ``--log-no-times`` to mach.
|
||||
|
||||
MOZ_PSEUDO_DERECURSE
|
||||
Activate an *experimental* build mode where make directory traversal
|
||||
is derecursified. This mode should result in faster build times at
|
||||
the expense of busted builds from time-to-time. The end goal is for
|
||||
this build mode to be the default. At which time, this variable will
|
||||
likely go away.
|
||||
|
||||
A value of ``1`` activates the mode with full optimizations.
|
||||
|
||||
A value of ``no-parallel-export`` activates the mode without
|
||||
optimizations to the *export* tier, which are known to be slightly
|
||||
buggy.
|
||||
|
||||
A value of ``no-skip`` activates the mode without optimizations to skip
|
||||
some directories during traversal.
|
||||
|
||||
Values may be combined with a comma.
|
||||
|
@ -8,35 +8,17 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef WIN32_REDIST_DIR
|
||||
|
||||
ifeq (1600,$(_MSC_VER))
|
||||
REDIST_FILES = \
|
||||
msvcp100.dll \
|
||||
msvcr100.dll \
|
||||
$(MSVC_C_RUNTIME_DLL) \
|
||||
$(MSVC_CXX_RUNTIME_DLL) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq (1700,$(_MSC_VER))
|
||||
REDIST_FILES = \
|
||||
msvcp110.dll \
|
||||
msvcr110.dll \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq (1800,$(_MSC_VER))
|
||||
REDIST_FILES = \
|
||||
msvcp120.dll \
|
||||
msvcr120.dll \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef REDIST_FILES
|
||||
libs-preqs = \
|
||||
$(call mkdir_deps,$(FINAL_TARGET)) \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(libs-preqs)
|
||||
install --preserve-timestamps $(foreach f,$(REDIST_FILES),'$(WIN32_REDIST_DIR)'/$(f)) $(FINAL_TARGET)
|
||||
endif
|
||||
|
||||
endif # WIN32_REDIST_DIR
|
||||
|
||||
|
@ -64,6 +64,7 @@
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsILoadInfo.h"
|
||||
|
||||
// This should be probably defined on some other place... but I couldn't find it
|
||||
#define WEBAPPS_PERM_NAME "webapps-manage"
|
||||
@ -265,6 +266,20 @@ nsScriptSecurityManager::GetChannelPrincipal(nsIChannel* aChannel,
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether we have an nsILoadInfo that says what we should do.
|
||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||
aChannel->GetLoadInfo(getter_AddRefs(loadInfo));
|
||||
if (loadInfo) {
|
||||
if (loadInfo->GetLoadingSandboxed()) {
|
||||
return CallCreateInstance(NS_NULLPRINCIPAL_CONTRACTID, aPrincipal);
|
||||
}
|
||||
|
||||
if (loadInfo->GetForceInheritPrincipal()) {
|
||||
NS_ADDREF(*aPrincipal = loadInfo->LoadingPrincipal());
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// OK, get the principal from the URI. Make sure this does the same thing
|
||||
// as nsDocument::Reset and XULDocument::StartDocumentLoad.
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
|
@ -198,11 +198,6 @@ endif
|
||||
CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
|
||||
AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf
|
||||
|
||||
# Disable MOZ_PSEUDO_DERECURSE on PGO builds until it's fixed.
|
||||
ifneq (,$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE))
|
||||
MOZ_PSEUDO_DERECURSE :=
|
||||
endif
|
||||
|
||||
#
|
||||
# Strip off the excessively long version numbers on these platforms,
|
||||
# but save the version to allow multiple versions of the same base
|
||||
|
@ -100,7 +100,6 @@ endif
|
||||
|
||||
endif # !NO_DIST_INSTALL
|
||||
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
BINARIES_INSTALL_TARGETS := $(foreach category,$(INSTALL_TARGETS),$(if $(filter binaries,$($(category)_TARGET)),$(category)))
|
||||
|
||||
# Fill a dependency file with all the binaries installed somewhere in $(DIST)
|
||||
@ -114,9 +113,4 @@ $(BINARIES_PP): Makefile $(wildcard backend.mk) $(call mkdir_deps,$(MDDEPDIR))
|
||||
)\
|
||||
))binaries: Makefile $(wildcard backend.mk)' | tr % '\n' > $@
|
||||
|
||||
else
|
||||
binaries::
|
||||
$(error The binaries target is not supported without MOZ_PSEUDO_DERECURSE)
|
||||
endif
|
||||
|
||||
# EOF
|
||||
|
@ -22,8 +22,7 @@ endif
|
||||
# make -C foo/baz
|
||||
# make -C qux
|
||||
|
||||
# MOZ_PSEUDO_DERECURSE can have values other than 1.
|
||||
ifeq (1_.,$(if $(MOZ_PSEUDO_DERECURSE),1)_$(DEPTH))
|
||||
ifeq (.,$(DEPTH))
|
||||
|
||||
include root.mk
|
||||
|
||||
@ -106,6 +105,8 @@ $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CUR
|
||||
endif
|
||||
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
# Disable dependency aggregation on PGO builds because of bug 934166.
|
||||
ifeq (,$(MOZ_PGO)$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE))
|
||||
ifneq (,$(filter libs binaries,$(CURRENT_TIER)))
|
||||
# When doing a "libs" build, target_libs.mk ensures the interesting dependency data
|
||||
# is available in the "binaries" stamp. Once recursion is done, aggregate all that
|
||||
@ -135,6 +136,8 @@ DIST_GARBAGE += binaries-deps.mk binaries-deps
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above
|
||||
@ -185,9 +188,7 @@ endif # ifdef TIERS
|
||||
|
||||
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
|
||||
|
||||
endif # ifeq (1_.,$(MOZ_PSEUDO_DERECURSE)_$(DEPTH))
|
||||
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
endif # ifeq (.,$(DEPTH))
|
||||
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
|
||||
@ -204,13 +205,14 @@ ALL_DEP_FILES := \
|
||||
endif
|
||||
|
||||
binaries libs:: $(TARGETS) $(BINARIES_PP)
|
||||
# Disable dependency aggregation on PGO builds because of bug 934166.
|
||||
ifeq (,$(MOZ_PGO)$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE))
|
||||
ifneq (.,$(DEPTH))
|
||||
@$(if $^,$(call py_action,link_deps,-o binaries --group-all --topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES)))
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
endif # ifdef MOZ_PSEUDO_DERECURSE
|
||||
endif
|
||||
|
||||
recurse:
|
||||
@$(RECURSED_COMMAND)
|
||||
|
@ -177,18 +177,20 @@ else
|
||||
SHARED_LIBRARY := $(DLL_PREFIX)$(SHARED_LIBRARY_NAME)$(DLL_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef SONAME
|
||||
DSO_SONAME = $(DLL_PREFIX)$(SONAME)$(DLL_SUFFIX)
|
||||
else
|
||||
DSO_SONAME = $(notdir $@)
|
||||
endif
|
||||
|
||||
EMBED_MANIFEST_AT=2
|
||||
|
||||
endif # MKSHLIB
|
||||
endif # FORCE_SHARED_LIB
|
||||
endif # LIBRARY
|
||||
|
||||
ifdef MKSHLIB
|
||||
ifdef SONAME
|
||||
DSO_SONAME = $(DLL_PREFIX)$(SONAME)$(DLL_SUFFIX)
|
||||
else
|
||||
DSO_SONAME = $(notdir $@)
|
||||
endif
|
||||
endif # MKSHLIB
|
||||
|
||||
ifdef FORCE_STATIC_LIB
|
||||
ifndef FORCE_SHARED_LIB
|
||||
SHARED_LIBRARY := $(NULL)
|
||||
@ -581,10 +583,8 @@ endif
|
||||
# default rule before including rules.mk
|
||||
default all::
|
||||
$(MAKE) export
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
$(MAKE) compile
|
||||
endif
|
||||
endif
|
||||
$(MAKE) libs
|
||||
$(MAKE) tools
|
||||
|
22
configure.in
22
configure.in
@ -481,16 +481,24 @@ case "$target" in
|
||||
if test "$_CC_MAJOR_VERSION" = "16"; then
|
||||
_CC_SUITE=10
|
||||
MSVS_VERSION=2010
|
||||
MSVC_C_RUNTIME_DLL=msvcr100.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp100.dll
|
||||
elif test "$_CC_MAJOR_VERSION" = "17"; then
|
||||
_CC_SUITE=11
|
||||
MSVS_VERSION=2012
|
||||
MSVC_C_RUNTIME_DLL=msvcr110.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp110.dll
|
||||
elif test "$_CC_MAJOR_VERSION" = "18"; then
|
||||
_CC_SUITE=12
|
||||
MSVS_VERSION=2013
|
||||
MSVC_C_RUNTIME_DLL=msvcr120.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp120.dll
|
||||
else
|
||||
AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
|
||||
fi
|
||||
AC_SUBST(MSVS_VERSION)
|
||||
AC_SUBST(MSVC_C_RUNTIME_DLL)
|
||||
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
|
||||
|
||||
# Disable SEH on clang-cl because it doesn't implement them yet.
|
||||
if test -z "$CLANG_CL"; then
|
||||
@ -3895,7 +3903,6 @@ MOZ_SAFE_BROWSING=
|
||||
MOZ_HELP_VIEWER=
|
||||
MOZ_SPELLCHECK=1
|
||||
MOZ_ANDROID_OMTC=
|
||||
MOZ_NATIVE_CASTING=1
|
||||
MOZ_TOOLKIT_SEARCH=1
|
||||
MOZ_UI_LOCALE=en-US
|
||||
MOZ_UNIVERSALCHARDET=1
|
||||
@ -7674,19 +7681,6 @@ else
|
||||
OMNIJAR_NAME=omni.ja
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = --disable-native-casting
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(native-casting,
|
||||
[ --disable-native-casting Disable native casting devices],
|
||||
MOZ_NATIVE_CASTING=,
|
||||
MOZ_NATIVE_CASTING=1)
|
||||
if test "$MOZ_NATIVE_CASTING"; then
|
||||
AC_DEFINE(MOZ_NATIVE_CASTING)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_NATIVE_CASTING)
|
||||
AC_SUBST(OMNIJAR_NAME)
|
||||
AC_SUBST(MOZ_OMNIJAR)
|
||||
AC_SUBST(MOZ_PACKAGER_FORMAT)
|
||||
|
@ -1993,20 +1993,27 @@ public:
|
||||
static nsresult URIInheritsSecurityContext(nsIURI *aURI, bool *aResult);
|
||||
|
||||
/**
|
||||
* Set the given principal as the owner of the given channel, if
|
||||
* needed. aURI must be the URI of aChannel. aPrincipal may be
|
||||
* null. If aSetUpForAboutBlank is true, then about:blank will get
|
||||
* the principal set up on it. If aForceOwner is true, the owner
|
||||
* will be set on the channel, even if the principal can be determined
|
||||
* from the channel.
|
||||
* The return value is whether the principal was set up as the owner
|
||||
* of the channel.
|
||||
* Set the given principal as the principal on the nsILoadInfo of the given
|
||||
* channel, and tell the channel to inherit it if needed. aPrincipal may be
|
||||
* null, in which case this method is a no-op.
|
||||
*
|
||||
* If aLoadingPrincipal is not null, aURI must be the URI of aChannel. If
|
||||
* aInheritForAboutBlank is true, then about:blank will be told to inherit the
|
||||
* principal. If aForceInherit is true, the channel will be told to inherit
|
||||
* the principal no matter what, as long as the principal is not null.
|
||||
*
|
||||
* If aIsSandboxed is true, then aLoadingPrincipal must not be null. In this
|
||||
* case, the owner on the channel, if any, will be reset to null and the
|
||||
* nsILoadInfo will say the channel should be sandboxed.
|
||||
*
|
||||
* The return value is whether the channel was told to inherit the principal.
|
||||
*/
|
||||
static bool SetUpChannelOwner(nsIPrincipal* aLoadingPrincipal,
|
||||
nsIChannel* aChannel,
|
||||
nsIURI* aURI,
|
||||
bool aSetUpForAboutBlank,
|
||||
bool aForceOwner = false);
|
||||
bool aInheritForAboutBlank,
|
||||
bool aIsSandboxed,
|
||||
bool aForceInherit);
|
||||
|
||||
static nsresult Btoa(const nsAString& aBinaryData,
|
||||
nsAString& aAsciiBase64String);
|
||||
|
@ -132,8 +132,8 @@ typedef CallbackObjectHolder<NodeFilter, nsIDOMNodeFilter> NodeFilterHolder;
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0xc9e11955, 0xaa55, 0x49a1, \
|
||||
{ 0x94, 0x29, 0x58, 0xe9, 0xbe, 0xf6, 0x79, 0x54 } }
|
||||
{ 0xa45ef8f0, 0x7c5b, 0x425d, \
|
||||
{ 0xa5, 0xe7, 0x11, 0x41, 0x5c, 0x41, 0x0c, 0x7a } }
|
||||
|
||||
// Enum for requesting a particular type of document when creating a doc
|
||||
enum DocumentFlavor {
|
||||
@ -851,6 +851,7 @@ public:
|
||||
};
|
||||
|
||||
virtual nsresult LoadAdditionalStyleSheet(additionalSheetType aType, nsIURI* aSheetURI) = 0;
|
||||
virtual nsresult AddAdditionalStyleSheet(additionalSheetType aType, nsIStyleSheet* aSheet) = 0;
|
||||
virtual void RemoveAdditionalStyleSheet(additionalSheetType aType, nsIURI* sheetURI) = 0;
|
||||
virtual nsIStyleSheet* FirstAdditionalAuthorSheet() = 0;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsError.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
@ -241,8 +242,11 @@ DOMParser::ParseFromStream(nsIInputStream *stream,
|
||||
nsDependentCString(contentType), nullptr);
|
||||
NS_ENSURE_STATE(parserChannel);
|
||||
|
||||
// More principal-faking here
|
||||
parserChannel->SetOwner(mOriginalPrincipal);
|
||||
// More principal-faking here
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(mOriginalPrincipal, LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
parserChannel->SetLoadInfo(loadInfo);
|
||||
|
||||
if (charset) {
|
||||
parserChannel->SetContentCharset(nsDependentCString(charset));
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/DOMEventTargetHelper.h"
|
||||
#include "mozilla/dom/EventSourceBinding.h"
|
||||
#include "mozilla/dom/MessageEvent.h"
|
||||
@ -375,7 +376,10 @@ EventSource::OnStartRequest(nsIRequest *aRequest,
|
||||
principal = do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
rv = httpChannel->SetOwner(principal);
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(principal, LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
rv = httpChannel->SetLoadInfo(loadInfo);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/dom/DocumentFragment.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
@ -6429,15 +6430,25 @@ bool
|
||||
nsContentUtils::SetUpChannelOwner(nsIPrincipal* aLoadingPrincipal,
|
||||
nsIChannel* aChannel,
|
||||
nsIURI* aURI,
|
||||
bool aSetUpForAboutBlank,
|
||||
bool aForceOwner)
|
||||
bool aInheritForAboutBlank,
|
||||
bool aIsSandboxed,
|
||||
bool aForceInherit)
|
||||
{
|
||||
if (!aLoadingPrincipal) {
|
||||
// Nothing to do here
|
||||
MOZ_ASSERT(!aIsSandboxed);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we're sandboxed, make sure to clear any owner the channel
|
||||
// might already have.
|
||||
if (aIsSandboxed) {
|
||||
aChannel->SetOwner(nullptr);
|
||||
}
|
||||
|
||||
// Set the loadInfo of the channel, but only tell the channel to
|
||||
// inherit if it can't provide its own security context.
|
||||
//
|
||||
// Set the owner of the channel, but only for channels that can't
|
||||
// provide their own security context.
|
||||
//
|
||||
// XXX: It seems wrong that the owner is ignored - even if one is
|
||||
// supplied) unless the URI is javascript or data or about:blank.
|
||||
// XXX: If this is ever changed, check all callers for what owners
|
||||
// they're passing in. In particular, see the code and
|
||||
// comments in nsDocShell::LoadURI where we fall back on
|
||||
@ -6445,57 +6456,40 @@ nsContentUtils::SetUpChannelOwner(nsIPrincipal* aLoadingPrincipal,
|
||||
// very wrong if this code changed anything but channels that
|
||||
// can't provide their own security context!
|
||||
//
|
||||
// (Currently chrome URIs set the owner when they are created!
|
||||
// So setting a nullptr owner would be bad!)
|
||||
//
|
||||
// If aForceOwner is true, the owner will be set, even for a channel that
|
||||
// can provide its own security context. This is used for the HTML5 IFRAME
|
||||
// sandbox attribute, so we can force the channel (and its document) to
|
||||
// explicitly have a null principal.
|
||||
bool inherit;
|
||||
// We expect URIInheritsSecurityContext to return success for an
|
||||
// about:blank URI, so don't call NS_IsAboutBlank() if this call fails.
|
||||
// This condition needs to match the one in nsDocShell::InternalLoad where
|
||||
// we're checking for things that will use the owner.
|
||||
if (aForceOwner || ((NS_SUCCEEDED(URIInheritsSecurityContext(aURI, &inherit)) &&
|
||||
(inherit || (aSetUpForAboutBlank && NS_IsAboutBlank(aURI)))))) {
|
||||
#ifdef DEBUG
|
||||
// Assert that aForceOwner is only set for null principals for non-srcdoc
|
||||
// loads. (Strictly speaking not all uses of about:srcdoc would be
|
||||
// srcdoc loads, but the URI is non-resolvable in cases where it is not).
|
||||
if (aForceOwner) {
|
||||
nsAutoCString uriStr;
|
||||
aURI->GetSpec(uriStr);
|
||||
if(!uriStr.EqualsLiteral("about:srcdoc") &&
|
||||
!uriStr.EqualsLiteral("view-source:about:srcdoc")) {
|
||||
nsCOMPtr<nsIURI> ownerURI;
|
||||
nsresult rv = aLoadingPrincipal->GetURI(getter_AddRefs(ownerURI));
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv) && SchemeIs(ownerURI, NS_NULLPRINCIPAL_SCHEME));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
aChannel->SetOwner(aLoadingPrincipal);
|
||||
return true;
|
||||
// If aForceInherit is true, we will inherit, even for a channel that
|
||||
// can provide its own security context. This is used for srcdoc loads.
|
||||
bool inherit = aForceInherit;
|
||||
if (!inherit) {
|
||||
bool uriInherits;
|
||||
// We expect URIInheritsSecurityContext to return success for an
|
||||
// about:blank URI, so don't call NS_IsAboutBlank() if this call fails.
|
||||
// This condition needs to match the one in nsDocShell::InternalLoad where
|
||||
// we're checking for things that will use the owner.
|
||||
inherit =
|
||||
(NS_SUCCEEDED(URIInheritsSecurityContext(aURI, &uriInherits)) &&
|
||||
(uriInherits || (aInheritForAboutBlank && NS_IsAboutBlank(aURI)))) ||
|
||||
//
|
||||
// file: uri special-casing
|
||||
//
|
||||
// If this is a file: load opened from another file: then it may need
|
||||
// to inherit the owner from the referrer so they can script each other.
|
||||
// If we don't set the owner explicitly then each file: gets an owner
|
||||
// based on its own codebase later.
|
||||
//
|
||||
(URIIsLocalFile(aURI) &&
|
||||
NS_SUCCEEDED(aLoadingPrincipal->CheckMayLoad(aURI, false, false)) &&
|
||||
// One more check here. CheckMayLoad will always return true for the
|
||||
// system principal, but we do NOT want to inherit in that case.
|
||||
!IsSystemPrincipal(aLoadingPrincipal));
|
||||
}
|
||||
|
||||
//
|
||||
// file: uri special-casing
|
||||
//
|
||||
// If this is a file: load opened from another file: then it may need
|
||||
// to inherit the owner from the referrer so they can script each other.
|
||||
// If we don't set the owner explicitly then each file: gets an owner
|
||||
// based on its own codebase later.
|
||||
//
|
||||
if (URIIsLocalFile(aURI) && aLoadingPrincipal &&
|
||||
NS_SUCCEEDED(aLoadingPrincipal->CheckMayLoad(aURI, false, false)) &&
|
||||
// One more check here. CheckMayLoad will always return true for the
|
||||
// system principal, but we do NOT want to inherit in that case.
|
||||
!IsSystemPrincipal(aLoadingPrincipal)) {
|
||||
aChannel->SetOwner(aLoadingPrincipal);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(aLoadingPrincipal,
|
||||
inherit ?
|
||||
LoadInfo::eInheritPrincipal : LoadInfo::eDontInheritPrincipal,
|
||||
aIsSandboxed ? LoadInfo::eSandboxed : LoadInfo::eNotSandboxed);
|
||||
aChannel->SetLoadInfo(loadInfo);
|
||||
return inherit && !aIsSandboxed;
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -4221,22 +4221,34 @@ nsDocument::LoadAdditionalStyleSheet(additionalSheetType aType, nsIURI* aSheetUR
|
||||
true, getter_AddRefs(sheet));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mAdditionalSheets[aType].AppendObject(sheet);
|
||||
sheet->SetOwningDocument(this);
|
||||
MOZ_ASSERT(sheet->IsApplicable());
|
||||
|
||||
return AddAdditionalStyleSheet(aType, sheet);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocument::AddAdditionalStyleSheet(additionalSheetType aType, nsIStyleSheet* aSheet)
|
||||
{
|
||||
if (mAdditionalSheets[aType].Contains(aSheet))
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
if (!aSheet->IsApplicable())
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
mAdditionalSheets[aType].AppendObject(aSheet);
|
||||
|
||||
BeginUpdate(UPDATE_STYLE);
|
||||
nsCOMPtr<nsIPresShell> shell = GetShell();
|
||||
if (shell) {
|
||||
nsStyleSet::sheetType type = ConvertAdditionalSheetType(aType);
|
||||
shell->StyleSet()->AppendStyleSheet(type, sheet);
|
||||
shell->StyleSet()->AppendStyleSheet(type, aSheet);
|
||||
}
|
||||
|
||||
// Passing false, so documet.styleSheets.length will not be affected by
|
||||
// these additional sheets.
|
||||
NotifyStyleSheetAdded(sheet, false);
|
||||
NotifyStyleSheetAdded(aSheet, false);
|
||||
EndUpdate(UPDATE_STYLE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -11875,6 +11887,10 @@ SizeOfStyleSheetsElementIncludingThis(nsIStyleSheet* aStyleSheet,
|
||||
MallocSizeOf aMallocSizeOf,
|
||||
void* aData)
|
||||
{
|
||||
if (!aStyleSheet->GetOwningDocument()) {
|
||||
// Avoid over-reporting shared sheets.
|
||||
return 0;
|
||||
}
|
||||
return aStyleSheet->SizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
|
@ -809,6 +809,7 @@ public:
|
||||
bool aApplicable) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult LoadAdditionalStyleSheet(additionalSheetType aType, nsIURI* aSheetURI) MOZ_OVERRIDE;
|
||||
virtual nsresult AddAdditionalStyleSheet(additionalSheetType aType, nsIStyleSheet* aSheet) MOZ_OVERRIDE;
|
||||
virtual void RemoveAdditionalStyleSheet(additionalSheetType aType, nsIURI* sheetURI) MOZ_OVERRIDE;
|
||||
virtual nsIStyleSheet* FirstAdditionalAuthorSheet() MOZ_OVERRIDE;
|
||||
|
||||
|
@ -15,8 +15,10 @@
|
||||
#include "mozilla/dom/MediaSource.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
|
||||
using mozilla::dom::DOMFileImpl;
|
||||
using mozilla::LoadInfo;
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Hash table
|
||||
@ -506,8 +508,6 @@ nsHostObjectProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
stream);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsISupports> owner = do_QueryInterface(info->mPrincipal);
|
||||
|
||||
nsString type;
|
||||
rv = blob->GetType(type);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -523,7 +523,10 @@ nsHostObjectProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
rv = blob->GetSize(&size);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
channel->SetOwner(owner);
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new mozilla::LoadInfo(info->mPrincipal, LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
channel->SetLoadInfo(loadInfo);
|
||||
channel->SetOriginalURI(uri);
|
||||
channel->SetContentType(NS_ConvertUTF16toUTF8(type));
|
||||
channel->SetContentLength(size);
|
||||
|
@ -2367,18 +2367,11 @@ nsObjectLoadingContent::OpenChannel()
|
||||
|
||||
// Set up the channel's principal and such, like nsDocShell::DoURILoad does.
|
||||
// If the content being loaded should be sandboxed with respect to origin we
|
||||
// create a new null principal here. nsContentUtils::SetUpChannelOwner is
|
||||
// used with a flag to force it to be set as the channel owner.
|
||||
nsCOMPtr<nsIPrincipal> ownerPrincipal;
|
||||
uint32_t sandboxFlags = doc->GetSandboxFlags();
|
||||
if (sandboxFlags & SANDBOXED_ORIGIN) {
|
||||
ownerPrincipal = do_CreateInstance("@mozilla.org/nullprincipal;1");
|
||||
} else {
|
||||
// Not sandboxed - we allow the content to assume its natural owner.
|
||||
ownerPrincipal = thisContent->NodePrincipal();
|
||||
}
|
||||
nsContentUtils::SetUpChannelOwner(ownerPrincipal, chan, mURI, true,
|
||||
sandboxFlags & SANDBOXED_ORIGIN);
|
||||
// tell SetUpChannelOwner that.
|
||||
nsContentUtils::SetUpChannelOwner(thisContent->NodePrincipal(), chan, mURI,
|
||||
true,
|
||||
doc->GetSandboxFlags() & SANDBOXED_ORIGIN,
|
||||
false);
|
||||
|
||||
nsCOMPtr<nsIScriptChannel> scriptChannel = do_QueryInterface(chan);
|
||||
if (scriptChannel) {
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "mozilla/dom/XMLHttpRequestUploadBinding.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "nsDOMBlobBuilder.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
@ -1973,7 +1974,10 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
|
||||
documentPrincipal = mPrincipal;
|
||||
}
|
||||
|
||||
channel->SetOwner(documentPrincipal);
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(documentPrincipal, LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
channel->SetLoadInfo(loadInfo);
|
||||
|
||||
nsresult status;
|
||||
request->GetStatus(&status);
|
||||
|
@ -2112,14 +2112,14 @@ WebGLContext::ReadPixels(GLint x, GLint y, GLsizei width,
|
||||
case LOCAL_GL_UNSIGNED_BYTE:
|
||||
isReadTypeValid = true;
|
||||
bytesPerPixel = 1*channels;
|
||||
requiredDataType = js::ArrayBufferView::TYPE_UINT8;
|
||||
requiredDataType = js::Scalar::Uint8;
|
||||
break;
|
||||
case LOCAL_GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
case LOCAL_GL_UNSIGNED_SHORT_5_5_5_1:
|
||||
case LOCAL_GL_UNSIGNED_SHORT_5_6_5:
|
||||
isReadTypeValid = true;
|
||||
bytesPerPixel = 2;
|
||||
requiredDataType = js::ArrayBufferView::TYPE_UINT16;
|
||||
requiredDataType = js::Scalar::Uint16;
|
||||
break;
|
||||
case LOCAL_GL_FLOAT:
|
||||
if (IsExtensionEnabled(WebGLExtensionID::WEBGL_color_buffer_float) ||
|
||||
@ -2128,7 +2128,7 @@ WebGLContext::ReadPixels(GLint x, GLint y, GLsizei width,
|
||||
isReadTypeValid = true;
|
||||
isReadTypeFloat = true;
|
||||
bytesPerPixel = 4*channels;
|
||||
requiredDataType = js::ArrayBufferView::TYPE_FLOAT32;
|
||||
requiredDataType = js::Scalar::Float32;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1202,7 +1202,7 @@ WebGLContext::ValidateTexInputData(GLenum type, int jsArrayType, WebGLTexImageFu
|
||||
// First, we check for packed types
|
||||
switch (type) {
|
||||
case LOCAL_GL_UNSIGNED_BYTE:
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::ArrayBufferView::TYPE_UINT8);
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::Scalar::Uint8);
|
||||
break;
|
||||
|
||||
case LOCAL_GL_HALF_FLOAT:
|
||||
@ -1211,16 +1211,16 @@ WebGLContext::ValidateTexInputData(GLenum type, int jsArrayType, WebGLTexImageFu
|
||||
case LOCAL_GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
case LOCAL_GL_UNSIGNED_SHORT_5_5_5_1:
|
||||
case LOCAL_GL_UNSIGNED_SHORT_5_6_5:
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::ArrayBufferView::TYPE_UINT16);
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::Scalar::Uint16);
|
||||
break;
|
||||
|
||||
case LOCAL_GL_UNSIGNED_INT:
|
||||
case LOCAL_GL_UNSIGNED_INT_24_8:
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::ArrayBufferView::TYPE_UINT32);
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::Scalar::Uint32);
|
||||
break;
|
||||
|
||||
case LOCAL_GL_FLOAT:
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::ArrayBufferView::TYPE_FLOAT32);
|
||||
validInput = (jsArrayType == -1 || jsArrayType == js::Scalar::Float32);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -83,6 +83,7 @@
|
||||
|
||||
#include "mozilla/dom/EncodingUtils.h"
|
||||
#include "mozilla/dom/FallbackEncoding.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "nsIEditingSession.h"
|
||||
#include "nsIEditor.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
@ -1525,7 +1526,10 @@ nsHTMLDocument::Open(JSContext* cx,
|
||||
|
||||
// Set the caller principal, if any, on the channel so that we'll
|
||||
// make sure to use it when we reset.
|
||||
rv = channel->SetOwner(callerPrincipal);
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(callerPrincipal, LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
rv = channel->SetLoadInfo(loadInfo);
|
||||
if (rv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -2388,7 +2392,10 @@ nsHTMLDocument::CreateAndAddWyciwygChannel(void)
|
||||
GetDocumentCharacterSet());
|
||||
|
||||
// Use our new principal
|
||||
channel->SetOwner(NodePrincipal());
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(NodePrincipal(), LoadInfo::eInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
channel->SetLoadInfo(loadInfo);
|
||||
|
||||
// Inherit load flags from the original document's channel
|
||||
channel->SetLoadFlags(mLoadFlags);
|
||||
|
@ -813,7 +813,7 @@ public:
|
||||
// Called when the backend has changed the current playback
|
||||
// position. It dispatches a timeupdate event and invalidates the frame.
|
||||
// This must be called on the main thread only.
|
||||
void PlaybackPositionChanged();
|
||||
virtual void PlaybackPositionChanged();
|
||||
|
||||
// Calls mElement->UpdateReadyStateForData, telling it whether we have
|
||||
// data for the next frame and if we're buffering. Main thread only.
|
||||
|
@ -23,17 +23,17 @@ SOURCES += [
|
||||
if CONFIG['MOZ_WMF']:
|
||||
EXPORTS += [
|
||||
'wmf/MFTDecoder.h',
|
||||
'wmf/WMFAudioOutputSource.h',
|
||||
'wmf/WMFAudioMFTManager.h',
|
||||
'wmf/WMFDecoderModule.h',
|
||||
'wmf/WMFMediaDataDecoder.h',
|
||||
'wmf/WMFVideoOutputSource.h',
|
||||
'wmf/WMFVideoMFTManager.h',
|
||||
]
|
||||
UNIFIED_SOURCES += [
|
||||
'wmf/MFTDecoder.cpp',
|
||||
'wmf/WMFAudioOutputSource.cpp',
|
||||
'wmf/WMFAudioMFTManager.cpp',
|
||||
'wmf/WMFDecoderModule.cpp',
|
||||
'wmf/WMFMediaDataDecoder.cpp',
|
||||
'wmf/WMFVideoOutputSource.cpp',
|
||||
'wmf/WMFVideoMFTManager.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_FFMPEG']:
|
||||
|
@ -21,6 +21,7 @@ namespace mozilla {
|
||||
|
||||
MFTDecoder::MFTDecoder()
|
||||
: mMFTProvidesOutputSamples(false)
|
||||
, mDiscontinuity(true)
|
||||
{
|
||||
memset(&mInputStreamInfo, 0, sizeof(MFT_INPUT_STREAM_INFO));
|
||||
memset(&mOutputStreamInfo, 0, sizeof(MFT_OUTPUT_STREAM_INFO));
|
||||
@ -237,6 +238,11 @@ MFTDecoder::Output(RefPtr<IMFSample>* aOutput)
|
||||
|
||||
MOZ_ASSERT(output.pSample);
|
||||
|
||||
if (mDiscontinuity) {
|
||||
output.pSample->SetUINT32(MFSampleExtension_Discontinuity, TRUE);
|
||||
mDiscontinuity = false;
|
||||
}
|
||||
|
||||
*aOutput = output.pSample; // AddRefs
|
||||
if (mMFTProvidesOutputSamples) {
|
||||
// If the MFT is providing samples, we must release the sample here.
|
||||
@ -277,6 +283,8 @@ MFTDecoder::Flush()
|
||||
HRESULT hr = SendMFTMessage(MFT_MESSAGE_COMMAND_FLUSH, 0);
|
||||
NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
|
||||
|
||||
mDiscontinuity = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,9 @@ private:
|
||||
|
||||
// True if the IMFTransform allocates the samples that it returns.
|
||||
bool mMFTProvidesOutputSamples;
|
||||
|
||||
// True if we need to mark the next sample as a discontinuity.
|
||||
bool mDiscontinuity;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -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/. */
|
||||
|
||||
#include "WMFAudioOutputSource.h"
|
||||
#include "WMFAudioMFTManager.h"
|
||||
#include "mp4_demuxer/DecoderData.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "WMFUtils.h"
|
||||
@ -66,7 +66,7 @@ AACAudioSpecificConfigToUserData(const uint8_t* aAudioSpecConfig,
|
||||
aOutUserData.AppendElements(aAudioSpecConfig, aConfigLength);
|
||||
}
|
||||
|
||||
WMFAudioOutputSource::WMFAudioOutputSource(
|
||||
WMFAudioMFTManager::WMFAudioMFTManager(
|
||||
const mp4_demuxer::AudioDecoderConfig& aConfig)
|
||||
: mAudioChannels(aConfig.channel_count)
|
||||
, mAudioBytesPerSample(aConfig.bits_per_sample / 8)
|
||||
@ -75,19 +75,19 @@ WMFAudioOutputSource::WMFAudioOutputSource(
|
||||
, mAudioFrameSum(0)
|
||||
, mMustRecaptureAudioPosition(true)
|
||||
{
|
||||
MOZ_COUNT_CTOR(WMFAudioOutputSource);
|
||||
MOZ_COUNT_CTOR(WMFAudioMFTManager);
|
||||
AACAudioSpecificConfigToUserData(&aConfig.audio_specific_config[0],
|
||||
aConfig.audio_specific_config.length(),
|
||||
mUserData);
|
||||
}
|
||||
|
||||
WMFAudioOutputSource::~WMFAudioOutputSource()
|
||||
WMFAudioMFTManager::~WMFAudioMFTManager()
|
||||
{
|
||||
MOZ_COUNT_DTOR(WMFAudioOutputSource);
|
||||
MOZ_COUNT_DTOR(WMFAudioMFTManager);
|
||||
}
|
||||
|
||||
TemporaryRef<MFTDecoder>
|
||||
WMFAudioOutputSource::Init()
|
||||
WMFAudioMFTManager::Init()
|
||||
{
|
||||
RefPtr<MFTDecoder> decoder(new MFTDecoder());
|
||||
|
||||
@ -129,7 +129,7 @@ WMFAudioOutputSource::Init()
|
||||
}
|
||||
|
||||
HRESULT
|
||||
WMFAudioOutputSource::Input(mp4_demuxer::MP4Sample* aSample)
|
||||
WMFAudioMFTManager::Input(mp4_demuxer::MP4Sample* aSample)
|
||||
{
|
||||
const uint8_t* data = reinterpret_cast<const uint8_t*>(aSample->data);
|
||||
uint32_t length = aSample->size;
|
||||
@ -137,8 +137,8 @@ WMFAudioOutputSource::Input(mp4_demuxer::MP4Sample* aSample)
|
||||
}
|
||||
|
||||
HRESULT
|
||||
WMFAudioOutputSource::Output(int64_t aStreamOffset,
|
||||
nsAutoPtr<MediaData>& aOutData)
|
||||
WMFAudioMFTManager::Output(int64_t aStreamOffset,
|
||||
nsAutoPtr<MediaData>& aOutData)
|
||||
{
|
||||
aOutData = nullptr;
|
||||
RefPtr<IMFSample> sample;
|
@ -15,10 +15,10 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WMFAudioOutputSource : public WMFOutputSource {
|
||||
class WMFAudioMFTManager : public MFTManager {
|
||||
public:
|
||||
WMFAudioOutputSource(const mp4_demuxer::AudioDecoderConfig& aConfig);
|
||||
~WMFAudioOutputSource();
|
||||
WMFAudioMFTManager(const mp4_demuxer::AudioDecoderConfig& aConfig);
|
||||
~WMFAudioMFTManager();
|
||||
|
||||
virtual TemporaryRef<MFTDecoder> Init() MOZ_OVERRIDE;
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "WMF.h"
|
||||
#include "WMFDecoderModule.h"
|
||||
#include "WMFDecoder.h"
|
||||
#include "WMFVideoOutputSource.h"
|
||||
#include "WMFAudioOutputSource.h"
|
||||
#include "WMFVideoMFTManager.h"
|
||||
#include "WMFAudioMFTManager.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "WMFMediaDataDecoder.h"
|
||||
@ -70,10 +70,10 @@ WMFDecoderModule::CreateH264Decoder(const mp4_demuxer::VideoDecoderConfig& aConf
|
||||
MediaTaskQueue* aVideoTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
return new WMFMediaDataDecoder(new WMFVideoOutputSource(aConfig,
|
||||
aLayersBackend,
|
||||
aImageContainer,
|
||||
sDXVAEnabled),
|
||||
return new WMFMediaDataDecoder(new WMFVideoMFTManager(aConfig,
|
||||
aLayersBackend,
|
||||
aImageContainer,
|
||||
sDXVAEnabled),
|
||||
aVideoTaskQueue,
|
||||
aCallback);
|
||||
}
|
||||
@ -83,7 +83,7 @@ WMFDecoderModule::CreateAACDecoder(const mp4_demuxer::AudioDecoderConfig& aConfi
|
||||
MediaTaskQueue* aAudioTaskQueue,
|
||||
MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
return new WMFMediaDataDecoder(new WMFAudioOutputSource(aConfig),
|
||||
return new WMFMediaDataDecoder(new WMFAudioMFTManager(aConfig),
|
||||
aAudioTaskQueue,
|
||||
aCallback);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user