Merge inbound to mozilla-central. a=merge
|
@ -1063,6 +1063,11 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
|||
if (child->Role() == roles::ROW) {
|
||||
prevRowColor = rowColor;
|
||||
nsIFrame* rowFrame = child->GetFrame();
|
||||
MOZ_ASSERT(rowFrame, "Table hierarchy got screwed up");
|
||||
if (!rowFrame) {
|
||||
RETURN_LAYOUT_ANSWER(false, "Unexpected table hierarchy");
|
||||
}
|
||||
|
||||
rowColor = rowFrame->StyleBackground()->BackgroundColor(rowFrame);
|
||||
|
||||
if (childIdx > 0 && prevRowColor != rowColor)
|
||||
|
|
|
@ -88,6 +88,7 @@ const SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED = SEC_ERROR_BASE + 176;
|
|||
const MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE = MOZILLA_PKIX_ERROR_BASE + 5;
|
||||
const MOZILLA_PKIX_ERROR_NOT_YET_VALID_ISSUER_CERTIFICATE = MOZILLA_PKIX_ERROR_BASE + 6;
|
||||
const MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT = MOZILLA_PKIX_ERROR_BASE + 14;
|
||||
const MOZILLA_PKIX_ERROR_MITM_DETECTED = MOZILLA_PKIX_ERROR_BASE + 15;
|
||||
|
||||
|
||||
const SSL_ERROR_BASE = Ci.nsINSSErrorsService.NSS_SSL_ERROR_BASE;
|
||||
|
@ -318,6 +319,8 @@ var AboutNetAndCertErrorListener = {
|
|||
|
||||
if (input.data.certIsUntrusted) {
|
||||
switch (input.data.code) {
|
||||
// We only want to measure MitM rates for now. Treat it as unkown issuer.
|
||||
case MOZILLA_PKIX_ERROR_MITM_DETECTED:
|
||||
case SEC_ERROR_UNKNOWN_ISSUER:
|
||||
msg1 += gPipNSSBundle.GetStringFromName("certErrorTrust_UnknownIssuer") + "\n";
|
||||
msg1 += gPipNSSBundle.GetStringFromName("certErrorTrust_UnknownIssuer2") + "\n";
|
||||
|
@ -486,6 +489,7 @@ var AboutNetAndCertErrorListener = {
|
|||
|
||||
switch (msg.data.code) {
|
||||
case SEC_ERROR_UNKNOWN_ISSUER:
|
||||
case MOZILLA_PKIX_ERROR_MITM_DETECTED:
|
||||
case MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT:
|
||||
learnMoreLink.href = baseURL + "security-error";
|
||||
break;
|
||||
|
|
|
@ -471,21 +471,6 @@ function loadTab(args) {
|
|||
radioGroup.focus();
|
||||
}
|
||||
|
||||
function toggleGroupbox(id) {
|
||||
var elt = document.getElementById(id);
|
||||
if (elt.hasAttribute("closed")) {
|
||||
elt.removeAttribute("closed");
|
||||
if (elt.flexWhenOpened)
|
||||
elt.flex = elt.flexWhenOpened;
|
||||
} else {
|
||||
elt.setAttribute("closed", "true");
|
||||
if (elt.flex) {
|
||||
elt.flexWhenOpened = elt.flex;
|
||||
elt.flex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openCacheEntry(key, cb) {
|
||||
var checkCacheListener = {
|
||||
onCacheEntryCheck(entry, appCache) {
|
||||
|
@ -523,20 +508,20 @@ function makeGeneralTab(metaViewRows, docInfo) {
|
|||
|
||||
var metaGroup = document.getElementById("metaTags");
|
||||
if (!length)
|
||||
metaGroup.collapsed = true;
|
||||
metaGroup.style.visibility = "hidden";
|
||||
else {
|
||||
var metaTagsCaption = document.getElementById("metaTagsCaption");
|
||||
if (length == 1)
|
||||
metaTagsCaption.label = gBundle.getString("generalMetaTag");
|
||||
metaTagsCaption.value = gBundle.getString("generalMetaTag");
|
||||
else
|
||||
metaTagsCaption.label = gBundle.getFormattedString("generalMetaTags", [length]);
|
||||
metaTagsCaption.value = gBundle.getFormattedString("generalMetaTags", [length]);
|
||||
var metaTree = document.getElementById("metatree");
|
||||
metaTree.view = gMetaView;
|
||||
|
||||
// Add the metaViewRows onto the general tab's meta info tree.
|
||||
gMetaView.addRows(metaViewRows);
|
||||
|
||||
metaGroup.collapsed = false;
|
||||
metaGroup.style.removeProperty("visibility");
|
||||
}
|
||||
|
||||
// get the date of last modification
|
||||
|
|
|
@ -142,8 +142,8 @@
|
|||
</rows>
|
||||
</grid>
|
||||
<separator class="thin"/>
|
||||
<groupbox id="metaTags" flex="1" class="collapsable treebox">
|
||||
<caption id="metaTagsCaption" onclick="toggleGroupbox('metaTags');"/>
|
||||
<vbox id="metaTags" flex="1">
|
||||
<label control="metatree" id="metaTagsCaption" class="header"/>
|
||||
<tree id="metatree" flex="1" hidecolumnpicker="true" contextmenu="picontext">
|
||||
<treecols>
|
||||
<treecol id="meta-name" label="&generalMetaName;"
|
||||
|
@ -156,7 +156,7 @@
|
|||
</treecols>
|
||||
<treechildren id="metatreechildren" flex="1"/>
|
||||
</tree>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
<hbox pack="end">
|
||||
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
|
||||
</hbox>
|
||||
|
|
|
@ -98,35 +98,6 @@ textbox[disabled] {
|
|||
margin-inline-start: 5px;
|
||||
}
|
||||
|
||||
groupbox.collapsable caption .caption-icon {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-inline-start: 1px;
|
||||
margin-inline-end: 3px;
|
||||
background-image: url("chrome://global/skin/tree/twisty-open.png");
|
||||
}
|
||||
|
||||
groupbox.collapsable[closed="true"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
groupbox.collapsable[closed="true"] caption .caption-icon {
|
||||
background-image: url("chrome://global/skin/tree/twisty-clsd.png");
|
||||
}
|
||||
|
||||
groupbox tree {
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
groupbox.treebox .groupbox-body {
|
||||
margin-inline-start: 5px;
|
||||
margin-inline-end: 1px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#securityBox description {
|
||||
margin-inline-start: 10px;
|
||||
}
|
||||
|
|
|
@ -72,27 +72,6 @@ textbox[disabled] {
|
|||
}
|
||||
|
||||
/* General Tab */
|
||||
groupbox.collapsable caption .caption-icon {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-inline-end: 2px;
|
||||
background-image: url("chrome://global/skin/arrow/arrow-dn.gif");
|
||||
}
|
||||
|
||||
groupbox.collapsable[closed="true"] caption .caption-icon {
|
||||
background-image: url("chrome://global/skin/arrow/arrow-rit.gif");
|
||||
}
|
||||
|
||||
groupbox tree {
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
groupbox.treebox .groupbox-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#securityBox description {
|
||||
margin-inline-start: 10px;
|
||||
|
|
|
@ -122,30 +122,6 @@ textbox[disabled] {
|
|||
}
|
||||
|
||||
/* General Tab */
|
||||
groupbox.collapsable caption .caption-icon {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
margin-inline-start: 2px;
|
||||
margin-inline-end: 2px;
|
||||
background-image: url("chrome://global/skin/tree/twisty.svg#open");
|
||||
}
|
||||
|
||||
groupbox.collapsable[closed="true"] {
|
||||
border: none;
|
||||
margin-bottom: 9px;
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
groupbox.collapsable[closed="true"] caption .caption-icon {
|
||||
background-image: url("chrome://global/skin/tree/twisty.svg#clsd");
|
||||
}
|
||||
|
||||
groupbox tree {
|
||||
margin: 0 3px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#securityBox description {
|
||||
margin-inline-start: 10px;
|
||||
|
|
|
@ -663,6 +663,7 @@ skip-if = (toolkit == 'android') # Android: Bug 775227
|
|||
[test_html_colors_standards.html]
|
||||
[test_htmlcopyencoder.html]
|
||||
[test_htmlcopyencoder.xhtml]
|
||||
[test_iframe_event_listener_leaks.html]
|
||||
[test_iframe_referrer.html]
|
||||
[test_iframe_referrer_changing.html]
|
||||
[test_iframe_referrer_invalid.html]
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1451426 - Test iframe event listener leak conditions</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/dom/events/test/event_leak_utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="text/javascript">
|
||||
// Manipulate iframe. Its important here that we create a
|
||||
// listener callback from the DOM objects back to the frame's global
|
||||
// in order to exercise the leak condition.
|
||||
async function useIFrame(contentWindow) {
|
||||
let f = contentWindow.document.createElement("iframe");
|
||||
contentWindow.document.body.appendChild(f);
|
||||
f.onload = _ => {
|
||||
contentWindow.loadCount += 1;
|
||||
};
|
||||
}
|
||||
|
||||
async function runTest() {
|
||||
try {
|
||||
await checkForEventListenerLeaks("IFrame", useIFrame);
|
||||
} catch (e) {
|
||||
ok(false, e);
|
||||
} finally {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addEventListener("load", runTest, { once: true });
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -296,16 +296,23 @@ CreateFileWHookFn(LPCWSTR aFname, DWORD aAccess, DWORD aShare,
|
|||
|
||||
void FunctionHook::HookProtectedMode()
|
||||
{
|
||||
// Make sure we only do this once.
|
||||
static bool sRunOnce = false;
|
||||
if (sRunOnce) {
|
||||
return;
|
||||
}
|
||||
sRunOnce = true;
|
||||
|
||||
// Legacy code. Uses the nsWindowsDLLInterceptor directly instead of
|
||||
// using the FunctionHook
|
||||
sKernel32Intercept.Init("kernel32.dll");
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Plugin);
|
||||
WindowsDllInterceptor k32Intercept("kernel32.dll");
|
||||
k32Intercept.AddHook("CreateFileW",
|
||||
reinterpret_cast<intptr_t>(CreateFileWHookFn),
|
||||
(void**) &sCreateFileWStub);
|
||||
k32Intercept.AddHook("CreateFileA",
|
||||
reinterpret_cast<intptr_t>(CreateFileAHookFn),
|
||||
(void**) &sCreateFileAStub);
|
||||
sKernel32Intercept.AddHook("CreateFileW",
|
||||
reinterpret_cast<intptr_t>(CreateFileWHookFn),
|
||||
(void**) &sCreateFileWStub);
|
||||
sKernel32Intercept.AddHook("CreateFileA",
|
||||
reinterpret_cast<intptr_t>(CreateFileAHookFn),
|
||||
(void**) &sCreateFileAStub);
|
||||
}
|
||||
|
||||
#endif // defined(XP_WIN)
|
||||
|
|
|
@ -159,8 +159,8 @@ nsContentSecurityManager::AllowInsecureRedirectToDataURI(nsIChannel* aNewChannel
|
|||
return false;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsContentSecurityManager::AllowFTPSubresourceLoad(nsIChannel* aChannel)
|
||||
/* static */ nsresult
|
||||
nsContentSecurityManager::CheckFTPSubresourceLoad(nsIChannel* aChannel)
|
||||
{
|
||||
// We dissallow using FTP resources as a subresource everywhere.
|
||||
// The only valid way to use FTP resources is loading it as
|
||||
|
@ -168,23 +168,24 @@ nsContentSecurityManager::AllowFTPSubresourceLoad(nsIChannel* aChannel)
|
|||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
|
||||
if (!loadInfo) {
|
||||
return true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsContentPolicyType type = loadInfo->GetExternalContentPolicyType();
|
||||
if (type == nsIContentPolicy::TYPE_DOCUMENT) {
|
||||
return true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv) || !uri) {
|
||||
return true;
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!uri) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool isFtpURI = (NS_SUCCEEDED(uri->SchemeIs("ftp", &isFtpURI)) && isFtpURI);
|
||||
if (!isFtpURI) {
|
||||
return true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
|
@ -204,7 +205,7 @@ nsContentSecurityManager::AllowFTPSubresourceLoad(nsIChannel* aChannel)
|
|||
"BlockSubresourceFTP",
|
||||
params, ArrayLength(params));
|
||||
|
||||
return false;
|
||||
return NS_ERROR_CONTENT_BLOCKED;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
|
@ -654,6 +655,10 @@ nsContentSecurityManager::doContentSecurityCheck(nsIChannel* aChannel,
|
|||
rv = DoContentSecurityChecks(aChannel, loadInfo);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Apply this after CSP to match Chrome.
|
||||
rv = CheckFTPSubresourceLoad(aChannel);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// now lets set the initalSecurityFlag for subsequent calls
|
||||
loadInfo->SetInitialSecurityCheckDone(true);
|
||||
|
||||
|
@ -671,6 +676,9 @@ nsContentSecurityManager::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
|||
// Are we enforcing security using LoadInfo?
|
||||
if (loadInfo && loadInfo->GetEnforceSecurity()) {
|
||||
nsresult rv = CheckChannel(aNewChannel);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = CheckFTPSubresourceLoad(aNewChannel);
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
aOldChannel->Cancel(rv);
|
||||
return rv;
|
||||
|
@ -806,10 +814,6 @@ nsContentSecurityManager::CheckChannel(nsIChannel* aChannel)
|
|||
// consider calling SetBlockedRequest in nsContentSecurityManager::CheckChannel
|
||||
}
|
||||
|
||||
if (!AllowFTPSubresourceLoad(aChannel)) {
|
||||
return NS_ERROR_CONTENT_BLOCKED;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,10 +36,9 @@ public:
|
|||
static bool AllowTopLevelNavigationToDataURI(nsIChannel* aChannel);
|
||||
static bool AllowInsecureRedirectToDataURI(nsIChannel* aNewChannel);
|
||||
|
||||
static bool AllowFTPSubresourceLoad(nsIChannel* aChannel);
|
||||
|
||||
private:
|
||||
static nsresult CheckChannel(nsIChannel* aChannel);
|
||||
static nsresult CheckFTPSubresourceLoad(nsIChannel* aChannel);
|
||||
|
||||
virtual ~nsContentSecurityManager() {}
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ interface XULElement : Element {
|
|||
[SetterThrows]
|
||||
attribute DOMString flex;
|
||||
[SetterThrows]
|
||||
attribute DOMString flexGroup;
|
||||
[SetterThrows]
|
||||
attribute DOMString ordinal;
|
||||
[SetterThrows]
|
||||
attribute DOMString orient;
|
||||
|
@ -54,10 +52,6 @@ interface XULElement : Element {
|
|||
[SetterThrows]
|
||||
attribute DOMString maxHeight;
|
||||
|
||||
// Persistence
|
||||
[SetterThrows]
|
||||
attribute DOMString persist;
|
||||
|
||||
// Position properties for
|
||||
// * popups - these are screen coordinates
|
||||
// * other elements - these are client coordinates relative to parent stack.
|
||||
|
@ -66,11 +60,9 @@ interface XULElement : Element {
|
|||
[SetterThrows]
|
||||
attribute DOMString top;
|
||||
|
||||
// Tooltip and status info
|
||||
// Tooltip
|
||||
[SetterThrows]
|
||||
attribute DOMString tooltipText;
|
||||
[SetterThrows]
|
||||
attribute DOMString statusText;
|
||||
|
||||
// Properties for images
|
||||
[SetterThrows]
|
||||
|
|
|
@ -455,14 +455,6 @@ public:
|
|||
{
|
||||
SetXULAttr(nsGkAtoms::flex, aValue, rv);
|
||||
}
|
||||
void GetFlexGroup(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::flexgroup, aValue);
|
||||
}
|
||||
void SetFlexGroup(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetXULAttr(nsGkAtoms::flexgroup, aValue, rv);
|
||||
}
|
||||
void GetOrdinal(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::ordinal, aValue);
|
||||
|
@ -583,14 +575,6 @@ public:
|
|||
{
|
||||
SetXULAttr(nsGkAtoms::maxheight, aValue, rv);
|
||||
}
|
||||
void GetPersist(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::persist, aValue);
|
||||
}
|
||||
void SetPersist(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetXULAttr(nsGkAtoms::persist, aValue, rv);
|
||||
}
|
||||
void GetLeft(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::left, aValue);
|
||||
|
@ -615,14 +599,6 @@ public:
|
|||
{
|
||||
SetXULAttr(nsGkAtoms::tooltiptext, aValue, rv);
|
||||
}
|
||||
void GetStatusText(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::statustext, aValue);
|
||||
}
|
||||
void SetStatusText(const nsAString& aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetXULAttr(nsGkAtoms::statustext, aValue, rv);
|
||||
}
|
||||
void GetSrc(DOMString& aValue) const
|
||||
{
|
||||
GetXULAttr(nsGkAtoms::src, aValue);
|
||||
|
|
|
@ -149,6 +149,9 @@ BasicTextureImage::DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion
|
|||
&uploadSize,
|
||||
needInit,
|
||||
aFrom);
|
||||
if (mTextureFormat == SurfaceFormat::UNKNOWN) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uploadSize > 0) {
|
||||
UpdateUploadSize(uploadSize);
|
||||
|
|
|
@ -27,6 +27,23 @@ DataOffset(const IntPoint& aPoint, int32_t aStride, SurfaceFormat aFormat)
|
|||
return data;
|
||||
}
|
||||
|
||||
static bool
|
||||
CheckUploadBounds(const IntSize& aDst, const IntSize& aSrc, const IntPoint& aOffset)
|
||||
{
|
||||
if (aOffset.x < 0 || aOffset.y < 0 ||
|
||||
aOffset.x >= aSrc.width ||
|
||||
aOffset.y >= aSrc.height) {
|
||||
MOZ_ASSERT_UNREACHABLE("Offset outside source bounds");
|
||||
return false;
|
||||
}
|
||||
if (aDst.width > (aSrc.width - aOffset.x) ||
|
||||
aDst.height > (aSrc.height - aOffset.y)) {
|
||||
MOZ_ASSERT_UNREACHABLE("Source has insufficient data");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static GLint GetAddressAlignment(ptrdiff_t aAddress)
|
||||
{
|
||||
if (!(aAddress & 0x7)) {
|
||||
|
@ -375,6 +392,7 @@ TexImage2DHelper(GLContext* gl,
|
|||
SurfaceFormat
|
||||
UploadImageDataToTexture(GLContext* gl,
|
||||
unsigned char* aData,
|
||||
const gfx::IntSize& aDataSize,
|
||||
int32_t aStride,
|
||||
SurfaceFormat aFormat,
|
||||
const nsIntRegion& aDstRegion,
|
||||
|
@ -506,6 +524,10 @@ UploadImageDataToTexture(GLContext* gl,
|
|||
// Upload each rect in the region to the texture
|
||||
for (auto iter = aDstRegion.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const IntRect& rect = iter.Get();
|
||||
if (!CheckUploadBounds(rect.Size(), aDataSize, rect.TopLeft())) {
|
||||
return SurfaceFormat::UNKNOWN;
|
||||
}
|
||||
|
||||
const unsigned char* rectData =
|
||||
aData + DataOffset(rect.TopLeft(), aStride, aFormat);
|
||||
|
||||
|
@ -542,10 +564,17 @@ UploadSurfaceToTexture(GLContext* gl,
|
|||
DataSourceSurface::ScopedMap map(aSurface, DataSourceSurface::READ);
|
||||
int32_t stride = map.GetStride();
|
||||
SurfaceFormat format = aSurface->GetFormat();
|
||||
gfx::IntSize size = aSurface->GetSize();
|
||||
if (!CheckUploadBounds(aSize, size, aSrcPoint)) {
|
||||
return SurfaceFormat::UNKNOWN;
|
||||
}
|
||||
|
||||
unsigned char* data = map.GetData() +
|
||||
DataOffset(aSrcPoint, stride, format);
|
||||
size.width -= aSrcPoint.x;
|
||||
size.height -= aSrcPoint.y;
|
||||
|
||||
return UploadImageDataToTexture(gl, data, stride, format,
|
||||
return UploadImageDataToTexture(gl, data, size, stride, format,
|
||||
aDstRegion, aTexture, aSize,
|
||||
aOutUploadSize, aNeedInit,
|
||||
aTextureUnit, aTextureTarget);
|
||||
|
|
|
@ -28,6 +28,7 @@ class GLContext;
|
|||
* \param gl The GL Context to use.
|
||||
* \param aData Start of image data of surface to upload.
|
||||
* Corresponds to the first pixel of the texture.
|
||||
* \param aDataSize The image data's size.
|
||||
* \param aStride The image data's stride.
|
||||
* \param aFormat The image data's format.
|
||||
* \param aDstRegion Region of the texture to upload.
|
||||
|
@ -46,6 +47,7 @@ class GLContext;
|
|||
gfx::SurfaceFormat
|
||||
UploadImageDataToTexture(GLContext* gl,
|
||||
unsigned char* aData,
|
||||
const gfx::IntSize& aDataSize,
|
||||
int32_t aStride,
|
||||
gfx::SurfaceFormat aFormat,
|
||||
const nsIntRegion& aDstRegion,
|
||||
|
|
|
@ -119,6 +119,10 @@ TextureImageEGL::DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion&
|
|||
&uploadSize,
|
||||
needInit,
|
||||
aFrom);
|
||||
if (mTextureFormat == SurfaceFormat::UNKNOWN) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uploadSize > 0) {
|
||||
UpdateUploadSize(uploadSize);
|
||||
}
|
||||
|
|
|
@ -1012,8 +1012,7 @@ BufferTextureHost::Upload(nsIntRegion *aRegion)
|
|||
mFirstSource = mProvider->CreateDataTextureSource(mFlags|TextureFlags::RGB_FROM_YCBCR);
|
||||
mFirstSource->SetOwner(this);
|
||||
}
|
||||
mFirstSource->Update(surf, aRegion);
|
||||
return true;
|
||||
return mFirstSource->Update(surf, aRegion);
|
||||
}
|
||||
|
||||
RefPtr<DataTextureSource> srcY;
|
||||
|
|
|
@ -168,9 +168,7 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface,
|
|||
}
|
||||
}
|
||||
|
||||
mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset);
|
||||
|
||||
return true;
|
||||
return mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
|
||||
class gfxDWriteFontFileStream;
|
||||
|
||||
static mozilla::Atomic<uint64_t> sNextFontFileKey;
|
||||
static std::unordered_map<uint64_t, IDWriteFontFileStream*> sFontFileStreams;
|
||||
static std::unordered_map<uint64_t, gfxDWriteFontFileStream*> sFontFileStreams;
|
||||
|
||||
IDWriteFontFileLoader* gfxDWriteFontFileLoader::mInstance = nullptr;
|
||||
|
||||
|
@ -77,6 +79,14 @@ public:
|
|||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64* lastWriteTime);
|
||||
|
||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
return mData.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
private:
|
||||
FallibleTArray<uint8_t> mData;
|
||||
nsAutoRefCnt mRefCnt;
|
||||
|
@ -172,7 +182,7 @@ gfxDWriteFontFileLoader::CreateCustomFontFile(const uint8_t* aFontData,
|
|||
}
|
||||
|
||||
uint64_t fontFileKey = sNextFontFileKey++;
|
||||
RefPtr<IDWriteFontFileStream> ffsRef =
|
||||
RefPtr<gfxDWriteFontFileStream> ffsRef =
|
||||
new gfxDWriteFontFileStream(aFontData, aLength, fontFileKey);
|
||||
sFontFileStreams[fontFileKey] = ffsRef;
|
||||
|
||||
|
@ -188,3 +198,18 @@ gfxDWriteFontFileLoader::CreateCustomFontFile(const uint8_t* aFontData,
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
size_t
|
||||
gfxDWriteFontFileLoader::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t sizes = mallocSizeOf(this);
|
||||
|
||||
// We are a singleton type that is effective owner of sFontFileStreams.
|
||||
MOZ_ASSERT(this == mInstance);
|
||||
for (const auto& entry : sFontFileStreams) {
|
||||
gfxDWriteFontFileStream* fileStream = entry.second;
|
||||
sizes += fileStream->SizeOfIncludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
return sizes;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define GFX_DWRITECOMMON_H
|
||||
|
||||
// Mozilla includes
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "nscore.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -73,12 +74,6 @@ FontStretchFromDWriteStretch(DWRITE_FONT_STRETCH aStretch)
|
|||
}
|
||||
}
|
||||
|
||||
struct ffReferenceKey
|
||||
{
|
||||
FallibleTArray<uint8_t> *mArray;
|
||||
nsID mGUID;
|
||||
};
|
||||
|
||||
class gfxDWriteFontFileLoader : public IDWriteFontFileLoader
|
||||
{
|
||||
public:
|
||||
|
@ -149,6 +144,8 @@ public:
|
|||
IDWriteFontFile** aFontFile,
|
||||
IDWriteFontFileStream** aFontFileStream);
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
private:
|
||||
static IDWriteFontFileLoader* mInstance;
|
||||
};
|
||||
|
|
|
@ -1450,6 +1450,12 @@ gfxDWriteFontList::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
|||
{
|
||||
gfxPlatformFontList::AddSizeOfExcludingThis(aMallocSizeOf, aSizes);
|
||||
|
||||
// We are a singleton, so include the font loader singleton's memory.
|
||||
MOZ_ASSERT(static_cast<const gfxPlatformFontList*>(this) == gfxPlatformFontList::PlatformFontList());
|
||||
gfxDWriteFontFileLoader* loader =
|
||||
static_cast<gfxDWriteFontFileLoader*>(gfxDWriteFontFileLoader::Instance());
|
||||
aSizes->mLoaderSize += loader->SizeOfIncludingThis(aMallocSizeOf);
|
||||
|
||||
aSizes->mFontListSize +=
|
||||
SizeOfFontFamilyTableExcludingThis(mFontSubstitutes, aMallocSizeOf);
|
||||
|
||||
|
|
|
@ -457,6 +457,16 @@ gfxMacFont::CreateCTFontFromCGFontWithVariations(CGFontRef aCGFont,
|
|||
int32_t
|
||||
gfxMacFont::GetGlyphWidth(DrawTarget& aDrawTarget, uint16_t aGID)
|
||||
{
|
||||
if (mVariationFont) {
|
||||
// Avoid a potential Core Text crash (bug 1450209) by using
|
||||
// CoreGraphics glyph advance API. This is inferior for 'sbix'
|
||||
// fonts, but those won't have variations, so it's OK.
|
||||
int cgAdvance;
|
||||
if (::CGFontGetGlyphAdvances(mCGFont, &aGID, 1, &cgAdvance)) {
|
||||
return cgAdvance * mFUnitsConvFactor * 0x10000;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mCTFont) {
|
||||
mCTFont = CreateCTFontFromCGFontWithVariations(mCGFont, mAdjustedSize);
|
||||
if (!mCTFont) { // shouldn't happen, but let's be safe
|
||||
|
|
|
@ -161,6 +161,7 @@ gfxPlatformFontList::MemoryReporter::CollectReports(
|
|||
sizes.mFontListSize = 0;
|
||||
sizes.mFontTableCacheSize = 0;
|
||||
sizes.mCharMapsSize = 0;
|
||||
sizes.mLoaderSize = 0;
|
||||
|
||||
gfxPlatformFontList::PlatformFontList()->AddSizeOfIncludingThis(&FontListMallocSizeOf,
|
||||
&sizes);
|
||||
|
@ -182,6 +183,13 @@ gfxPlatformFontList::MemoryReporter::CollectReports(
|
|||
"Memory used for cached font metrics and layout tables.");
|
||||
}
|
||||
|
||||
if (sizes.mLoaderSize) {
|
||||
MOZ_COLLECT_REPORT(
|
||||
"explicit/gfx/font-loader", KIND_HEAP, UNITS_BYTES,
|
||||
sizes.mLoaderSize,
|
||||
"Memory used for (platform-specific) font loader.");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ struct FontListSizes {
|
|||
// including the font table cache and the cmaps
|
||||
uint32_t mFontTableCacheSize; // memory used for the gfxFontEntry table caches
|
||||
uint32_t mCharMapsSize; // memory used for cmap coverage info
|
||||
uint32_t mLoaderSize; // memory used for (platform-specific) loader
|
||||
};
|
||||
|
||||
class gfxUserFontSet;
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
||||
* 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/. */
|
||||
|
||||
/* Code related to various SpiderMonkey-specific language syntax extensions. */
|
||||
|
||||
#ifndef frontend_LanguageExtensions_h
|
||||
#define frontend_LanguageExtensions_h
|
||||
|
||||
namespace js {
|
||||
|
||||
/**
|
||||
* Numeric identifiers for various deprecated language extensions.
|
||||
*
|
||||
* The initializer numbers are directly used in telemetry, so while it's okay
|
||||
* to *remove* values as language extensions are removed from SpiderMonkey,
|
||||
* it's *not* okay to compact or reorder them. When an initializer falls into
|
||||
* disuse, remove it without reassigning its value to a new or existing
|
||||
* initializer. The *only* initializer whose value should ever change is
|
||||
* DeprecatedLanguageExtension::Count.
|
||||
*/
|
||||
enum class DeprecatedLanguageExtension
|
||||
{
|
||||
// NO LONGER USING 0
|
||||
// NO LONGER USING 1
|
||||
// NO LONGER USING 2
|
||||
ExpressionClosure = 3, // Added in JS 1.8
|
||||
// NO LONGER USING 4
|
||||
// NO LONGER USING 5
|
||||
// NO LONGER USING 6
|
||||
// NO LONGER USING 7
|
||||
// NO LONGER USING 8
|
||||
// NO LONGER USING 9
|
||||
// NO LONGER USING 10
|
||||
|
||||
// Sentinel value. MAY change as extension initializers are added (only to
|
||||
// the end) above.
|
||||
Count
|
||||
};
|
||||
|
||||
} // namespace js
|
||||
|
||||
#endif /* frontend_LanguageExtensions_h */
|
|
@ -9992,14 +9992,6 @@ GeneralParser<ParseHandler, CharT>::exprInParens(InHandling inHandling,
|
|||
return expr(inHandling, yieldHandling, tripledotHandling, possibleError, PredictInvoked);
|
||||
}
|
||||
|
||||
void
|
||||
ParserBase::addTelemetry(DeprecatedLanguageExtension e)
|
||||
{
|
||||
if (context->helperThread())
|
||||
return;
|
||||
context->compartment()->addTelemetry(getFilename(), e);
|
||||
}
|
||||
|
||||
template class PerHandlerParser<FullParseHandler>;
|
||||
template class PerHandlerParser<SyntaxParseHandler>;
|
||||
template class GeneralParser<FullParseHandler, char16_t>;
|
||||
|
|
|
@ -173,7 +173,6 @@
|
|||
#include "ds/Nestable.h"
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
#include "frontend/FullParseHandler.h"
|
||||
#include "frontend/LanguageExtensions.h"
|
||||
#include "frontend/NameAnalysisTypes.h"
|
||||
#include "frontend/NameCollections.h"
|
||||
#include "frontend/ParseContext.h"
|
||||
|
@ -334,8 +333,6 @@ class ParserBase
|
|||
|
||||
bool isValidStrictBinding(PropertyName* name);
|
||||
|
||||
void addTelemetry(DeprecatedLanguageExtension e);
|
||||
|
||||
bool hasValidSimpleStrictParameterNames();
|
||||
|
||||
/*
|
||||
|
|
|
@ -158,7 +158,6 @@ enum {
|
|||
JS_TELEMETRY_GC_MINOR_US,
|
||||
JS_TELEMETRY_GC_NURSERY_BYTES,
|
||||
JS_TELEMETRY_GC_PRETENURE_COUNT,
|
||||
JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT,
|
||||
JS_TELEMETRY_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS,
|
||||
JS_TELEMETRY_WEB_PARSER_COMPILE_LAZY_AFTER_MS,
|
||||
JS_TELEMETRY_END
|
||||
|
|
|
@ -91,7 +91,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options =
|
|||
iterResultTemplate_(nullptr),
|
||||
lcovOutput()
|
||||
{
|
||||
PodArrayZero(sawDeprecatedLanguageExtension);
|
||||
runtime_->numCompartments++;
|
||||
MOZ_ASSERT_IF(creationOptions_.mergeable(),
|
||||
creationOptions_.invisibleToDebugger());
|
||||
|
@ -99,8 +98,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options =
|
|||
|
||||
JSCompartment::~JSCompartment()
|
||||
{
|
||||
reportTelemetry();
|
||||
|
||||
// Write the code coverage information in a file.
|
||||
JSRuntime* rt = runtimeFromActiveCooperatingThread();
|
||||
if (rt->lcovOutput().isEnabled())
|
||||
|
@ -1337,35 +1334,6 @@ JSCompartment::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
JSCompartment::reportTelemetry()
|
||||
{
|
||||
// Only report telemetry for web content, not chrome JS.
|
||||
if (isSystem_)
|
||||
return;
|
||||
|
||||
// Hazard analysis can't tell that the telemetry callbacks don't GC.
|
||||
JS::AutoSuppressGCAnalysis nogc;
|
||||
|
||||
// Call back into Firefox's Telemetry reporter.
|
||||
for (size_t i = 0; i < size_t(DeprecatedLanguageExtension::Count); i++) {
|
||||
if (sawDeprecatedLanguageExtension[i])
|
||||
runtime_->addTelemetry(JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT, i);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
JSCompartment::addTelemetry(const char* filename, DeprecatedLanguageExtension e)
|
||||
{
|
||||
// Only report telemetry for web content, not chrome JS.
|
||||
if (isSystem_)
|
||||
return;
|
||||
if (!filename || strncmp(filename, "http", 4) != 0)
|
||||
return;
|
||||
|
||||
sawDeprecatedLanguageExtension[size_t(e)] = true;
|
||||
}
|
||||
|
||||
HashNumber
|
||||
JSCompartment::randomHashCode()
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "frontend/LanguageExtensions.h"
|
||||
#include "gc/Barrier.h"
|
||||
#include "gc/NurseryAwareHashMap.h"
|
||||
#include "gc/Zone.h"
|
||||
|
@ -1186,16 +1185,6 @@ struct JSCompartment
|
|||
static const size_t IterResultObjectDoneSlot = 1;
|
||||
js::NativeObject* getOrCreateIterResultTemplateObject(JSContext* cx);
|
||||
|
||||
private:
|
||||
// Used for collecting telemetry on SpiderMonkey's deprecated language extensions.
|
||||
bool sawDeprecatedLanguageExtension[size_t(js::DeprecatedLanguageExtension::Count)];
|
||||
|
||||
void reportTelemetry();
|
||||
|
||||
public:
|
||||
void addTelemetry(const char* filename, js::DeprecatedLanguageExtension e);
|
||||
|
||||
public:
|
||||
// Aggregated output used to collect JSScript hit counts when code coverage
|
||||
// is enabled.
|
||||
js::coverage::LCovCompartment lcovOutput;
|
||||
|
|
|
@ -502,8 +502,8 @@ FuncCast(F* funcPtr, ABIFunctionType abiType)
|
|||
return pf;
|
||||
}
|
||||
|
||||
void*
|
||||
wasm::AddressOf(SymbolicAddress imm, ABIFunctionType* abiType)
|
||||
static void*
|
||||
AddressOf(SymbolicAddress imm, ABIFunctionType* abiType)
|
||||
{
|
||||
switch (imm) {
|
||||
case SymbolicAddress::HandleDebugTrap:
|
||||
|
|
|
@ -26,9 +26,6 @@ namespace wasm {
|
|||
|
||||
class WasmFrameIter;
|
||||
|
||||
void*
|
||||
AddressOf(SymbolicAddress sym, jit::ABIFunctionType* abiType);
|
||||
|
||||
// A SymbolicAddress that NeedsBuiltinThunk() will call through a thunk to the
|
||||
// C++ function. This will be true for all normal calls from normal wasm
|
||||
// function code. Only calls to C++ from other exits/thunks do not need a thunk.
|
||||
|
|
|
@ -471,9 +471,8 @@ static const Register ScratchIonEntry = ABINonArgReg2;
|
|||
static void
|
||||
CallSymbolicAddress(MacroAssembler& masm, bool isAbsolute, SymbolicAddress sym)
|
||||
{
|
||||
ABIFunctionType _;
|
||||
if (isAbsolute)
|
||||
masm.call(ImmPtr(AddressOf(sym, &_), ImmPtr::NoCheckToken()));
|
||||
masm.call(ImmPtr(SymbolicAddressTarget(sym), ImmPtr::NoCheckToken()));
|
||||
else
|
||||
masm.call(sym);
|
||||
}
|
||||
|
|
|
@ -2565,9 +2565,6 @@ AccumulateTelemetryCallback(int id, uint32_t sample, const char* key)
|
|||
case JS_TELEMETRY_GC_PRETENURE_COUNT:
|
||||
Telemetry::Accumulate(Telemetry::GC_PRETENURE_COUNT, sample);
|
||||
break;
|
||||
case JS_TELEMETRY_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT:
|
||||
Telemetry::Accumulate(Telemetry::JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT, sample);
|
||||
break;
|
||||
case JS_TELEMETRY_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS:
|
||||
Telemetry::Accumulate(Telemetry::JS_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS, sample);
|
||||
break;
|
||||
|
|
|
@ -1787,8 +1787,10 @@ nsPresContext::ThemeChangedInternal()
|
|||
|
||||
// Recursively notify all remote leaf descendants that the
|
||||
// system theme has changed.
|
||||
nsContentUtils::CallOnAllRemoteChildren(mDocument->GetWindow(),
|
||||
NotifyThemeChanged, nullptr);
|
||||
if (nsPIDOMWindowOuter* window = mDocument->GetWindow()) {
|
||||
nsContentUtils::CallOnAllRemoteChildren(window,
|
||||
NotifyThemeChanged, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2118,9 +2120,11 @@ NotifyTabSizeModeChanged(TabParent* aTab, void* aArg)
|
|||
void
|
||||
nsPresContext::SizeModeChanged(nsSizeMode aSizeMode)
|
||||
{
|
||||
nsContentUtils::CallOnAllRemoteChildren(mDocument->GetWindow(),
|
||||
NotifyTabSizeModeChanged,
|
||||
&aSizeMode);
|
||||
if (nsPIDOMWindowOuter* window = mDocument->GetWindow()) {
|
||||
nsContentUtils::CallOnAllRemoteChildren(window,
|
||||
NotifyTabSizeModeChanged,
|
||||
&aSizeMode);
|
||||
}
|
||||
MediaFeatureValuesChangedAllDocuments({ MediaFeatureChangeReason::SizeModeChange });
|
||||
}
|
||||
|
||||
|
|
|
@ -41,12 +41,6 @@ inline bool IsInServoTraversal()
|
|||
inline servotype_* GetAsServo(); \
|
||||
inline const servotype_* GetAsServo() const;
|
||||
|
||||
#define MOZ_DECL_STYLO_CONVERT_METHODS_GECKO(geckotype_) \
|
||||
inline geckotype_* AsGecko(); \
|
||||
inline const geckotype_* AsGecko() const; \
|
||||
inline geckotype_* GetAsGecko(); \
|
||||
inline const geckotype_* GetAsGecko() const;
|
||||
|
||||
#define MOZ_DECL_STYLO_CONVERT_METHODS(geckotype_, servotype_) \
|
||||
MOZ_DECL_STYLO_CONVERT_METHODS_SERVO(servotype_)
|
||||
|
||||
|
@ -57,20 +51,6 @@ inline bool IsInServoTraversal()
|
|||
#define MOZ_DECL_STYLO_METHODS(geckotype_, servotype_) \
|
||||
MOZ_DECL_STYLO_CONVERT_METHODS(geckotype_, servotype_)
|
||||
|
||||
#define MOZ_DEFINE_STYLO_METHODS_GECKO(type_, geckotype_) \
|
||||
geckotype_* type_::AsGecko() { \
|
||||
return static_cast<geckotype_*>(this); \
|
||||
} \
|
||||
const geckotype_* type_::AsGecko() const { \
|
||||
return static_cast<const geckotype_*>(this); \
|
||||
} \
|
||||
geckotype_* type_::GetAsGecko() { \
|
||||
return nullptr; \
|
||||
} \
|
||||
const geckotype_* type_::GetAsGecko() const { \
|
||||
return nullptr; \
|
||||
}
|
||||
|
||||
#define MOZ_DEFINE_STYLO_METHODS_SERVO(type_, servotype_) \
|
||||
servotype_* type_::AsServo() { \
|
||||
return static_cast<servotype_*>(this); \
|
||||
|
@ -95,7 +75,6 @@ inline bool IsInServoTraversal()
|
|||
MOZ_DEFINE_STYLO_METHODS_SERVO(type_, servotype_)
|
||||
|
||||
#define MOZ_STYLO_THIS_TYPE mozilla::RemovePointer<decltype(this)>::Type
|
||||
#define MOZ_STYLO_GECKO_TYPE mozilla::RemovePointer<decltype(AsGecko())>::Type
|
||||
#define MOZ_STYLO_SERVO_TYPE mozilla::RemovePointer<decltype(AsServo())>::Type
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,429 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
/* rules in a CSS stylesheet other than style rules (e.g., @import rules) */
|
||||
|
||||
#ifndef nsCSSRules_h_
|
||||
#define nsCSSRules_h_
|
||||
|
||||
#include "Declaration.h"
|
||||
#include "StyleRule.h"
|
||||
#include "gfxFontFeatures.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/SheetType.h"
|
||||
#include "mozilla/css/GroupRule.h"
|
||||
#include "mozilla/css/URLMatchingFunction.h"
|
||||
#include "mozilla/dom/CSSFontFeatureValuesRule.h"
|
||||
#include "mozilla/dom/CSSKeyframeRule.h"
|
||||
#include "mozilla/dom/CSSKeyframesRule.h"
|
||||
#include "mozilla/dom/CSSMediaRule.h"
|
||||
#include "mozilla/dom/CSSPageRule.h"
|
||||
#include "mozilla/dom/CSSSupportsRule.h"
|
||||
#include "mozilla/dom/CSSMozDocumentRule.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCSSPropertyID.h"
|
||||
#include "nsCSSValue.h"
|
||||
#include "nsDOMCSSDeclaration.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsMediaList;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class ErrorResult;
|
||||
|
||||
namespace dom {
|
||||
class DocGroup;
|
||||
class MediaList;
|
||||
}
|
||||
|
||||
namespace css {
|
||||
|
||||
class MediaRule final : public dom::CSSMediaRule
|
||||
{
|
||||
public:
|
||||
MediaRule(uint32_t aLineNumber, uint32_t aColumnNumber);
|
||||
private:
|
||||
MediaRule(const MediaRule& aCopy);
|
||||
~MediaRule();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaRule, dom::CSSMediaRule)
|
||||
|
||||
// Rule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual void SetStyleSheet(mozilla::StyleSheet* aSheet) override; //override GroupRule
|
||||
mozilla::CSSStyleSheet* GetStyleSheet() const
|
||||
{
|
||||
mozilla::StyleSheet* sheet = GroupRule::GetStyleSheet();
|
||||
return sheet ? sheet->AsGecko() : nullptr;
|
||||
}
|
||||
virtual already_AddRefed<Rule> Clone() const override;
|
||||
|
||||
// rest of GroupRule
|
||||
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey) override;
|
||||
|
||||
// @media rule methods
|
||||
nsresult SetMedia(nsMediaList* aMedia);
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetConditionText(nsAString& aConditionText) final;
|
||||
void SetConditionText(const nsAString& aConditionText,
|
||||
ErrorResult& aRv) final;
|
||||
dom::MediaList* Media() final;
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
||||
const override MOZ_MUST_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void AppendConditionText(nsAString& aOutput) const;
|
||||
|
||||
RefPtr<nsMediaList> mMedia;
|
||||
};
|
||||
|
||||
class DocumentRule final : public dom::CSSMozDocumentRule
|
||||
{
|
||||
public:
|
||||
DocumentRule(uint32_t aLineNumber, uint32_t aColumnNumber);
|
||||
private:
|
||||
DocumentRule(const DocumentRule& aCopy);
|
||||
~DocumentRule();
|
||||
public:
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(DocumentRule,
|
||||
dom::CSSMozDocumentRule)
|
||||
|
||||
// Rule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual already_AddRefed<Rule> Clone() const override;
|
||||
|
||||
// rest of GroupRule
|
||||
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey) override;
|
||||
|
||||
bool UseForPresentation(nsPresContext* aPresContext);
|
||||
|
||||
struct URL {
|
||||
URLMatchingFunction func;
|
||||
nsCString url;
|
||||
URL *next;
|
||||
|
||||
URL() : next(nullptr) {}
|
||||
URL(const URL& aOther)
|
||||
: func(aOther.func)
|
||||
, url(aOther.url)
|
||||
, next(aOther.next ? new URL(*aOther.next) : nullptr)
|
||||
{
|
||||
}
|
||||
~URL();
|
||||
};
|
||||
|
||||
void SetURLs(URL *aURLs) { mURLs = aURLs; }
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetConditionText(nsAString& aConditionText) final;
|
||||
void SetConditionText(const nsAString& aConditionText,
|
||||
ErrorResult& aRv) final;
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
||||
const override MOZ_MUST_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void AppendConditionText(nsAString& aOutput) const;
|
||||
|
||||
nsAutoPtr<URL> mURLs; // linked list of |struct URL| above.
|
||||
};
|
||||
|
||||
} // namespace css
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
class nsCSSFontFeatureValuesRule final : public mozilla::dom::CSSFontFeatureValuesRule
|
||||
{
|
||||
public:
|
||||
nsCSSFontFeatureValuesRule(uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||
: mozilla::dom::CSSFontFeatureValuesRule(aLineNumber, aColumnNumber)
|
||||
{
|
||||
}
|
||||
|
||||
nsCSSFontFeatureValuesRule(const nsCSSFontFeatureValuesRule& aCopy)
|
||||
// copy everything except our reference count
|
||||
: mozilla::dom::CSSFontFeatureValuesRule(aCopy),
|
||||
mFamilyList(aCopy.mFamilyList),
|
||||
mFeatureValues(aCopy.mFeatureValues)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void List(FILE* out = stdout, int32_t aIndent = 0) const final;
|
||||
#endif
|
||||
already_AddRefed<mozilla::css::Rule> Clone() const final;
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetFontFamily(nsAString& aFamily) final;
|
||||
void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) final;
|
||||
void GetValueText(nsAString& aValueText) final;
|
||||
void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) final;
|
||||
|
||||
mozilla::SharedFontList* GetFamilyList() const { return mFamilyList; }
|
||||
void SetFamilyList(mozilla::SharedFontList* aFamilyList)
|
||||
{
|
||||
mFamilyList = aFamilyList;
|
||||
}
|
||||
|
||||
void AddValueList(int32_t aVariantAlternate,
|
||||
nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList);
|
||||
|
||||
const nsTArray<gfxFontFeatureValueSet::FeatureValues>& GetFeatureValues()
|
||||
{
|
||||
return mFeatureValues;
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
|
||||
|
||||
protected:
|
||||
~nsCSSFontFeatureValuesRule() {}
|
||||
|
||||
RefPtr<mozilla::SharedFontList> mFamilyList;
|
||||
nsTArray<gfxFontFeatureValueSet::FeatureValues> mFeatureValues;
|
||||
};
|
||||
|
||||
class nsCSSKeyframeRule;
|
||||
|
||||
class nsCSSKeyframeStyleDeclaration final : public nsDOMCSSDeclaration
|
||||
{
|
||||
public:
|
||||
explicit nsCSSKeyframeStyleDeclaration(nsCSSKeyframeRule *aRule);
|
||||
|
||||
mozilla::css::Rule* GetParentRule() override;
|
||||
void DropReference() { mRule = nullptr; }
|
||||
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
|
||||
nsIPrincipal* aSubjectPrincipal) override;
|
||||
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
|
||||
GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSKeyframeStyleDeclaration,
|
||||
nsICSSDeclaration)
|
||||
|
||||
virtual nsINode* GetParentObject() override;
|
||||
|
||||
protected:
|
||||
virtual ~nsCSSKeyframeStyleDeclaration();
|
||||
|
||||
// This reference is not reference-counted. The rule object tells us
|
||||
// when it's about to go away.
|
||||
nsCSSKeyframeRule* MOZ_NON_OWNING_REF mRule;
|
||||
};
|
||||
|
||||
class nsCSSKeyframeRule final : public mozilla::dom::CSSKeyframeRule
|
||||
{
|
||||
public:
|
||||
// Steals the contents of aKeys, and takes the reference in Declaration
|
||||
nsCSSKeyframeRule(InfallibleTArray<float>&& aKeys,
|
||||
already_AddRefed<mozilla::css::Declaration>&& aDeclaration,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||
: mozilla::dom::CSSKeyframeRule(aLineNumber, aColumnNumber)
|
||||
, mKeys(mozilla::Move(aKeys))
|
||||
, mDeclaration(mozilla::Move(aDeclaration))
|
||||
{
|
||||
mDeclaration->SetOwningRule(this);
|
||||
}
|
||||
private:
|
||||
nsCSSKeyframeRule(const nsCSSKeyframeRule& aCopy);
|
||||
~nsCSSKeyframeRule();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsCSSKeyframeRule,
|
||||
mozilla::dom::CSSKeyframeRule)
|
||||
virtual bool IsCCLeaf() const override;
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetKeyText(nsAString& aKeyText) final;
|
||||
void SetKeyText(const nsAString& aKeyText) final;
|
||||
nsICSSDeclaration* Style() final;
|
||||
|
||||
const nsTArray<float>& GetKeys() const { return mKeys; }
|
||||
mozilla::css::Declaration* Declaration() { return mDeclaration; }
|
||||
|
||||
void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
|
||||
void DoGetKeyText(nsAString &aKeyText) const;
|
||||
|
||||
private:
|
||||
nsTArray<float> mKeys;
|
||||
RefPtr<mozilla::css::Declaration> mDeclaration;
|
||||
// lazily created when needed:
|
||||
RefPtr<nsCSSKeyframeStyleDeclaration> mDOMDeclaration;
|
||||
};
|
||||
|
||||
class nsCSSKeyframesRule final : public mozilla::dom::CSSKeyframesRule
|
||||
{
|
||||
public:
|
||||
nsCSSKeyframesRule(already_AddRefed<nsAtom> aName,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||
: mozilla::dom::CSSKeyframesRule(aLineNumber, aColumnNumber)
|
||||
, mName(aName)
|
||||
{
|
||||
}
|
||||
private:
|
||||
nsCSSKeyframesRule(const nsCSSKeyframesRule& aCopy);
|
||||
~nsCSSKeyframesRule();
|
||||
public:
|
||||
// Rule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetName(nsAString& aName) const final;
|
||||
void SetName(const nsAString& aName) final;
|
||||
mozilla::dom::CSSRuleList* CssRules() final { return GroupRule::CssRules(); }
|
||||
void AppendRule(const nsAString& aRule) final;
|
||||
void DeleteRule(const nsAString& aKey) final;
|
||||
nsCSSKeyframeRule* FindRule(const nsAString& aKey) final;
|
||||
|
||||
const nsAtom* GetName() const { return mName; }
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
|
||||
private:
|
||||
uint32_t FindRuleIndexForKey(const nsAString& aKey);
|
||||
|
||||
RefPtr<nsAtom> mName;
|
||||
};
|
||||
|
||||
class nsCSSPageRule;
|
||||
|
||||
class nsCSSPageStyleDeclaration final : public nsDOMCSSDeclaration
|
||||
{
|
||||
public:
|
||||
explicit nsCSSPageStyleDeclaration(nsCSSPageRule *aRule);
|
||||
|
||||
mozilla::css::Rule* GetParentRule() override;
|
||||
void DropReference() { mRule = nullptr; }
|
||||
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
|
||||
nsIPrincipal* aSubjectPrincipal) override;
|
||||
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
|
||||
GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSPageStyleDeclaration,
|
||||
nsICSSDeclaration)
|
||||
|
||||
virtual nsINode *GetParentObject() override;
|
||||
|
||||
protected:
|
||||
virtual ~nsCSSPageStyleDeclaration();
|
||||
|
||||
// This reference is not reference-counted. The rule object tells us
|
||||
// when it's about to go away.
|
||||
nsCSSPageRule* MOZ_NON_OWNING_REF mRule;
|
||||
};
|
||||
|
||||
class nsCSSPageRule final : public mozilla::dom::CSSPageRule
|
||||
{
|
||||
public:
|
||||
nsCSSPageRule(mozilla::css::Declaration* aDeclaration,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||
: mozilla::dom::CSSPageRule(aLineNumber, aColumnNumber)
|
||||
, mDeclaration(aDeclaration)
|
||||
{
|
||||
mDeclaration->SetOwningRule(this);
|
||||
}
|
||||
private:
|
||||
nsCSSPageRule(const nsCSSPageRule& aCopy);
|
||||
~nsCSSPageRule();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsCSSPageRule, mozilla::dom::CSSPageRule)
|
||||
virtual bool IsCCLeaf() const override;
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
||||
|
||||
// WebIDL interfaces
|
||||
virtual void GetCssText(nsAString& aCssText) const override;
|
||||
virtual nsICSSDeclaration* Style() override;
|
||||
|
||||
mozilla::css::Declaration* Declaration() { return mDeclaration; }
|
||||
|
||||
void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
|
||||
private:
|
||||
RefPtr<mozilla::css::Declaration> mDeclaration;
|
||||
// lazily created when needed:
|
||||
RefPtr<nsCSSPageStyleDeclaration> mDOMDeclaration;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class CSSSupportsRule final : public dom::CSSSupportsRule
|
||||
{
|
||||
public:
|
||||
CSSSupportsRule(bool aConditionMet, const nsString& aCondition,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber);
|
||||
CSSSupportsRule(const CSSSupportsRule& aCopy);
|
||||
|
||||
// Rule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
||||
#endif
|
||||
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
||||
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey) override;
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(CSSSupportsRule,
|
||||
dom::CSSSupportsRule)
|
||||
|
||||
// WebIDL interface
|
||||
void GetCssText(nsAString& aCssText) const final;
|
||||
void GetConditionText(nsAString& aConditionText) final;
|
||||
void SetConditionText(const nsAString& aConditionText,
|
||||
ErrorResult& aRv) final;
|
||||
|
||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
|
||||
protected:
|
||||
virtual ~CSSSupportsRule();
|
||||
|
||||
bool mUseGroup;
|
||||
nsString mCondition;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* !defined(nsCSSRules_h_) */
|
|
@ -283,6 +283,19 @@ public class GlobalSession implements HttpResponseObserver {
|
|||
return;
|
||||
}
|
||||
|
||||
// Bug 1442248. The right fix for this is to figure out why we're reaching
|
||||
// `session.advance()` in `ServerSyncStage.onSynchronizeFailed(_, _, _)` after
|
||||
// the session has been cleaned up. It might be that we're cleaning up/aborting when
|
||||
// we shouldn't -- e.g., line 685 of `ServerSyncStage.java` is where we should bail
|
||||
// out if we've aborted, and that's not the case.
|
||||
//
|
||||
// In the absence of someone with the time and tools to figure this out, let's just
|
||||
// bail out here.
|
||||
if (this.stages == null) {
|
||||
Logger.info(LOG_TAG, "Not advancing: stages cleaned up.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.callback.handleStageCompleted(this.currentState, this);
|
||||
Stage next = nextStage(this.currentState);
|
||||
GlobalSyncStage nextStage;
|
||||
|
|
|
@ -934,6 +934,24 @@ CertVerifier::VerifySSLServerCert(const UniqueCERTCertificate& peerCert,
|
|||
// certificate is self-signed.
|
||||
return Result::ERROR_SELF_SIGNED_CERT;
|
||||
}
|
||||
if (rv == Result::ERROR_UNKNOWN_ISSUER) {
|
||||
// In this case we didn't get any valid path for the cert. Let's see if
|
||||
// the issuer is the same as the issuer for our canary probe. If yes, this
|
||||
// connection is connecting via a misconfigured proxy.
|
||||
// Note: The MitM canary might not be set. In this case we consider this
|
||||
// an unknown issuer error.
|
||||
nsCOMPtr<nsINSSComponent> component(
|
||||
do_GetService(PSM_COMPONENT_CONTRACTID));
|
||||
if (!component) {
|
||||
return Result::FATAL_ERROR_LIBRARY_FAILURE;
|
||||
}
|
||||
// IssuerMatchesMitmCanary succeeds if the issuer matches the canary and
|
||||
// the feature is enabled.
|
||||
nsresult rv = component->IssuerMatchesMitmCanary(peerCert->issuerName);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return Result::ERROR_MITM_DETECTED;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -329,3 +329,4 @@ MOZILLA_PKIX_ERROR_INVALID_INTEGER_ENCODING=The server presented a certificate t
|
|||
MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME=The server presented a certificate with an empty issuer distinguished name.
|
||||
MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED=An additional policy constraint failed when validating this certificate.
|
||||
MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT=The certificate is not trusted because it is self-signed.
|
||||
MOZILLA_PKIX_ERROR_MITM_DETECTED=Your connection is being intercepted by a TLS proxy. Uninstall it if possible or configure Firefox to trust its root certificate.
|
||||
|
|
|
@ -150,6 +150,7 @@ ErrorIsOverridable(PRErrorCode code)
|
|||
case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_INADEQUATE_KEY_SIZE:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_MITM_DETECTED:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_NOT_YET_VALID_ISSUER_CERTIFICATE:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT:
|
||||
|
|
|
@ -290,6 +290,7 @@ MapOverridableErrorToProbeValue(PRErrorCode errorCode)
|
|||
case mozilla::pkix::MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED:
|
||||
return 18;
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT: return 19;
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_MITM_DETECTED: return 20;
|
||||
}
|
||||
NS_WARNING("Unknown certificate error code. Does MapOverridableErrorToProbeValue "
|
||||
"handle everything in DetermineCertOverrideErrors?");
|
||||
|
@ -351,6 +352,7 @@ DetermineCertOverrideErrors(const UniqueCERTCertificate& cert,
|
|||
case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_INADEQUATE_KEY_SIZE:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_MITM_DETECTED:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_NOT_YET_VALID_ISSUER_CERTIFICATE:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT:
|
||||
case mozilla::pkix::MOZILLA_PKIX_ERROR_V1_CERT_USED_AS_CA:
|
||||
|
|
|
@ -2201,6 +2201,12 @@ nsNSSComponent::InitializeNSS()
|
|||
Preferences::GetString("security.content.signature.root_hash",
|
||||
mContentSigningRootHash);
|
||||
|
||||
mMitmCanaryIssuer.Truncate();
|
||||
Preferences::GetString("security.pki.mitm_canary_issuer",
|
||||
mMitmCanaryIssuer);
|
||||
mMitmDetecionEnabled =
|
||||
Preferences::GetBool("security.pki.mitm_canary_issuer.enabled", true);
|
||||
|
||||
mNSSInitialized = true;
|
||||
}
|
||||
|
||||
|
@ -2367,6 +2373,16 @@ nsNSSComponent::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
mContentSigningRootHash);
|
||||
} else if (prefName.Equals(kEnterpriseRootModePref)) {
|
||||
MaybeImportEnterpriseRoots();
|
||||
} else if (prefName.EqualsLiteral("security.pki.mitm_canary_issuer")) {
|
||||
MutexAutoLock lock(mMutex);
|
||||
mMitmCanaryIssuer.Truncate();
|
||||
Preferences::GetString("security.pki.mitm_canary_issuer",
|
||||
mMitmCanaryIssuer);
|
||||
} else if (prefName.EqualsLiteral(
|
||||
"security.pki.mitm_canary_issuer.enabled")) {
|
||||
MutexAutoLock lock(mMutex);
|
||||
mMitmDetecionEnabled =
|
||||
Preferences::GetBool("security.pki.mitm_canary_issuer.enabled", true);
|
||||
} else {
|
||||
clearSessionCache = false;
|
||||
}
|
||||
|
@ -2495,6 +2511,20 @@ nsNSSComponent::IsCertContentSigningRoot(CERTCertificate* cert, bool& result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNSSComponent::IssuerMatchesMitmCanary(const char* aCertIssuer)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
if (mMitmDetecionEnabled && !mMitmCanaryIssuer.IsEmpty()) {
|
||||
nsString certIssuer = NS_ConvertUTF8toUTF16(aCertIssuer);
|
||||
if (mMitmCanaryIssuer.Equals(certIssuer)) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
SharedCertVerifier::~SharedCertVerifier() { }
|
||||
|
||||
already_AddRefed<SharedCertVerifier>
|
||||
|
|
|
@ -79,6 +79,10 @@ public:
|
|||
|
||||
NS_IMETHOD BlockUntilLoadableRootsLoaded() = 0;
|
||||
NS_IMETHOD CheckForSmartCardChanges() = 0;
|
||||
// IssuerMatchesMitmCanary succeeds if aCertIssuer matches the canary and
|
||||
// the feature is enabled. It returns an error if the strings don't match,
|
||||
// the canary is not set, or the feature is disabled.
|
||||
NS_IMETHOD IssuerMatchesMitmCanary(const char* aCertIssuer) = 0;
|
||||
|
||||
// Main thread only
|
||||
NS_IMETHOD HasActiveSmartCards(bool& result) = 0;
|
||||
|
@ -131,6 +135,7 @@ public:
|
|||
|
||||
NS_IMETHOD BlockUntilLoadableRootsLoaded() override;
|
||||
NS_IMETHOD CheckForSmartCardChanges() override;
|
||||
NS_IMETHOD IssuerMatchesMitmCanary(const char* aCertIssuer) override;
|
||||
|
||||
// Main thread only
|
||||
NS_IMETHOD HasActiveSmartCards(bool& result) override;
|
||||
|
@ -192,6 +197,8 @@ private:
|
|||
#endif
|
||||
nsString mContentSigningRootHash;
|
||||
RefPtr<mozilla::psm::SharedCertVerifier> mDefaultCertVerifier;
|
||||
nsString mMitmCanaryIssuer;
|
||||
bool mMitmDetecionEnabled;
|
||||
#ifdef XP_WIN
|
||||
mozilla::UniqueCERTCertificate mFamilySafetyRoot;
|
||||
mozilla::UniqueCERTCertList mEnterpriseRoots;
|
||||
|
|
|
@ -136,3 +136,10 @@ pref("security.cert_pinning.max_max_age_seconds", 5184000);
|
|||
// 1: Symantec root distrust policy enforced
|
||||
// See https://wiki.mozilla.org/CA/Upcoming_Distrust_Actions for more details.
|
||||
pref("security.pki.distrust_ca_policy", 1);
|
||||
|
||||
// Issuer we use to detect MitM proxies. Set to the issuer of the cert of the
|
||||
// Firefox update service. The string format is whatever NSS uses to print a DN.
|
||||
// This value is set and cleared automatically.
|
||||
pref("security.pki.mitm_canary_issuer", "");
|
||||
// Pref to disable the MitM proxy checks.
|
||||
pref("security.pki.mitm_canary_issuer.enabled", true);
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+jCCAeKgAwIBAgIUEeg5ETFB4yT6lPxRZ18k9rDVmqowDQYJKoZIhvcNAQEL
|
||||
BQAwGTEXMBUGA1UEAwwOVGVzdCBNSVRNIFJvb3QwIhgPMjAxNjExMjcwMDAwMDBa
|
||||
GA8yMDE5MDIwNTAwMDAwMFowMDEuMCwGA1UEAwwlVGVzdCBlbmQtZW50aXR5IGlz
|
||||
c3VlZCBmcm9tIE1JVE0gUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
||||
ggEBALqIUahEjhbWQf1utogGNhA9PBPZ6uQ1SrTs9WhXbCR7wcclqODYH72xnAab
|
||||
bhqG8mvir1p1a2pkcQh6pVqnRYf3HNUknAJ+zUP8HmnQOCApk6sgw0nk27lMwmts
|
||||
Du0Vgg/xfq1pGrHTAjqLKkHup3DgDw2N/WYLK7AkkqR9uYhheZCxV5A90jvF4LhI
|
||||
H6g304hD7ycW2FW3ZlqqfgKQLzp7EIAGJMwcbJetlmFbt+KWEsB1MaMMkd20yvf8
|
||||
rR0l0wnvuRcOp2jhs3svIm9p47SKlWEd7ibWJZ2rkQhONsscJAQsvxaLL+Xxj5kX
|
||||
Mbiz/kkj+nJRxDHVA6zaGAo17Y0CAwEAAaMfMB0wGwYDVR0RBBQwEoIQbWl0bS5l
|
||||
eGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAHDyyXCBKd2xYyHOw25cei6gU
|
||||
MAXeyHZyC6+8h62U61eGL7KWnO+xjVuSK1KlvQjo1G1R0ypkmZzBcNjO/GEfqr06
|
||||
xkkGKlTUJcDNyzCFpOm4GDvp3Ojm6SOZT2YeilMjpRU8ONLhFn5s3YvhF2WWp9Al
|
||||
1qooxIE6XGJ7TSrA76iEgr1k6+XGg2UULpAONIJZ5K8eS21VWC1r0QKbPWmQ1O1y
|
||||
ltEtiC0DluBLeEQf6x5POCNbNaERf1tTVmiNZe2waavvR/gCz+XpxY5k6dnLq8Gf
|
||||
cJ4Id3UlcZ5A5W7urNIlMeI2wWhevboRTIx2tKNOQ+3tgsYdf3vGJ2OEqjg5cA==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,3 @@
|
|||
issuer:Test MITM Root
|
||||
subject:Test end-entity issued from MITM Root
|
||||
extension:subjectAlternativeName:mitm.example.com
|
|
@ -36,6 +36,7 @@
|
|||
# 'mismatch-untrusted.pem',
|
||||
# 'mismatch.pem',
|
||||
# 'mismatchCN.pem',
|
||||
# 'mitm.pem',
|
||||
# 'noValidNames.pem',
|
||||
# 'notYetValid.pem',
|
||||
# 'notYetValidINT.pem',
|
||||
|
|
|
@ -84,6 +84,7 @@ const MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING = MOZILLA_PKIX_ERROR_BAS
|
|||
const MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME = MOZILLA_PKIX_ERROR_BASE + 12;
|
||||
const MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED = MOZILLA_PKIX_ERROR_BASE + 13;
|
||||
const MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT = MOZILLA_PKIX_ERROR_BASE + 14;
|
||||
const MOZILLA_PKIX_ERROR_MITM_DETECTED = MOZILLA_PKIX_ERROR_BASE + 15;
|
||||
|
||||
// Supported Certificate Usages
|
||||
const certificateUsageSSLClient = 0x0001;
|
||||
|
|
|
@ -18,7 +18,7 @@ function check_telemetry() {
|
|||
.getHistogramById("SSL_CERT_ERROR_OVERRIDES")
|
||||
.snapshot();
|
||||
equal(histogram.counts[0], 0, "Should have 0 unclassified counts");
|
||||
equal(histogram.counts[2], 6,
|
||||
equal(histogram.counts[2], 9,
|
||||
"Actual and expected SEC_ERROR_UNKNOWN_ISSUER counts should match");
|
||||
equal(histogram.counts[3], 1,
|
||||
"Actual and expected SEC_ERROR_CA_CERT_INVALID counts should match");
|
||||
|
@ -52,6 +52,8 @@ function check_telemetry() {
|
|||
"Actual and expected MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME counts should match");
|
||||
equal(histogram.counts[19], 3,
|
||||
"Actual and expected MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT counts should match");
|
||||
equal(histogram.counts[20], 1,
|
||||
"Actual and expected MOZILLA_PKIX_ERROR_MITM_DETECTED counts should match");
|
||||
|
||||
let keySizeHistogram = Services.telemetry
|
||||
.getHistogramById("CERT_CHAIN_KEY_SIZE_STATUS")
|
||||
|
@ -62,7 +64,7 @@ function check_telemetry() {
|
|||
"Actual and expected successful verifications of 2048-bit keys should match");
|
||||
equal(keySizeHistogram.counts[2], 0,
|
||||
"Actual and expected successful verifications of 1024-bit keys should match");
|
||||
equal(keySizeHistogram.counts[3], 60,
|
||||
equal(keySizeHistogram.counts[3], 68,
|
||||
"Actual and expected verification failures unrelated to key size should match");
|
||||
|
||||
run_next_test();
|
||||
|
@ -176,6 +178,53 @@ function add_simple_tests() {
|
|||
Ci.nsICertOverrideService.ERROR_UNTRUSTED,
|
||||
SEC_ERROR_INADEQUATE_KEY_USAGE);
|
||||
|
||||
// Test triggering the MitM detection. We don't set-up a proxy here. Just
|
||||
// set the pref. Without the pref set we expect an unkown issuer error.
|
||||
add_cert_override_test("mitm.example.com",
|
||||
Ci.nsICertOverrideService.ERROR_UNTRUSTED,
|
||||
SEC_ERROR_UNKNOWN_ISSUER);
|
||||
add_test(function() {
|
||||
Services.prefs.setStringPref("security.pki.mitm_canary_issuer",
|
||||
"CN=Test MITM Root");
|
||||
let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
certOverrideService.clearValidityOverride("mitm.example.com", 8443);
|
||||
run_next_test();
|
||||
});
|
||||
add_cert_override_test("mitm.example.com",
|
||||
Ci.nsICertOverrideService.ERROR_UNTRUSTED,
|
||||
MOZILLA_PKIX_ERROR_MITM_DETECTED);
|
||||
add_test(function() {
|
||||
Services.prefs.setStringPref("security.pki.mitm_canary_issuer",
|
||||
"CN=Other MITM Root");
|
||||
let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
certOverrideService.clearValidityOverride("mitm.example.com", 8443);
|
||||
run_next_test();
|
||||
});
|
||||
// If the canary issuer doesn't match the one we see, we exepct and unknown
|
||||
// issuer error.
|
||||
add_cert_override_test("mitm.example.com",
|
||||
Ci.nsICertOverrideService.ERROR_UNTRUSTED,
|
||||
SEC_ERROR_UNKNOWN_ISSUER);
|
||||
// If security.pki.mitm_canary_issuer.enabled is false, there should always
|
||||
// be an unknown issuer error.
|
||||
add_test(function() {
|
||||
Services.prefs.setBoolPref("security.pki.mitm_canary_issuer.enabled",
|
||||
false);
|
||||
let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
certOverrideService.clearValidityOverride("mitm.example.com", 8443);
|
||||
run_next_test();
|
||||
});
|
||||
add_cert_override_test("mitm.example.com",
|
||||
Ci.nsICertOverrideService.ERROR_UNTRUSTED,
|
||||
SEC_ERROR_UNKNOWN_ISSUER);
|
||||
add_test(function() {
|
||||
Services.prefs.clearUserPref("security.pki.mitm_canary_issuer");
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
// This is intended to test the case where a verification has failed for one
|
||||
// overridable reason (e.g. unknown issuer) but then, in the process of
|
||||
// reporting that error, a non-overridable error is encountered. The
|
||||
|
|
|
@ -34,6 +34,7 @@ const BadCertHost sBadCertHosts[] =
|
|||
{ "unknownissuer.example.com", "unknownissuer" },
|
||||
{ "mismatch.example.com", "mismatch" },
|
||||
{ "mismatch-CN.example.com", "mismatchCN" },
|
||||
{ "mitm.example.com", "mitm" },
|
||||
{ "expiredissuer.example.com", "expiredissuer" },
|
||||
{ "notyetvalidissuer.example.com", "notYetValidIssuer" },
|
||||
{ "before-epoch-issuer.example.com", "beforeEpochIssuer" },
|
||||
|
|
|
@ -195,6 +195,8 @@ static const unsigned int FATAL_ERROR_FLAG = 0x800;
|
|||
MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED) \
|
||||
MOZILLA_PKIX_MAP(ERROR_SELF_SIGNED_CERT, 55, \
|
||||
MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT) \
|
||||
MOZILLA_PKIX_MAP(ERROR_MITM_DETECTED, 56, \
|
||||
MOZILLA_PKIX_ERROR_MITM_DETECTED) \
|
||||
MOZILLA_PKIX_MAP(FATAL_ERROR_INVALID_ARGS, FATAL_ERROR_FLAG | 1, \
|
||||
SEC_ERROR_INVALID_ARGS) \
|
||||
MOZILLA_PKIX_MAP(FATAL_ERROR_INVALID_STATE, FATAL_ERROR_FLAG | 2, \
|
||||
|
|
|
@ -89,6 +89,7 @@ enum ErrorCode
|
|||
MOZILLA_PKIX_ERROR_EMPTY_ISSUER_NAME = ERROR_BASE + 12,
|
||||
MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED = ERROR_BASE + 13,
|
||||
MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT = ERROR_BASE + 14,
|
||||
MOZILLA_PKIX_ERROR_MITM_DETECTED = ERROR_BASE + 15,
|
||||
END_OF_LIST
|
||||
};
|
||||
|
||||
|
|
|
@ -216,6 +216,9 @@ RegisterErrorTable()
|
|||
"certificate." },
|
||||
{ "MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT",
|
||||
"The certificate is not trusted because it is self-signed." },
|
||||
{ "MOZILLA_PKIX_ERROR_MITM_DETECTED",
|
||||
"Your connection is being intercepted by a TLS proxy. Uninstall it if "
|
||||
"possible or configure Firefox to trust its root certificate." },
|
||||
};
|
||||
// Note that these error strings are not localizable.
|
||||
// When these strings change, update the localization information too.
|
||||
|
|
|
@ -11,7 +11,7 @@ Content-Security-Policy-Report-Only: img-src http://*; default-src 'self'; scrip
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEElEQVR42mNgaGD4D8YwBgAw9AX9Y9zBwwAAAABJRU5ErkJggg==" />
|
||||
<img src="ftp://blah.test" />
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20http%3A%2F%2F%2A%20https%3A%2F%2F%2A&testName=1-Violation%20report%20status%20OK'></script>
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20http%3A%2F%2F%2A&reportCookieName=multiple-report-policies-2&testName=2-Violation%20report%20status%20OK'></script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEElEQVR42mNgaGD4D8YwBgAw9AX9Y9zBwwAAAABJRU5ErkJggg==" />
|
||||
<img src="ftp://blah.test" />
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20http%3A%2F%2F%2A'></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEElEQVR42mNgaGD4D8YwBgAw9AX9Y9zBwwAAAABJRU5ErkJggg==" />
|
||||
<img src="ftp://blah.test" />
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20http%3A%2F%2F%2A'></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -958,14 +958,6 @@
|
|||
"n_values": 10,
|
||||
"description": "Count how often we use different fallbacks when the GPU process crashes: None=0, GPUProcessDecodingDisabled=1, GPUProcessDisabled=2"
|
||||
},
|
||||
"JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["jdemooij@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"kind": "enumerated",
|
||||
"n_values": 10,
|
||||
"description": "Use of SpiderMonkey's deprecated language extensions in web content: ForEach=0 (obsolete), DestructuringForIn=1 (obsolete), LegacyGenerator=2 (obsolete), ExpressionClosure=3, LetBlock=4 (obsolete), LetExpression=5 (obsolete), NoSuchMethod=6 (obsolete), FlagsArgument=7 (obsolete), RegExpSourceProp=8 (obsolete), RestoredRegExpStatics=9 (obsolete), BlockScopeFunRedecl=10 (obsolete)"
|
||||
},
|
||||
"JS_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["dteller@mozilla.com"],
|
||||
|
|
|
@ -874,7 +874,6 @@
|
|||
"IPC_SAME_PROCESS_MESSAGE_COPY_OOM_KB",
|
||||
"IPC_TRANSACTION_CANCEL",
|
||||
"IPV4_AND_IPV6_ADDRESS_CONNECTIVITY",
|
||||
"JS_DEPRECATED_LANGUAGE_EXTENSIONS_IN_CONTENT",
|
||||
"LOCALDOMSTORAGE_CLEAR_BLOCKING_MS",
|
||||
"LOCALDOMSTORAGE_GETALLKEYS_BLOCKING_MS",
|
||||
"LOCALDOMSTORAGE_GETKEY_BLOCKING_MS",
|
||||
|
|
|
@ -3081,6 +3081,7 @@ Checker.prototype = {
|
|||
*/
|
||||
onLoad: function UC_onLoad(event) {
|
||||
LOG("Checker:onLoad - request completed downloading document");
|
||||
Services.prefs.clearUserPref("security.pki.mitm_canary_issuer");
|
||||
|
||||
try {
|
||||
// Analyze the resulting DOM and determine the set of updates.
|
||||
|
@ -3124,6 +3125,19 @@ Checker.prototype = {
|
|||
var status = this._getChannelStatus(request);
|
||||
LOG("Checker:onError - request.status: " + status);
|
||||
|
||||
// Set MitM pref.
|
||||
try {
|
||||
var sslStatus = request.channel.QueryInterface(Ci.nsIRequest)
|
||||
.securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
|
||||
.SSLStatus.QueryInterface(Ci.nsISSLStatus);
|
||||
if (sslStatus && sslStatus.serverCert && sslStatus.serverCert.issuerName) {
|
||||
Services.prefs.setStringPref("security.pki.mitm_canary_issuer",
|
||||
sslStatus.serverCert.issuerName);
|
||||
}
|
||||
} catch (e) {
|
||||
LOG("Checker:onError - Getting sslStatus failed.");
|
||||
}
|
||||
|
||||
// If we can't find an error string specific to this status code,
|
||||
// just use the 200 message from above, which means everything
|
||||
// "looks" fine but there was probably an XML error or a bogus file.
|
||||
|
|
|
@ -45,6 +45,5 @@ toolkit.jar:
|
|||
|
||||
* skin/classic/global/in-content/common.css (in-content/common.css)
|
||||
* skin/classic/global/in-content/info-pages.css (in-content/info-pages.css)
|
||||
skin/classic/global/toolbar/spring.png (toolbar/spring.png)
|
||||
skin/classic/global/tree/twisty-clsd.png (tree/twisty-clsd.png)
|
||||
skin/classic/global/tree/twisty-open.png (tree/twisty-open.png)
|
||||
|
|
|
@ -54,40 +54,6 @@ toolbarpaletteitem {
|
|||
cursor: grab;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"],
|
||||
.toolbarpaletteitem-box[type="spring"] {
|
||||
border: 1px solid #808080;
|
||||
background-color: #FFF !important;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[place="toolbar"] > toolbarspacer {
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="toolbar"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="toolbar"] {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 2px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="separator"][place="palette"] {
|
||||
width: 2px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="palette"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
margin-bottom: 2px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
background: url("chrome://global/skin/toolbar/spring.png") no-repeat center;
|
||||
}
|
||||
|
||||
/* ..... drag and drop feedback ..... */
|
||||
|
||||
toolbarpaletteitem[place="toolbar"] {
|
||||
|
|
Двоичные данные
toolkit/themes/linux/global/toolbar/spring.png
До Ширина: | Высота: | Размер: 614 B |
Двоичные данные
toolkit/themes/osx/global/10pct_transparent_grey.png
До Ширина: | Высота: | Размер: 84 B |
Двоичные данные
toolkit/themes/osx/global/arrow/arrow-rit.gif
До Ширина: | Высота: | Размер: 57 B |
Двоичные данные
toolkit/themes/osx/global/icons/tabprompts-bgtexture.png
До Ширина: | Высота: | Размер: 3.1 KiB |
|
@ -5,7 +5,6 @@
|
|||
#include ../../shared/jar.inc.mn
|
||||
|
||||
toolkit.jar:
|
||||
skin/classic/global/10pct_transparent_grey.png
|
||||
skin/classic/global/autocomplete.css
|
||||
skin/classic/global/button.css
|
||||
skin/classic/global/checkbox.css
|
||||
|
@ -48,7 +47,6 @@ toolkit.jar:
|
|||
skin/classic/global/arrow/arrow-lft-sharp.gif (arrow/arrow-lft-sharp.gif)
|
||||
skin/classic/global/arrow/arrow-rit-dis.gif (arrow/arrow-rit-dis.gif)
|
||||
skin/classic/global/arrow/arrow-rit-sharp.gif (arrow/arrow-rit-sharp.gif)
|
||||
skin/classic/global/arrow/arrow-rit.gif (arrow/arrow-rit.gif)
|
||||
skin/classic/global/arrow/arrow-up-dis.gif (arrow/arrow-up-dis.gif)
|
||||
skin/classic/global/arrow/arrow-up-sharp.gif (arrow/arrow-up-sharp.gif)
|
||||
skin/classic/global/arrow/arrow-up.gif (arrow/arrow-up.gif)
|
||||
|
@ -70,7 +68,6 @@ toolkit.jar:
|
|||
skin/classic/global/icons/resizer-rtl@2x.png (icons/resizer-rtl@2x.png)
|
||||
skin/classic/global/icons/search-textbox.svg (icons/search-textbox.svg)
|
||||
skin/classic/global/icons/searchfield-cancel.svg (icons/searchfield-cancel.svg)
|
||||
skin/classic/global/icons/tabprompts-bgtexture.png (icons/tabprompts-bgtexture.png)
|
||||
skin/classic/global/icons/warning-16.png (icons/warning-16.png)
|
||||
skin/classic/global/icons/warning-64.png (icons/warning-64.png)
|
||||
skin/classic/global/icons/warning-large.png (icons/warning-large.png)
|
||||
|
@ -82,8 +79,6 @@ toolkit.jar:
|
|||
skin/classic/global/icons/sslWarning.png (icons/sslWarning.png)
|
||||
* skin/classic/global/in-content/common.css (in-content/common.css)
|
||||
* skin/classic/global/in-content/info-pages.css (in-content/info-pages.css)
|
||||
skin/classic/global/toolbar/spring.png (toolbar/spring.png)
|
||||
skin/classic/global/toolbar/toolbar-separator.png (toolbar/toolbar-separator.png)
|
||||
skin/classic/global/tree/arrow-disclosure.svg (tree/arrow-disclosure.svg)
|
||||
skin/classic/global/tree/columnpicker.gif (tree/columnpicker.gif)
|
||||
skin/classic/global/tree/folder.png (tree/folder.png)
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
/* Tab Modal Prompt boxes */
|
||||
tabmodalprompt {
|
||||
background-image: url(chrome://global/skin/icons/tabprompts-bgtexture.png);
|
||||
background-color: hsla(0,0%,10%,.5);
|
||||
font-family: sans-serif; /* use content font not system UI font */
|
||||
font-size: 110%;
|
||||
|
|
|
@ -25,7 +25,7 @@ menubar {
|
|||
toolbarseparator {
|
||||
-moz-appearance: none;
|
||||
margin: 3px 4px;
|
||||
background: url("chrome://global/skin/toolbar/toolbar-separator.png") transparent repeat-y;
|
||||
background-color: ThreeDShadow;
|
||||
padding: 0;
|
||||
width: 1px !important;
|
||||
}
|
||||
|
@ -36,52 +36,10 @@ toolbarpaletteitem {
|
|||
cursor: grab;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[type="spacer"],
|
||||
toolbarspacer {
|
||||
min-width: 24px !important;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"] {
|
||||
border: 1px solid #A3A3A3;
|
||||
background: url("chrome://global/skin/10pct_transparent_grey.png") repeat;
|
||||
width: 32px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spring"] {
|
||||
border: 1px solid #A3A3A3;
|
||||
background: url("chrome://global/skin/toolbar/spring.png") #FFFFFF no-repeat;
|
||||
width: 32px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spring"][place="toolbar"] {
|
||||
background: url("chrome://global/skin/10pct_transparent_grey.png") repeat;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="toolbar"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="toolbar"] {
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="separator"][place="palette"] {
|
||||
width: 2px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="palette"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
margin-top: 0;
|
||||
margin-bottom: 2px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
background-position: center;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* ..... drag and drop feedback ..... */
|
||||
|
||||
toolbarpaletteitem[place="toolbar"] {
|
||||
|
|
Двоичные данные
toolkit/themes/osx/global/toolbar/spring.png
До Ширина: | Высота: | Размер: 159 B |
Двоичные данные
toolkit/themes/osx/global/toolbar/toolbar-separator.png
До Ширина: | Высота: | Размер: 89 B |
|
@ -30,7 +30,6 @@
|
|||
skin/classic/global/icons/question-64.png (../../windows/global/icons/question-64.png)
|
||||
skin/classic/global/icons/resizer-rtl.png (../../windows/global/icons/resizer-rtl.png)
|
||||
skin/classic/global/icons/search-textbox.svg (../../windows/global/icons/search-textbox.svg)
|
||||
skin/classic/global/icons/tabprompts-bgtexture.png (../../windows/global/icons/tabprompts-bgtexture.png)
|
||||
skin/classic/global/icons/warning-16.png (../../windows/global/icons/warning-16.png)
|
||||
skin/classic/global/icons/warning-64.png (../../windows/global/icons/warning-64.png)
|
||||
skin/classic/global/tree/columnpicker.gif (../../windows/global/tree/columnpicker.gif)
|
||||
|
|
Двоичные данные
toolkit/themes/windows/global/icons/tabprompts-bgtexture.png
До Ширина: | Высота: | Размер: 481 B |
|
@ -58,7 +58,6 @@ toolkit.jar:
|
|||
skin/classic/global/icons/windowControls.png (icons/windowControls.png)
|
||||
* skin/classic/global/in-content/common.css (in-content/common.css)
|
||||
* skin/classic/global/in-content/info-pages.css (in-content/info-pages.css)
|
||||
skin/classic/global/toolbar/spring.png (toolbar/spring.png)
|
||||
skin/classic/global/tree/twisty.svg (tree/twisty.svg)
|
||||
skin/classic/global/tree/twisty-preWin10.svg (tree/twisty-preWin10.svg)
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
/* Tab Modal Prompt boxes */
|
||||
tabmodalprompt {
|
||||
background-image: url(chrome://global/skin/icons/tabprompts-bgtexture.png);
|
||||
background-color: hsla(0,0%,10%,.5);
|
||||
font-family: sans-serif; /* use content font not system UI font */
|
||||
}
|
||||
|
|
|
@ -47,40 +47,6 @@ toolbarpaletteitem {
|
|||
cursor: grab;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"],
|
||||
.toolbarpaletteitem-box[type="spring"] {
|
||||
border: 1px solid #808080;
|
||||
background-color: #FFF !important;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[place="toolbar"] > toolbarspacer {
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="toolbar"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="toolbar"] {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 2px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="separator"][place="palette"] {
|
||||
width: 2px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spacer"][place="palette"],
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
margin-bottom: 2px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.toolbarpaletteitem-box[type="spring"][place="palette"] {
|
||||
background: url("chrome://global/skin/toolbar/spring.png") no-repeat center;
|
||||
}
|
||||
|
||||
/* ..... drag and drop feedback ..... */
|
||||
|
||||
toolbarpaletteitem[place="toolbar"] {
|
||||
|
|
Двоичные данные
toolkit/themes/windows/global/toolbar/spring.png
До Ширина: | Высота: | Размер: 436 B |
|
@ -1388,10 +1388,10 @@ GfxInfo::GetGfxDriverInfo()
|
|||
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1359416");
|
||||
|
||||
// bug 1419264
|
||||
APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Windows7,
|
||||
APPEND_TO_DRIVER_BLOCKLIST_RANGE(OperatingSystem::Windows7,
|
||||
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
|
||||
nsIGfxInfo::FEATURE_ADVANCED_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
||||
DRIVER_GREATER_THAN_OR_EQUAL, V(23,21,13,8813),
|
||||
DRIVER_BETWEEN_INCLUSIVE, V(23,21,13,8569), V(23,21,13,9135),
|
||||
"FEATURE_FAILURE_BUG_1419264", "Windows 10");
|
||||
}
|
||||
return *mDriverInfo;
|
||||
|
|
|
@ -464,7 +464,6 @@ GK_ATOM(findbar, "findbar")
|
|||
GK_ATOM(fixed, "fixed")
|
||||
GK_ATOM(flags, "flags")
|
||||
GK_ATOM(flex, "flex")
|
||||
GK_ATOM(flexgroup, "flexgroup")
|
||||
GK_ATOM(flip, "flip")
|
||||
GK_ATOM(floating, "floating")
|
||||
GK_ATOM(floor, "floor")
|
||||
|
|