зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team.
This commit is contained in:
Коммит
1e03d34ba6
|
@ -982,7 +982,6 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
|
||||||
{
|
{
|
||||||
a11y::RootAccessible* rootAccWrap = accWrap->RootAccessible();
|
a11y::RootAccessible* rootAccWrap = accWrap->RootAccessible();
|
||||||
if (rootAccWrap && rootAccWrap->mActivated) {
|
if (rootAccWrap && rootAccWrap->mActivated) {
|
||||||
atk_focus_tracker_notify(atkObj);
|
|
||||||
// Fire state change event for focus
|
// Fire state change event for focus
|
||||||
nsRefPtr<AccEvent> stateChangeEvent =
|
nsRefPtr<AccEvent> stateChangeEvent =
|
||||||
new AccStateChangeEvent(accessible, states::FOCUSED, true);
|
new AccStateChangeEvent(accessible, states::FOCUSED, true);
|
||||||
|
@ -1169,7 +1168,6 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nsIAccessibleEvent::EVENT_MENUPOPUP_START:
|
case nsIAccessibleEvent::EVENT_MENUPOPUP_START:
|
||||||
atk_focus_tracker_notify(atkObj); // fire extra focus event
|
|
||||||
atk_object_notify_state_change(atkObj, ATK_STATE_VISIBLE, true);
|
atk_object_notify_state_change(atkObj, ATK_STATE_VISIBLE, true);
|
||||||
atk_object_notify_state_change(atkObj, ATK_STATE_SHOWING, true);
|
atk_object_notify_state_change(atkObj, ATK_STATE_SHOWING, true);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -10,7 +10,6 @@ chrome.jar:
|
||||||
|
|
||||||
content/arrow.svg (content/arrow.svg)
|
content/arrow.svg (content/arrow.svg)
|
||||||
* content/dbg-browser-actors.js (content/dbg-browser-actors.js)
|
* content/dbg-browser-actors.js (content/dbg-browser-actors.js)
|
||||||
content/forms.js (content/forms.js)
|
|
||||||
* content/settings.js (content/settings.js)
|
* content/settings.js (content/settings.js)
|
||||||
* content/shell.html (content/shell.html)
|
* content/shell.html (content/shell.html)
|
||||||
* content/shell.js (content/shell.js)
|
* content/shell.js (content/shell.js)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"revision": "207a81a6816b8627674a956b521772de2ac6b572",
|
"revision": "ab0d6e1927a4fbce5d171555044557c1b7ba25c3",
|
||||||
"repo_path": "/integration/gaia-central"
|
"repo_path": "/integration/gaia-central"
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,5 +61,7 @@ fi
|
||||||
MOZ_WEBGL_CONFORMANT=1
|
MOZ_WEBGL_CONFORMANT=1
|
||||||
# Enable navigator.mozPay
|
# Enable navigator.mozPay
|
||||||
MOZ_PAY=1
|
MOZ_PAY=1
|
||||||
|
# Enable activities. These are used for FxOS developers currently.
|
||||||
|
MOZ_ACTIVITIES=1
|
||||||
MOZ_JSDOWNLOADS=1
|
MOZ_JSDOWNLOADS=1
|
||||||
|
|
||||||
|
|
|
@ -521,6 +521,19 @@
|
||||||
@BINPATH@/components/TCPSocketParentIntermediary.js
|
@BINPATH@/components/TCPSocketParentIntermediary.js
|
||||||
@BINPATH@/components/TCPSocket.manifest
|
@BINPATH@/components/TCPSocket.manifest
|
||||||
|
|
||||||
|
#ifdef MOZ_ACTIVITIES
|
||||||
|
@BINPATH@/components/SystemMessageInternal.js
|
||||||
|
@BINPATH@/components/SystemMessageManager.js
|
||||||
|
@BINPATH@/components/SystemMessageManager.manifest
|
||||||
|
|
||||||
|
@BINPATH@/components/Activities.manifest
|
||||||
|
@BINPATH@/components/ActivityOptions.js
|
||||||
|
@BINPATH@/components/ActivityProxy.js
|
||||||
|
@BINPATH@/components/ActivityRequestHandler.js
|
||||||
|
@BINPATH@/components/ActivityWrapper.js
|
||||||
|
@BINPATH@/components/ActivityMessageConfigurator.js
|
||||||
|
#endif
|
||||||
|
|
||||||
@BINPATH@/components/Payment.js
|
@BINPATH@/components/Payment.js
|
||||||
@BINPATH@/components/PaymentFlowInfo.js
|
@BINPATH@/components/PaymentFlowInfo.js
|
||||||
@BINPATH@/components/PaymentRequestInfo.js
|
@BINPATH@/components/PaymentRequestInfo.js
|
||||||
|
|
|
@ -147,9 +147,15 @@ case "$target" in
|
||||||
dnl set up compilers
|
dnl set up compilers
|
||||||
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
|
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
|
||||||
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
|
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
|
||||||
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
|
if test -z "$CC"; then
|
||||||
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
|
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
|
||||||
CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
|
fi
|
||||||
|
if test -z "$CXX"; then
|
||||||
|
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
|
||||||
|
fi
|
||||||
|
if test -z "$CPP"; then
|
||||||
|
CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
|
||||||
|
fi
|
||||||
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
|
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
|
||||||
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
|
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
|
||||||
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
|
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
|
||||||
|
|
|
@ -7360,6 +7360,14 @@ if test -n "$MOZ_PAY"; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST(MOZ_PAY)
|
AC_SUBST(MOZ_PAY)
|
||||||
|
|
||||||
|
dnl ========================================================
|
||||||
|
dnl = Enable Browser Support for Activities
|
||||||
|
dnl ========================================================
|
||||||
|
if test -n "$MOZ_ACTIVITIES"; then
|
||||||
|
AC_DEFINE(MOZ_ACTIVITIES)
|
||||||
|
fi
|
||||||
|
AC_SUBST(MOZ_ACTIVITIES)
|
||||||
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl = Enable Support for AudioChannelManager API
|
dnl = Enable Support for AudioChannelManager API
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
|
@ -90,6 +90,20 @@ nsDOMKeyboardEvent::GetMetaKey(bool* aIsDown)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
nsDOMKeyboardEvent::Repeat()
|
||||||
|
{
|
||||||
|
return mEvent->AsKeyboardEvent()->mIsRepeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDOMKeyboardEvent::GetRepeat(bool* aIsRepeat)
|
||||||
|
{
|
||||||
|
NS_ENSURE_ARG_POINTER(aIsRepeat);
|
||||||
|
*aIsRepeat = Repeat();
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMKeyboardEvent::GetModifierState(const nsAString& aKey,
|
nsDOMKeyboardEvent::GetModifierState(const nsAString& aKey,
|
||||||
bool* aState)
|
bool* aState)
|
||||||
|
|
|
@ -43,6 +43,7 @@ public:
|
||||||
return GetModifierStateInternal(aKey);
|
return GetModifierStateInternal(aKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Repeat();
|
||||||
uint32_t CharCode();
|
uint32_t CharCode();
|
||||||
uint32_t KeyCode();
|
uint32_t KeyCode();
|
||||||
virtual uint32_t Which() MOZ_OVERRIDE;
|
virtual uint32_t Which() MOZ_OVERRIDE;
|
||||||
|
|
|
@ -79,27 +79,28 @@ WebappsRegistry.prototype = {
|
||||||
return uri.prePath;
|
return uri.prePath;
|
||||||
},
|
},
|
||||||
|
|
||||||
_validateURL: function(aURL) {
|
// Checks that the URL scheme is appropriate (http or https) and
|
||||||
|
// asynchronously fire an error on the DOM Request if it isn't.
|
||||||
|
_validateURL: function(aURL, aRequest) {
|
||||||
let uri;
|
let uri;
|
||||||
let res;
|
let res;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
uri = Services.io.newURI(aURL, null, null);
|
uri = Services.io.newURI(aURL, null, null);
|
||||||
if (uri.schemeIs("http") || uri.schemeIs("https")) {
|
if (uri.schemeIs("http") || uri.schemeIs("https")) {
|
||||||
res = uri.spec;
|
res = uri.spec;
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
throw new Components.Exception(
|
Services.DOMRequest.fireErrorAsync(aRequest, "INVALID_URL");
|
||||||
"INVALID_URL: '" + aURL + "'", Cr.NS_ERROR_FAILURE
|
return false;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The scheme is incorrect, throw an exception.
|
// The scheme is incorrect, fire DOMRequest error.
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new Components.Exception(
|
Services.DOMRequest.fireErrorAsync(aRequest, "INVALID_URL");
|
||||||
"INVALID_URL_SCHEME: '" + uri.scheme + "'; must be 'http' or 'https'",
|
return false;
|
||||||
Cr.NS_ERROR_FAILURE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return uri.spec;
|
return uri.spec;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -113,13 +114,7 @@ WebappsRegistry.prototype = {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let runnable = {
|
Services.DOMRequest.fireErrorAsync(aRequest, "BACKGROUND_APP");
|
||||||
run: function run() {
|
|
||||||
Services.DOMRequest.fireError(aRequest, "BACKGROUND_APP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Services.tm.currentThread.dispatch(runnable,
|
|
||||||
Ci.nsIThread.DISPATCH_NORMAL);
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -155,11 +150,11 @@ WebappsRegistry.prototype = {
|
||||||
// mozIDOMApplicationRegistry implementation
|
// mozIDOMApplicationRegistry implementation
|
||||||
|
|
||||||
install: function(aURL, aParams) {
|
install: function(aURL, aParams) {
|
||||||
let uri = this._validateURL(aURL);
|
|
||||||
|
|
||||||
let request = this.createRequest();
|
let request = this.createRequest();
|
||||||
|
|
||||||
if (this._ensureForeground(request)) {
|
let uri = this._validateURL(aURL, request);
|
||||||
|
|
||||||
|
if (uri && this._ensureForeground(request)) {
|
||||||
this.addMessageListeners("Webapps:Install:Return:KO");
|
this.addMessageListeners("Webapps:Install:Return:KO");
|
||||||
cpmm.sendAsyncMessage("Webapps:Install",
|
cpmm.sendAsyncMessage("Webapps:Install",
|
||||||
this._prepareInstall(uri, request, aParams, false));
|
this._prepareInstall(uri, request, aParams, false));
|
||||||
|
@ -218,11 +213,11 @@ WebappsRegistry.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
installPackage: function(aURL, aParams) {
|
installPackage: function(aURL, aParams) {
|
||||||
let uri = this._validateURL(aURL);
|
|
||||||
|
|
||||||
let request = this.createRequest();
|
let request = this.createRequest();
|
||||||
|
|
||||||
if (this._ensureForeground(request)) {
|
let uri = this._validateURL(aURL, request);
|
||||||
|
|
||||||
|
if (uri && this._ensureForeground(request)) {
|
||||||
this.addMessageListeners("Webapps:Install:Return:KO");
|
this.addMessageListeners("Webapps:Install:Return:KO");
|
||||||
cpmm.sendAsyncMessage("Webapps:InstallPackage",
|
cpmm.sendAsyncMessage("Webapps:InstallPackage",
|
||||||
this._prepareInstall(uri, request, aParams, true));
|
this._prepareInstall(uri, request, aParams, true));
|
||||||
|
@ -471,13 +466,7 @@ WebappsApplication.prototype = {
|
||||||
requestID: this.getRequestId(request) }
|
requestID: this.getRequestId(request) }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
let runnable = {
|
Services.DOMRequest.fireErrorAsync(request, "NO_CLEARABLE_BROWSER");
|
||||||
run: function run() {
|
|
||||||
Services.DOMRequest.fireError(request, "NO_CLEARABLE_BROWSER");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Services.tm.currentThread.dispatch(runnable,
|
|
||||||
Ci.nsIThread.DISPATCH_NORMAL);
|
|
||||||
}
|
}
|
||||||
return request;
|
return request;
|
||||||
},
|
},
|
||||||
|
@ -751,7 +740,7 @@ WebappsApplicationMgmt.prototype = {
|
||||||
var msg = aMessage.json;
|
var msg = aMessage.json;
|
||||||
let req = this.getRequest(msg.requestID);
|
let req = this.getRequest(msg.requestID);
|
||||||
// We want Webapps:Install:Return:OK and Webapps:Uninstall:Broadcast:Return:OK
|
// We want Webapps:Install:Return:OK and Webapps:Uninstall:Broadcast:Return:OK
|
||||||
// to be boradcasted to all instances of mozApps.mgmt.
|
// to be broadcasted to all instances of mozApps.mgmt.
|
||||||
if (!((msg.oid == this._id && req) ||
|
if (!((msg.oid == this._id && req) ||
|
||||||
aMessage.name == "Webapps:Install:Return:OK" ||
|
aMessage.name == "Webapps:Install:Return:OK" ||
|
||||||
aMessage.name == "Webapps:Uninstall:Broadcast:Return:OK")) {
|
aMessage.name == "Webapps:Uninstall:Broadcast:Return:OK")) {
|
||||||
|
|
|
@ -56,6 +56,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058
|
||||||
launchableValue = SpecialPowers.setAllAppsLaunchable(true);
|
launchableValue = SpecialPowers.setAllAppsLaunchable(true);
|
||||||
SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
|
SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
|
||||||
|
|
||||||
|
// Test Bug 927699 - navigator.mozApps.install(url) lets NS_ERROR_FAILURE
|
||||||
|
// onto the web
|
||||||
|
var request = navigator.mozApps.install("");
|
||||||
|
request.onerror = function() {
|
||||||
|
ok(request.error.name == "INVALID_URL", "Got expected INVALID_URL");
|
||||||
|
continueTest();
|
||||||
|
};
|
||||||
|
request.onsuccess = mozAppsError;
|
||||||
|
yield undefined;
|
||||||
|
|
||||||
setAppVersion(1, continueTest);
|
setAppVersion(1, continueTest);
|
||||||
yield undefined;
|
yield undefined;
|
||||||
SpecialPowers.autoConfirmAppInstall(continueTest);
|
SpecialPowers.autoConfirmAppInstall(continueTest);
|
||||||
|
@ -69,7 +79,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058
|
||||||
setAppVersion(2, continueTest);
|
setAppVersion(2, continueTest);
|
||||||
yield undefined;
|
yield undefined;
|
||||||
|
|
||||||
var request = navigator.mozApps.install(gHostedManifestURL);
|
request = navigator.mozApps.install(gHostedManifestURL);
|
||||||
request.onerror = mozAppsError;
|
request.onerror = mozAppsError;
|
||||||
request.onsuccess = continueTest;
|
request.onsuccess = continueTest;
|
||||||
yield undefined;
|
yield undefined;
|
||||||
|
|
|
@ -94,6 +94,12 @@ var steps = [
|
||||||
function() {
|
function() {
|
||||||
PackagedTestHelper.setAppVersion(0, PackagedTestHelper.next);
|
PackagedTestHelper.setAppVersion(0, PackagedTestHelper.next);
|
||||||
},
|
},
|
||||||
|
function() {
|
||||||
|
// Bug 927699 - navigator.mozApps.install(url) lets NS_ERROR_FAILURE onto
|
||||||
|
// the web.
|
||||||
|
ok(true, "== TEST == INVALID_URL");
|
||||||
|
checkAppInstallError("", "INVALID_URL");
|
||||||
|
},
|
||||||
function() {
|
function() {
|
||||||
// Test network error.
|
// Test network error.
|
||||||
ok(true, "== TEST == Network error");
|
ok(true, "== TEST == Network error");
|
||||||
|
|
|
@ -24,9 +24,14 @@ docShell.setFullscreenAllowed(infos.fullscreenAllowed);
|
||||||
|
|
||||||
|
|
||||||
if (!('BrowserElementIsPreloaded' in this)) {
|
if (!('BrowserElementIsPreloaded' in this)) {
|
||||||
|
try {
|
||||||
|
if (Services.prefs.getBoolPref("dom.mozInputMethod.enabled")) {
|
||||||
|
Services.scriptloader.loadSubScript("chrome://global/content/forms.js", global);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
// Those are produc-specific files that's sometimes unavailable.
|
// Those are produc-specific files that's sometimes unavailable.
|
||||||
try {
|
try {
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/forms.js");
|
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js");
|
Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ this.EXPORTED_SYMBOLS = ['Keyboard'];
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
const kFormsFrameScript = 'chrome://browser/content/forms.js';
|
const kFormsFrameScript = 'chrome://global/content/forms.js';
|
||||||
|
|
||||||
Cu.import('resource://gre/modules/Services.jsm');
|
Cu.import('resource://gre/modules/Services.jsm');
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
@ -64,27 +64,31 @@ this.Keyboard = {
|
||||||
ppmm.broadcastAsyncMessage('Keyboard:FocusChange', { 'type': 'blur' });
|
ppmm.broadcastAsyncMessage('Keyboard:FocusChange', { 'type': 'blur' });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mm.addMessageListener('Forms:Input', this);
|
this.initFormsFrameScript(mm);
|
||||||
mm.addMessageListener('Forms:SelectionChange', this);
|
}
|
||||||
mm.addMessageListener('Forms:GetText:Result:OK', this);
|
},
|
||||||
mm.addMessageListener('Forms:GetText:Result:Error', this);
|
|
||||||
mm.addMessageListener('Forms:SetSelectionRange:Result:OK', this);
|
|
||||||
mm.addMessageListener('Forms:ReplaceSurroundingText:Result:OK', this);
|
|
||||||
mm.addMessageListener('Forms:SendKey:Result:OK', this);
|
|
||||||
mm.addMessageListener('Forms:SequenceError', this);
|
|
||||||
mm.addMessageListener('Forms:GetContext:Result:OK', this);
|
|
||||||
mm.addMessageListener('Forms:SetComposition:Result:OK', this);
|
|
||||||
mm.addMessageListener('Forms:EndComposition:Result:OK', this);
|
|
||||||
|
|
||||||
// When not running apps OOP, we need to load forms.js here since this
|
initFormsFrameScript: function(mm) {
|
||||||
// won't happen from dom/ipc/preload.js
|
mm.addMessageListener('Forms:Input', this);
|
||||||
try {
|
mm.addMessageListener('Forms:SelectionChange', this);
|
||||||
if (Services.prefs.getBoolPref("dom.ipc.tabs.disabled") === true) {
|
mm.addMessageListener('Forms:GetText:Result:OK', this);
|
||||||
mm.loadFrameScript(kFormsFrameScript, true);
|
mm.addMessageListener('Forms:GetText:Result:Error', this);
|
||||||
}
|
mm.addMessageListener('Forms:SetSelectionRange:Result:OK', this);
|
||||||
} catch (e) {
|
mm.addMessageListener('Forms:ReplaceSurroundingText:Result:OK', this);
|
||||||
dump('Error loading ' + kFormsFrameScript + ' as frame script: ' + e + '\n');
|
mm.addMessageListener('Forms:SendKey:Result:OK', this);
|
||||||
|
mm.addMessageListener('Forms:SequenceError', this);
|
||||||
|
mm.addMessageListener('Forms:GetContext:Result:OK', this);
|
||||||
|
mm.addMessageListener('Forms:SetComposition:Result:OK', this);
|
||||||
|
mm.addMessageListener('Forms:EndComposition:Result:OK', this);
|
||||||
|
|
||||||
|
// When not running apps OOP, we need to load forms.js here since this
|
||||||
|
// won't happen from dom/ipc/preload.js
|
||||||
|
try {
|
||||||
|
if (Services.prefs.getBoolPref("dom.ipc.tabs.disabled") === true) {
|
||||||
|
mm.loadFrameScript(kFormsFrameScript, true);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
dump('Error loading ' + kFormsFrameScript + ' as frame script: ' + e + '\n');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
toolkit.jar:
|
||||||
|
content/global/forms.js (forms.js)
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "nsIDOMUIEvent.idl"
|
#include "nsIDOMUIEvent.idl"
|
||||||
|
|
||||||
[scriptable, builtinclass, uuid(91a3d7f2-223b-4e09-a566-634e7ee0a31d)]
|
[scriptable, builtinclass, uuid(2bbf1087-e404-45a5-880a-4f3702aebd4e)]
|
||||||
interface nsIDOMKeyEvent : nsIDOMUIEvent
|
interface nsIDOMKeyEvent : nsIDOMUIEvent
|
||||||
{
|
{
|
||||||
const unsigned long DOM_VK_CANCEL = 0x03;
|
const unsigned long DOM_VK_CANCEL = 0x03;
|
||||||
|
@ -252,6 +252,7 @@ interface nsIDOMKeyEvent : nsIDOMUIEvent
|
||||||
const unsigned long DOM_KEY_LOCATION_JOYSTICK = 0x05;
|
const unsigned long DOM_KEY_LOCATION_JOYSTICK = 0x05;
|
||||||
|
|
||||||
readonly attribute unsigned long location;
|
readonly attribute unsigned long location;
|
||||||
|
readonly attribute boolean repeat;
|
||||||
|
|
||||||
readonly attribute DOMString key;
|
readonly attribute DOMString key;
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,9 +87,15 @@ const BrowserElementIsPreloaded = true;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (Services.prefs.getBoolPref("dom.mozInputMethod.enabled")) {
|
||||||
|
Services.scriptloader.loadSubScript("chrome://global/content/forms.js", global);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
|
||||||
// Those are produc-specific files that's sometimes unavailable.
|
// Those are produc-specific files that's sometimes unavailable.
|
||||||
try {
|
try {
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/forms.js", global);
|
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js", global);
|
Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js", global);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,20 +168,27 @@ function invalidMessage(next) {
|
||||||
|
|
||||||
function fileURL(next) {
|
function fileURL(next) {
|
||||||
try {
|
try {
|
||||||
navigator.mozApps.install("file:///nonexistent");
|
var req = navigator.mozApps.install("file:///nonexistent");
|
||||||
ok(false,
|
req.onsuccess = function() {
|
||||||
"attempt to install nonexistent file: URL doesn't throw exception");
|
ok(false, "Unexpected success installing non existent file");
|
||||||
|
};
|
||||||
|
req.onerror = function() {
|
||||||
|
is(this.error.name, "INVALID_URL", "Expected INVALID_URL");
|
||||||
|
};
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
is(ex.message, "INVALID_URL_SCHEME: 'file'; must be 'http' or 'https'",
|
ok(false, "Unexpected exception " + ex.message);
|
||||||
"attempt to install nonexistent file: URL throws exception");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
navigator.mozApps.install("file:///");
|
req = navigator.mozApps.install("file:///");
|
||||||
ok(false, "attempt to install existent file: URL doesn't throw exception");
|
req.onsuccess = function() {
|
||||||
|
ok(false, "Unexpected success installing file: URL");
|
||||||
|
};
|
||||||
|
req.onerror = function() {
|
||||||
|
is(this.error.name, "INVALID_URL", "Expected INVALID_URL");
|
||||||
|
};
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
is(ex.message, "INVALID_URL_SCHEME: 'file'; must be 'http' or 'https'",
|
ok(false, "Unexpected exception " + ex.message);
|
||||||
"attempt to install existent file: URL throws exception");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -26,6 +26,7 @@ interface KeyboardEvent : UIEvent
|
||||||
const unsigned long DOM_KEY_LOCATION_JOYSTICK = 0x05;
|
const unsigned long DOM_KEY_LOCATION_JOYSTICK = 0x05;
|
||||||
|
|
||||||
readonly attribute unsigned long location;
|
readonly attribute unsigned long location;
|
||||||
|
readonly attribute boolean repeat;
|
||||||
|
|
||||||
readonly attribute DOMString key;
|
readonly attribute DOMString key;
|
||||||
};
|
};
|
||||||
|
|
|
@ -440,6 +440,11 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const = 0;
|
const Matrix &aTransform = Matrix()) const = 0;
|
||||||
|
|
||||||
|
/* Take the contents of this path and stream it to another sink, this works
|
||||||
|
* regardless of the backend that might be used for the destination sink.
|
||||||
|
*/
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const = 0;
|
||||||
|
|
||||||
/* This gets the fillrule this path's builder was created with. This is not
|
/* This gets the fillrule this path's builder was created with. This is not
|
||||||
* mutable.
|
* mutable.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -143,6 +143,11 @@ static inline Matrix ToMatrix(const D2D1_MATRIX_3X2_F &aTransform)
|
||||||
aTransform._31, aTransform._32);
|
aTransform._31, aTransform._32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline Point ToPoint(const D2D1_POINT_2F &aPoint)
|
||||||
|
{
|
||||||
|
return Point(aPoint.x, aPoint.y);
|
||||||
|
}
|
||||||
|
|
||||||
static inline DXGI_FORMAT DXGIFormat(SurfaceFormat aFormat)
|
static inline DXGI_FORMAT DXGIFormat(SurfaceFormat aFormat)
|
||||||
{
|
{
|
||||||
switch (aFormat) {
|
switch (aFormat) {
|
||||||
|
|
|
@ -250,6 +250,12 @@ IntRectToSkIRect(const IntRect& aRect)
|
||||||
return SkIRect::MakeXYWH(aRect.x, aRect.y, aRect.width, aRect.height);
|
return SkIRect::MakeXYWH(aRect.x, aRect.y, aRect.width, aRect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline Point
|
||||||
|
SkPointToPoint(const SkPoint &aPoint)
|
||||||
|
{
|
||||||
|
return Point(SkScalarToFloat(aPoint.x()), SkScalarToFloat(aPoint.y()));
|
||||||
|
}
|
||||||
|
|
||||||
static inline SkShader::TileMode
|
static inline SkShader::TileMode
|
||||||
ExtendModeToTileMode(ExtendMode aMode)
|
ExtendModeToTileMode(ExtendMode aMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,8 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const;
|
const Matrix &aTransform = Matrix()) const;
|
||||||
|
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const { MOZ_ASSERT(false); }
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const { return mFillRule; }
|
virtual FillRule GetFillRule() const { return mFillRule; }
|
||||||
|
|
||||||
CGMutablePathRef GetPath() const { return mPath; }
|
CGMutablePathRef GetPath() const { return mPath; }
|
||||||
|
|
|
@ -236,6 +236,35 @@ PathCairo::GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
return aTransform.TransformBounds(bounds);
|
return aTransform.TransformBounds(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PathCairo::StreamToSink(PathSink *aSink) const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < mPathData.size(); i++) {
|
||||||
|
switch (mPathData[i].header.type) {
|
||||||
|
case CAIRO_PATH_MOVE_TO:
|
||||||
|
i++;
|
||||||
|
aSink->MoveTo(Point(mPathData[i].point.x, mPathData[i].point.y));
|
||||||
|
break;
|
||||||
|
case CAIRO_PATH_LINE_TO:
|
||||||
|
i++;
|
||||||
|
aSink->LineTo(Point(mPathData[i].point.x, mPathData[i].point.y));
|
||||||
|
break;
|
||||||
|
case CAIRO_PATH_CURVE_TO:
|
||||||
|
aSink->BezierTo(Point(mPathData[i + 1].point.x, mPathData[i + 1].point.y),
|
||||||
|
Point(mPathData[i + 2].point.x, mPathData[i + 2].point.y),
|
||||||
|
Point(mPathData[i + 3].point.x, mPathData[i + 3].point.y));
|
||||||
|
i += 3;
|
||||||
|
break;
|
||||||
|
case CAIRO_PATH_CLOSE_PATH:
|
||||||
|
aSink->Close();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Corrupt path data!
|
||||||
|
MOZ_ASSERT(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PathCairo::EnsureContainingContext() const
|
PathCairo::EnsureContainingContext() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,8 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const;
|
const Matrix &aTransform = Matrix()) const;
|
||||||
|
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const;
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const { return mFillRule; }
|
virtual FillRule GetFillRule() const { return mFillRule; }
|
||||||
|
|
||||||
void SetPathOnContext(cairo_t *aContext) const;
|
void SetPathOnContext(cairo_t *aContext) const;
|
||||||
|
|
|
@ -91,6 +91,70 @@ private:
|
||||||
bool mNeedsFigureEnded;
|
bool mNeedsFigureEnded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class StreamingGeometrySink : public ID2D1SimplifiedGeometrySink
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
StreamingGeometrySink(PathSink *aSink)
|
||||||
|
: mSink(aSink)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE QueryInterface(const IID &aIID, void **aPtr)
|
||||||
|
{
|
||||||
|
if (!aPtr) {
|
||||||
|
return E_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aIID == IID_IUnknown) {
|
||||||
|
*aPtr = static_cast<IUnknown*>(this);
|
||||||
|
return S_OK;
|
||||||
|
} else if (aIID == IID_ID2D1SimplifiedGeometrySink) {
|
||||||
|
*aPtr = static_cast<ID2D1SimplifiedGeometrySink*>(this);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE AddRef()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE Release()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We ignore SetFillMode, this depends on the destination sink.
|
||||||
|
STDMETHOD_(void, SetFillMode)(D2D1_FILL_MODE aMode)
|
||||||
|
{ return; }
|
||||||
|
STDMETHOD_(void, BeginFigure)(D2D1_POINT_2F aPoint, D2D1_FIGURE_BEGIN aBegin)
|
||||||
|
{ mSink->MoveTo(ToPoint(aPoint)); }
|
||||||
|
STDMETHOD_(void, AddLines)(const D2D1_POINT_2F *aLines, UINT aCount)
|
||||||
|
{ for (UINT i = 0; i < aCount; i++) { mSink->LineTo(ToPoint(aLines[i])); } }
|
||||||
|
STDMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *aSegments, UINT aCount)
|
||||||
|
{
|
||||||
|
for (UINT i = 0; i < aCount; i++) {
|
||||||
|
mSink->BezierTo(ToPoint(aSegments[i].point1), ToPoint(aSegments[i].point2), ToPoint(aSegments[i].point3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
STDMETHOD(Close)()
|
||||||
|
{ /* Should never be called! */ return S_OK; }
|
||||||
|
STDMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT aFlags)
|
||||||
|
{ /* Should never be called! */ }
|
||||||
|
|
||||||
|
STDMETHOD_(void, EndFigure)(D2D1_FIGURE_END aEnd)
|
||||||
|
{
|
||||||
|
if (aEnd == D2D1_FIGURE_END_CLOSED) {
|
||||||
|
return mSink->Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
|
||||||
|
PathSink *mSink;
|
||||||
|
};
|
||||||
|
|
||||||
PathBuilderD2D::~PathBuilderD2D()
|
PathBuilderD2D::~PathBuilderD2D()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -292,6 +356,22 @@ PathD2D::TransformedCopyToBuilder(const Matrix &aTransform, FillRule aFillRule)
|
||||||
return pathBuilder;
|
return pathBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PathD2D::StreamToSink(PathSink *aSink) const
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
StreamingGeometrySink sink(aSink);
|
||||||
|
|
||||||
|
hr = mGeometry->Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
|
||||||
|
D2D1::IdentityMatrix(), &sink);
|
||||||
|
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
gfxWarning() << "Failed to stream D2D path to sink. Code: " << hr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PathD2D::ContainsPoint(const Point &aPoint, const Matrix &aTransform) const
|
PathD2D::ContainsPoint(const Point &aPoint, const Matrix &aTransform) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,8 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const;
|
const Matrix &aTransform = Matrix()) const;
|
||||||
|
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const;
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const { return mFillRule; }
|
virtual FillRule GetFillRule() const { return mFillRule; }
|
||||||
|
|
||||||
ID2D1Geometry *GetGeometry() { return mGeometry; }
|
ID2D1Geometry *GetGeometry() { return mGeometry; }
|
||||||
|
|
|
@ -106,7 +106,9 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const
|
const Matrix &aTransform = Matrix()) const
|
||||||
{ return mPath->GetStrokedBounds(aStrokeOptions, aTransform); }
|
{ return mPath->GetStrokedBounds(aStrokeOptions, aTransform); }
|
||||||
|
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const { mPath->StreamToSink(aSink); }
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const { return mFillRule; }
|
virtual FillRule GetFillRule() const { return mFillRule; }
|
||||||
|
|
||||||
void StorePath(std::ostream &aStream) const;
|
void StorePath(std::ostream &aStream) const;
|
||||||
|
|
|
@ -209,5 +209,39 @@ PathSkia::GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
return aTransform.TransformBounds(bounds);
|
return aTransform.TransformBounds(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PathSkia::StreamToSink(PathSink *aSink) const
|
||||||
|
{
|
||||||
|
SkPath::RawIter iter(mPath);
|
||||||
|
|
||||||
|
SkPoint points[4];
|
||||||
|
SkPath::Verb currentVerb;
|
||||||
|
while ((currentVerb = iter.next(points)) != SkPath::kDone_Verb) {
|
||||||
|
switch (currentVerb) {
|
||||||
|
case SkPath::kMove_Verb:
|
||||||
|
aSink->MoveTo(SkPointToPoint(points[0]));
|
||||||
|
break;
|
||||||
|
case SkPath::kLine_Verb:
|
||||||
|
aSink->LineTo(SkPointToPoint(points[1]));
|
||||||
|
break;
|
||||||
|
case SkPath::kCubic_Verb:
|
||||||
|
aSink->BezierTo(SkPointToPoint(points[1]),
|
||||||
|
SkPointToPoint(points[2]),
|
||||||
|
SkPointToPoint(points[3]));
|
||||||
|
break;
|
||||||
|
case SkPath::kQuad_Verb:
|
||||||
|
aSink->QuadraticBezierTo(SkPointToPoint(points[1]),
|
||||||
|
SkPointToPoint(points[2]));
|
||||||
|
break;
|
||||||
|
case SkPath::kClose_Verb:
|
||||||
|
aSink->Close();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
MOZ_ASSERT(false);
|
||||||
|
// Unexpected verb found in path!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,8 @@ public:
|
||||||
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const Matrix &aTransform = Matrix()) const;
|
const Matrix &aTransform = Matrix()) const;
|
||||||
|
|
||||||
|
virtual void StreamToSink(PathSink *aSink) const;
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const { return mFillRule; }
|
virtual FillRule GetFillRule() const { return mFillRule; }
|
||||||
|
|
||||||
const SkPath& GetPath() const { return mPath; }
|
const SkPath& GetPath() const { return mPath; }
|
||||||
|
|
|
@ -53,8 +53,7 @@ void
|
||||||
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
||||||
const nsIntRegion& aVisibleRegion,
|
const nsIntRegion& aVisibleRegion,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform)
|
||||||
const gfx::Point& aOffset)
|
|
||||||
{
|
{
|
||||||
if (!ShouldDrawDiagnostics(aFlags)) {
|
if (!ShouldDrawDiagnostics(aFlags)) {
|
||||||
return;
|
return;
|
||||||
|
@ -66,36 +65,33 @@ Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
||||||
while (const nsIntRect* rect = screenIter.Next())
|
while (const nsIntRect* rect = screenIter.Next())
|
||||||
{
|
{
|
||||||
DrawDiagnostics(aFlags | DIAGNOSTIC_REGION_RECT,
|
DrawDiagnostics(aFlags | DIAGNOSTIC_REGION_RECT,
|
||||||
ToRect(*rect), aClipRect, aTransform, aOffset);
|
ToRect(*rect), aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawDiagnostics(aFlags, ToRect(aVisibleRegion.GetBounds()),
|
DrawDiagnostics(aFlags, ToRect(aVisibleRegion.GetBounds()),
|
||||||
aClipRect, aTransform, aOffset);
|
aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
Compositor::DrawDiagnostics(DiagnosticFlags aFlags,
|
||||||
const gfx::Rect& aVisibleRect,
|
const gfx::Rect& aVisibleRect,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform)
|
||||||
const gfx::Point& aOffset)
|
|
||||||
{
|
{
|
||||||
if (!ShouldDrawDiagnostics(aFlags)) {
|
if (!ShouldDrawDiagnostics(aFlags)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawDiagnosticsInternal(aFlags, aVisibleRect,
|
DrawDiagnosticsInternal(aFlags, aVisibleRect,
|
||||||
aClipRect, aTransform,
|
aClipRect, aTransform);
|
||||||
aOffset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
||||||
const gfx::Rect& aVisibleRect,
|
const gfx::Rect& aVisibleRect,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform)
|
||||||
const gfx::Point& aOffset)
|
|
||||||
{
|
{
|
||||||
#ifdef MOZ_B2G
|
#ifdef MOZ_B2G
|
||||||
int lWidth = 4;
|
int lWidth = 4;
|
||||||
|
@ -138,22 +134,22 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
||||||
this->DrawQuad(gfx::Rect(aVisibleRect.x, aVisibleRect.y,
|
this->DrawQuad(gfx::Rect(aVisibleRect.x, aVisibleRect.y,
|
||||||
lWidth, aVisibleRect.height),
|
lWidth, aVisibleRect.height),
|
||||||
aClipRect, effects, opacity,
|
aClipRect, effects, opacity,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
// top
|
// top
|
||||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y,
|
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y,
|
||||||
aVisibleRect.width - 2 * lWidth, lWidth),
|
aVisibleRect.width - 2 * lWidth, lWidth),
|
||||||
aClipRect, effects, opacity,
|
aClipRect, effects, opacity,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
// right
|
// right
|
||||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + aVisibleRect.width - lWidth, aVisibleRect.y,
|
this->DrawQuad(gfx::Rect(aVisibleRect.x + aVisibleRect.width - lWidth, aVisibleRect.y,
|
||||||
lWidth, aVisibleRect.height),
|
lWidth, aVisibleRect.height),
|
||||||
aClipRect, effects, opacity,
|
aClipRect, effects, opacity,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
// bottom
|
// bottom
|
||||||
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y + aVisibleRect.height-lWidth,
|
this->DrawQuad(gfx::Rect(aVisibleRect.x + lWidth, aVisibleRect.y + aVisibleRect.height-lWidth,
|
||||||
aVisibleRect.width - 2 * lWidth, lWidth),
|
aVisibleRect.width - 2 * lWidth, lWidth),
|
||||||
aClipRect, effects, opacity,
|
aClipRect, effects, opacity,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -125,8 +125,7 @@ class CompositingRenderTarget;
|
||||||
enum SurfaceInitMode
|
enum SurfaceInitMode
|
||||||
{
|
{
|
||||||
INIT_MODE_NONE,
|
INIT_MODE_NONE,
|
||||||
INIT_MODE_CLEAR,
|
INIT_MODE_CLEAR
|
||||||
INIT_MODE_COPY
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -248,10 +247,13 @@ public:
|
||||||
* Creates a Surface that can be used as a rendering target by this
|
* Creates a Surface that can be used as a rendering target by this
|
||||||
* compositor, and initializes the surface by copying from aSource.
|
* compositor, and initializes the surface by copying from aSource.
|
||||||
* If aSource is null, then the current screen buffer is used as source.
|
* If aSource is null, then the current screen buffer is used as source.
|
||||||
|
*
|
||||||
|
* aSourcePoint specifies the point in aSource to copy data from.
|
||||||
*/
|
*/
|
||||||
virtual TemporaryRef<CompositingRenderTarget>
|
virtual TemporaryRef<CompositingRenderTarget>
|
||||||
CreateRenderTargetFromSource(const gfx::IntRect& aRect,
|
CreateRenderTargetFromSource(const gfx::IntRect& aRect,
|
||||||
const CompositingRenderTarget* aSource) = 0;
|
const CompositingRenderTarget* aSource,
|
||||||
|
const gfx::IntPoint& aSourcePoint) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the given surface as the target for subsequent calls to DrawQuad.
|
* Sets the given surface as the target for subsequent calls to DrawQuad.
|
||||||
|
@ -280,14 +282,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* Tell the compositor to actually draw a quad. What to do draw and how it is
|
* Tell the compositor to actually draw a quad. What to do draw and how it is
|
||||||
* drawn is specified by aEffectChain. aRect is the quad to draw, in user space.
|
* drawn is specified by aEffectChain. aRect is the quad to draw, in user space.
|
||||||
* aTransform transforms from user space to screen space. aOffset is the
|
* aTransform transforms from user space to screen space. If texture coords are
|
||||||
* offset of the render target from 0,0 of the screen. If texture coords are
|
|
||||||
* required, these will be in the primary effect in the effect chain.
|
* required, these will be in the primary effect in the effect chain.
|
||||||
*/
|
*/
|
||||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||||
const EffectChain& aEffectChain,
|
const EffectChain& aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform) = 0;
|
||||||
const gfx::Point& aOffset) = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a new frame.
|
* Start a new frame.
|
||||||
|
@ -349,14 +349,12 @@ public:
|
||||||
void DrawDiagnostics(DiagnosticFlags aFlags,
|
void DrawDiagnostics(DiagnosticFlags aFlags,
|
||||||
const gfx::Rect& visibleRect,
|
const gfx::Rect& visibleRect,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& transform,
|
const gfx::Matrix4x4& transform);
|
||||||
const gfx::Point& aOffset);
|
|
||||||
|
|
||||||
void DrawDiagnostics(DiagnosticFlags aFlags,
|
void DrawDiagnostics(DiagnosticFlags aFlags,
|
||||||
const nsIntRegion& visibleRegion,
|
const nsIntRegion& visibleRegion,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& transform,
|
const gfx::Matrix4x4& transform);
|
||||||
const gfx::Point& aOffset);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef MOZ_DUMP_PAINTING
|
#ifdef MOZ_DUMP_PAINTING
|
||||||
|
@ -432,8 +430,7 @@ protected:
|
||||||
void DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
void DrawDiagnosticsInternal(DiagnosticFlags aFlags,
|
||||||
const gfx::Rect& aVisibleRect,
|
const gfx::Rect& aVisibleRect,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const gfx::Matrix4x4& transform,
|
const gfx::Matrix4x4& transform);
|
||||||
const gfx::Point& aOffset);
|
|
||||||
|
|
||||||
bool ShouldDrawDiagnostics(DiagnosticFlags);
|
bool ShouldDrawDiagnostics(DiagnosticFlags);
|
||||||
|
|
||||||
|
|
|
@ -250,20 +250,20 @@ void BasicCompositor::Destroy()
|
||||||
TemporaryRef<CompositingRenderTarget>
|
TemporaryRef<CompositingRenderTarget>
|
||||||
BasicCompositor::CreateRenderTarget(const IntRect& aRect, SurfaceInitMode aInit)
|
BasicCompositor::CreateRenderTarget(const IntRect& aRect, SurfaceInitMode aInit)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aInit != INIT_MODE_COPY);
|
|
||||||
RefPtr<DrawTarget> target = mDrawTarget->CreateSimilarDrawTarget(aRect.Size(), FORMAT_B8G8R8A8);
|
RefPtr<DrawTarget> target = mDrawTarget->CreateSimilarDrawTarget(aRect.Size(), FORMAT_B8G8R8A8);
|
||||||
|
|
||||||
RefPtr<BasicCompositingRenderTarget> rt = new BasicCompositingRenderTarget(target, aRect.Size());
|
RefPtr<BasicCompositingRenderTarget> rt = new BasicCompositingRenderTarget(target, aRect);
|
||||||
|
|
||||||
return rt.forget();
|
return rt.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
TemporaryRef<CompositingRenderTarget>
|
TemporaryRef<CompositingRenderTarget>
|
||||||
BasicCompositor::CreateRenderTargetFromSource(const IntRect &aRect,
|
BasicCompositor::CreateRenderTargetFromSource(const IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource)
|
const CompositingRenderTarget *aSource,
|
||||||
|
const IntPoint &aSourcePoint)
|
||||||
{
|
{
|
||||||
RefPtr<DrawTarget> target = mDrawTarget->CreateSimilarDrawTarget(aRect.Size(), FORMAT_B8G8R8A8);
|
RefPtr<DrawTarget> target = mDrawTarget->CreateSimilarDrawTarget(aRect.Size(), FORMAT_B8G8R8A8);
|
||||||
RefPtr<BasicCompositingRenderTarget> rt = new BasicCompositingRenderTarget(target, aRect.Size());
|
RefPtr<BasicCompositingRenderTarget> rt = new BasicCompositingRenderTarget(target, aRect);
|
||||||
|
|
||||||
DrawTarget *source;
|
DrawTarget *source;
|
||||||
if (aSource) {
|
if (aSource) {
|
||||||
|
@ -276,7 +276,8 @@ BasicCompositor::CreateRenderTargetFromSource(const IntRect &aRect,
|
||||||
|
|
||||||
RefPtr<SourceSurface> snapshot = source->Snapshot();
|
RefPtr<SourceSurface> snapshot = source->Snapshot();
|
||||||
|
|
||||||
rt->mDrawTarget->CopySurface(snapshot, aRect, IntPoint(0, 0));
|
IntRect sourceRect(aSourcePoint, aRect.Size());
|
||||||
|
rt->mDrawTarget->CopySurface(snapshot, sourceRect, IntPoint(0, 0));
|
||||||
return rt.forget();
|
return rt.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,12 +331,13 @@ DrawSurfaceWithTextureCoords(DrawTarget *aDest,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BasicCompositor::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||||
|
const gfx::Rect& aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity,
|
||||||
const gfx::Point& aOffset)
|
const gfx::Matrix4x4 &aTransform)
|
||||||
{
|
{
|
||||||
DrawTarget *dest = mRenderTarget ? mRenderTarget->mDrawTarget : mDrawTarget;
|
DrawTarget *dest = mRenderTarget->mDrawTarget;
|
||||||
|
|
||||||
if (!aTransform.Is2D()) {
|
if (!aTransform.Is2D()) {
|
||||||
NS_WARNING("Can't handle 3D transforms yet!");
|
NS_WARNING("Can't handle 3D transforms yet!");
|
||||||
|
@ -346,7 +348,8 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
||||||
|
|
||||||
Matrix oldTransform = dest->GetTransform();
|
Matrix oldTransform = dest->GetTransform();
|
||||||
Matrix newTransform = aTransform.As2D();
|
Matrix newTransform = aTransform.As2D();
|
||||||
newTransform.Translate(-aOffset.x, -aOffset.y);
|
IntPoint offset = mRenderTarget->GetOrigin();
|
||||||
|
newTransform.Translate(-offset.x, -offset.y);
|
||||||
dest->SetTransform(newTransform);
|
dest->SetTransform(newTransform);
|
||||||
|
|
||||||
RefPtr<SourceSurface> sourceMask;
|
RefPtr<SourceSurface> sourceMask;
|
||||||
|
|
|
@ -19,9 +19,10 @@ namespace layers {
|
||||||
class BasicCompositingRenderTarget : public CompositingRenderTarget
|
class BasicCompositingRenderTarget : public CompositingRenderTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BasicCompositingRenderTarget(gfx::DrawTarget* aDrawTarget, const gfx::IntSize& aSize)
|
BasicCompositingRenderTarget(gfx::DrawTarget* aDrawTarget, const gfx::IntRect& aRect)
|
||||||
: mDrawTarget(aDrawTarget)
|
: CompositingRenderTarget(aRect.TopLeft())
|
||||||
, mSize(aSize)
|
, mDrawTarget(aDrawTarget)
|
||||||
|
, mSize(aRect.Size())
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
||||||
|
@ -60,7 +61,8 @@ public:
|
||||||
|
|
||||||
virtual TemporaryRef<CompositingRenderTarget>
|
virtual TemporaryRef<CompositingRenderTarget>
|
||||||
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource) MOZ_OVERRIDE;
|
const CompositingRenderTarget *aSource,
|
||||||
|
const gfx::IntPoint &aSourcePoint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual TemporaryRef<DataTextureSource>
|
virtual TemporaryRef<DataTextureSource>
|
||||||
CreateDataTextureSource(TextureFlags aFlags = 0) MOZ_OVERRIDE;
|
CreateDataTextureSource(TextureFlags aFlags = 0) MOZ_OVERRIDE;
|
||||||
|
@ -76,10 +78,11 @@ public:
|
||||||
return mRenderTarget;
|
return mRenderTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
virtual void DrawQuad(const gfx::Rect& aRect,
|
||||||
|
const gfx::Rect& aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity,
|
||||||
const gfx::Point& aOffset) MOZ_OVERRIDE;
|
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
||||||
const gfxMatrix& aTransform,
|
const gfxMatrix& aTransform,
|
||||||
|
|
|
@ -61,8 +61,7 @@ CanvasLayerComposite::GetRenderState()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CanvasLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
CanvasLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
if (!mImageHost || !mImageHost->IsAttached()) {
|
if (!mImageHost || !mImageHost->IsAttached()) {
|
||||||
return;
|
return;
|
||||||
|
@ -98,7 +97,6 @@ CanvasLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||||
mImageHost->Composite(effectChain,
|
mImageHost->Composite(effectChain,
|
||||||
GetEffectiveOpacity(),
|
GetEffectiveOpacity(),
|
||||||
transform,
|
transform,
|
||||||
gfx::Point(aOffset.x, aOffset.y),
|
|
||||||
gfx::ToFilter(filter),
|
gfx::ToFilter(filter),
|
||||||
clipRect);
|
clipRect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void CleanupResources() MOZ_OVERRIDE;
|
virtual void CleanupResources() MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@ namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
void
|
void
|
||||||
ColorLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
ColorLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
EffectChain effects;
|
EffectChain effects;
|
||||||
gfxRGBA color(GetColor());
|
gfxRGBA color(GetColor());
|
||||||
|
@ -46,11 +45,10 @@ ColorLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||||
gfx::Matrix4x4 transform;
|
gfx::Matrix4x4 transform;
|
||||||
ToMatrix4x4(GetEffectiveTransform(), transform);
|
ToMatrix4x4(GetEffectiveTransform(), transform);
|
||||||
|
|
||||||
mCompositor->DrawQuad(rect, clipRect, effects, opacity,
|
mCompositor->DrawQuad(rect, clipRect, effects, opacity, transform);
|
||||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
|
||||||
mCompositor->DrawDiagnostics(DIAGNOSTIC_COLOR,
|
mCompositor->DrawDiagnostics(DIAGNOSTIC_COLOR,
|
||||||
rect, clipRect,
|
rect, clipRect,
|
||||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* layers */
|
} /* layers */
|
||||||
|
|
|
@ -42,8 +42,7 @@ public:
|
||||||
|
|
||||||
virtual void Destroy() MOZ_OVERRIDE { mDestroyed = true; }
|
virtual void Destroy() MOZ_OVERRIDE { mDestroyed = true; }
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
|
||||||
virtual void CleanupResources() MOZ_OVERRIDE {};
|
virtual void CleanupResources() MOZ_OVERRIDE {};
|
||||||
|
|
||||||
CompositableHost* GetCompositableHost() MOZ_OVERRIDE { return nullptr; }
|
CompositableHost* GetCompositableHost() MOZ_OVERRIDE { return nullptr; }
|
||||||
|
|
|
@ -114,7 +114,6 @@ public:
|
||||||
virtual void Composite(EffectChain& aEffectChain,
|
virtual void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
|
|
@ -81,7 +81,6 @@ GetOpaqueRect(Layer* aLayer)
|
||||||
|
|
||||||
template<class ContainerT> void
|
template<class ContainerT> void
|
||||||
ContainerRender(ContainerT* aContainer,
|
ContainerRender(ContainerT* aContainer,
|
||||||
const nsIntPoint& aOffset,
|
|
||||||
LayerManagerComposite* aManager,
|
LayerManagerComposite* aManager,
|
||||||
const nsIntRect& aClipRect)
|
const nsIntRect& aClipRect)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +93,6 @@ ContainerRender(ContainerT* aContainer,
|
||||||
|
|
||||||
RefPtr<CompositingRenderTarget> previousTarget = compositor->GetCurrentRenderTarget();
|
RefPtr<CompositingRenderTarget> previousTarget = compositor->GetCurrentRenderTarget();
|
||||||
|
|
||||||
nsIntPoint childOffset(aOffset);
|
|
||||||
nsIntRect visibleRect = aContainer->GetEffectiveVisibleRegion().GetBounds();
|
nsIntRect visibleRect = aContainer->GetEffectiveVisibleRegion().GetBounds();
|
||||||
|
|
||||||
aContainer->mSupportsComponentAlphaChildren = false;
|
aContainer->mSupportsComponentAlphaChildren = false;
|
||||||
|
@ -107,6 +105,7 @@ ContainerRender(ContainerT* aContainer,
|
||||||
bool surfaceCopyNeeded = false;
|
bool surfaceCopyNeeded = false;
|
||||||
gfx::IntRect surfaceRect = gfx::IntRect(visibleRect.x, visibleRect.y,
|
gfx::IntRect surfaceRect = gfx::IntRect(visibleRect.x, visibleRect.y,
|
||||||
visibleRect.width, visibleRect.height);
|
visibleRect.width, visibleRect.height);
|
||||||
|
gfx::IntPoint sourcePoint = gfx::IntPoint(visibleRect.x, visibleRect.y);
|
||||||
// we're about to create a framebuffer backed by textures to use as an intermediate
|
// we're about to create a framebuffer backed by textures to use as an intermediate
|
||||||
// surface. What to do if its size (as given by framebufferRect) would exceed the
|
// surface. What to do if its size (as given by framebufferRect) would exceed the
|
||||||
// maximum texture size supported by the GL? The present code chooses the compromise
|
// maximum texture size supported by the GL? The present code chooses the compromise
|
||||||
|
@ -131,19 +130,17 @@ ContainerRender(ContainerT* aContainer,
|
||||||
// not safe.
|
// not safe.
|
||||||
if (HasOpaqueAncestorLayer(aContainer) &&
|
if (HasOpaqueAncestorLayer(aContainer) &&
|
||||||
transform3D.Is2D(&transform) && !transform.HasNonIntegerTranslation()) {
|
transform3D.Is2D(&transform) && !transform.HasNonIntegerTranslation()) {
|
||||||
mode = gfxPlatform::ComponentAlphaEnabled() ?
|
surfaceCopyNeeded = gfxPlatform::ComponentAlphaEnabled();
|
||||||
INIT_MODE_COPY : INIT_MODE_CLEAR;
|
sourcePoint.x += transform.x0;
|
||||||
surfaceCopyNeeded = (mode == INIT_MODE_COPY);
|
sourcePoint.y += transform.y0;
|
||||||
surfaceRect.x += transform.x0;
|
|
||||||
surfaceRect.y += transform.y0;
|
|
||||||
aContainer->mSupportsComponentAlphaChildren
|
aContainer->mSupportsComponentAlphaChildren
|
||||||
= gfxPlatform::ComponentAlphaEnabled();
|
= gfxPlatform::ComponentAlphaEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceRect -= gfx::IntPoint(aOffset.x, aOffset.y);
|
sourcePoint -= compositor->GetCurrentRenderTarget()->GetOrigin();
|
||||||
if (surfaceCopyNeeded) {
|
if (surfaceCopyNeeded) {
|
||||||
surface = compositor->CreateRenderTargetFromSource(surfaceRect, previousTarget);
|
surface = compositor->CreateRenderTargetFromSource(surfaceRect, previousTarget, sourcePoint);
|
||||||
} else {
|
} else {
|
||||||
surface = compositor->CreateRenderTarget(surfaceRect, mode);
|
surface = compositor->CreateRenderTarget(surfaceRect, mode);
|
||||||
}
|
}
|
||||||
|
@ -153,8 +150,6 @@ ContainerRender(ContainerT* aContainer,
|
||||||
}
|
}
|
||||||
|
|
||||||
compositor->SetRenderTarget(surface);
|
compositor->SetRenderTarget(surface);
|
||||||
childOffset.x = visibleRect.x;
|
|
||||||
childOffset.y = visibleRect.y;
|
|
||||||
} else {
|
} else {
|
||||||
surface = previousTarget;
|
surface = previousTarget;
|
||||||
aContainer->mSupportsComponentAlphaChildren = (aContainer->GetContentFlags() & Layer::CONTENT_OPAQUE) ||
|
aContainer->mSupportsComponentAlphaChildren = (aContainer->GetContentFlags() & Layer::CONTENT_OPAQUE) ||
|
||||||
|
@ -203,7 +198,7 @@ ContainerRender(ContainerT* aContainer,
|
||||||
// this time & reset composition flag for next composition phase
|
// this time & reset composition flag for next composition phase
|
||||||
layerToRender->SetLayerComposited(false);
|
layerToRender->SetLayerComposited(false);
|
||||||
} else {
|
} else {
|
||||||
layerToRender->RenderLayer(childOffset, clipRect);
|
layerToRender->RenderLayer(clipRect);
|
||||||
}
|
}
|
||||||
// invariant: our GL context should be current here, I don't think we can
|
// invariant: our GL context should be current here, I don't think we can
|
||||||
// assert it though
|
// assert it though
|
||||||
|
@ -232,7 +227,7 @@ ContainerRender(ContainerT* aContainer,
|
||||||
gfx::Rect rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
|
gfx::Rect rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
|
||||||
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
||||||
aManager->GetCompositor()->DrawQuad(rect, clipRect, effectChain, opacity,
|
aManager->GetCompositor()->DrawQuad(rect, clipRect, effectChain, opacity,
|
||||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aContainer->GetFrameMetrics().IsScrollable()) {
|
if (aContainer->GetFrameMetrics().IsScrollable()) {
|
||||||
|
@ -245,7 +240,7 @@ ContainerRender(ContainerT* aContainer,
|
||||||
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
|
||||||
aManager->GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTAINER,
|
aManager->GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTAINER,
|
||||||
rect, clipRect,
|
rect, clipRect,
|
||||||
transform, gfx::Point(aOffset.x, aOffset.y));
|
transform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,10 +292,9 @@ ContainerLayerComposite::GetFirstChildComposite()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ContainerLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
ContainerLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
ContainerRender(this, aOffset, mCompositeManager, aClipRect);
|
ContainerRender(this, mCompositeManager, aClipRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -341,10 +335,9 @@ RefLayerComposite::GetFirstChildComposite()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RefLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
RefLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
ContainerRender(this, aOffset, mCompositeManager, aClipRect);
|
ContainerRender(this, mCompositeManager, aClipRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -25,7 +25,6 @@ class ContainerLayerComposite : public ContainerLayer,
|
||||||
{
|
{
|
||||||
template<class ContainerT>
|
template<class ContainerT>
|
||||||
friend void ContainerRender(ContainerT* aContainer,
|
friend void ContainerRender(ContainerT* aContainer,
|
||||||
const nsIntPoint& aOffset,
|
|
||||||
LayerManagerComposite* aManager,
|
LayerManagerComposite* aManager,
|
||||||
const nsIntRect& aClipRect);
|
const nsIntRect& aClipRect);
|
||||||
public:
|
public:
|
||||||
|
@ -40,8 +39,7 @@ public:
|
||||||
|
|
||||||
LayerComposite* GetFirstChildComposite();
|
LayerComposite* GetFirstChildComposite();
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
|
@ -65,7 +63,6 @@ class RefLayerComposite : public RefLayer,
|
||||||
{
|
{
|
||||||
template<class ContainerT>
|
template<class ContainerT>
|
||||||
friend void ContainerRender(ContainerT* aContainer,
|
friend void ContainerRender(ContainerT* aContainer,
|
||||||
const nsIntPoint& aOffset,
|
|
||||||
LayerManagerComposite* aManager,
|
LayerManagerComposite* aManager,
|
||||||
const nsIntRect& aClipRect);
|
const nsIntRect& aClipRect);
|
||||||
public:
|
public:
|
||||||
|
@ -79,8 +76,7 @@ public:
|
||||||
|
|
||||||
LayerComposite* GetFirstChildComposite();
|
LayerComposite* GetFirstChildComposite();
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,6 @@ void
|
||||||
ContentHostBase::Composite(EffectChain& aEffectChain,
|
ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const Point& aOffset,
|
|
||||||
const Filter& aFilter,
|
const Filter& aFilter,
|
||||||
const Rect& aClipRect,
|
const Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion,
|
const nsIntRegion* aVisibleRegion,
|
||||||
|
@ -188,12 +187,12 @@ ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||||
Float(tileRegionRect.y) / texRect.height,
|
Float(tileRegionRect.y) / texRect.height,
|
||||||
Float(tileRegionRect.width) / texRect.width,
|
Float(tileRegionRect.width) / texRect.width,
|
||||||
Float(tileRegionRect.height) / texRect.height);
|
Float(tileRegionRect.height) / texRect.height);
|
||||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain, aOpacity, aTransform, aOffset);
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain, aOpacity, aTransform);
|
||||||
if (usingTiles) {
|
if (usingTiles) {
|
||||||
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT | DIAGNOSTIC_BIGIMAGE;
|
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT | DIAGNOSTIC_BIGIMAGE;
|
||||||
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
||||||
GetCompositor()->DrawDiagnostics(diagnostics, rect, aClipRect,
|
GetCompositor()->DrawDiagnostics(diagnostics, rect, aClipRect,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,7 +212,7 @@ ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||||
|
|
||||||
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT;
|
DiagnosticTypes diagnostics = DIAGNOSTIC_CONTENT;
|
||||||
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
diagnostics |= iterOnWhite ? DIAGNOSTIC_COMPONENT_ALPHA : 0;
|
||||||
GetCompositor()->DrawDiagnostics(diagnostics, *aVisibleRegion, aClipRect, aTransform, aOffset);
|
GetCompositor()->DrawDiagnostics(diagnostics, *aVisibleRegion, aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -96,7 +96,6 @@ public:
|
||||||
virtual void Composite(EffectChain& aEffectChain,
|
virtual void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
@ -275,7 +274,6 @@ public:
|
||||||
virtual void Composite(EffectChain& aEffectChain,
|
virtual void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
@ -284,7 +282,7 @@ public:
|
||||||
ProcessTextureUpdates();
|
ProcessTextureUpdates();
|
||||||
|
|
||||||
ContentHostBase::Composite(aEffectChain, aOpacity,
|
ContentHostBase::Composite(aEffectChain, aOpacity,
|
||||||
aTransform, aOffset, aFilter,
|
aTransform, aFilter,
|
||||||
aClipRect, aVisibleRegion,
|
aClipRect, aVisibleRegion,
|
||||||
aLayerProperties);
|
aLayerProperties);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,6 @@ void
|
||||||
ImageHost::Composite(EffectChain& aEffectChain,
|
ImageHost::Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion,
|
const nsIntRegion* aVisibleRegion,
|
||||||
|
@ -115,15 +114,15 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
||||||
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
||||||
}
|
}
|
||||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||||
aOpacity, aTransform, aOffset);
|
aOpacity, aTransform);
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
||||||
rect, aClipRect, aTransform, aOffset);
|
rect, aClipRect, aTransform);
|
||||||
} while (it->NextTile());
|
} while (it->NextTile());
|
||||||
it->EndTileIteration();
|
it->EndTileIteration();
|
||||||
// layer border
|
// layer border
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||||
gfxPictureRect, aClipRect,
|
gfxPictureRect, aClipRect,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
} else {
|
} else {
|
||||||
IntSize textureSize = source->GetSize();
|
IntSize textureSize = source->GetSize();
|
||||||
gfx::Rect rect;
|
gfx::Rect rect;
|
||||||
|
@ -144,10 +143,10 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||||
aOpacity, aTransform, aOffset);
|
aOpacity, aTransform);
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||||
rect, aClipRect,
|
rect, aClipRect,
|
||||||
aTransform, aOffset);
|
aTransform);
|
||||||
}
|
}
|
||||||
mFrontBuffer->Unlock();
|
mFrontBuffer->Unlock();
|
||||||
}
|
}
|
||||||
|
@ -265,7 +264,6 @@ void
|
||||||
DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion,
|
const nsIntRegion* aVisibleRegion,
|
||||||
|
@ -303,9 +301,9 @@ DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
||||||
nsIntRect tileRect = it->GetTileRect();
|
nsIntRect tileRect = it->GetTileRect();
|
||||||
gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
|
gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
|
||||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||||
aOpacity, aTransform, aOffset);
|
aOpacity, aTransform);
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE|DIAGNOSTIC_BIGIMAGE,
|
||||||
rect, aClipRect, aTransform, aOffset);
|
rect, aClipRect, aTransform);
|
||||||
} while (it->NextTile());
|
} while (it->NextTile());
|
||||||
it->EndTileIteration();
|
it->EndTileIteration();
|
||||||
} else {
|
} else {
|
||||||
|
@ -329,9 +327,9 @@ DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
|
||||||
aOpacity, aTransform, aOffset);
|
aOpacity, aTransform);
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_IMAGE,
|
||||||
rect, aClipRect, aTransform, aOffset);
|
rect, aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDeprecatedTextureHost->Unlock();
|
mDeprecatedTextureHost->Unlock();
|
||||||
|
|
|
@ -49,7 +49,6 @@ public:
|
||||||
virtual void Composite(EffectChain& aEffectChain,
|
virtual void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
@ -110,7 +109,6 @@ public:
|
||||||
virtual void Composite(EffectChain& aEffectChain,
|
virtual void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
|
|
@ -78,8 +78,7 @@ ImageLayerComposite::GetLayer()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ImageLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
ImageLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
if (!mImageHost || !mImageHost->IsAttached()) {
|
if (!mImageHost || !mImageHost->IsAttached()) {
|
||||||
return;
|
return;
|
||||||
|
@ -104,7 +103,6 @@ ImageLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||||
mImageHost->Composite(effectChain,
|
mImageHost->Composite(effectChain,
|
||||||
GetEffectiveOpacity(),
|
GetEffectiveOpacity(),
|
||||||
transform,
|
transform,
|
||||||
gfx::Point(aOffset.x, aOffset.y),
|
|
||||||
gfx::ToFilter(mFilter),
|
gfx::ToFilter(mFilter),
|
||||||
clipRect);
|
clipRect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,7 @@ public:
|
||||||
|
|
||||||
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
virtual Layer* GetLayer() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect);
|
||||||
const nsIntRect& aClipRect);
|
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE;
|
virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -303,8 +303,7 @@ LayerManagerComposite::RenderDebugOverlay(const Rect& aBounds)
|
||||||
clip,
|
clip,
|
||||||
effects,
|
effects,
|
||||||
opacity,
|
opacity,
|
||||||
gfx::Matrix4x4(),
|
gfx::Matrix4x4());
|
||||||
gfx::Point());
|
|
||||||
}
|
}
|
||||||
// We intentionally overflow at 2^16.
|
// We intentionally overflow at 2^16.
|
||||||
sFrameCount++;
|
sFrameCount++;
|
||||||
|
@ -359,7 +358,7 @@ LayerManagerComposite::Render()
|
||||||
mCompositor->RestoreState();
|
mCompositor->RestoreState();
|
||||||
|
|
||||||
// Render our layers.
|
// Render our layers.
|
||||||
RootLayer()->RenderLayer(nsIntPoint(0, 0), clipRect);
|
RootLayer()->RenderLayer(clipRect);
|
||||||
|
|
||||||
// Allow widget to render a custom foreground.
|
// Allow widget to render a custom foreground.
|
||||||
mCompositor->SaveState();
|
mCompositor->SaveState();
|
||||||
|
|
|
@ -317,8 +317,7 @@ public:
|
||||||
|
|
||||||
virtual Layer* GetLayer() = 0;
|
virtual Layer* GetLayer() = 0;
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) = 0;
|
||||||
const nsIntRect& aClipRect) = 0;
|
|
||||||
|
|
||||||
virtual void SetCompositableHost(CompositableHost* aHost)
|
virtual void SetCompositableHost(CompositableHost* aHost)
|
||||||
{
|
{
|
||||||
|
|
|
@ -799,11 +799,19 @@ private:
|
||||||
class CompositingRenderTarget : public TextureSource
|
class CompositingRenderTarget : public TextureSource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CompositingRenderTarget(const gfx::IntPoint& aOrigin)
|
||||||
|
: mOrigin(aOrigin)
|
||||||
|
{}
|
||||||
virtual ~CompositingRenderTarget() {}
|
virtual ~CompositingRenderTarget() {}
|
||||||
|
|
||||||
#ifdef MOZ_DUMP_PAINTING
|
#ifdef MOZ_DUMP_PAINTING
|
||||||
virtual already_AddRefed<gfxImageSurface> Dump(Compositor* aCompositor) { return nullptr; }
|
virtual already_AddRefed<gfxImageSurface> Dump(Compositor* aCompositor) { return nullptr; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const gfx::IntPoint& GetOrigin() { return mOrigin; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
gfx::IntPoint mOrigin;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -95,8 +95,7 @@ ThebesLayerComposite::GetRenderState()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ThebesLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
ThebesLayerComposite::RenderLayer(const nsIntRect& aClipRect)
|
||||||
const nsIntRect& aClipRect)
|
|
||||||
{
|
{
|
||||||
if (!mBuffer || !mBuffer->IsAttached()) {
|
if (!mBuffer || !mBuffer->IsAttached()) {
|
||||||
return;
|
return;
|
||||||
|
@ -139,7 +138,6 @@ ThebesLayerComposite::RenderLayer(const nsIntPoint& aOffset,
|
||||||
mBuffer->Composite(effectChain,
|
mBuffer->Composite(effectChain,
|
||||||
GetEffectiveOpacity(),
|
GetEffectiveOpacity(),
|
||||||
transform,
|
transform,
|
||||||
gfx::Point(aOffset.x, aOffset.y),
|
|
||||||
gfx::FILTER_LINEAR,
|
gfx::FILTER_LINEAR,
|
||||||
clipRect,
|
clipRect,
|
||||||
&visibleRegion,
|
&visibleRegion,
|
||||||
|
|
|
@ -53,8 +53,7 @@ public:
|
||||||
|
|
||||||
virtual TiledLayerComposer* GetTiledLayerComposer() MOZ_OVERRIDE;
|
virtual TiledLayerComposer* GetTiledLayerComposer() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void RenderLayer(const nsIntPoint& aOffset,
|
virtual void RenderLayer(const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
||||||
const nsIntRect& aClipRect) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void CleanupResources() MOZ_OVERRIDE;
|
virtual void CleanupResources() MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,6 @@ void
|
||||||
TiledContentHost::Composite(EffectChain& aEffectChain,
|
TiledContentHost::Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion /* = nullptr */,
|
const nsIntRegion* aVisibleRegion /* = nullptr */,
|
||||||
|
@ -164,8 +163,8 @@ TiledContentHost::Composite(EffectChain& aEffectChain,
|
||||||
|
|
||||||
RenderLayerBuffer(mLowPrecisionVideoMemoryTiledBuffer,
|
RenderLayerBuffer(mLowPrecisionVideoMemoryTiledBuffer,
|
||||||
mLowPrecisionVideoMemoryTiledBuffer.GetValidRegion(), aEffectChain, aOpacity,
|
mLowPrecisionVideoMemoryTiledBuffer.GetValidRegion(), aEffectChain, aOpacity,
|
||||||
aOffset, aFilter, aClipRect, aLayerProperties->mValidRegion, visibleRect, aTransform);
|
aFilter, aClipRect, aLayerProperties->mValidRegion, visibleRect, aTransform);
|
||||||
RenderLayerBuffer(mVideoMemoryTiledBuffer, aLayerProperties->mValidRegion, aEffectChain, aOpacity, aOffset,
|
RenderLayerBuffer(mVideoMemoryTiledBuffer, aLayerProperties->mValidRegion, aEffectChain, aOpacity,
|
||||||
aFilter, aClipRect, nsIntRegion(), visibleRect, aTransform);
|
aFilter, aClipRect, nsIntRegion(), visibleRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +174,6 @@ TiledContentHost::RenderTile(const TiledTexture& aTile,
|
||||||
EffectChain& aEffectChain,
|
EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion& aScreenRegion,
|
const nsIntRegion& aScreenRegion,
|
||||||
|
@ -202,9 +200,9 @@ TiledContentHost::RenderTile(const TiledTexture& aTile,
|
||||||
textureRect.y / aTextureBounds.height,
|
textureRect.y / aTextureBounds.height,
|
||||||
textureRect.width / aTextureBounds.width,
|
textureRect.width / aTextureBounds.width,
|
||||||
textureRect.height / aTextureBounds.height);
|
textureRect.height / aTextureBounds.height);
|
||||||
mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, aOpacity, aTransform, aOffset);
|
mCompositor->DrawQuad(graphicsRect, aClipRect, aEffectChain, aOpacity, aTransform);
|
||||||
mCompositor->DrawDiagnostics(DIAGNOSTIC_CONTENT|DIAGNOSTIC_TILE,
|
mCompositor->DrawDiagnostics(DIAGNOSTIC_CONTENT|DIAGNOSTIC_TILE,
|
||||||
graphicsRect, aClipRect, aTransform, aOffset);
|
graphicsRect, aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
aTile.mDeprecatedTextureHost->Unlock();
|
aTile.mDeprecatedTextureHost->Unlock();
|
||||||
|
@ -215,7 +213,6 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
||||||
const nsIntRegion& aValidRegion,
|
const nsIntRegion& aValidRegion,
|
||||||
EffectChain& aEffectChain,
|
EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion& aMaskRegion,
|
const nsIntRegion& aMaskRegion,
|
||||||
|
@ -276,7 +273,7 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
||||||
nsIntPoint tileOffset((x - tileStartX) * resolution,
|
nsIntPoint tileOffset((x - tileStartX) * resolution,
|
||||||
(y - tileStartY) * resolution);
|
(y - tileStartY) * resolution);
|
||||||
uint32_t tileSize = aLayerBuffer.GetTileLength();
|
uint32_t tileSize = aLayerBuffer.GetTileLength();
|
||||||
RenderTile(tileTexture, aEffectChain, aOpacity, aTransform, aOffset, aFilter, aClipRect, tileDrawRegion,
|
RenderTile(tileTexture, aEffectChain, aOpacity, aTransform, aFilter, aClipRect, tileDrawRegion,
|
||||||
tileOffset, nsIntSize(tileSize, tileSize));
|
tileOffset, nsIntSize(tileSize, tileSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,7 +286,7 @@ TiledContentHost::RenderLayerBuffer(TiledLayerBufferComposite& aLayerBuffer,
|
||||||
gfx::Rect rect(aVisibleRect.x, aVisibleRect.y,
|
gfx::Rect rect(aVisibleRect.x, aVisibleRect.y,
|
||||||
aVisibleRect.width, aVisibleRect.height);
|
aVisibleRect.width, aVisibleRect.height);
|
||||||
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTENT,
|
GetCompositor()->DrawDiagnostics(DIAGNOSTIC_CONTENT,
|
||||||
rect, aClipRect, aTransform, aOffset);
|
rect, aClipRect, aTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -202,7 +202,6 @@ public:
|
||||||
EffectChain& aEffectChain,
|
EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion& aScreenRegion,
|
const nsIntRegion& aScreenRegion,
|
||||||
|
@ -212,7 +211,6 @@ public:
|
||||||
void Composite(EffectChain& aEffectChain,
|
void Composite(EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion* aVisibleRegion = nullptr,
|
const nsIntRegion* aVisibleRegion = nullptr,
|
||||||
|
@ -260,7 +258,6 @@ private:
|
||||||
const nsIntRegion& aValidRegion,
|
const nsIntRegion& aValidRegion,
|
||||||
EffectChain& aEffectChain,
|
EffectChain& aEffectChain,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
const gfx::Point& aOffset,
|
|
||||||
const gfx::Filter& aFilter,
|
const gfx::Filter& aFilter,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const nsIntRegion& aMaskRegion,
|
const nsIntRegion& aMaskRegion,
|
||||||
|
|
|
@ -380,7 +380,7 @@ CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<CompositingRenderTargetD3D11> rt = new CompositingRenderTargetD3D11(texture);
|
RefPtr<CompositingRenderTargetD3D11> rt = new CompositingRenderTargetD3D11(texture, aRect.TopLeft());
|
||||||
rt->SetSize(IntSize(aRect.width, aRect.height));
|
rt->SetSize(IntSize(aRect.width, aRect.height));
|
||||||
|
|
||||||
if (aInit == INIT_MODE_CLEAR) {
|
if (aInit == INIT_MODE_CLEAR) {
|
||||||
|
@ -393,7 +393,8 @@ CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect,
|
||||||
|
|
||||||
TemporaryRef<CompositingRenderTarget>
|
TemporaryRef<CompositingRenderTarget>
|
||||||
CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
const CompositingRenderTarget* aSource)
|
const CompositingRenderTarget* aSource,
|
||||||
|
const gfx::IntPoint &aSourcePoint)
|
||||||
{
|
{
|
||||||
CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM,
|
CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||||
aRect.width, aRect.height, 1, 1,
|
aRect.width, aRect.height, 1, 1,
|
||||||
|
@ -411,11 +412,11 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
static_cast<const CompositingRenderTargetD3D11*>(aSource);
|
static_cast<const CompositingRenderTargetD3D11*>(aSource);
|
||||||
|
|
||||||
D3D11_BOX srcBox;
|
D3D11_BOX srcBox;
|
||||||
srcBox.left = aRect.x;
|
srcBox.left = aSourcePoint.x;
|
||||||
srcBox.top = aRect.y;
|
srcBox.top = aSourcePoint.y;
|
||||||
srcBox.front = 0;
|
srcBox.front = 0;
|
||||||
srcBox.right = aRect.XMost();
|
srcBox.right = aSourcePoint.x + aRect.width;
|
||||||
srcBox.bottom = aRect.YMost();
|
srcBox.bottom = aSourcePoint.y + aRect.height;
|
||||||
srcBox.back = 0;
|
srcBox.back = 0;
|
||||||
|
|
||||||
const IntSize& srcSize = sourceD3D11->GetSize();
|
const IntSize& srcSize = sourceD3D11->GetSize();
|
||||||
|
@ -431,8 +432,8 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<CompositingRenderTargetD3D11> rt =
|
RefPtr<CompositingRenderTargetD3D11> rt =
|
||||||
new CompositingRenderTargetD3D11(texture);
|
new CompositingRenderTargetD3D11(texture, aRect.TopLeft());
|
||||||
rt->SetSize(IntSize(aRect.width, aRect.height));
|
rt->SetSize(aRect.Size());
|
||||||
|
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
|
@ -480,13 +481,13 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect,
|
||||||
const gfx::Rect& aClipRect,
|
const gfx::Rect& aClipRect,
|
||||||
const EffectChain& aEffectChain,
|
const EffectChain& aEffectChain,
|
||||||
gfx::Float aOpacity,
|
gfx::Float aOpacity,
|
||||||
const gfx::Matrix4x4& aTransform,
|
const gfx::Matrix4x4& aTransform)
|
||||||
const gfx::Point& aOffset)
|
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mCurrentRT, "No render target");
|
MOZ_ASSERT(mCurrentRT, "No render target");
|
||||||
memcpy(&mVSConstants.layerTransform, &aTransform._11, 64);
|
memcpy(&mVSConstants.layerTransform, &aTransform._11, 64);
|
||||||
mVSConstants.renderTargetOffset[0] = aOffset.x;
|
IntPoint origin = mCurrentRT->GetOrigin();
|
||||||
mVSConstants.renderTargetOffset[1] = aOffset.y;
|
mVSConstants.renderTargetOffset[0] = origin.x;
|
||||||
|
mVSConstants.renderTargetOffset[1] = origin.y;
|
||||||
mVSConstants.layerQuad = aRect;
|
mVSConstants.layerQuad = aRect;
|
||||||
|
|
||||||
mPSConstants.layerOpacity[0] = aOpacity;
|
mPSConstants.layerOpacity[0] = aOpacity;
|
||||||
|
@ -785,7 +786,7 @@ CompositorD3D11::UpdateRenderTarget()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDefaultRT = new CompositingRenderTargetD3D11(backBuf);
|
mDefaultRT = new CompositingRenderTargetD3D11(backBuf, IntPoint(0, 0));
|
||||||
mDefaultRT->SetSize(mSize);
|
mDefaultRT->SetSize(mSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ public:
|
||||||
|
|
||||||
virtual TemporaryRef<CompositingRenderTarget>
|
virtual TemporaryRef<CompositingRenderTarget>
|
||||||
CreateRenderTargetFromSource(const gfx::IntRect& aRect,
|
CreateRenderTargetFromSource(const gfx::IntRect& aRect,
|
||||||
const CompositingRenderTarget* aSource) MOZ_OVERRIDE;
|
const CompositingRenderTarget* aSource,
|
||||||
|
const gfx::IntPoint& aSourcePoint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void SetRenderTarget(CompositingRenderTarget* aSurface) MOZ_OVERRIDE;
|
virtual void SetRenderTarget(CompositingRenderTarget* aSurface) MOZ_OVERRIDE;
|
||||||
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE
|
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE
|
||||||
|
@ -93,8 +94,7 @@ public:
|
||||||
const gfx::Rect &aClipRect,
|
const gfx::Rect &aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity,
|
gfx::Float aOpacity,
|
||||||
const gfx::Matrix4x4 &aTransform,
|
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||||
const gfx::Point &aOffset) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
|
* Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
|
||||||
|
|
|
@ -39,7 +39,9 @@ CreateDeprecatedTextureHostD3D11(SurfaceDescriptorType aDescriptorType,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CompositingRenderTargetD3D11::CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture)
|
CompositingRenderTargetD3D11::CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture,
|
||||||
|
const gfx::IntPoint& aOrigin)
|
||||||
|
: CompositingRenderTarget(aOrigin)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aTexture);
|
MOZ_ASSERT(aTexture);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ class CompositingRenderTargetD3D11 : public CompositingRenderTarget,
|
||||||
public TextureSourceD3D11
|
public TextureSourceD3D11
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture);
|
CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture,
|
||||||
|
const gfx::IntPoint& aOrigin);
|
||||||
|
|
||||||
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,15 @@ CompositorD3D9::CreateRenderTarget(const gfx::IntRect &aRect,
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<CompositingRenderTargetD3D9> rt =
|
RefPtr<CompositingRenderTargetD3D9> rt =
|
||||||
new CompositingRenderTargetD3D9(texture, aInit, IntSize(aRect.width, aRect.height));
|
new CompositingRenderTargetD3D9(texture, aInit, aRect);
|
||||||
|
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
|
|
||||||
TemporaryRef<CompositingRenderTarget>
|
TemporaryRef<CompositingRenderTarget>
|
||||||
CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource)
|
const CompositingRenderTarget *aSource,
|
||||||
|
const gfx::IntPoint &aSourcePoint)
|
||||||
{
|
{
|
||||||
RefPtr<IDirect3DTexture9> texture;
|
RefPtr<IDirect3DTexture9> texture;
|
||||||
HRESULT hr = device()->CreateTexture(aRect.width, aRect.height, 1,
|
HRESULT hr = device()->CreateTexture(aRect.width, aRect.height, 1,
|
||||||
|
@ -130,10 +131,10 @@ CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
|
|
||||||
if (sourceSurface && destSurface) {
|
if (sourceSurface && destSurface) {
|
||||||
RECT sourceRect;
|
RECT sourceRect;
|
||||||
sourceRect.left = aRect.x;
|
sourceRect.left = aSourcePoint.x;
|
||||||
sourceRect.right = aRect.XMost();
|
sourceRect.right = aSourcePoint.x + aRect.width;
|
||||||
sourceRect.top = aRect.y;
|
sourceRect.top = aSourcePoint.y;
|
||||||
sourceRect.bottom = aRect.YMost();
|
sourceRect.bottom = aSourcePoint.y + aRect.height;
|
||||||
RECT destRect;
|
RECT destRect;
|
||||||
destRect.left = 0;
|
destRect.left = 0;
|
||||||
destRect.right = aRect.width;
|
destRect.right = aRect.width;
|
||||||
|
@ -156,7 +157,7 @@ CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
RefPtr<CompositingRenderTargetD3D9> rt =
|
RefPtr<CompositingRenderTargetD3D9> rt =
|
||||||
new CompositingRenderTargetD3D9(texture,
|
new CompositingRenderTargetD3D9(texture,
|
||||||
INIT_MODE_NONE,
|
INIT_MODE_NONE,
|
||||||
IntSize(aRect.width, aRect.height));
|
aRect);
|
||||||
|
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
|
@ -190,15 +191,17 @@ ShaderModeForEffectType(EffectTypes aEffectType)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorD3D9::DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
|
CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
|
||||||
|
const gfx::Rect &aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity,
|
||||||
const gfx::Point &aOffset)
|
const gfx::Matrix4x4 &aTransform)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mCurrentRT, "No render target");
|
MOZ_ASSERT(mCurrentRT, "No render target");
|
||||||
device()->SetVertexShaderConstantF(CBmLayerTransform, &aTransform._11, 4);
|
device()->SetVertexShaderConstantF(CBmLayerTransform, &aTransform._11, 4);
|
||||||
|
|
||||||
float renderTargetOffset[] = { aOffset.x, aOffset.y, 0, 0 };
|
IntPoint origin = mCurrentRT->GetOrigin();
|
||||||
|
float renderTargetOffset[] = { origin.x, origin.y, 0, 0 };
|
||||||
device()->SetVertexShaderConstantF(CBvRenderTargetOffset,
|
device()->SetVertexShaderConstantF(CBvRenderTargetOffset,
|
||||||
renderTargetOffset,
|
renderTargetOffset,
|
||||||
1);
|
1);
|
||||||
|
@ -475,7 +478,7 @@ CompositorD3D9::BeginFrame(const Rect *aClipRectIn,
|
||||||
nsRefPtr<IDirect3DSurface9> backBuffer = mSwapChain->GetBackBuffer();
|
nsRefPtr<IDirect3DSurface9> backBuffer = mSwapChain->GetBackBuffer();
|
||||||
mDefaultRT = new CompositingRenderTargetD3D9(backBuffer,
|
mDefaultRT = new CompositingRenderTargetD3D9(backBuffer,
|
||||||
INIT_MODE_CLEAR,
|
INIT_MODE_CLEAR,
|
||||||
IntSize(mSize.width, mSize.height));
|
IntRect(0, 0, mSize.width, mSize.height));
|
||||||
SetRenderTarget(mDefaultRT);
|
SetRenderTarget(mDefaultRT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,8 @@ public:
|
||||||
|
|
||||||
virtual TemporaryRef<CompositingRenderTarget>
|
virtual TemporaryRef<CompositingRenderTarget>
|
||||||
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource) MOZ_OVERRIDE;
|
const CompositingRenderTarget *aSource,
|
||||||
|
const gfx::IntPoint &aSourcePoint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void SetRenderTarget(CompositingRenderTarget *aSurface);
|
virtual void SetRenderTarget(CompositingRenderTarget *aSurface);
|
||||||
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE
|
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE
|
||||||
|
@ -54,10 +55,11 @@ public:
|
||||||
|
|
||||||
virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) MOZ_OVERRIDE {}
|
virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) MOZ_OVERRIDE {}
|
||||||
|
|
||||||
virtual void DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
|
virtual void DrawQuad(const gfx::Rect &aRect,
|
||||||
|
const gfx::Rect &aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity,
|
||||||
const gfx::Point &aOffset) MOZ_OVERRIDE;
|
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
virtual void BeginFrame(const gfx::Rect *aClipRectIn,
|
||||||
const gfxMatrix& aTransform,
|
const gfxMatrix& aTransform,
|
||||||
|
|
|
@ -41,8 +41,9 @@ CreateDeprecatedTextureHostD3D9(SurfaceDescriptorType aDescriptorType,
|
||||||
|
|
||||||
CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture,
|
CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture,
|
||||||
SurfaceInitMode aInit,
|
SurfaceInitMode aInit,
|
||||||
const gfx::IntSize& aSize)
|
const gfx::IntRect& aRect)
|
||||||
: mInitMode(aInit)
|
: CompositingRenderTarget(aRect.TopLeft())
|
||||||
|
, mInitMode(aInit)
|
||||||
, mInitialized(false)
|
, mInitialized(false)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(CompositingRenderTargetD3D9);
|
MOZ_COUNT_CTOR(CompositingRenderTargetD3D9);
|
||||||
|
@ -51,19 +52,20 @@ CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DTexture9* aTex
|
||||||
mTextures[0] = aTexture;
|
mTextures[0] = aTexture;
|
||||||
HRESULT hr = mTextures[0]->GetSurfaceLevel(0, getter_AddRefs(mSurface));
|
HRESULT hr = mTextures[0]->GetSurfaceLevel(0, getter_AddRefs(mSurface));
|
||||||
NS_ASSERTION(mSurface, "Couldn't create surface for texture");
|
NS_ASSERTION(mSurface, "Couldn't create surface for texture");
|
||||||
TextureSourceD3D9::SetSize(aSize);
|
TextureSourceD3D9::SetSize(aRect.Size());
|
||||||
}
|
}
|
||||||
|
|
||||||
CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface,
|
CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface,
|
||||||
SurfaceInitMode aInit,
|
SurfaceInitMode aInit,
|
||||||
const gfx::IntSize& aSize)
|
const gfx::IntRect& aRect)
|
||||||
: mSurface(aSurface)
|
: CompositingRenderTarget(aRect.TopLeft())
|
||||||
|
, mSurface(aSurface)
|
||||||
, mInitMode(aInit)
|
, mInitMode(aInit)
|
||||||
, mInitialized(false)
|
, mInitialized(false)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(CompositingRenderTargetD3D9);
|
MOZ_COUNT_CTOR(CompositingRenderTargetD3D9);
|
||||||
MOZ_ASSERT(mSurface);
|
MOZ_ASSERT(mSurface);
|
||||||
TextureSourceD3D9::SetSize(aSize);
|
TextureSourceD3D9::SetSize(aRect.Size());
|
||||||
}
|
}
|
||||||
|
|
||||||
CompositingRenderTargetD3D9::~CompositingRenderTargetD3D9()
|
CompositingRenderTargetD3D9::~CompositingRenderTargetD3D9()
|
||||||
|
|
|
@ -56,11 +56,11 @@ class CompositingRenderTargetD3D9 : public CompositingRenderTarget,
|
||||||
public:
|
public:
|
||||||
CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture,
|
CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture,
|
||||||
SurfaceInitMode aInit,
|
SurfaceInitMode aInit,
|
||||||
const gfx::IntSize& aSize);
|
const gfx::IntRect& aRect);
|
||||||
// use for rendering to the main window, cannot be rendered as a texture
|
// use for rendering to the main window, cannot be rendered as a texture
|
||||||
CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface,
|
CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface,
|
||||||
SurfaceInitMode aInit,
|
SurfaceInitMode aInit,
|
||||||
const gfx::IntSize& aSize);
|
const gfx::IntRect& aRect);
|
||||||
~CompositingRenderTargetD3D9();
|
~CompositingRenderTargetD3D9();
|
||||||
|
|
||||||
virtual TextureSourceD3D9* AsSourceD3D9() MOZ_OVERRIDE
|
virtual TextureSourceD3D9* AsSourceD3D9() MOZ_OVERRIDE
|
||||||
|
|
|
@ -62,8 +62,10 @@ class CompositingRenderTargetOGL : public CompositingRenderTarget
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CompositingRenderTargetOGL(CompositorOGL* aCompositor, GLuint aTexure, GLuint aFBO)
|
CompositingRenderTargetOGL(CompositorOGL* aCompositor, const gfx::IntPoint& aOrigin,
|
||||||
: mInitParams()
|
GLuint aTexure, GLuint aFBO)
|
||||||
|
: CompositingRenderTarget(aOrigin)
|
||||||
|
, mInitParams()
|
||||||
, mTransform()
|
, mTransform()
|
||||||
, mCompositor(aCompositor)
|
, mCompositor(aCompositor)
|
||||||
, mGL(aCompositor->gl())
|
, mGL(aCompositor->gl())
|
||||||
|
@ -83,7 +85,7 @@ public:
|
||||||
const gfxMatrix& aTransform)
|
const gfxMatrix& aTransform)
|
||||||
{
|
{
|
||||||
RefPtr<CompositingRenderTargetOGL> result
|
RefPtr<CompositingRenderTargetOGL> result
|
||||||
= new CompositingRenderTargetOGL(aCompositor, 0, 0);
|
= new CompositingRenderTargetOGL(aCompositor, gfx::IntPoint(0, 0), 0, 0);
|
||||||
result->mTransform = aTransform;
|
result->mTransform = aTransform;
|
||||||
result->mInitParams = InitParams(aSize, 0, INIT_MODE_NONE);
|
result->mInitParams = InitParams(aSize, 0, INIT_MODE_NONE);
|
||||||
result->mInitParams.mStatus = InitParams::INITIALIZED;
|
result->mInitParams.mStatus = InitParams::INITIALIZED;
|
||||||
|
|
|
@ -659,34 +659,36 @@ CompositorOGL::CreateRenderTarget(const IntRect &aRect, SurfaceInitMode aInit)
|
||||||
{
|
{
|
||||||
GLuint tex = 0;
|
GLuint tex = 0;
|
||||||
GLuint fbo = 0;
|
GLuint fbo = 0;
|
||||||
CreateFBOWithTexture(aRect, aInit, 0, &fbo, &tex);
|
CreateFBOWithTexture(aRect, false, 0, &fbo, &tex);
|
||||||
RefPtr<CompositingRenderTargetOGL> surface
|
RefPtr<CompositingRenderTargetOGL> surface
|
||||||
= new CompositingRenderTargetOGL(this, tex, fbo);
|
= new CompositingRenderTargetOGL(this, aRect.TopLeft(), tex, fbo);
|
||||||
surface->Initialize(IntSize(aRect.width, aRect.height), mFBOTextureTarget, aInit);
|
surface->Initialize(aRect.Size(), mFBOTextureTarget, aInit);
|
||||||
return surface.forget();
|
return surface.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
TemporaryRef<CompositingRenderTarget>
|
TemporaryRef<CompositingRenderTarget>
|
||||||
CompositorOGL::CreateRenderTargetFromSource(const IntRect &aRect,
|
CompositorOGL::CreateRenderTargetFromSource(const IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource)
|
const CompositingRenderTarget *aSource,
|
||||||
|
const IntPoint &aSourcePoint)
|
||||||
{
|
{
|
||||||
GLuint tex = 0;
|
GLuint tex = 0;
|
||||||
GLuint fbo = 0;
|
GLuint fbo = 0;
|
||||||
const CompositingRenderTargetOGL* sourceSurface
|
const CompositingRenderTargetOGL* sourceSurface
|
||||||
= static_cast<const CompositingRenderTargetOGL*>(aSource);
|
= static_cast<const CompositingRenderTargetOGL*>(aSource);
|
||||||
|
IntRect sourceRect(aSourcePoint, aRect.Size());
|
||||||
if (aSource) {
|
if (aSource) {
|
||||||
CreateFBOWithTexture(aRect, INIT_MODE_COPY, sourceSurface->GetFBO(),
|
CreateFBOWithTexture(sourceRect, true, sourceSurface->GetFBO(),
|
||||||
&fbo, &tex);
|
&fbo, &tex);
|
||||||
} else {
|
} else {
|
||||||
CreateFBOWithTexture(aRect, INIT_MODE_COPY, 0,
|
CreateFBOWithTexture(sourceRect, true, 0,
|
||||||
&fbo, &tex);
|
&fbo, &tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<CompositingRenderTargetOGL> surface
|
RefPtr<CompositingRenderTargetOGL> surface
|
||||||
= new CompositingRenderTargetOGL(this, tex, fbo);
|
= new CompositingRenderTargetOGL(this, aRect.TopLeft(), tex, fbo);
|
||||||
surface->Initialize(IntSize(aRect.width, aRect.height),
|
surface->Initialize(aRect.Size(),
|
||||||
mFBOTextureTarget,
|
mFBOTextureTarget,
|
||||||
INIT_MODE_COPY);
|
INIT_MODE_NONE);
|
||||||
return surface.forget();
|
return surface.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -841,7 +843,7 @@ CompositorOGL::BeginFrame(const Rect *aClipRectIn, const gfxMatrix& aTransform,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorOGL::CreateFBOWithTexture(const IntRect& aRect, SurfaceInitMode aInit,
|
CompositorOGL::CreateFBOWithTexture(const IntRect& aRect, bool aCopyFromSource,
|
||||||
GLuint aSourceFrameBuffer,
|
GLuint aSourceFrameBuffer,
|
||||||
GLuint *aFBO, GLuint *aTexture)
|
GLuint *aFBO, GLuint *aTexture)
|
||||||
{
|
{
|
||||||
|
@ -851,7 +853,7 @@ CompositorOGL::CreateFBOWithTexture(const IntRect& aRect, SurfaceInitMode aInit,
|
||||||
mGLContext->fGenTextures(1, &tex);
|
mGLContext->fGenTextures(1, &tex);
|
||||||
mGLContext->fBindTexture(mFBOTextureTarget, tex);
|
mGLContext->fBindTexture(mFBOTextureTarget, tex);
|
||||||
|
|
||||||
if (aInit == INIT_MODE_COPY) {
|
if (aCopyFromSource) {
|
||||||
GLuint curFBO = mCurrentRenderTarget->GetFBO();
|
GLuint curFBO = mCurrentRenderTarget->GetFBO();
|
||||||
if (curFBO != aSourceFrameBuffer) {
|
if (curFBO != aSourceFrameBuffer) {
|
||||||
mGLContext->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, aSourceFrameBuffer);
|
mGLContext->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, aSourceFrameBuffer);
|
||||||
|
@ -981,10 +983,11 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorOGL::DrawQuad(const Rect& aRect, const Rect& aClipRect,
|
CompositorOGL::DrawQuad(const Rect& aRect,
|
||||||
|
const Rect& aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
Float aOpacity,
|
||||||
const Point& aOffset)
|
const gfx::Matrix4x4 &aTransform)
|
||||||
{
|
{
|
||||||
PROFILER_LABEL("CompositorOGL", "DrawQuad");
|
PROFILER_LABEL("CompositorOGL", "DrawQuad");
|
||||||
MOZ_ASSERT(mFrameInProgress, "frame not started");
|
MOZ_ASSERT(mFrameInProgress, "frame not started");
|
||||||
|
@ -1046,7 +1049,8 @@ CompositorOGL::DrawQuad(const Rect& aRect, const Rect& aClipRect,
|
||||||
}
|
}
|
||||||
program->SetLayerQuadRect(aRect);
|
program->SetLayerQuadRect(aRect);
|
||||||
program->SetLayerTransform(aTransform);
|
program->SetLayerTransform(aTransform);
|
||||||
program->SetRenderOffset(aOffset.x, aOffset.y);
|
IntPoint offset = mCurrentRenderTarget->GetOrigin();
|
||||||
|
program->SetRenderOffset(offset.x, offset.y);
|
||||||
|
|
||||||
switch (aEffectChain.mPrimaryEffect->mType) {
|
switch (aEffectChain.mPrimaryEffect->mType) {
|
||||||
case EFFECT_SOLID_COLOR: {
|
case EFFECT_SOLID_COLOR: {
|
||||||
|
@ -1227,7 +1231,7 @@ CompositorOGL::DrawQuad(const Rect& aRect, const Rect& aClipRect,
|
||||||
program->SetLayerOpacity(aOpacity);
|
program->SetLayerOpacity(aOpacity);
|
||||||
program->SetLayerTransform(aTransform);
|
program->SetLayerTransform(aTransform);
|
||||||
program->SetTextureTransform(gfx3DMatrix());
|
program->SetTextureTransform(gfx3DMatrix());
|
||||||
program->SetRenderOffset(aOffset.x, aOffset.y);
|
program->SetRenderOffset(offset.x, offset.y);
|
||||||
program->SetLayerQuadRect(aRect);
|
program->SetLayerQuadRect(aRect);
|
||||||
AutoBindTexture bindMask;
|
AutoBindTexture bindMask;
|
||||||
if (maskType != MaskNone) {
|
if (maskType != MaskNone) {
|
||||||
|
|
|
@ -88,15 +88,17 @@ public:
|
||||||
|
|
||||||
virtual TemporaryRef<CompositingRenderTarget>
|
virtual TemporaryRef<CompositingRenderTarget>
|
||||||
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
CreateRenderTargetFromSource(const gfx::IntRect &aRect,
|
||||||
const CompositingRenderTarget *aSource) MOZ_OVERRIDE;
|
const CompositingRenderTarget *aSource,
|
||||||
|
const gfx::IntPoint &aSourcePoint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void SetRenderTarget(CompositingRenderTarget *aSurface) MOZ_OVERRIDE;
|
virtual void SetRenderTarget(CompositingRenderTarget *aSurface) MOZ_OVERRIDE;
|
||||||
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE;
|
virtual CompositingRenderTarget* GetCurrentRenderTarget() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect,
|
virtual void DrawQuad(const gfx::Rect& aRect,
|
||||||
|
const gfx::Rect& aClipRect,
|
||||||
const EffectChain &aEffectChain,
|
const EffectChain &aEffectChain,
|
||||||
gfx::Float aOpacity, const gfx::Matrix4x4 &aTransform,
|
gfx::Float aOpacity,
|
||||||
const gfx::Point& aOffset) MOZ_OVERRIDE;
|
const gfx::Matrix4x4 &aTransform) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void EndFrame() MOZ_OVERRIDE;
|
virtual void EndFrame() MOZ_OVERRIDE;
|
||||||
virtual void EndFrameForExternalComposition(const gfxMatrix& aTransform) MOZ_OVERRIDE;
|
virtual void EndFrameForExternalComposition(const gfxMatrix& aTransform) MOZ_OVERRIDE;
|
||||||
|
@ -274,7 +276,7 @@ private:
|
||||||
* shaders are required to sample from the different
|
* shaders are required to sample from the different
|
||||||
* texture types.
|
* texture types.
|
||||||
*/
|
*/
|
||||||
void CreateFBOWithTexture(const gfx::IntRect& aRect, SurfaceInitMode aInit,
|
void CreateFBOWithTexture(const gfx::IntRect& aRect, bool aCopyFromSource,
|
||||||
GLuint aSourceFrameBuffer,
|
GLuint aSourceFrameBuffer,
|
||||||
GLuint *aFBO, GLuint *aTexture);
|
GLuint *aFBO, GLuint *aTexture);
|
||||||
|
|
||||||
|
|
|
@ -2153,7 +2153,7 @@ gfxContext::ChangeTransform(const Matrix &aNewMatrix, bool aUpdatePatternTransfo
|
||||||
|
|
||||||
if (aUpdatePatternTransform && (state.pattern || state.sourceSurface)
|
if (aUpdatePatternTransform && (state.pattern || state.sourceSurface)
|
||||||
&& !state.patternTransformChanged) {
|
&& !state.patternTransformChanged) {
|
||||||
state.patternTransform = mTransform;
|
state.patternTransform = GetDTTransform();
|
||||||
state.patternTransformChanged = true;
|
state.patternTransformChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -938,7 +938,7 @@ gfxPlatform::GetThebesSurfaceForDrawTarget(DrawTarget *aTarget)
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSize size = data->GetSize();
|
IntSize size = data->GetSize();
|
||||||
gfxImageFormat format = OptimalFormatForContent(ContentForFormat(data->GetFormat()));
|
gfxImageFormat format = SurfaceFormatToImageFormat(data->GetFormat());
|
||||||
|
|
||||||
|
|
||||||
nsRefPtr<gfxASurface> surf =
|
nsRefPtr<gfxASurface> surf =
|
||||||
|
|
|
@ -147,9 +147,15 @@ case "$target" in
|
||||||
dnl set up compilers
|
dnl set up compilers
|
||||||
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
|
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
|
||||||
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
|
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
|
||||||
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
|
if test -z "$CC"; then
|
||||||
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
|
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
|
||||||
CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
|
fi
|
||||||
|
if test -z "$CXX"; then
|
||||||
|
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
|
||||||
|
fi
|
||||||
|
if test -z "$CPP"; then
|
||||||
|
CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
|
||||||
|
fi
|
||||||
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
|
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
|
||||||
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
|
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
|
||||||
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
|
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
|
||||||
|
|
|
@ -7439,6 +7439,18 @@ GetTemplateObjectForNative(JSContext *cx, HandleScript script, jsbytecode *pc,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (native == intrinsic_NewDenseArray) {
|
||||||
|
res.set(NewDenseUnallocatedArray(cx, 0, nullptr, TenuredObject));
|
||||||
|
if (!res)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
types::TypeObject *type = types::TypeScript::InitObject(cx, script, pc, JSProto_Array);
|
||||||
|
if (!type)
|
||||||
|
return false;
|
||||||
|
res->setType(type);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (native == js::array_concat) {
|
if (native == js::array_concat) {
|
||||||
if (args.thisv().isObject() && args.thisv().toObject().is<ArrayObject>() &&
|
if (args.thisv().isObject() && args.thisv().toObject().is<ArrayObject>() &&
|
||||||
!args.thisv().toObject().hasSingletonType())
|
!args.thisv().toObject().hasSingletonType())
|
||||||
|
@ -7451,6 +7463,18 @@ GetTemplateObjectForNative(JSContext *cx, HandleScript script, jsbytecode *pc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (native == js::str_split && args.length() == 1 && args[0].isString()) {
|
||||||
|
res.set(NewDenseUnallocatedArray(cx, 0, nullptr, TenuredObject));
|
||||||
|
if (!res)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
types::TypeObject *type = types::TypeScript::InitObject(cx, script, pc, JSProto_Array);
|
||||||
|
if (!type)
|
||||||
|
return false;
|
||||||
|
res->setType(type);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (native == js_String) {
|
if (native == js_String) {
|
||||||
RootedString emptyString(cx, cx->runtime()->emptyString);
|
RootedString emptyString(cx, cx->runtime()->emptyString);
|
||||||
res.set(StringObject::create(cx, emptyString, TenuredObject));
|
res.set(StringObject::create(cx, emptyString, TenuredObject));
|
||||||
|
|
|
@ -4625,6 +4625,19 @@ CodeGenerator::visitFromCharCode(LFromCharCode *lir)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef JSObject *(*StringSplitFn)(JSContext *, HandleTypeObject, HandleString, HandleString);
|
||||||
|
static const VMFunction StringSplitInfo = FunctionInfo<StringSplitFn>(js::str_split_string);
|
||||||
|
|
||||||
|
bool
|
||||||
|
CodeGenerator::visitStringSplit(LStringSplit *lir)
|
||||||
|
{
|
||||||
|
pushArg(ToRegister(lir->separator()));
|
||||||
|
pushArg(ToRegister(lir->string()));
|
||||||
|
pushArg(ImmGCPtr(lir->mir()->typeObject()));
|
||||||
|
|
||||||
|
return callVM(StringSplitInfo, lir);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CodeGenerator::visitInitializedLength(LInitializedLength *lir)
|
CodeGenerator::visitInitializedLength(LInitializedLength *lir)
|
||||||
{
|
{
|
||||||
|
|
|
@ -201,6 +201,7 @@ class CodeGenerator : public CodeGeneratorSpecific
|
||||||
bool visitConcatPar(LConcatPar *lir);
|
bool visitConcatPar(LConcatPar *lir);
|
||||||
bool visitCharCodeAt(LCharCodeAt *lir);
|
bool visitCharCodeAt(LCharCodeAt *lir);
|
||||||
bool visitFromCharCode(LFromCharCode *lir);
|
bool visitFromCharCode(LFromCharCode *lir);
|
||||||
|
bool visitStringSplit(LStringSplit *lir);
|
||||||
bool visitFunctionEnvironment(LFunctionEnvironment *lir);
|
bool visitFunctionEnvironment(LFunctionEnvironment *lir);
|
||||||
bool visitForkJoinSlice(LForkJoinSlice *lir);
|
bool visitForkJoinSlice(LForkJoinSlice *lir);
|
||||||
bool visitGuardThreadLocalObject(LGuardThreadLocalObject *lir);
|
bool visitGuardThreadLocalObject(LGuardThreadLocalObject *lir);
|
||||||
|
|
|
@ -5952,8 +5952,8 @@ ClassHasResolveHook(JSCompartment *comp, const Class *clasp, PropertyName *name)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
JSObject *
|
||||||
IonBuilder::testSingletonProperty(JSObject *obj, JSObject *singleton, PropertyName *name)
|
IonBuilder::testSingletonProperty(JSObject *obj, PropertyName *name)
|
||||||
{
|
{
|
||||||
// We would like to completely no-op property/global accesses which can
|
// We would like to completely no-op property/global accesses which can
|
||||||
// produce only a particular JSObject. When indicating the access result is
|
// produce only a particular JSObject. When indicating the access result is
|
||||||
|
@ -5971,26 +5971,26 @@ IonBuilder::testSingletonProperty(JSObject *obj, JSObject *singleton, PropertyNa
|
||||||
|
|
||||||
while (obj) {
|
while (obj) {
|
||||||
if (!ClassHasEffectlessLookup(obj->getClass()))
|
if (!ClassHasEffectlessLookup(obj->getClass()))
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
types::TypeObjectKey *objType = types::TypeObjectKey::get(obj);
|
types::TypeObjectKey *objType = types::TypeObjectKey::get(obj);
|
||||||
if (objType->unknownProperties())
|
if (objType->unknownProperties())
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
types::HeapTypeSetKey property = objType->property(NameToId(name), context());
|
types::HeapTypeSetKey property = objType->property(NameToId(name), context());
|
||||||
if (property.isOwnProperty(constraints())) {
|
if (property.isOwnProperty(constraints())) {
|
||||||
if (obj->hasSingletonType())
|
if (obj->hasSingletonType())
|
||||||
return property.singleton(constraints()) == singleton;
|
return property.singleton(constraints());
|
||||||
return false;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ClassHasResolveHook(compartment, obj->getClass(), name))
|
if (ClassHasResolveHook(compartment, obj->getClass(), name))
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
obj = obj->getProto();
|
obj = obj->getProto();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -6014,7 +6014,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr
|
||||||
|
|
||||||
JSObject *objectSingleton = types ? types->getSingleton() : nullptr;
|
JSObject *objectSingleton = types ? types->getSingleton() : nullptr;
|
||||||
if (objectSingleton)
|
if (objectSingleton)
|
||||||
return testSingletonProperty(objectSingleton, singleton, name);
|
return testSingletonProperty(objectSingleton, name) == singleton;
|
||||||
|
|
||||||
JSProtoKey key;
|
JSProtoKey key;
|
||||||
switch (obj->type()) {
|
switch (obj->type()) {
|
||||||
|
@ -6058,7 +6058,7 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr
|
||||||
|
|
||||||
if (JSObject *proto = object->proto().toObjectOrNull()) {
|
if (JSObject *proto = object->proto().toObjectOrNull()) {
|
||||||
// Test this type.
|
// Test this type.
|
||||||
if (!testSingletonProperty(proto, singleton, name))
|
if (testSingletonProperty(proto, name) != singleton)
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// Can't be on the prototype chain with no prototypes...
|
// Can't be on the prototype chain with no prototypes...
|
||||||
|
@ -6070,12 +6070,12 @@ IonBuilder::testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, Pr
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSObject *proto = GetClassPrototypePure(&script()->global(), key);
|
JSObject *proto = GetClassPrototypePure(&script()->global(), key);
|
||||||
if (proto)
|
if (proto)
|
||||||
return testSingletonProperty(proto, singleton, name);
|
return testSingletonProperty(proto, name) == singleton;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -6213,7 +6213,7 @@ IonBuilder::getStaticName(JSObject *staticObject, PropertyName *name, bool *psuc
|
||||||
if (!barrier) {
|
if (!barrier) {
|
||||||
if (singleton) {
|
if (singleton) {
|
||||||
// Try to inline a known constant value.
|
// Try to inline a known constant value.
|
||||||
if (testSingletonProperty(staticObject, singleton, name))
|
if (testSingletonProperty(staticObject, name) == singleton)
|
||||||
return pushConstant(ObjectValue(*singleton));
|
return pushConstant(ObjectValue(*singleton));
|
||||||
}
|
}
|
||||||
if (knownType == JSVAL_TYPE_UNDEFINED)
|
if (knownType == JSVAL_TYPE_UNDEFINED)
|
||||||
|
@ -7724,25 +7724,7 @@ IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPro
|
||||||
if (ownTypes.isOwnProperty(constraints()))
|
if (ownTypes.isOwnProperty(constraints()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
JSObject *singleton = nullptr;
|
JSObject *singleton = testSingletonProperty(typeObj->proto().toObject(), name);
|
||||||
JSObject *proto = typeObj->proto().toObject();
|
|
||||||
while (true) {
|
|
||||||
types::TypeObjectKey *protoType = types::TypeObjectKey::get(proto);
|
|
||||||
if (!protoType->unknownProperties()) {
|
|
||||||
types::HeapTypeSetKey property = protoType->property(NameToId(name));
|
|
||||||
|
|
||||||
singleton = property.singleton(constraints());
|
|
||||||
if (singleton) {
|
|
||||||
if (singleton->is<JSFunction>())
|
|
||||||
break;
|
|
||||||
singleton = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TaggedProto taggedProto = proto->getTaggedProto();
|
|
||||||
if (!taggedProto.isObject())
|
|
||||||
break;
|
|
||||||
proto = taggedProto.toObject();
|
|
||||||
}
|
|
||||||
if (!singleton)
|
if (!singleton)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -559,6 +559,7 @@ class IonBuilder : public MIRGenerator
|
||||||
|
|
||||||
// String natives.
|
// String natives.
|
||||||
InliningStatus inlineStringObject(CallInfo &callInfo);
|
InliningStatus inlineStringObject(CallInfo &callInfo);
|
||||||
|
InliningStatus inlineStringSplit(CallInfo &callInfo);
|
||||||
InliningStatus inlineStrCharCodeAt(CallInfo &callInfo);
|
InliningStatus inlineStrCharCodeAt(CallInfo &callInfo);
|
||||||
InliningStatus inlineStrFromCharCode(CallInfo &callInfo);
|
InliningStatus inlineStrFromCharCode(CallInfo &callInfo);
|
||||||
InliningStatus inlineStrCharAt(CallInfo &callInfo);
|
InliningStatus inlineStrCharAt(CallInfo &callInfo);
|
||||||
|
@ -642,7 +643,7 @@ class IonBuilder : public MIRGenerator
|
||||||
|
|
||||||
MGetPropertyCache *getInlineableGetPropertyCache(CallInfo &callInfo);
|
MGetPropertyCache *getInlineableGetPropertyCache(CallInfo &callInfo);
|
||||||
|
|
||||||
bool testSingletonProperty(JSObject *obj, JSObject *singleton, PropertyName *name);
|
JSObject *testSingletonProperty(JSObject *obj, PropertyName *name);
|
||||||
bool testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, PropertyName *name,
|
bool testSingletonPropertyTypes(MDefinition *obj, JSObject *singleton, PropertyName *name,
|
||||||
bool *testObject, bool *testString);
|
bool *testObject, bool *testString);
|
||||||
bool getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name,
|
bool getDefiniteSlot(types::TemporaryTypeSet *types, PropertyName *name,
|
||||||
|
|
|
@ -2720,6 +2720,26 @@ class LFromCharCode : public LInstructionHelper<1, 1, 0>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LStringSplit : public LCallInstructionHelper<1, 2, 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LIR_HEADER(StringSplit)
|
||||||
|
|
||||||
|
LStringSplit(const LAllocation &string, const LAllocation &separator) {
|
||||||
|
setOperand(0, string);
|
||||||
|
setOperand(1, separator);
|
||||||
|
}
|
||||||
|
const LAllocation *string() {
|
||||||
|
return getOperand(0);
|
||||||
|
}
|
||||||
|
const LAllocation *separator() {
|
||||||
|
return getOperand(1);
|
||||||
|
}
|
||||||
|
const MStringSplit *mir() const {
|
||||||
|
return mir_->toStringSplit();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Convert a 32-bit integer to a double.
|
// Convert a 32-bit integer to a double.
|
||||||
class LInt32ToDouble : public LInstructionHelper<1, 1, 0>
|
class LInt32ToDouble : public LInstructionHelper<1, 1, 0>
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,6 +126,7 @@
|
||||||
_(ConcatPar) \
|
_(ConcatPar) \
|
||||||
_(CharCodeAt) \
|
_(CharCodeAt) \
|
||||||
_(FromCharCode) \
|
_(FromCharCode) \
|
||||||
|
_(StringSplit) \
|
||||||
_(Int32ToDouble) \
|
_(Int32ToDouble) \
|
||||||
_(Float32ToDouble) \
|
_(Float32ToDouble) \
|
||||||
_(DoubleToFloat32) \
|
_(DoubleToFloat32) \
|
||||||
|
|
|
@ -2524,6 +2524,18 @@ LIRGenerator::visitArrayConcat(MArrayConcat *ins)
|
||||||
return defineReturn(lir, ins) && assignSafepoint(lir, ins);
|
return defineReturn(lir, ins) && assignSafepoint(lir, ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
LIRGenerator::visitStringSplit(MStringSplit *ins)
|
||||||
|
{
|
||||||
|
JS_ASSERT(ins->type() == MIRType_Object);
|
||||||
|
JS_ASSERT(ins->string()->type() == MIRType_String);
|
||||||
|
JS_ASSERT(ins->separator()->type() == MIRType_String);
|
||||||
|
|
||||||
|
LStringSplit *lir = new LStringSplit(useRegisterAtStart(ins->string()),
|
||||||
|
useRegisterAtStart(ins->separator()));
|
||||||
|
return defineReturn(lir, ins) && assignSafepoint(lir, ins);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
LIRGenerator::visitLoadTypedArrayElement(MLoadTypedArrayElement *ins)
|
LIRGenerator::visitLoadTypedArrayElement(MLoadTypedArrayElement *ins)
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,6 +148,7 @@ class LIRGenerator : public LIRGeneratorSpecific
|
||||||
bool visitConcatPar(MConcatPar *ins);
|
bool visitConcatPar(MConcatPar *ins);
|
||||||
bool visitCharCodeAt(MCharCodeAt *ins);
|
bool visitCharCodeAt(MCharCodeAt *ins);
|
||||||
bool visitFromCharCode(MFromCharCode *ins);
|
bool visitFromCharCode(MFromCharCode *ins);
|
||||||
|
bool visitStringSplit(MStringSplit *ins);
|
||||||
bool visitStart(MStart *start);
|
bool visitStart(MStart *start);
|
||||||
bool visitOsrEntry(MOsrEntry *entry);
|
bool visitOsrEntry(MOsrEntry *entry);
|
||||||
bool visitNop(MNop *nop);
|
bool visitNop(MNop *nop);
|
||||||
|
|
|
@ -105,6 +105,8 @@ IonBuilder::inlineNativeCall(CallInfo &callInfo, JSNative native)
|
||||||
// String natives.
|
// String natives.
|
||||||
if (native == js_String)
|
if (native == js_String)
|
||||||
return inlineStringObject(callInfo);
|
return inlineStringObject(callInfo);
|
||||||
|
if (native == js::str_split)
|
||||||
|
return inlineStringSplit(callInfo);
|
||||||
if (native == js_str_charCodeAt)
|
if (native == js_str_charCodeAt)
|
||||||
return inlineStrCharCodeAt(callInfo);
|
return inlineStrCharCodeAt(callInfo);
|
||||||
if (native == js::str_fromCharCode)
|
if (native == js::str_fromCharCode)
|
||||||
|
@ -910,6 +912,43 @@ IonBuilder::inlineStringObject(CallInfo &callInfo)
|
||||||
return InliningStatus_Inlined;
|
return InliningStatus_Inlined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IonBuilder::InliningStatus
|
||||||
|
IonBuilder::inlineStringSplit(CallInfo &callInfo)
|
||||||
|
{
|
||||||
|
if (callInfo.argc() != 1 || callInfo.constructing())
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
if (callInfo.thisArg()->type() != MIRType_String)
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
if (callInfo.getArg(0)->type() != MIRType_String)
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
|
||||||
|
JSObject *templateObject = inspector->getTemplateObjectForNative(pc, js::str_split);
|
||||||
|
if (!templateObject)
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
JS_ASSERT(templateObject->is<ArrayObject>());
|
||||||
|
|
||||||
|
types::TypeObjectKey *retType = types::TypeObjectKey::get(templateObject);
|
||||||
|
if (retType->unknownProperties())
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
|
||||||
|
types::HeapTypeSetKey key = retType->property(JSID_VOID);
|
||||||
|
if (!key.maybeTypes())
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
|
||||||
|
if (!key.maybeTypes()->hasType(types::Type::StringType())) {
|
||||||
|
key.freeze(constraints());
|
||||||
|
return InliningStatus_NotInlined;
|
||||||
|
}
|
||||||
|
|
||||||
|
callInfo.unwrapArgs();
|
||||||
|
|
||||||
|
MStringSplit *ins = MStringSplit::New(callInfo.thisArg(), callInfo.getArg(0), templateObject);
|
||||||
|
current->add(ins);
|
||||||
|
current->push(ins);
|
||||||
|
|
||||||
|
return InliningStatus_Inlined;
|
||||||
|
}
|
||||||
|
|
||||||
IonBuilder::InliningStatus
|
IonBuilder::InliningStatus
|
||||||
IonBuilder::inlineStrCharCodeAt(CallInfo &callInfo)
|
IonBuilder::inlineStrCharCodeAt(CallInfo &callInfo)
|
||||||
{
|
{
|
||||||
|
@ -1362,10 +1401,9 @@ IonBuilder::inlineNewDenseArrayForParallelExecution(CallInfo &callInfo)
|
||||||
return InliningStatus_NotInlined;
|
return InliningStatus_NotInlined;
|
||||||
types::TypeObject *typeObject = returnTypes->getTypeObject(0);
|
types::TypeObject *typeObject = returnTypes->getTypeObject(0);
|
||||||
|
|
||||||
JSObject *templateObject = NewDenseAllocatedArray(cx, 0, nullptr, TenuredObject);
|
JSObject *templateObject = inspector->getTemplateObjectForNative(pc, intrinsic_NewDenseArray);
|
||||||
if (!templateObject)
|
if (!templateObject || templateObject->type() != typeObject)
|
||||||
return InliningStatus_Error;
|
return InliningStatus_NotInlined;
|
||||||
templateObject->setType(typeObject);
|
|
||||||
|
|
||||||
callInfo.unwrapArgs();
|
callInfo.unwrapArgs();
|
||||||
|
|
||||||
|
|
|
@ -4152,6 +4152,48 @@ class MFromCharCode
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MStringSplit
|
||||||
|
: public MBinaryInstruction,
|
||||||
|
public MixPolicy<StringPolicy<0>, StringPolicy<1> >
|
||||||
|
{
|
||||||
|
types::TypeObject *typeObject_;
|
||||||
|
|
||||||
|
MStringSplit(MDefinition *string, MDefinition *sep, JSObject *templateObject)
|
||||||
|
: MBinaryInstruction(string, sep),
|
||||||
|
typeObject_(templateObject->type())
|
||||||
|
{
|
||||||
|
setResultType(MIRType_Object);
|
||||||
|
setResultTypeSet(MakeSingletonTypeSet(templateObject));
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
INSTRUCTION_HEADER(StringSplit)
|
||||||
|
|
||||||
|
static MStringSplit *New(MDefinition *string, MDefinition *sep, JSObject *templateObject) {
|
||||||
|
return new MStringSplit(string, sep, templateObject);
|
||||||
|
}
|
||||||
|
types::TypeObject *typeObject() const {
|
||||||
|
return typeObject_;
|
||||||
|
}
|
||||||
|
MDefinition *string() const {
|
||||||
|
return getOperand(0);
|
||||||
|
}
|
||||||
|
MDefinition *separator() const {
|
||||||
|
return getOperand(1);
|
||||||
|
}
|
||||||
|
TypePolicy *typePolicy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
bool possiblyCalls() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
virtual AliasSet getAliasSet() const {
|
||||||
|
// Although this instruction returns a new array, we don't have to mark
|
||||||
|
// it as store instruction, see also MNewArray.
|
||||||
|
return AliasSet::None();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Returns an object to use as |this| value. See also ComputeThis and
|
// Returns an object to use as |this| value. See also ComputeThis and
|
||||||
// BoxNonStrictThis in Interpreter.h.
|
// BoxNonStrictThis in Interpreter.h.
|
||||||
class MComputeThis
|
class MComputeThis
|
||||||
|
|
|
@ -72,6 +72,7 @@ namespace jit {
|
||||||
_(ConcatPar) \
|
_(ConcatPar) \
|
||||||
_(CharCodeAt) \
|
_(CharCodeAt) \
|
||||||
_(FromCharCode) \
|
_(FromCharCode) \
|
||||||
|
_(StringSplit) \
|
||||||
_(Return) \
|
_(Return) \
|
||||||
_(Throw) \
|
_(Throw) \
|
||||||
_(Box) \
|
_(Box) \
|
||||||
|
|
|
@ -163,6 +163,7 @@ class ParallelSafetyVisitor : public MInstructionVisitor
|
||||||
SAFE_OP(ConcatPar)
|
SAFE_OP(ConcatPar)
|
||||||
UNSAFE_OP(CharCodeAt)
|
UNSAFE_OP(CharCodeAt)
|
||||||
UNSAFE_OP(FromCharCode)
|
UNSAFE_OP(FromCharCode)
|
||||||
|
UNSAFE_OP(StringSplit)
|
||||||
SAFE_OP(Return)
|
SAFE_OP(Return)
|
||||||
CUSTOM_OP(Throw)
|
CUSTOM_OP(Throw)
|
||||||
SAFE_OP(Box) // Boxing just creates a JSVal, doesn't alloc.
|
SAFE_OP(Box) // Boxing just creates a JSVal, doesn't alloc.
|
||||||
|
|
|
@ -3005,7 +3005,7 @@ class SplitMatchResult {
|
||||||
} /* anonymous namespace */
|
} /* anonymous namespace */
|
||||||
|
|
||||||
template<class Matcher>
|
template<class Matcher>
|
||||||
static JSObject *
|
static ArrayObject *
|
||||||
SplitHelper(JSContext *cx, Handle<JSLinearString*> str, uint32_t limit, const Matcher &splitMatch,
|
SplitHelper(JSContext *cx, Handle<JSLinearString*> str, uint32_t limit, const Matcher &splitMatch,
|
||||||
Handle<TypeObject*> type)
|
Handle<TypeObject*> type)
|
||||||
{
|
{
|
||||||
|
@ -3289,6 +3289,28 @@ js::str_split(JSContext *cx, unsigned argc, Value *vp)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JSObject *
|
||||||
|
js::str_split_string(JSContext *cx, HandleTypeObject type, HandleString str, HandleString sep)
|
||||||
|
{
|
||||||
|
Rooted<JSLinearString*> linearStr(cx, str->ensureLinear(cx));
|
||||||
|
if (!linearStr)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
Rooted<JSLinearString*> linearSep(cx, sep->ensureLinear(cx));
|
||||||
|
if (!linearSep)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
uint32_t limit = UINT32_MAX;
|
||||||
|
|
||||||
|
SplitStringMatcher matcher(cx, linearSep);
|
||||||
|
ArrayObject *aobj = SplitHelper(cx, linearStr, limit, matcher, type);
|
||||||
|
if (!aobj)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
aobj->setType(type);
|
||||||
|
return aobj;
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
str_substr(JSContext *cx, unsigned argc, Value *vp)
|
str_substr(JSContext *cx, unsigned argc, Value *vp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "jsutil.h"
|
#include "jsutil.h"
|
||||||
#include "NamespaceImports.h"
|
#include "NamespaceImports.h"
|
||||||
|
|
||||||
|
#include "gc/Rooting.h"
|
||||||
#include "js/RootingAPI.h"
|
#include "js/RootingAPI.h"
|
||||||
#include "vm/Unicode.h"
|
#include "vm/Unicode.h"
|
||||||
|
|
||||||
|
@ -355,6 +356,9 @@ str_search(JSContext *cx, unsigned argc, Value *vp);
|
||||||
bool
|
bool
|
||||||
str_split(JSContext *cx, unsigned argc, Value *vp);
|
str_split(JSContext *cx, unsigned argc, Value *vp);
|
||||||
|
|
||||||
|
JSObject *
|
||||||
|
str_split_string(JSContext *cx, HandleTypeObject type, HandleString str, HandleString sep);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
str_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
|
str_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
|
||||||
MutableHandleObject objp);
|
MutableHandleObject objp);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
NSS_3_15_3_BETA2
|
NSS_3_15_4_BETA1
|
||||||
|
|
|
@ -945,7 +945,7 @@ PrintSyntax(char *progName)
|
||||||
{
|
{
|
||||||
#define FPS fprintf(stderr,
|
#define FPS fprintf(stderr,
|
||||||
FPS "Type %s -H for more detailed descriptions\n", progName);
|
FPS "Type %s -H for more detailed descriptions\n", progName);
|
||||||
FPS "Usage: %s -N [-d certdir] [-P dbprefix] [-f pwfile]\n", progName);
|
FPS "Usage: %s -N [-d certdir] [-P dbprefix] [-f pwfile] [--empty-password]\n", progName);
|
||||||
FPS "Usage: %s -T [-d certdir] [-P dbprefix] [-h token-name]\n"
|
FPS "Usage: %s -T [-d certdir] [-P dbprefix] [-h token-name]\n"
|
||||||
"\t\t [-f pwfile] [-0 SSO-password]\n", progName);
|
"\t\t [-f pwfile] [-0 SSO-password]\n", progName);
|
||||||
FPS "\t%s -A -n cert-name -t trustargs [-d certdir] [-P dbprefix] [-a] [-i input]\n",
|
FPS "\t%s -A -n cert-name -t trustargs [-d certdir] [-P dbprefix] [-a] [-i input]\n",
|
||||||
|
@ -1361,6 +1361,8 @@ static void luN(enum usage_level ul, const char *command)
|
||||||
" -d certdir");
|
" -d certdir");
|
||||||
FPS "%-20s Cert & Key database prefix\n",
|
FPS "%-20s Cert & Key database prefix\n",
|
||||||
" -P dbprefix");
|
" -P dbprefix");
|
||||||
|
FPS "%-20s use empty password when creating a new database\n",
|
||||||
|
" --empty-password");
|
||||||
FPS "\n");
|
FPS "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2191,6 +2193,7 @@ enum certutilOpts {
|
||||||
opt_KeyOpFlagsOn,
|
opt_KeyOpFlagsOn,
|
||||||
opt_KeyOpFlagsOff,
|
opt_KeyOpFlagsOff,
|
||||||
opt_KeyAttrFlags,
|
opt_KeyAttrFlags,
|
||||||
|
opt_EmptyPassword,
|
||||||
opt_Help
|
opt_Help
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2298,6 +2301,8 @@ secuCommandFlag options_init[] =
|
||||||
"keyOpFlagsOff"},
|
"keyOpFlagsOff"},
|
||||||
{ /* opt_KeyAttrFlags */ 0, PR_TRUE, 0, PR_FALSE,
|
{ /* opt_KeyAttrFlags */ 0, PR_TRUE, 0, PR_FALSE,
|
||||||
"keyAttrFlags"},
|
"keyAttrFlags"},
|
||||||
|
{ /* opt_EmptyPassword */ 0, PR_FALSE, 0, PR_FALSE,
|
||||||
|
"empty-password"},
|
||||||
};
|
};
|
||||||
#define NUM_OPTIONS ((sizeof options_init) / (sizeof options_init[0]))
|
#define NUM_OPTIONS ((sizeof options_init) / (sizeof options_init[0]))
|
||||||
|
|
||||||
|
@ -2809,7 +2814,10 @@ certutil_main(int argc, char **argv, PRBool initialize)
|
||||||
|
|
||||||
/* If creating new database, initialize the password. */
|
/* If creating new database, initialize the password. */
|
||||||
if (certutil.commands[cmd_NewDBs].activated) {
|
if (certutil.commands[cmd_NewDBs].activated) {
|
||||||
SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg,
|
if(certutil.options[opt_EmptyPassword].activated && (PK11_NeedUserInit(slot)))
|
||||||
|
PK11_InitPin(slot, (char*)NULL, "");
|
||||||
|
else
|
||||||
|
SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg,
|
||||||
certutil.options[opt_NewPasswordFile].arg);
|
certutil.options[opt_NewPasswordFile].arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -528,11 +528,10 @@ ownAuthCertificate(void *arg, PRFileDesc *fd, PRBool checkSig,
|
||||||
csa = SSL_PeerStapledOCSPResponses(fd);
|
csa = SSL_PeerStapledOCSPResponses(fd);
|
||||||
if (csa) {
|
if (csa) {
|
||||||
for (i = 0; i < csa->len; ++i) {
|
for (i = 0; i < csa->len; ++i) {
|
||||||
SECStatus test_rv =
|
PORT_SetError(0);
|
||||||
CERT_CacheOCSPResponseFromSideChannel(
|
if (CERT_CacheOCSPResponseFromSideChannel(
|
||||||
serverCertAuth->dbHandle, cert, PR_Now(),
|
serverCertAuth->dbHandle, cert, PR_Now(),
|
||||||
&csa->items[i], arg);
|
&csa->items[i], arg) != SECSuccess) {
|
||||||
if (test_rv != SECSuccess) {
|
|
||||||
PRErrorCode error = PR_GetError();
|
PRErrorCode error = PR_GetError();
|
||||||
PORT_Assert(error != 0);
|
PORT_Assert(error != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#error "Do not include this header file."
|
#error "Do not include this header file."
|
||||||
|
|
||||||
|
|
|
@ -648,6 +648,11 @@ of the attribute codes:
|
||||||
<listitem><para>Add a Name Constraint extension to the certificate. X.509 certificate extensions are described in RFC 5280.</para></listitem>
|
<listitem><para>Add a Name Constraint extension to the certificate. X.509 certificate extensions are described in RFC 5280.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--empty-password</term>
|
||||||
|
<listitem><para>Use empty password when creating new certificate database with -N.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>--keyAttrFlags attrflags</term>
|
<term>--keyAttrFlags attrflags</term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>CERTUTIL</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="CERTUTIL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CERTUTIL</th></tr></table><hr></div><div class="refentry"><a name="certutil"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>certutil — Manage keys and certificate in both NSS databases and other NSS tokens</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">certutil</code> [<em class="replaceable"><code>options</code></em>] [[<em class="replaceable"><code>arguments</code></em>]]</p></div></div><div class="refsection"><a name="idm207694846832"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>CERTUTIL</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="CERTUTIL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CERTUTIL</th></tr></table><hr></div><div class="refentry"><a name="certutil"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>certutil — Manage keys and certificate in both NSS databases and other NSS tokens</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">certutil</code> [<em class="replaceable"><code>options</code></em>] [[<em class="replaceable"><code>arguments</code></em>]]</p></div></div><div class="refsection"><a name="idm139822584390064"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Certificate Database Tool, <span class="command"><strong>certutil</strong></span>, is a command-line utility that can create and modify certificate and key databases. It can specifically list, generate, modify, or delete certificates, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.</p><p>Certificate issuance, part of the key and certificate management process, requires that keys and certificates be created in the key database. This document discusses certificate and key database management. For information on the security module database management, see the <span class="command"><strong>modutil</strong></span> manpage.</p></div><div class="refsection"><a name="options"></a><h2>Command Options and Arguments</h2><p>Running <span class="command"><strong>certutil</strong></span> always requires one and only one command option to specify the type of certificate operation. Each command option may take zero or more arguments. The command option <code class="option">-H</code> will list all the command options and their relevant arguments.</p><p><span class="command"><strong>Command Options</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-A </span></dt><dd><p>Add an existing certificate to a certificate database. The certificate database should already exist; if one is not present, this command option will initialize one by default.</p></dd><dt><span class="term">-B</span></dt><dd><p>Run a series of commands from the specified batch file. This requires the <code class="option">-i</code> argument.</p></dd><dt><span class="term">-C </span></dt><dd><p>Create a new binary certificate file from a binary certificate request file. Use the <code class="option">-i</code> argument to specify the certificate request file. If this argument is not used, <span class="command"><strong>certutil</strong></span> prompts for a filename. </p></dd><dt><span class="term">-D </span></dt><dd><p>Delete a certificate from the certificate database.</p></dd><dt><span class="term">-E </span></dt><dd><p>Add an email certificate to the certificate database.</p></dd><dt><span class="term">-F</span></dt><dd><p>Delete a private key from a key database. Specify the key to delete with the -n argument. Specify the database from which to delete the key with the
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Certificate Database Tool, <span class="command"><strong>certutil</strong></span>, is a command-line utility that can create and modify certificate and key databases. It can specifically list, generate, modify, or delete certificates, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.</p><p>Certificate issuance, part of the key and certificate management process, requires that keys and certificates be created in the key database. This document discusses certificate and key database management. For information on the security module database management, see the <span class="command"><strong>modutil</strong></span> manpage.</p></div><div class="refsection"><a name="options"></a><h2>Command Options and Arguments</h2><p>Running <span class="command"><strong>certutil</strong></span> always requires one and only one command option to specify the type of certificate operation. Each command option may take zero or more arguments. The command option <code class="option">-H</code> will list all the command options and their relevant arguments.</p><p><span class="command"><strong>Command Options</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-A </span></dt><dd><p>Add an existing certificate to a certificate database. The certificate database should already exist; if one is not present, this command option will initialize one by default.</p></dd><dt><span class="term">-B</span></dt><dd><p>Run a series of commands from the specified batch file. This requires the <code class="option">-i</code> argument.</p></dd><dt><span class="term">-C </span></dt><dd><p>Create a new binary certificate file from a binary certificate request file. Use the <code class="option">-i</code> argument to specify the certificate request file. If this argument is not used, <span class="command"><strong>certutil</strong></span> prompts for a filename. </p></dd><dt><span class="term">-D </span></dt><dd><p>Delete a certificate from the certificate database.</p></dd><dt><span class="term">-E </span></dt><dd><p>Add an email certificate to the certificate database.</p></dd><dt><span class="term">-F</span></dt><dd><p>Delete a private key from a key database. Specify the key to delete with the -n argument. Specify the database from which to delete the key with the
|
||||||
<code class="option">-d</code> argument. Use the <code class="option">-k</code> argument to specify explicitly whether to delete a DSA, RSA, or ECC key. If you don't use the <code class="option">-k</code> argument, the option looks for an RSA key matching the specified nickname.
|
<code class="option">-d</code> argument. Use the <code class="option">-k</code> argument to specify explicitly whether to delete a DSA, RSA, or ECC key. If you don't use the <code class="option">-k</code> argument, the option looks for an RSA key matching the specified nickname.
|
||||||
</p><p>
|
</p><p>
|
||||||
|
@ -10,7 +10,7 @@ For certificate requests, ASCII output defaults to standard output unless redire
|
||||||
</p><p>
|
</p><p>
|
||||||
If this option is not used, the validity check defaults to the current system time.</p></dd><dt><span class="term">-c issuer</span></dt><dd><p>Identify the certificate of the CA from which a new certificate will derive its authenticity.
|
If this option is not used, the validity check defaults to the current system time.</p></dd><dt><span class="term">-c issuer</span></dt><dd><p>Identify the certificate of the CA from which a new certificate will derive its authenticity.
|
||||||
Use the exact nickname or alias of the CA certificate, or use the CA's email address. Bracket the issuer string
|
Use the exact nickname or alias of the CA certificate, or use the CA's email address. Bracket the issuer string
|
||||||
with quotation marks if it contains spaces. </p></dd><dt><span class="term">-d [prefix]directory</span></dt><dd><p>Specify the database directory containing the certificate and key database files.</p><p><span class="command"><strong>certutil</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). </p><p>NSS recognizes the following prefixes:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="command"><strong>sql: requests the newer database</strong></span></p></li><li class="listitem"><p><span class="command"><strong>dbm: requests the legacy database</strong></span></p></li></ul></div><p>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then dbm: is the default.</p></dd><dt><span class="term">-e </span></dt><dd><p>Check a certificate's signature during the process of validating a certificate.</p></dd><dt><span class="term">-f password-file</span></dt><dd><p>Specify a file that will automatically supply the password to include in a certificate
|
with quotation marks if it contains spaces. </p></dd><dt><span class="term">-d [prefix]directory</span></dt><dd><p>Specify the database directory containing the certificate and key database files.</p><p><span class="command"><strong>certutil</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). </p><p>NSS recognizes the following prefixes:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="command"><strong>sql: requests the newer database</strong></span></p></li><li class="listitem"><p><span class="command"><strong>dbm: requests the legacy database</strong></span></p></li></ul></div><p>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then dbm: is the default.</p></dd><dt><span class="term">-e </span></dt><dd><p>Check a certificate's signature during the process of validating a certificate.</p></dd><dt><span class="term">--email email-address</span></dt><dd><p>Specify the email address of a certificate to list. Used with the -L command option.</p></dd><dt><span class="term">-f password-file</span></dt><dd><p>Specify a file that will automatically supply the password to include in a certificate
|
||||||
or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent
|
or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent
|
||||||
unauthorized access to this file.</p></dd><dt><span class="term">-g keysize</span></dt><dd><p>Set a key size to use when generating new public and private key pairs. The minimum is 512 bits and the maximum is 8192 bits. The default is 1024 bits. Any size between the minimum and maximum is allowed.</p></dd><dt><span class="term">-h tokenname</span></dt><dd><p>Specify the name of a token to use or act on. If not specified the default token is the internal database slot.</p></dd><dt><span class="term">-i input_file</span></dt><dd><p>Pass an input file to the command. Depending on the command option, an input file can be a specific certificate, a certificate request file, or a batch file of commands.</p></dd><dt><span class="term">-k key-type-or-id</span></dt><dd><p>Specify the type or specific ID of a key.</p><p>
|
unauthorized access to this file.</p></dd><dt><span class="term">-g keysize</span></dt><dd><p>Set a key size to use when generating new public and private key pairs. The minimum is 512 bits and the maximum is 8192 bits. The default is 1024 bits. Any size between the minimum and maximum is allowed.</p></dd><dt><span class="term">-h tokenname</span></dt><dd><p>Specify the name of a token to use or act on. If not specified the default token is the internal database slot.</p></dd><dt><span class="term">-i input_file</span></dt><dd><p>Pass an input file to the command. Depending on the command option, an input file can be a specific certificate, a certificate request file, or a batch file of commands.</p></dd><dt><span class="term">-k key-type-or-id</span></dt><dd><p>Specify the type or specific ID of a key.</p><p>
|
||||||
The valid key type options are rsa, dsa, ec, or all. The default
|
The valid key type options are rsa, dsa, ec, or all. The default
|
||||||
|
@ -109,7 +109,7 @@ of the attribute codes:
|
||||||
msTrustListSign
|
msTrustListSign
|
||||||
</p></li><li class="listitem"><p>
|
</p></li><li class="listitem"><p>
|
||||||
critical
|
critical
|
||||||
</p></li></ul></div><p>X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">-7 emailAddrs</span></dt><dd><p>Add a comma-separated list of email addresses to the subject alternative name extension of a certificate or certificate request that is being created or added to the database. Subject alternative name extensions are described in Section 4.2.1.7 of RFC 3280.</p></dd><dt><span class="term">-8 dns-names</span></dt><dd><p>Add a comma-separated list of DNS names to the subject alternative name extension of a certificate or certificate request that is being created or added to the database. Subject alternative name extensions are described in Section 4.2.1.7 of RFC 3280.</p></dd><dt><span class="term">--extAIA</span></dt><dd><p>Add the Authority Information Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extSIA</span></dt><dd><p>Add the Subject Information Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extCP</span></dt><dd><p>Add the Certificate Policies extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extPM</span></dt><dd><p>Add the Policy Mappings extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extPC</span></dt><dd><p>Add the Policy Constraints extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extIA</span></dt><dd><p>Add the Inhibit Any Policy Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extSKID</span></dt><dd><p>Add the Subject Key ID extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extNC</span></dt><dd><p>Add a Name Constraint extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--keyAttrFlags attrflags</span></dt><dd><p>
|
</p></li></ul></div><p>X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">-7 emailAddrs</span></dt><dd><p>Add a comma-separated list of email addresses to the subject alternative name extension of a certificate or certificate request that is being created or added to the database. Subject alternative name extensions are described in Section 4.2.1.7 of RFC 3280.</p></dd><dt><span class="term">-8 dns-names</span></dt><dd><p>Add a comma-separated list of DNS names to the subject alternative name extension of a certificate or certificate request that is being created or added to the database. Subject alternative name extensions are described in Section 4.2.1.7 of RFC 3280.</p></dd><dt><span class="term">--extAIA</span></dt><dd><p>Add the Authority Information Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extSIA</span></dt><dd><p>Add the Subject Information Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extCP</span></dt><dd><p>Add the Certificate Policies extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extPM</span></dt><dd><p>Add the Policy Mappings extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extPC</span></dt><dd><p>Add the Policy Constraints extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extIA</span></dt><dd><p>Add the Inhibit Any Policy Access extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extSKID</span></dt><dd><p>Add the Subject Key ID extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--extNC</span></dt><dd><p>Add a Name Constraint extension to the certificate. X.509 certificate extensions are described in RFC 5280.</p></dd><dt><span class="term">--empty-password</span></dt><dd><p>Use empty password when creating new certificate database with -N.</p></dd><dt><span class="term">--keyAttrFlags attrflags</span></dt><dd><p>
|
||||||
PKCS #11 key Attributes. Comma separated list of key attribute flags, selected from the following list of choices: {token | session} {public | private} {sensitive | insensitive} {modifiable | unmodifiable} {extractable | unextractable}</p></dd><dt><span class="term">--keyFlagsOn opflags, </span><span class="term">--keyFlagsOff opflags</span></dt><dd><p>
|
PKCS #11 key Attributes. Comma separated list of key attribute flags, selected from the following list of choices: {token | session} {public | private} {sensitive | insensitive} {modifiable | unmodifiable} {extractable | unextractable}</p></dd><dt><span class="term">--keyFlagsOn opflags, </span><span class="term">--keyFlagsOff opflags</span></dt><dd><p>
|
||||||
PKCS #11 key Operation Flags.
|
PKCS #11 key Operation Flags.
|
||||||
Comma separated list of one or more of the following:
|
Comma separated list of one or more of the following:
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
common-options are:
|
common-options are:
|
||||||
[-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]
|
[-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]
|
||||||
]</p></div></div><div class="refsection"><a name="idm207680667808"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
]</p></div></div><div class="refsection"><a name="idm212191438032"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The PKCS #12 utility, <span class="command"><strong>pk12util</strong></span>, enables sharing certificates among any server that supports PKCS#12. The tool can import certificates and keys from PKCS#12 files into security databases, export certificates, and list certificates and keys.</p></div><div class="refsection"><a name="options"></a><h2>Options and Arguments</h2><p><span class="command"><strong>Options</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-i p12file</span></dt><dd><p>Import keys and certificates from a PKCS#12 file into a security database.</p></dd><dt><span class="term">-l p12file</span></dt><dd><p>List the keys and certificates in PKCS#12 file.</p></dd><dt><span class="term">-o p12file</span></dt><dd><p>Export keys and certificates from the security database to a PKCS#12 file.</p></dd></dl></div><p><span class="command"><strong>Arguments</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-n certname</span></dt><dd><p>Specify the nickname of the cert and private key to export.</p></dd><dt><span class="term">-d [sql:]directory</span></dt><dd><p>Specify the database directory into which to import to or export from certificates and keys.</p><p><span class="command"><strong>pk12util</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). If the prefix <span class="command"><strong>sql:</strong></span> is not used, then the tool assumes that the given databases are in the old format.</p></dd><dt><span class="term">-P prefix</span></dt><dd><p>Specify the prefix used on the certificate and key databases. This option is provided as a special case.
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The PKCS #12 utility, <span class="command"><strong>pk12util</strong></span>, enables sharing certificates among any server that supports PKCS#12. The tool can import certificates and keys from PKCS#12 files into security databases, export certificates, and list certificates and keys.</p></div><div class="refsection"><a name="options"></a><h2>Options and Arguments</h2><p><span class="command"><strong>Options</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-i p12file</span></dt><dd><p>Import keys and certificates from a PKCS#12 file into a security database.</p></dd><dt><span class="term">-l p12file</span></dt><dd><p>List the keys and certificates in PKCS#12 file.</p></dd><dt><span class="term">-o p12file</span></dt><dd><p>Export keys and certificates from the security database to a PKCS#12 file.</p></dd></dl></div><p><span class="command"><strong>Arguments</strong></span></p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-n certname</span></dt><dd><p>Specify the nickname of the cert and private key to export.</p></dd><dt><span class="term">-d [sql:]directory</span></dt><dd><p>Specify the database directory into which to import to or export from certificates and keys.</p><p><span class="command"><strong>pk12util</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). If the prefix <span class="command"><strong>sql:</strong></span> is not used, then the tool assumes that the given databases are in the old format.</p></dd><dt><span class="term">-P prefix</span></dt><dd><p>Specify the prefix used on the certificate and key databases. This option is provided as a special case.
|
||||||
Changing the names of the certificate and key databases is not recommended.</p></dd><dt><span class="term">-h tokenname</span></dt><dd><p>Specify the name of the token to import into or export from.</p></dd><dt><span class="term">-v </span></dt><dd><p>Enable debug logging when importing.</p></dd><dt><span class="term">-k slotPasswordFile</span></dt><dd><p>Specify the text file containing the slot's password.</p></dd><dt><span class="term">-K slotPassword</span></dt><dd><p>Specify the slot's password.</p></dd><dt><span class="term">-w p12filePasswordFile</span></dt><dd><p>Specify the text file containing the pkcs #12 file password.</p></dd><dt><span class="term">-W p12filePassword</span></dt><dd><p>Specify the pkcs #12 file password.</p></dd><dt><span class="term">-c keyCipher</span></dt><dd><p>Specify the key encryption algorithm.</p></dd><dt><span class="term">-C certCipher</span></dt><dd><p>Specify the key cert (overall package) encryption algorithm.</p></dd><dt><span class="term">-m | --key-len keyLength</span></dt><dd><p>Specify the desired length of the symmetric key to be used to encrypt the private key.</p></dd><dt><span class="term">-n | --cert-key-len certKeyLength</span></dt><dd><p>Specify the desired length of the symmetric key to be used to encrypt the certificates and other meta-data.</p></dd><dt><span class="term">-r</span></dt><dd><p>Dumps all of the data in raw (binary) form. This must be saved as a DER file. The default is to return information in a pretty-print ASCII format, which displays the information about the certificates and public keys in the p12 file.</p></dd></dl></div></div><div class="refsection"><a name="return-codes"></a><h2>Return Codes</h2><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 0 - No error</p></li><li class="listitem"><p> 1 - User Cancelled</p></li><li class="listitem"><p> 2 - Usage error</p></li><li class="listitem"><p> 6 - NLS init error</p></li><li class="listitem"><p> 8 - Certificate DB open error</p></li><li class="listitem"><p> 9 - Key DB open error</p></li><li class="listitem"><p> 10 - File initialization error</p></li><li class="listitem"><p> 11 - Unicode conversion error</p></li><li class="listitem"><p> 12 - Temporary file creation error</p></li><li class="listitem"><p> 13 - PKCS11 get slot error</p></li><li class="listitem"><p> 14 - PKCS12 decoder start error</p></li><li class="listitem"><p> 15 - error read from import file</p></li><li class="listitem"><p> 16 - pkcs12 decode error</p></li><li class="listitem"><p> 17 - pkcs12 decoder verify error</p></li><li class="listitem"><p> 18 - pkcs12 decoder validate bags error</p></li><li class="listitem"><p> 19 - pkcs12 decoder import bags error</p></li><li class="listitem"><p> 20 - key db conversion version 3 to version 2 error</p></li><li class="listitem"><p> 21 - cert db conversion version 7 to version 5 error</p></li><li class="listitem"><p> 22 - cert and key dbs patch error</p></li><li class="listitem"><p> 23 - get default cert db error</p></li><li class="listitem"><p> 24 - find cert by nickname error</p></li><li class="listitem"><p> 25 - create export context error</p></li><li class="listitem"><p> 26 - PKCS12 add password itegrity error</p></li><li class="listitem"><p> 27 - cert and key Safes creation error</p></li><li class="listitem"><p> 28 - PKCS12 add cert and key error</p></li><li class="listitem"><p> 29 - PKCS12 encode error</p></li></ul></div></div><div class="refsection"><a name="examples"></a><h2>Examples</h2><p><span class="command"><strong>Importing Keys and Certificates</strong></span></p><p>The most basic usage of <span class="command"><strong>pk12util</strong></span> for importing a certificate or key is the PKCS#12 input file (<code class="option">-i</code>) and some way to specify the security database being accessed (either <code class="option">-d</code> for a directory or <code class="option">-h</code> for a token).
|
Changing the names of the certificate and key databases is not recommended.</p></dd><dt><span class="term">-h tokenname</span></dt><dd><p>Specify the name of the token to import into or export from.</p></dd><dt><span class="term">-v </span></dt><dd><p>Enable debug logging when importing.</p></dd><dt><span class="term">-k slotPasswordFile</span></dt><dd><p>Specify the text file containing the slot's password.</p></dd><dt><span class="term">-K slotPassword</span></dt><dd><p>Specify the slot's password.</p></dd><dt><span class="term">-w p12filePasswordFile</span></dt><dd><p>Specify the text file containing the pkcs #12 file password.</p></dd><dt><span class="term">-W p12filePassword</span></dt><dd><p>Specify the pkcs #12 file password.</p></dd><dt><span class="term">-c keyCipher</span></dt><dd><p>Specify the key encryption algorithm.</p></dd><dt><span class="term">-C certCipher</span></dt><dd><p>Specify the key cert (overall package) encryption algorithm.</p></dd><dt><span class="term">-m | --key-len keyLength</span></dt><dd><p>Specify the desired length of the symmetric key to be used to encrypt the private key.</p></dd><dt><span class="term">-n | --cert-key-len certKeyLength</span></dt><dd><p>Specify the desired length of the symmetric key to be used to encrypt the certificates and other meta-data.</p></dd><dt><span class="term">-r</span></dt><dd><p>Dumps all of the data in raw (binary) form. This must be saved as a DER file. The default is to return information in a pretty-print ASCII format, which displays the information about the certificates and public keys in the p12 file.</p></dd></dl></div></div><div class="refsection"><a name="return-codes"></a><h2>Return Codes</h2><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 0 - No error</p></li><li class="listitem"><p> 1 - User Cancelled</p></li><li class="listitem"><p> 2 - Usage error</p></li><li class="listitem"><p> 6 - NLS init error</p></li><li class="listitem"><p> 8 - Certificate DB open error</p></li><li class="listitem"><p> 9 - Key DB open error</p></li><li class="listitem"><p> 10 - File initialization error</p></li><li class="listitem"><p> 11 - Unicode conversion error</p></li><li class="listitem"><p> 12 - Temporary file creation error</p></li><li class="listitem"><p> 13 - PKCS11 get slot error</p></li><li class="listitem"><p> 14 - PKCS12 decoder start error</p></li><li class="listitem"><p> 15 - error read from import file</p></li><li class="listitem"><p> 16 - pkcs12 decode error</p></li><li class="listitem"><p> 17 - pkcs12 decoder verify error</p></li><li class="listitem"><p> 18 - pkcs12 decoder validate bags error</p></li><li class="listitem"><p> 19 - pkcs12 decoder import bags error</p></li><li class="listitem"><p> 20 - key db conversion version 3 to version 2 error</p></li><li class="listitem"><p> 21 - cert db conversion version 7 to version 5 error</p></li><li class="listitem"><p> 22 - cert and key dbs patch error</p></li><li class="listitem"><p> 23 - get default cert db error</p></li><li class="listitem"><p> 24 - find cert by nickname error</p></li><li class="listitem"><p> 25 - create export context error</p></li><li class="listitem"><p> 26 - PKCS12 add password itegrity error</p></li><li class="listitem"><p> 27 - cert and key Safes creation error</p></li><li class="listitem"><p> 28 - PKCS12 add cert and key error</p></li><li class="listitem"><p> 29 - PKCS12 encode error</p></li></ul></div></div><div class="refsection"><a name="examples"></a><h2>Examples</h2><p><span class="command"><strong>Importing Keys and Certificates</strong></span></p><p>The most basic usage of <span class="command"><strong>pk12util</strong></span> for importing a certificate or key is the PKCS#12 input file (<code class="option">-i</code>) and some way to specify the security database being accessed (either <code class="option">-d</code> for a directory or <code class="option">-h</code> for a token).
|
||||||
</p><pre class="programlisting">pk12util -i p12File [-h tokenname] [-v] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]</pre><p>For example:</p><pre class="programlisting"># pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb
|
</p><pre class="programlisting">pk12util -i p12File [-h tokenname] [-v] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]</pre><p>For example:</p><pre class="programlisting"># pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>PP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="PP"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PP</th></tr></table><hr></div><div class="refentry"><a name="pp"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pp — Prints certificates, keys, crls, and pkcs7 files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">pp -t type [-a] [-i input] [-o output]</code> </p></div></div><div class="refsection"><a name="idm207695084256"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>PP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="PP"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PP</th></tr></table><hr></div><div class="refentry"><a name="pp"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pp — Prints certificates, keys, crls, and pkcs7 files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">pp -t type [-a] [-i input] [-o output]</code> </p></div></div><div class="refsection"><a name="idm212208370176"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="idm207691286816"></a><h2>Description</h2><p><span class="command"><strong>pp </strong></span>pretty-prints private and public key, certificate, certificate-request,
|
</p></div><div class="refsection"><a name="idm212212496016"></a><h2>Description</h2><p><span class="command"><strong>pp </strong></span>pretty-prints private and public key, certificate, certificate-request,
|
||||||
pkcs7 or crl files
|
pkcs7 or crl files
|
||||||
</p></div><div class="refsection"><a name="idm207691284880"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-t </code> <em class="replaceable"><code>type</code></em></span></dt><dd><p class="simpara">specify the input, one of {private-key | public-key | certificate | certificate-request | pkcs7 | crl}</p><p class="simpara"></p></dd><dt><span class="term"><code class="option">-a </code></span></dt><dd>Input is in ascii encoded form (RFC1113)</dd><dt><span class="term"><code class="option">-i </code> <em class="replaceable"><code>inputfile</code></em></span></dt><dd>Define an input file to use (default is stdin)</dd><dt><span class="term"><code class="option">-u </code> <em class="replaceable"><code>outputfile</code></em></span></dt><dd>Define an output file to use (default is stdout)</dd></dl></div></div><div class="refsection"><a name="resources"></a><h2>Additional Resources</h2><p>NSS is maintained in conjunction with PKI and security-related projects through Mozilla and Fedora. The most closely-related project is Dogtag PKI, with a project wiki at <a class="ulink" href="http://pki.fedoraproject.org/wiki/" target="_top">PKI Wiki</a>. </p><p>For information specifically about NSS, the NSS project wiki is located at <a class="ulink" href="http://www.mozilla.org/projects/security/pki/nss/" target="_top">Mozilla NSS site</a>. The NSS site relates directly to NSS code changes and releases.</p><p>Mailing lists: pki-devel@redhat.com and pki-users@redhat.com</p><p>IRC: Freenode at #dogtag-pki</p></div><div class="refsection"><a name="authors"></a><h2>Authors</h2><p>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</p><p>
|
</p></div><div class="refsection"><a name="idm212212494128"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-t </code> <em class="replaceable"><code>type</code></em></span></dt><dd><p class="simpara">specify the input, one of {private-key | public-key | certificate | certificate-request | pkcs7 | crl}</p><p class="simpara"></p></dd><dt><span class="term"><code class="option">-a </code></span></dt><dd>Input is in ascii encoded form (RFC1113)</dd><dt><span class="term"><code class="option">-i </code> <em class="replaceable"><code>inputfile</code></em></span></dt><dd>Define an input file to use (default is stdin)</dd><dt><span class="term"><code class="option">-u </code> <em class="replaceable"><code>outputfile</code></em></span></dt><dd>Define an output file to use (default is stdout)</dd></dl></div></div><div class="refsection"><a name="resources"></a><h2>Additional Resources</h2><p>NSS is maintained in conjunction with PKI and security-related projects through Mozilla and Fedora. The most closely-related project is Dogtag PKI, with a project wiki at <a class="ulink" href="http://pki.fedoraproject.org/wiki/" target="_top">PKI Wiki</a>. </p><p>For information specifically about NSS, the NSS project wiki is located at <a class="ulink" href="http://www.mozilla.org/projects/security/pki/nss/" target="_top">Mozilla NSS site</a>. The NSS site relates directly to NSS code changes and releases.</p><p>Mailing lists: pki-devel@redhat.com and pki-users@redhat.com</p><p>IRC: Freenode at #dogtag-pki</p></div><div class="refsection"><a name="authors"></a><h2>Authors</h2><p>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</p><p>
|
||||||
Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>.
|
Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>.
|
||||||
</p></div><div class="refsection"><a name="license"></a><h2>LICENSE</h2><p>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
</p></div><div class="refsection"><a name="license"></a><h2>LICENSE</h2><p>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
</p></div></div><div class="navfooter"><hr></div></body></html>
|
</p></div></div><div class="navfooter"><hr></div></body></html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>signtool</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="signtool"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">signtool</th></tr></table><hr></div><div class="refentry"><a name="signtool"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>signtool — Digitally sign objects and files.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">signtool</code> [-k keyName] [[-h]] [[-H]] [[-l]] [[-L]] [[-M]] [[-v]] [[-w]] [[-G nickname]] [[--keysize | -s size]] [[-b basename]] [[-c Compression Level] ] [[-d cert-dir] ] [[-i installer script] ] [[-m metafile] ] [[-x name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-X] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[--leavearc] ] [[-j directory] ] [[-Z jarfile] ] [[-O] ] [[-p password] ] [directory-tree] [archive]</p></div></div><div class="refsection"><a name="idm207702595360"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>signtool</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="signtool"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">signtool</th></tr></table><hr></div><div class="refentry"><a name="signtool"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>signtool — Digitally sign objects and files.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">signtool</code> [-k keyName] [[-h]] [[-H]] [[-l]] [[-L]] [[-M]] [[-v]] [[-w]] [[-G nickname]] [[--keysize | -s size]] [[-b basename]] [[-c Compression Level] ] [[-d cert-dir] ] [[-i installer script] ] [[-m metafile] ] [[-x name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-X] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[--leavearc] ] [[-j directory] ] [[-Z jarfile] ] [[-O] ] [[-p password] ] [directory-tree] [archive]</p></div></div><div class="refsection"><a name="idm212213289088"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Signing Tool, <span class="command"><strong>signtool</strong></span>, creates digital signatures and uses a Java Archive (JAR) file to associate the signatures with files in a directory. Electronic software distribution over any network involves potential security problems. To help address some of these problems, you can associate digital signatures with the files in a JAR archive. Digital signatures allow SSL-enabled clients to perform two important operations:</p><p>* Confirm the identity of the individual, company, or other entity whose digital signature is associated with the files</p><p>* Check whether the files have been tampered with since being signed</p><p>If you have a signing certificate, you can use Netscape Signing Tool to digitally sign files and package them as a JAR file. An object-signing certificate is a special kind of certificate that allows you to associate your digital signature with one or more files.</p><p>An individual file can potentially be signed with multiple digital signatures. For example, a commercial software developer might sign the files that constitute a software product to prove that the files are indeed from a particular company. A network administrator manager might sign the same files with an additional digital signature based on a company-generated certificate to indicate that the product is approved for use within the company.</p><p>The significance of a digital signature is comparable to the significance of a handwritten signature. Once you have signed a file, it is difficult to claim later that you didn't sign it. In some situations, a digital signature may be considered as legally binding as a handwritten signature. Therefore, you should take great care to ensure that you can stand behind any file you sign and distribute.</p><p>For example, if you are a software developer, you should test your code to make sure it is virus-free before signing it. Similarly, if you are a network administrator, you should make sure, before signing any code, that it comes from a reliable source and will run correctly with the software installed on the machines to which you are distributing it.</p><p>Before you can use Netscape Signing Tool to sign files, you must have an object-signing certificate, which is a special certificate whose associated private key is used to create digital signatures. For testing purposes only, you can create an object-signing certificate with Netscape Signing Tool 1.3. When testing is finished and you are ready to disitribute your software, you should obtain an object-signing certificate from one of two kinds of sources:</p><p>* An independent certificate authority (CA) that authenticates your identity and charges you a fee. You typically get a certificate from an independent CA if you want to sign software that will be distributed over the Internet.</p><p>* CA server software running on your corporate intranet or extranet. Netscape Certificate Management System provides a complete management solution for creating, deploying, and managing certificates, including CAs that issue object-signing certificates.</p><p>You must also have a certificate for the CA that issues your signing certificate before you can sign files. If the certificate authority's certificate isn't already installed in your copy of Communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate. This is the case for some test certificates, as well as certificates issued by Netscape Certificate Management System: you must download the the CA certificate in addition to obtaining your own signing certificate. CA certificates for several certificate authorities are preinstalled in the Communicator certificate database.</p><p>When you receive an object-signing certificate for your own use, it is automatically installed in your copy of the Communicator client software. Communicator supports the public-key cryptography standard known as PKCS #12, which governs key portability. You can, for example, move an object-signing certificate and its associated private key from one computer to another on a credit-card-sized device called a smart card.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-b basename</span></dt><dd><p>Specifies the base filename for the .rsa and .sf files in the META-INF directory to conform with the JAR format. For example, <span class="emphasis"><em>-b signatures</em></span> causes the files to be named signatures.rsa and signatures.sf. The default is signtool.</p></dd><dt><span class="term">-c#</span></dt><dd><p>
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Signing Tool, <span class="command"><strong>signtool</strong></span>, creates digital signatures and uses a Java Archive (JAR) file to associate the signatures with files in a directory. Electronic software distribution over any network involves potential security problems. To help address some of these problems, you can associate digital signatures with the files in a JAR archive. Digital signatures allow SSL-enabled clients to perform two important operations:</p><p>* Confirm the identity of the individual, company, or other entity whose digital signature is associated with the files</p><p>* Check whether the files have been tampered with since being signed</p><p>If you have a signing certificate, you can use Netscape Signing Tool to digitally sign files and package them as a JAR file. An object-signing certificate is a special kind of certificate that allows you to associate your digital signature with one or more files.</p><p>An individual file can potentially be signed with multiple digital signatures. For example, a commercial software developer might sign the files that constitute a software product to prove that the files are indeed from a particular company. A network administrator manager might sign the same files with an additional digital signature based on a company-generated certificate to indicate that the product is approved for use within the company.</p><p>The significance of a digital signature is comparable to the significance of a handwritten signature. Once you have signed a file, it is difficult to claim later that you didn't sign it. In some situations, a digital signature may be considered as legally binding as a handwritten signature. Therefore, you should take great care to ensure that you can stand behind any file you sign and distribute.</p><p>For example, if you are a software developer, you should test your code to make sure it is virus-free before signing it. Similarly, if you are a network administrator, you should make sure, before signing any code, that it comes from a reliable source and will run correctly with the software installed on the machines to which you are distributing it.</p><p>Before you can use Netscape Signing Tool to sign files, you must have an object-signing certificate, which is a special certificate whose associated private key is used to create digital signatures. For testing purposes only, you can create an object-signing certificate with Netscape Signing Tool 1.3. When testing is finished and you are ready to disitribute your software, you should obtain an object-signing certificate from one of two kinds of sources:</p><p>* An independent certificate authority (CA) that authenticates your identity and charges you a fee. You typically get a certificate from an independent CA if you want to sign software that will be distributed over the Internet.</p><p>* CA server software running on your corporate intranet or extranet. Netscape Certificate Management System provides a complete management solution for creating, deploying, and managing certificates, including CAs that issue object-signing certificates.</p><p>You must also have a certificate for the CA that issues your signing certificate before you can sign files. If the certificate authority's certificate isn't already installed in your copy of Communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate. This is the case for some test certificates, as well as certificates issued by Netscape Certificate Management System: you must download the the CA certificate in addition to obtaining your own signing certificate. CA certificates for several certificate authorities are preinstalled in the Communicator certificate database.</p><p>When you receive an object-signing certificate for your own use, it is automatically installed in your copy of the Communicator client software. Communicator supports the public-key cryptography standard known as PKCS #12, which governs key portability. You can, for example, move an object-signing certificate and its associated private key from one computer to another on a credit-card-sized device called a smart card.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-b basename</span></dt><dd><p>Specifies the base filename for the .rsa and .sf files in the META-INF directory to conform with the JAR format. For example, <span class="emphasis"><em>-b signatures</em></span> causes the files to be named signatures.rsa and signatures.sf. The default is signtool.</p></dd><dt><span class="term">-c#</span></dt><dd><p>
|
||||||
Specifies the compression level for the -J or -Z option. The symbol # represents a number from 0 to 9, where 0 means no compression and 9 means maximum compression. The higher the level of compression, the smaller the output but the longer the operation takes.
|
Specifies the compression level for the -J or -Z option. The symbol # represents a number from 0 to 9, where 0 means no compression and 9 means maximum compression. The higher the level of compression, the smaller the output but the longer the operation takes.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SIGNVER</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SIGNVER"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SIGNVER</th></tr></table><hr></div><div class="refentry"><a name="signver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>signver — Verify a detached PKCS#7 signature for a file.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">signtool</code> -A | -V -d <em class="replaceable"><code>directory</code></em> [-a] [-i <em class="replaceable"><code>input_file</code></em>] [-o <em class="replaceable"><code>output_file</code></em>] [-s <em class="replaceable"><code>signature_file</code></em>] [-v]</p></div></div><div class="refsection"><a name="idm207691938384"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SIGNVER</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SIGNVER"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SIGNVER</th></tr></table><hr></div><div class="refentry"><a name="signver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>signver — Verify a detached PKCS#7 signature for a file.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">signtool</code> -A | -V -d <em class="replaceable"><code>directory</code></em> [-a] [-i <em class="replaceable"><code>input_file</code></em>] [-o <em class="replaceable"><code>output_file</code></em>] [-s <em class="replaceable"><code>signature_file</code></em>] [-v]</p></div></div><div class="refsection"><a name="idm212178498944"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Signature Verification Tool, <span class="command"><strong>signver</strong></span>, is a simple command-line utility that unpacks a base-64-encoded PKCS#7 signed object and verifies the digital signature using standard cryptographic techniques. The Signature Verification Tool can also display the contents of the signed object.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-A</span></dt><dd><p>Displays all of the information in the PKCS#7 signature.</p></dd><dt><span class="term">-V</span></dt><dd><p>Verifies the digital signature.</p></dd><dt><span class="term">-d [sql:]<span class="emphasis"><em>directory</em></span></span></dt><dd><p>Specify the database directory which contains the certificates and keys.</p><p><span class="command"><strong>signver</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). If the prefix <span class="command"><strong>sql:</strong></span> is not used, then the tool assumes that the given databases are in the old format.</p></dd><dt><span class="term">-a</span></dt><dd><p>Sets that the given signature file is in ASCII format.</p></dd><dt><span class="term">-i <span class="emphasis"><em>input_file</em></span></span></dt><dd><p>Gives the input file for the object with signed data.</p></dd><dt><span class="term">-o <span class="emphasis"><em>output_file</em></span></span></dt><dd><p>Gives the output file to which to write the results.</p></dd><dt><span class="term">-s <span class="emphasis"><em>signature_file</em></span></span></dt><dd><p>Gives the input file for the digital signature.</p></dd><dt><span class="term">-v</span></dt><dd><p>Enables verbose output.</p></dd></dl></div></div><div class="refsection"><a name="examples"></a><h2>Extended Examples</h2><div class="refsection"><a name="idm207695803904"></a><h3>Verifying a Signature</h3><p>The <code class="option">-V</code> option verifies that the signature in a given signature file is valid when used to sign the given object (from the input file).</p><pre class="programlisting">signver -V -s <em class="replaceable"><code>signature_file</code></em> -i <em class="replaceable"><code>signed_file</code></em> -d sql:/home/my/sharednssdb
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Signature Verification Tool, <span class="command"><strong>signver</strong></span>, is a simple command-line utility that unpacks a base-64-encoded PKCS#7 signed object and verifies the digital signature using standard cryptographic techniques. The Signature Verification Tool can also display the contents of the signed object.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-A</span></dt><dd><p>Displays all of the information in the PKCS#7 signature.</p></dd><dt><span class="term">-V</span></dt><dd><p>Verifies the digital signature.</p></dd><dt><span class="term">-d [sql:]<span class="emphasis"><em>directory</em></span></span></dt><dd><p>Specify the database directory which contains the certificates and keys.</p><p><span class="command"><strong>signver</strong></span> supports two types of databases: the legacy security databases (<code class="filename">cert8.db</code>, <code class="filename">key3.db</code>, and <code class="filename">secmod.db</code>) and new SQLite databases (<code class="filename">cert9.db</code>, <code class="filename">key4.db</code>, and <code class="filename">pkcs11.txt</code>). If the prefix <span class="command"><strong>sql:</strong></span> is not used, then the tool assumes that the given databases are in the old format.</p></dd><dt><span class="term">-a</span></dt><dd><p>Sets that the given signature file is in ASCII format.</p></dd><dt><span class="term">-i <span class="emphasis"><em>input_file</em></span></span></dt><dd><p>Gives the input file for the object with signed data.</p></dd><dt><span class="term">-o <span class="emphasis"><em>output_file</em></span></span></dt><dd><p>Gives the output file to which to write the results.</p></dd><dt><span class="term">-s <span class="emphasis"><em>signature_file</em></span></span></dt><dd><p>Gives the input file for the digital signature.</p></dd><dt><span class="term">-v</span></dt><dd><p>Enables verbose output.</p></dd></dl></div></div><div class="refsection"><a name="examples"></a><h2>Extended Examples</h2><div class="refsection"><a name="idm212182187744"></a><h3>Verifying a Signature</h3><p>The <code class="option">-V</code> option verifies that the signature in a given signature file is valid when used to sign the given object (from the input file).</p><pre class="programlisting">signver -V -s <em class="replaceable"><code>signature_file</code></em> -i <em class="replaceable"><code>signed_file</code></em> -d sql:/home/my/sharednssdb
|
||||||
|
|
||||||
signatureValid=yes</pre></div><div class="refsection"><a name="idm207695800736"></a><h3>Printing Signature Data</h3><p>
|
signatureValid=yes</pre></div><div class="refsection"><a name="idm212182184528"></a><h3>Printing Signature Data</h3><p>
|
||||||
The <code class="option">-A</code> option prints all of the information contained in a signature file. Using the <code class="option">-o</code> option prints the signature file information to the given output file rather than stdout.
|
The <code class="option">-A</code> option prints all of the information contained in a signature file. Using the <code class="option">-o</code> option prints the signature file information to the given output file rather than stdout.
|
||||||
</p><pre class="programlisting">signver -A -s <em class="replaceable"><code>signature_file</code></em> -o <em class="replaceable"><code>output_file</code></em></pre></div></div><div class="refsection"><a name="databases"></a><h2>NSS Database Types</h2><p>NSS originally used BerkeleyDB databases to store security information.
|
</p><pre class="programlisting">signver -A -s <em class="replaceable"><code>signature_file</code></em> -o <em class="replaceable"><code>output_file</code></em></pre></div></div><div class="refsection"><a name="databases"></a><h2>NSS Database Types</h2><p>NSS originally used BerkeleyDB databases to store security information.
|
||||||
The last versions of these <span class="emphasis"><em>legacy</em></span> databases are:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
|
The last versions of these <span class="emphasis"><em>legacy</em></span> databases are:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SSLTAP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SSLTAP"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SSLTAP</th></tr></table><hr></div><div class="refentry"><a name="ssltap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ssltap — Tap into SSL connections and display the data going by </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">libssltap</code> [-vhfsxl] [-p port] [hostname:port]</p></div></div><div class="refsection"><a name="idm207705899984"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SSLTAP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SSLTAP"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SSLTAP</th></tr></table><hr></div><div class="refentry"><a name="ssltap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ssltap — Tap into SSL connections and display the data going by </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">libssltap</code> [-vhfsxl] [-p port] [hostname:port]</p></div></div><div class="refsection"><a name="idm212195756784"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The SSL Debugging Tool <span class="command"><strong>ssltap</strong></span> is an SSL-aware command-line proxy. It watches TCP connections and displays the data going by. If a connection is SSL, the data display includes interpreted SSL records and handshaking</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-v </span></dt><dd><p>Print a version string for the tool.</p></dd><dt><span class="term">-h </span></dt><dd><p>
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The SSL Debugging Tool <span class="command"><strong>ssltap</strong></span> is an SSL-aware command-line proxy. It watches TCP connections and displays the data going by. If a connection is SSL, the data display includes interpreted SSL records and handshaking</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-v </span></dt><dd><p>Print a version string for the tool.</p></dd><dt><span class="term">-h </span></dt><dd><p>
|
||||||
Turn on hex/ASCII printing. Instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ASCII characters. The two parts are separated by a vertical bar. Nonprinting characters are replaced by dots.
|
Turn on hex/ASCII printing. Instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ASCII characters. The two parts are separated by a vertical bar. Nonprinting characters are replaced by dots.
|
||||||
</p></dd><dt><span class="term">-f </span></dt><dd><p>
|
</p></dd><dt><span class="term">-f </span></dt><dd><p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>VFYCHAIN</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="VFYCHAIN"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">VFYCHAIN</th></tr></table><hr></div><div class="refentry"><a name="vfychain"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">vfychain</code> </p></div></div><div class="refsection"><a name="idm207689306736"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>VFYCHAIN</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="VFYCHAIN"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">VFYCHAIN</th></tr></table><hr></div><div class="refentry"><a name="vfychain"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">vfychain</code> </p></div></div><div class="refsection"><a name="idm212186283232"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The verification Tool, <span class="command"><strong>vfychain</strong></span>, verifies certificate chains. <span class="command"><strong>modutil</strong></span> can add and delete PKCS #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable FIPS 140-2 compliance, and assign default providers for cryptographic operations. This tool can also create certificate, key, and module security database files.</p><p>The tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-a</code></span></dt><dd>the following certfile is base64 encoded</dd><dt><span class="term"><code class="option">-b </code> <em class="replaceable"><code>YYMMDDHHMMZ</code></em></span></dt><dd>Validate date (default: now)</dd><dt><span class="term"><code class="option">-d </code> <em class="replaceable"><code>directory</code></em></span></dt><dd>database directory</dd><dt><span class="term"><code class="option">-f </code> </span></dt><dd>Enable cert fetching from AIA URL</dd><dt><span class="term"><code class="option">-o </code> <em class="replaceable"><code>oid</code></em></span></dt><dd>Set policy OID for cert validation(Format OID.1.2.3)</dd><dt><span class="term"><code class="option">-p </code></span></dt><dd><p class="simpara">Use PKIX Library to validate certificate by calling:</p><p class="simpara"> * CERT_VerifyCertificate if specified once,</p><p class="simpara"> * CERT_PKIXVerifyCert if specified twice and more.</p></dd><dt><span class="term"><code class="option">-r </code></span></dt><dd>Following certfile is raw binary DER (default)</dd><dt><span class="term"><code class="option">-t</code></span></dt><dd>Following cert is explicitly trusted (overrides db trust)</dd><dt><span class="term"><code class="option">-u </code> <em class="replaceable"><code>usage</code></em></span></dt><dd><p>
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The verification Tool, <span class="command"><strong>vfychain</strong></span>, verifies certificate chains. <span class="command"><strong>modutil</strong></span> can add and delete PKCS #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable FIPS 140-2 compliance, and assign default providers for cryptographic operations. This tool can also create certificate, key, and module security database files.</p><p>The tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-a</code></span></dt><dd>the following certfile is base64 encoded</dd><dt><span class="term"><code class="option">-b </code> <em class="replaceable"><code>YYMMDDHHMMZ</code></em></span></dt><dd>Validate date (default: now)</dd><dt><span class="term"><code class="option">-d </code> <em class="replaceable"><code>directory</code></em></span></dt><dd>database directory</dd><dt><span class="term"><code class="option">-f </code> </span></dt><dd>Enable cert fetching from AIA URL</dd><dt><span class="term"><code class="option">-o </code> <em class="replaceable"><code>oid</code></em></span></dt><dd>Set policy OID for cert validation(Format OID.1.2.3)</dd><dt><span class="term"><code class="option">-p </code></span></dt><dd><p class="simpara">Use PKIX Library to validate certificate by calling:</p><p class="simpara"> * CERT_VerifyCertificate if specified once,</p><p class="simpara"> * CERT_PKIXVerifyCert if specified twice and more.</p></dd><dt><span class="term"><code class="option">-r </code></span></dt><dd>Following certfile is raw binary DER (default)</dd><dt><span class="term"><code class="option">-t</code></span></dt><dd>Following cert is explicitly trusted (overrides db trust)</dd><dt><span class="term"><code class="option">-u </code> <em class="replaceable"><code>usage</code></em></span></dt><dd><p>
|
||||||
0=SSL client, 1=SSL server, 2=SSL StepUp, 3=SSL CA,
|
0=SSL client, 1=SSL server, 2=SSL StepUp, 3=SSL CA,
|
||||||
4=Email signer, 5=Email recipient, 6=Object signer,
|
4=Email signer, 5=Email recipient, 6=Object signer,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>VFYSERV</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="VFYSERV"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">VFYSERV</th></tr></table><hr></div><div class="refentry"><a name="vfyserv"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vfyserv — TBD</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">vfyserv</code> </p></div></div><div class="refsection"><a name="idm207703284240"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>VFYSERV</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="VFYSERV"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">VFYSERV</th></tr></table><hr></div><div class="refentry"><a name="vfyserv"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vfyserv — TBD</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">vfyserv</code> </p></div></div><div class="refsection"><a name="idm212187704608"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
|
||||||
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The <span class="command"><strong>vfyserv </strong></span> tool verifies a certificate chain</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option"></code> <em class="replaceable"><code></code></em></span></dt><dd><p class="simpara"></p><p class="simpara"></p></dd></dl></div></div><div class="refsection"><a name="resources"></a><h2>Additional Resources</h2><p>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <a class="ulink" href="http://www.mozilla.org/projects/security/pki/nss/" target="_top">http://www.mozilla.org/projects/security/pki/nss/</a>. The NSS site relates directly to NSS code changes and releases.</p><p>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</p><p>IRC: Freenode at #dogtag-pki</p></div><div class="refsection"><a name="authors"></a><h2>Authors</h2><p>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</p><p>
|
</p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The <span class="command"><strong>vfyserv </strong></span> tool verifies a certificate chain</p></div><div class="refsection"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option"></code> <em class="replaceable"><code></code></em></span></dt><dd><p class="simpara"></p><p class="simpara"></p></dd></dl></div></div><div class="refsection"><a name="resources"></a><h2>Additional Resources</h2><p>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <a class="ulink" href="http://www.mozilla.org/projects/security/pki/nss/" target="_top">http://www.mozilla.org/projects/security/pki/nss/</a>. The NSS site relates directly to NSS code changes and releases.</p><p>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</p><p>IRC: Freenode at #dogtag-pki</p></div><div class="refsection"><a name="authors"></a><h2>Authors</h2><p>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</p><p>
|
||||||
Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>.
|
Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>.
|
||||||
</p></div><div class="refsection"><a name="license"></a><h2>LICENSE</h2><p>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
</p></div><div class="refsection"><a name="license"></a><h2>LICENSE</h2><p>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: CERTUTIL
|
.\" Title: CERTUTIL
|
||||||
.\" Author: [see the "Authors" section]
|
.\" Author: [see the "Authors" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 19 July 2013
|
.\" Date: 5 November 2013
|
||||||
.\" Manual: NSS Security Tools
|
.\" Manual: NSS Security Tools
|
||||||
.\" Source: nss-tools
|
.\" Source: nss-tools
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "CERTUTIL" "1" "19 July 2013" "nss-tools" "NSS Security Tools"
|
.TH "CERTUTIL" "1" "5 November 2013" "nss-tools" "NSS Security Tools"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * Define some portability stuff
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -251,6 +251,11 @@ If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE
|
||||||
Check a certificate\*(Aqs signature during the process of validating a certificate\&.
|
Check a certificate\*(Aqs signature during the process of validating a certificate\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-\-email email\-address
|
||||||
|
.RS 4
|
||||||
|
Specify the email address of a certificate to list\&. Used with the \-L command option\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-f password\-file
|
\-f password\-file
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify a file that will automatically supply the password to include in a certificate or to access a certificate database\&. This is a plain\-text file containing one password\&. Be sure to prevent unauthorized access to this file\&.
|
Specify a file that will automatically supply the password to include in a certificate or to access a certificate database\&. This is a plain\-text file containing one password\&. Be sure to prevent unauthorized access to this file\&.
|
||||||
|
@ -905,6 +910,11 @@ Add the Subject Key ID extension to the certificate\&. X\&.509 certificate exten
|
||||||
Add a Name Constraint extension to the certificate\&. X\&.509 certificate extensions are described in RFC 5280\&.
|
Add a Name Constraint extension to the certificate\&. X\&.509 certificate extensions are described in RFC 5280\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-\-empty\-password
|
||||||
|
.RS 4
|
||||||
|
Use empty password when creating new certificate database with \-N\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-\-keyAttrFlags attrflags
|
\-\-keyAttrFlags attrflags
|
||||||
.RS 4
|
.RS 4
|
||||||
PKCS #11 key Attributes\&. Comma separated list of key attribute flags, selected from the following list of choices: {token | session} {public | private} {sensitive | insensitive} {modifiable | unmodifiable} {extractable | unextractable}
|
PKCS #11 key Attributes\&. Comma separated list of key attribute flags, selected from the following list of choices: {token | session} {public | private} {sensitive | insensitive} {modifiable | unmodifiable} {extractable | unextractable}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: PK12UTIL
|
.\" Title: PK12UTIL
|
||||||
.\" Author: [see the "Authors" section]
|
.\" Author: [see the "Authors" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 19 July 2013
|
.\" Date: 5 November 2013
|
||||||
.\" Manual: NSS Security Tools
|
.\" Manual: NSS Security Tools
|
||||||
.\" Source: nss-tools
|
.\" Source: nss-tools
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "PK12UTIL" "1" "19 July 2013" "nss-tools" "NSS Security Tools"
|
.TH "PK12UTIL" "1" "5 November 2013" "nss-tools" "NSS Security Tools"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * Define some portability stuff
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче