зеркало из https://github.com/mozilla/gecko-dev.git
backout 757560ab8de1 (bug 1205923
) due to linux64 & winXP reftest failures
This commit is contained in:
Родитель
300922f68a
Коммит
2a984cec5a
|
@ -497,18 +497,14 @@ NS_IMETHODIMP
|
|||
VectorImage::GetWidth(int32_t* aWidth)
|
||||
{
|
||||
if (mError || !mIsFullyLoaded) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aWidth = -1;
|
||||
} else {
|
||||
SVGSVGElement* rootElem = mSVGDocumentWrapper->GetRootSVGElem();
|
||||
MOZ_ASSERT(rootElem, "Should have a root SVG elem, since we finished "
|
||||
"loading without errors");
|
||||
*aWidth = rootElem->GetIntrinsicWidth();
|
||||
}
|
||||
|
||||
SVGSVGElement* rootElem = mSVGDocumentWrapper->GetRootSVGElem();
|
||||
MOZ_ASSERT(rootElem, "Should have a root SVG elem, since we finished "
|
||||
"loading without errors");
|
||||
nscoord rootElemWidth = rootElem->GetIntrinsicWidth();
|
||||
if (rootElemWidth < 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
*aWidth = rootElemWidth;
|
||||
return NS_OK;
|
||||
return *aWidth >= 0 ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
@ -565,18 +561,14 @@ NS_IMETHODIMP
|
|||
VectorImage::GetHeight(int32_t* aHeight)
|
||||
{
|
||||
if (mError || !mIsFullyLoaded) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aHeight = -1;
|
||||
} else {
|
||||
SVGSVGElement* rootElem = mSVGDocumentWrapper->GetRootSVGElem();
|
||||
MOZ_ASSERT(rootElem, "Should have a root SVG elem, since we finished "
|
||||
"loading without errors");
|
||||
*aHeight = rootElem->GetIntrinsicHeight();
|
||||
}
|
||||
|
||||
SVGSVGElement* rootElem = mSVGDocumentWrapper->GetRootSVGElem();
|
||||
MOZ_ASSERT(rootElem, "Should have a root SVG elem, since we finished "
|
||||
"loading without errors");
|
||||
nscoord rootElemHeight = rootElem->GetIntrinsicHeight();
|
||||
if (rootElemHeight < 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
*aHeight = rootElemHeight;
|
||||
return NS_OK;
|
||||
return *aHeight >= 0 ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
function createImage() {
|
||||
var newImage = new Image;
|
||||
newImage.id = "thepreviewimage";
|
||||
newImage.setAttribute("src", "unsized-svg.svg");
|
||||
physWidth = newImage.width || 0;
|
||||
physHeight = newImage.height || 0;
|
||||
document.documentElement.innerHTML += newImage.width + " x " + newImage.height + "<br>";
|
||||
}
|
||||
function createImageAndEnd() {
|
||||
createImage();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
// Trigger image load:
|
||||
createImage();
|
||||
|
||||
// Asynchronously trigger image load again (hitting cache this time):
|
||||
setTimeout(createImageAndEnd, 0);
|
||||
</script>
|
||||
</html>
|
|
@ -52,5 +52,3 @@ skip-if(AddressSanitizer) skip-if(B2G) load 944353.jpg
|
|||
load invalid-disposal-method-1.gif
|
||||
load invalid-disposal-method-2.gif
|
||||
load invalid-disposal-method-3.gif
|
||||
|
||||
load 1205923-1.html
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"></svg>
|
До Ширина: | Высота: | Размер: 47 B |
Загрузка…
Ссылка в новой задаче