зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central into cedar
This commit is contained in:
Коммит
b6abfa36f7
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var f = document.getElementById("f");
|
||||
var w = f.contentWindow;
|
||||
f.parentNode.removeChild(f);
|
||||
w.localStorage;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"><iframe id="f" src="data:text/html,1"></iframe></body>
|
||||
</html>
|
|
@ -88,3 +88,4 @@ load 604262-1.html
|
|||
load 628599-1.html
|
||||
load 637214-1.svg
|
||||
load 637214-2.svg
|
||||
load 646184.html
|
||||
|
|
|
@ -2619,7 +2619,6 @@ nsGenericElement::RemoveAttributeNS(const nsAString& aNamespaceURI,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAutoString tmp;
|
||||
UnsetAttr(nsid, name, PR_TRUE);
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -1430,7 +1430,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::Translate(float x, float y)
|
||||
{
|
||||
if (!FloatValidate(x,y))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
mThebes->Translate(gfxPoint(x, y));
|
||||
return NS_OK;
|
||||
|
@ -1440,7 +1440,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::Transform(float m11, float m12, float m21, float m22, float dx, float dy)
|
||||
{
|
||||
if (!FloatValidate(m11,m12,m21,m22,dx,dy))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
gfxMatrix matrix(m11, m12, m21, m22, dx, dy);
|
||||
mThebes->Multiply(matrix);
|
||||
|
@ -1657,6 +1657,9 @@ nsCanvasRenderingContext2D::CreateRadialGradient(float x0, float y0, float r0, f
|
|||
if (!FloatValidate(x0,y0,r0,x1,y1,r1))
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
||||
if (r0 < 0.0 || r1 < 0.0)
|
||||
return NS_ERROR_DOM_INDEX_SIZE_ERR;
|
||||
|
||||
nsRefPtr<gfxPattern> gradpat = new gfxPattern(x0, y0, r0, x1, y1, r1);
|
||||
if (!gradpat)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -1674,6 +1677,9 @@ nsCanvasRenderingContext2D::CreatePattern(nsIDOMHTMLElement *image,
|
|||
const nsAString& repeat,
|
||||
nsIDOMCanvasPattern **_retval)
|
||||
{
|
||||
if (!image) {
|
||||
return NS_ERROR_DOM_TYPE_MISMATCH_ERR;
|
||||
}
|
||||
gfxPattern::GraphicsExtend extend;
|
||||
|
||||
if (repeat.IsEmpty() || repeat.EqualsLiteral("repeat")) {
|
||||
|
@ -2072,7 +2078,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::MoveTo(float x, float y)
|
||||
{
|
||||
if (!FloatValidate(x,y))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
mHasPath = PR_TRUE;
|
||||
mThebes->MoveTo(gfxPoint(x, y));
|
||||
|
@ -2083,7 +2089,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::LineTo(float x, float y)
|
||||
{
|
||||
if (!FloatValidate(x,y))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
mHasPath = PR_TRUE;
|
||||
mThebes->LineTo(gfxPoint(x, y));
|
||||
|
@ -2094,7 +2100,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::QuadraticCurveTo(float cpx, float cpy, float x, float y)
|
||||
{
|
||||
if (!FloatValidate(cpx,cpy,x,y))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
// we will always have a current point, since beginPath forces
|
||||
// a moveto(0,0)
|
||||
|
@ -2206,7 +2212,7 @@ NS_IMETHODIMP
|
|||
nsCanvasRenderingContext2D::Rect(float x, float y, float w, float h)
|
||||
{
|
||||
if (!FloatValidate(x,y,w,h))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_OK;
|
||||
|
||||
mHasPath = PR_TRUE;
|
||||
mThebes->Rectangle(gfxRect(x, y, w, h));
|
||||
|
|
|
@ -6647,13 +6647,13 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
@ -13220,7 +13220,7 @@ isPixel(ctx, 90,45, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
@ -13335,7 +13335,7 @@ isPixel(ctx, 50,25, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
@ -13441,7 +13441,7 @@ isPixel(ctx, 90,45, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
@ -13705,7 +13705,7 @@ isPixel(ctx, 90,45, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
@ -14768,7 +14768,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(null, 'repeat');
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
@ -14806,7 +14806,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(undefined, 'repeat');
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
@ -18916,7 +18916,7 @@ isPixel(ctx, 50,25, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
@ -19030,7 +19030,7 @@ isPixel(ctx, 50,25, 0,255,0,255, 0);
|
|||
} catch (e) {
|
||||
_thrown_outer = true;
|
||||
}
|
||||
todo(!_thrown_outer, 'should not throw exception');
|
||||
ok(!_thrown_outer, 'should not throw exception');
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7951,7 +7951,9 @@ nsGlobalWindow::GetSessionStorage(nsIDOMStorage ** aSessionStorage)
|
|||
*aSessionStorage = nsnull;
|
||||
|
||||
nsString documentURI;
|
||||
mDocument->GetDocumentURI(documentURI);
|
||||
if (mDocument) {
|
||||
mDocument->GetDocumentURI(documentURI);
|
||||
}
|
||||
|
||||
nsresult rv = docShell->GetSessionStorageForPrincipal(principal,
|
||||
documentURI,
|
||||
|
@ -8035,7 +8037,9 @@ nsGlobalWindow::GetLocalStorage(nsIDOMStorage ** aLocalStorage)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsString documentURI;
|
||||
mDocument->GetDocumentURI(documentURI);
|
||||
if (mDocument) {
|
||||
mDocument->GetDocumentURI(documentURI);
|
||||
}
|
||||
|
||||
rv = storageManager->GetLocalStorageForPrincipal(principal,
|
||||
documentURI,
|
||||
|
|
Загрузка…
Ссылка в новой задаче