Fixing bug 294086. <svg> should be a replaced element. r+sr=dbaron@mozilla.com blocking1.9=tor@acm.org

This commit is contained in:
jwatt@jwatt.org 2007-11-18 04:09:03 -08:00
parent 43b6bbdb77
commit d308285bb4
235 changed files with 6241 additions and 174 deletions

View File

@ -1331,28 +1331,6 @@ nsSVGSVGElement::InvalidateTransformNotifyFrame()
//----------------------------------------------------------------------
// nsSVGSVGElement
void
nsSVGSVGElement::SetCoordCtxRect(nsIDOMSVGRect* aCtxRect)
{
if (mLengthAttributes[WIDTH].GetSpecifiedUnitType() ==
nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
aCtxRect->GetWidth(&mViewportWidth);
mViewportWidth *=
mLengthAttributes[WIDTH].GetAnimValInSpecifiedUnits() / 100.0f;
} else {
mViewportWidth = mLengthAttributes[WIDTH].GetAnimValue(this);
}
if (mLengthAttributes[HEIGHT].GetSpecifiedUnitType() ==
nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
aCtxRect->GetHeight(&mViewportHeight);
mViewportHeight *=
mLengthAttributes[HEIGHT].GetAnimValInSpecifiedUnits() / 100.0f;
} else {
mViewportHeight = mLengthAttributes[HEIGHT].GetAnimValue(this);
}
}
already_AddRefed<nsIDOMSVGRect>
nsSVGSVGElement::GetCtxRect()
{

View File

@ -55,6 +55,19 @@
typedef nsSVGStylableElement nsSVGSVGElementBase;
class svgFloatSize {
public:
svgFloatSize(float aWidth, float aHeight)
: width(aWidth)
, height(aHeight)
{}
PRBool operator!=(const svgFloatSize& rhs) {
return width != rhs.width || height != rhs.height;
}
float width;
float height;
};
class nsSVGSVGElement : public nsSVGSVGElementBase,
public nsIDOMSVGSVGElement,
public nsIDOMSVGFitToViewBox,
@ -71,9 +84,6 @@ protected:
virtual ~nsSVGSVGElement();
nsresult Init();
// nsSVGSVGElement methods:
void SetCoordCtxRect(nsIDOMSVGRect* aCtxRect);
public:
// interfaces:
@ -147,6 +157,15 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
svgFloatSize GetViewportSize() {
return svgFloatSize(mViewportWidth, mViewportHeight);
}
void SetViewportSize(svgFloatSize& aSize) {
mViewportWidth = aSize.width;
mViewportHeight = aSize.height;
}
protected:
// nsSVGElement overrides
PRBool IsEventName(nsIAtom* aName);
@ -174,7 +193,16 @@ protected:
nsCOMPtr<nsIDOMSVGAnimatedRect> mViewBox;
nsCOMPtr<nsIDOMSVGAnimatedPreserveAspectRatio> mPreserveAspectRatio;
float mViewportWidth, mViewportHeight; // valid only for outersvg
// The size of the rectangular SVG viewport into which we render. This is
// not (necessarily) the same as the content area. See:
//
// http://www.w3.org/TR/SVG11/coords.html#ViewportSpace
//
// XXXjwatt Currently only used for outer <svg>, but maybe we could use -1 to
// flag this as an inner <svg> to save the overhead of GetCtx calls?
// XXXjwatt our frame should probably reset these when it's destroyed.
float mViewportWidth, mViewportHeight;
float mCoordCtxMmPerPx;
// zoom and pan

View File

@ -1734,8 +1734,9 @@ IsAutoHeight(const nsStyleCoord &aCoord, nscoord aCBHeight)
/* static */ nsSize
nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
nsIRenderingContext* aRenderingContext,
nsIFrame* aFrame, nsSize aIntrinsicSize, nsSize aCBSize,
nsIRenderingContext* aRenderingContext, nsIFrame* aFrame,
nsIFrame::IntrinsicSize& aIntrinsicSize,
nsSize aIntrinsicRatio, nsSize aCBSize,
nsSize aMargin, nsSize aBorder, nsSize aPadding)
{
const nsStylePosition *stylePos = aFrame->GetStylePosition();
@ -1812,10 +1813,74 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
minHeight = 0;
}
// Resolve percentage intrinsic width/height as necessary:
NS_ASSERTION(aCBSize.width != NS_UNCONSTRAINEDSIZE,
"Our containing block must not have unconstrained width!");
PRBool hasIntrinsicWidth, hasIntrinsicHeight;
nscoord intrinsicWidth, intrinsicHeight;
if (aIntrinsicSize.width.GetUnit() == eStyleUnit_Coord ||
aIntrinsicSize.width.GetUnit() == eStyleUnit_Percent) {
hasIntrinsicWidth = PR_TRUE;
intrinsicWidth = nsLayoutUtils::ComputeWidthValue(aRenderingContext,
aFrame, aCBSize.width, 0, boxSizingAdjust.width +
boxSizingToMarginEdgeWidth, aIntrinsicSize.width);
} else {
hasIntrinsicWidth = PR_FALSE;
intrinsicWidth = 0;
}
if (aIntrinsicSize.height.GetUnit() == eStyleUnit_Coord ||
(aIntrinsicSize.height.GetUnit() == eStyleUnit_Percent &&
aCBSize.height != NS_AUTOHEIGHT)) {
hasIntrinsicHeight = PR_TRUE;
intrinsicHeight = nsLayoutUtils::ComputeHeightDependentValue(
aRenderingContext, aFrame, aCBSize.height,
aIntrinsicSize.height);
if (intrinsicHeight < 0)
intrinsicHeight = 0;
} else {
hasIntrinsicHeight = PR_FALSE;
intrinsicHeight = 0;
}
NS_ASSERTION(aIntrinsicRatio.width >= 0 && aIntrinsicRatio.height >= 0,
"Intrinsic ratio has a negative component!");
// Now calculate the used values for width and height:
if (isAutoWidth) {
if (isAutoHeight) {
// 'auto' width, 'auto' height
// Get tentative values - CSS 2.1 sections 10.3.2 and 10.6.2:
nscoord tentWidth, tentHeight;
if (hasIntrinsicWidth) {
tentWidth = intrinsicWidth;
} else if (hasIntrinsicHeight && aIntrinsicRatio.height > 0) {
tentWidth = MULDIV(intrinsicHeight, aIntrinsicRatio.width, aIntrinsicRatio.height);
} else if (aIntrinsicRatio.width > 0) {
tentWidth = aCBSize.width - boxSizingToMarginEdgeWidth; // XXX scrollbar?
if (tentWidth < 0) tentWidth = 0;
} else {
tentWidth = nsPresContext::CSSPixelsToAppUnits(300);
}
if (hasIntrinsicHeight) {
tentHeight = intrinsicHeight;
} else if (aIntrinsicRatio.width > 0) {
tentHeight = MULDIV(tentWidth, aIntrinsicRatio.height, aIntrinsicRatio.width);
} else {
tentHeight = nsPresContext::CSSPixelsToAppUnits(150);
}
// Now apply min/max-width/height - CSS 2.1 sections 10.4 and 10.7:
if (minWidth > maxWidth)
maxWidth = minWidth;
if (minHeight > maxHeight)
@ -1823,68 +1888,77 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
nscoord heightAtMaxWidth, heightAtMinWidth,
widthAtMaxHeight, widthAtMinHeight;
if (aIntrinsicSize.width > 0) {
heightAtMaxWidth = MULDIV(maxWidth, aIntrinsicSize.height, aIntrinsicSize.width);
if (tentWidth > 0) {
heightAtMaxWidth = MULDIV(maxWidth, tentHeight, tentWidth);
if (heightAtMaxWidth < minHeight)
heightAtMaxWidth = minHeight;
heightAtMinWidth = MULDIV(minWidth, aIntrinsicSize.height, aIntrinsicSize.width);
heightAtMinWidth = MULDIV(minWidth, tentHeight, tentWidth);
if (heightAtMinWidth > maxHeight)
heightAtMinWidth = maxHeight;
} else {
heightAtMaxWidth = aIntrinsicSize.height;
heightAtMinWidth = aIntrinsicSize.height;
heightAtMaxWidth = tentHeight;
heightAtMinWidth = tentHeight;
}
if (aIntrinsicSize.height > 0) {
widthAtMaxHeight = MULDIV(maxHeight, aIntrinsicSize.width, aIntrinsicSize.height);
if (tentHeight > 0) {
widthAtMaxHeight = MULDIV(maxHeight, tentWidth, tentHeight);
if (widthAtMaxHeight < minWidth)
widthAtMaxHeight = minWidth;
widthAtMinHeight = MULDIV(minHeight, aIntrinsicSize.width, aIntrinsicSize.height);
widthAtMinHeight = MULDIV(minHeight, tentWidth, tentHeight);
if (widthAtMinHeight > maxWidth)
widthAtMinHeight = maxWidth;
} else {
widthAtMaxHeight = aIntrinsicSize.width;
widthAtMinHeight = aIntrinsicSize.width;
widthAtMaxHeight = tentWidth;
widthAtMinHeight = tentWidth;
}
if (aIntrinsicSize.width > maxWidth) {
if (aIntrinsicSize.height > maxHeight) {
if (PRInt64(maxWidth) * PRInt64(aIntrinsicSize.height) <=
PRInt64(maxHeight) * PRInt64(aIntrinsicSize.width)) {
// The table at http://www.w3.org/TR/CSS21/visudet.html#min-max-widths :
if (tentWidth > maxWidth) {
if (tentHeight > maxHeight) {
if (PRInt64(maxWidth) * PRInt64(tentHeight) <=
PRInt64(maxHeight) * PRInt64(tentWidth)) {
width = maxWidth;
height = heightAtMaxWidth;
} else {
height = maxHeight;
width = widthAtMaxHeight;
height = maxHeight;
}
} else {
// This also covers "(w > max-width) and (h < min-height)" since in
// that case (max-width/w < 1), and with (h < min-height):
// max(max-width * h/w, min-height) == min-height
width = maxWidth;
height = heightAtMaxWidth;
}
} else if (aIntrinsicSize.width < minWidth) {
if (aIntrinsicSize.height < minHeight) {
if (PRInt64(minWidth) * PRInt64(aIntrinsicSize.height) <=
PRInt64(minHeight) * PRInt64(aIntrinsicSize.width)) {
height = minHeight;
} else if (tentWidth < minWidth) {
if (tentHeight < minHeight) {
if (PRInt64(minWidth) * PRInt64(tentHeight) <=
PRInt64(minHeight) * PRInt64(tentWidth)) {
width = widthAtMinHeight;
height = minHeight;
} else {
width = minWidth;
height = heightAtMinWidth;
}
} else {
// This also covers "(w < min-width) and (h > max-height)" since in
// that case (min-width/w > 1), and with (h > max-height):
// min(min-width * h/w, max-height) == max-height
width = minWidth;
height = heightAtMinWidth;
}
} else {
if (aIntrinsicSize.height > maxHeight) {
height = maxHeight;
if (tentHeight > maxHeight) {
width = widthAtMaxHeight;
} else if (aIntrinsicSize.height < minHeight) {
height = minHeight;
height = maxHeight;
} else if (tentHeight < minHeight) {
width = widthAtMinHeight;
height = minHeight;
} else {
width = aIntrinsicSize.width;
height = aIntrinsicSize.height;
width = tentWidth;
height = tentHeight;
}
}
@ -1892,10 +1966,12 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
// 'auto' width, non-'auto' height
height = NS_CSS_MINMAX(height, minHeight, maxHeight);
if (aIntrinsicSize.height != 0) {
width = MULDIV(aIntrinsicSize.width, height, aIntrinsicSize.height);
if (aIntrinsicRatio.height > 0) {
width = MULDIV(height, aIntrinsicRatio.width, aIntrinsicRatio.height);
} else if (hasIntrinsicWidth) {
width = intrinsicWidth;
} else {
width = aIntrinsicSize.width;
width = nsPresContext::CSSPixelsToAppUnits(300);
}
width = NS_CSS_MINMAX(width, minWidth, maxWidth);
@ -1905,18 +1981,20 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
// non-'auto' width, 'auto' height
width = NS_CSS_MINMAX(width, minWidth, maxWidth);
if (aIntrinsicSize.width != 0) {
height = MULDIV(aIntrinsicSize.height, width, aIntrinsicSize.width);
if (aIntrinsicRatio.width > 0) {
height = MULDIV(width, aIntrinsicRatio.height, aIntrinsicRatio.width);
} else if (hasIntrinsicHeight) {
height = intrinsicHeight;
} else {
height = aIntrinsicSize.height;
height = nsPresContext::CSSPixelsToAppUnits(150);
}
height = NS_CSS_MINMAX(height, minHeight, maxHeight);
} else {
// non-'auto' width, non-'auto' height
height = NS_CSS_MINMAX(height, minHeight, maxHeight);
width = NS_CSS_MINMAX(width, minWidth, maxWidth);
height = NS_CSS_MINMAX(height, minHeight, maxHeight);
}
}

View File

@ -619,9 +619,15 @@ public:
nscoord aContainingBlockHeight,
const nsStyleCoord& aCoord);
/*
* Calculate the used values for 'width' and 'height' for a replaced element.
*
* http://www.w3.org/TR/CSS21/visudet.html#min-max-widths
*/
static nsSize ComputeSizeWithIntrinsicDimensions(
nsIRenderingContext* aRenderingContext,
nsIFrame* aFrame, nsSize aIntrinsicSize, nsSize aCBSize,
nsIRenderingContext* aRenderingContext, nsIFrame* aFrame,
nsIFrame::IntrinsicSize& aIntrinsicSize,
nsSize aIntrinsicRatio, nsSize aCBSize,
nsSize aMargin, nsSize aBorder, nsSize aPadding);
// Implement nsIFrame::GetPrefWidth in terms of nsIFrame::AddInlinePrefWidth

View File

@ -2943,6 +2943,12 @@ nsFrame::IntrinsicWidthOffsets(nsIRenderingContext* aRenderingContext)
return result;
}
/* virtual */ nsIFrame::IntrinsicSize
nsFrame::GetIntrinsicSize()
{
return IntrinsicSize(); // default is width/height set to eStyleUnit_None
}
/* virtual */ nsSize
nsFrame::GetIntrinsicRatio()
{

View File

@ -281,6 +281,7 @@ public:
InlinePrefWidthData *aData);
virtual IntrinsicWidthOffsetData
IntrinsicWidthOffsets(nsIRenderingContext* aRenderingContext);
virtual IntrinsicSize GetIntrinsicSize();
virtual nsSize GetIntrinsicRatio();
virtual nsSize ComputeSize(nsIRenderingContext *aRenderingContext,

View File

@ -90,6 +90,9 @@
#include "nsDisplayList.h"
#include "nsUnicharUtils.h"
#include "nsIReflowCallback.h"
#include "nsIScrollableFrame.h"
#include "nsIObjectLoadingContent.h"
#include "nsLayoutUtils.h"
// For Accessibility
#ifdef ACCESSIBILITY
@ -133,6 +136,16 @@ public:
virtual void Destroy();
virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
virtual nsSize GetIntrinsicRatio();
virtual nsSize ComputeSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
PRBool aShrinkWrap);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
@ -175,6 +188,16 @@ protected:
virtual PRIntn GetSkipSides() const;
/* Obtains the frame we should use for intrinsic size information if we are
* an HTML <object>, <embed> or <applet> (a replaced element - not <iframe>)
* and our sub-document has an intrinsic size. The frame returned is the
* frame for the document element of the document we're embedding.
*
* Called "Obtain*" and not "Get*" because of comment on GetDocShell that
* says it should be called ObtainDocShell because of it's side effects.
*/
nsIFrame* ObtainIntrinsicSizeFrame();
nsCOMPtr<nsIFrameLoader> mFrameLoader;
nsIView* mInnerView;
PRPackedBool mDidCreateDoc;
@ -324,13 +347,16 @@ nscoord
nsSubDocumentFrame::GetIntrinsicWidth()
{
if (!IsInline()) {
return 0; // <frame> has no useful intrinsic width
return 0; // HTML <frame> has no useful intrinsic width
}
if (mContent->IsNodeOfType(nsINode::eXUL)) {
return 0; // <xul:iframe> also has no useful intrinsic width
return 0; // XUL <iframe> and <browser> have no useful intrinsic width
}
NS_ASSERTION(ObtainIntrinsicSizeFrame() == nsnull,
"Intrinsic width should come from the embedded document.");
// We must be an HTML <iframe>. Default to a width of 300, for IE
// compat (and per CSS2.1 draft).
return nsPresContext::CSSPixelsToAppUnits(300);
@ -346,6 +372,9 @@ nsSubDocumentFrame::GetIntrinsicHeight()
return 0;
}
NS_ASSERTION(ObtainIntrinsicSizeFrame() == nsnull,
"Intrinsic height should come from the embedded document.");
// Use 150px, for compatibility with IE, and per CSS2.1 draft.
return nsPresContext::CSSPixelsToAppUnits(150);
}
@ -363,6 +392,66 @@ nsSubDocumentFrame::GetType() const
return nsGkAtoms::subDocumentFrame;
}
/* virtual */ nscoord
nsSubDocumentFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
result = subDocRoot->GetMinWidth(aRenderingContext);
} else {
result = GetIntrinsicWidth();
}
return result;
}
/* virtual */ nscoord
nsSubDocumentFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_PREF_WIDTH(this, result);
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
result = subDocRoot->GetPrefWidth(aRenderingContext);
} else {
result = GetIntrinsicWidth();
}
return result;
}
/* virtual */ nsSize
nsSubDocumentFrame::GetIntrinsicRatio()
{
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
return subDocRoot->GetIntrinsicRatio();
}
return nsLeafFrame::GetIntrinsicRatio();
}
/* virtual */ nsSize
nsSubDocumentFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
PRBool aShrinkWrap)
{
nsIFrame* subDocRoot = ObtainIntrinsicSizeFrame();
if (subDocRoot) {
return nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
aRenderingContext, this,
subDocRoot->GetIntrinsicSize(),
subDocRoot->GetIntrinsicRatio(),
aCBSize, aMargin, aBorder, aPadding);
}
return nsLeafFrame::ComputeSize(aRenderingContext, aCBSize, aAvailableWidth,
aMargin, aBorder, aPadding, aShrinkWrap);
}
NS_IMETHODIMP
nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@ -386,7 +475,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
nsPoint offset(0, 0);
if (IsInline()) {
// IFRAME
// XUL <iframe> or <browser>, or HTML <iframe>, <object> or <embed>
nsresult rv = nsLeafFrame::Reflow(aPresContext, aDesiredSize, aReflowState,
aStatus);
NS_ENSURE_SUCCESS(rv, rv);
@ -394,7 +483,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
offset = nsPoint(aReflowState.mComputedBorderPadding.left,
aReflowState.mComputedBorderPadding.top);
} else {
// FRAME
// HTML <frame>
SizeToAvailSize(aReflowState, aDesiredSize);
}
@ -824,3 +913,37 @@ nsSubDocumentFrame::CreateViewAndWidget(nsContentType aContentType)
return innerView->CreateWidget(kCChildCID, nsnull, nsnull, PR_TRUE, PR_TRUE,
aContentType);
}
nsIFrame*
nsSubDocumentFrame::ObtainIntrinsicSizeFrame()
{
nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(GetContent());
if (olc) {
// We are an HTML <object>, <embed> or <applet> (a replaced element).
// Try to get an nsIFrame for our sub-document's document element
nsIFrame* subDocRoot = nsnull;
nsCOMPtr<nsIDocShell> docShell;
GetDocShell(getter_AddRefs(docShell));
if (docShell) {
nsCOMPtr<nsIPresShell> presShell;
docShell->GetPresShell(getter_AddRefs(presShell));
if (presShell) {
nsIScrollableFrame* scrollable = presShell->GetRootScrollFrameAsScrollable();
if (scrollable) {
nsIFrame* scrolled = scrollable->GetScrolledFrame();
if (scrolled) {
subDocRoot = scrolled->GetFirstChild(nsnull);
}
}
}
}
if (subDocRoot && subDocRoot->GetContent() &&
subDocRoot->GetContent()->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG)) {
return subDocRoot; // SVG documents have an intrinsic size
}
}
return nsnull;
}

View File

@ -112,12 +112,17 @@ nsHTMLCanvasFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
PRBool aShrinkWrap)
{
nsSize size = GetCanvasSize();
nsSize canvasSize(nsPresContext::CSSPixelsToAppUnits(size.width),
nsPresContext::CSSPixelsToAppUnits(size.height));
IntrinsicSize intrinsicSize;
intrinsicSize.width.SetCoordValue(nsPresContext::CSSPixelsToAppUnits(size.width));
intrinsicSize.height.SetCoordValue(nsPresContext::CSSPixelsToAppUnits(size.height));
nsSize& intrinsicRatio = size; // won't actually be used
return nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
aRenderingContext, this, canvasSize,
aCBSize, aMargin, aBorder, aPadding);
aRenderingContext, this,
intrinsicSize, intrinsicRatio, aCBSize,
aMargin, aBorder, aPadding);
}
NS_IMETHODIMP

View File

@ -425,7 +425,8 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext)
mStylePosition->mMaxHeight.GetUnit() == eStyleUnit_Percent ||
mStylePosition->mOffset.GetTopUnit() == eStyleUnit_Percent ||
mStylePosition->mOffset.GetBottomUnit() == eStyleUnit_Percent ||
frame->IsBoxFrame();
frame->IsBoxFrame() ||
frame->GetIntrinsicSize().height.GetUnit() == eStyleUnit_Percent;
// If we're the child of a table cell that performs special height
// reflows and we could be the child that requires them, always set

View File

@ -1251,6 +1251,29 @@ public:
virtual IntrinsicWidthOffsetData
IntrinsicWidthOffsets(nsIRenderingContext* aRenderingContext) = 0;
/*
* For replaced elements only. Gets the intrinsic dimensions of this element.
* The dimensions may only be one of the following three types:
*
* eStyleUnit_Coord - a length in app units
* eStyleUnit_Percent - a percentage of the available space
* eStyleUnit_None - the element has no intrinsic size in this dimension
*/
struct IntrinsicSize {
nsStyleCoord width, height;
IntrinsicSize()
: width(eStyleUnit_None), height(eStyleUnit_None)
{}
IntrinsicSize(const IntrinsicSize& rhs)
: width(rhs.width), height(rhs.height)
{}
IntrinsicSize& operator=(const IntrinsicSize& rhs) {
width = rhs.width; height = rhs.height; return *this;
}
};
virtual IntrinsicSize GetIntrinsicSize() = 0;
/*
* Get the intrinsic ratio of this element, or nsSize(0,0) if it has
* no intrinsic ratio. The intrinsic ratio is the ratio of the

View File

@ -704,10 +704,16 @@ nsImageFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
nsPresContext *presContext = PresContext();
EnsureIntrinsicSize(presContext);
IntrinsicSize intrinsicSize;
intrinsicSize.width.SetCoordValue(mIntrinsicSize.width);
intrinsicSize.height.SetCoordValue(mIntrinsicSize.height);
nsSize& intrinsicRatio = mIntrinsicSize; // won't actually be used
return nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
aRenderingContext, this,
mIntrinsicSize,
aCBSize, aMargin, aBorder, aPadding);
intrinsicSize, intrinsicRatio, aCBSize,
aMargin, aBorder, aPadding);
}
nsRect

View File

@ -758,6 +758,14 @@ IsPercentageAware(const nsIFrame* aFrame)
fType == nsGkAtoms::comboboxDisplayFrame) {
return PR_TRUE;
}
// Handle SVG, which doesn't map width/height into style
if ((fType == nsGkAtoms::svgOuterSVGFrame ||
fType == nsGkAtoms::subDocumentFrame) &&
const_cast<nsIFrame*>(aFrame)->GetIntrinsicSize().width.GetUnit() ==
eStyleUnit_Percent) {
return PR_TRUE;
}
}
return PR_FALSE;

View File

@ -0,0 +1,57 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: change CSS 'height' property on inline SVG</title>
<!--
This testcase checks that when the value of the CSS 'height' property on
inline SVG is changed, the SVG resizes as expected.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
background: red;
}
</style>
<script type="text/javascript">
function handle_load(e)
{
setTimeout(resize_svg, 50); // allow some time for layout and rendering
}
function resize_svg()
{
document.getElementById('svg').style.height = '100%';
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<svg id="svg" xmlns="http://www.w3.org/2000/svg"
style="display:block; width:100%; height:0;" width="0" height="0">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: change CSS 'width' property on inline SVG</title>
<!--
This testcase checks that when the value of the CSS 'width' property on
inline SVG is changed, the SVG resizes as expected.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
background: red;
}
</style>
<script type="text/javascript">
function handle_load(e)
{
setTimeout(resize_svg, 50); // allow some time for layout and rendering
}
function resize_svg()
{
document.getElementById('svg').style.width = '100%';
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<svg id="svg" xmlns="http://www.w3.org/2000/svg"
style="display:block; width:0; height:100%;" width="0" height="0">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</body>
</html>

View File

@ -0,0 +1,60 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: resize of container block height</title>
<!--
This testcase checks that SVG embedded inline with a percentage height is
updated correctly when its containing block is resized.
-->
<style type="text/css">
html, body, div {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%; /* inline style override on the div below */
background: red;
overflow: hidden;
}
</style>
<script type="text/javascript">
function handle_load(e)
{
setTimeout(resize_div, 50); // allow some time for layout and rendering
}
function resize_div()
{
var XHTML_NS = 'http://www.w3.org/1999/xhtml';
document.getElementsByTagNameNS(XHTML_NS, 'div').item(0).style.height = '100%';
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<div style="height:50%;">
<svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</div>
</body>
</html>

View File

@ -0,0 +1,60 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: resize of container block width</title>
<!--
This testcase checks that SVG embedded inline with a percentage width is
updated correctly when its containing block is resized.
-->
<style type="text/css">
html, body, div {
padding: 0;
border: 0;
margin: 0;
width: 100%; /* inline style override on the div below */
height: 100%;
background: red;
overflow: hidden;
}
</style>
<script type="text/javascript">
function handle_load(e)
{
setTimeout(resize_div, 50); // allow some time for layout and rendering
}
function resize_div()
{
var XHTML_NS = 'http://www.w3.org/1999/xhtml';
document.getElementsByTagNameNS(XHTML_NS, 'div').item(0).style.width = '100%';
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<div style="width:50%;">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="5000">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</div>
</body>
</html>

View File

@ -0,0 +1,60 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: resize of window height</title>
<!--
This testcase checks that SVG embedded inline with a percentage height is
updated correctly when the window is resized.
-->
<style type="text/css">
html, body, div {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
background: red;
overflow: hidden;
}
</style>
<script type="text/javascript">
var initial_height = top.innerHeight;
top.innerHeight /= 2;
function handle_load(e)
{
setTimeout(restore_height, 50); // allow some time for layout and rendering
}
function restore_height()
{
top.innerHeight = initial_height;
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</body>
</html>

View File

@ -0,0 +1,60 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: resize of window width</title>
<!--
This testcase checks that SVG embedded inline with a percentage width is
updated correctly when the window is resized.
-->
<style type="text/css">
html, body, div {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
background: red;
overflow: hidden;
}
</style>
<script type="text/javascript">
var initial_width = top.innerWidth;
top.innerWidth /= 2;
function handle_load(e)
{
setTimeout(restore_width, 50); // allow some time for layout and rendering
}
function restore_width()
{
top.innerWidth = initial_width;
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
document.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="5000">
<rect width="100%" height="100%" fill="lime"/>
</svg>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="49%" height="70px"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 49% and the
intrinsic height is 70px, you should see a blue rectangle 49% wide by 70px
high when viewing this file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--pct-px.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70"
onload="handle_load(evt);">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by dynamic--object-svg-unloaded.xhtml</title>
<script type="text/javascript">
var embedding_element;
function handle_load(e)
{
embedding_element = e.originalTarget.ownerDocument.defaultView.frameElement;
setTimeout(load_new_page, 50); // allow some time for layout and rendering
}
function load_new_page()
{
// We could set embedding_element.data to load the new page, but that:
//
// a) Crashes if we don't use setTimeout
//
// b) Actually works, perhaps because it takes a different code path to the
// path that's taken when a user clicks on a link in the embedded SVG
//
// For these reasons we set document.location.href on the SVG document.
document.location.href = 'dynamic--object-svg-unloaded-b.xhtml';
}
</script>
<rect width="100%" height="100%" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by dynamic--object-svg-unloaded.xhtml</title>
<style type="text/css">
html {
padding: 0;
border: 0;
margin: 0;
background: lime;
}
</style>
<script type="text/javascript">
var embedding_element;
function handle_load(e)
{
embedding_element = e.originalTarget.defaultView.frameElement;
setTimeout(notify_test_finished, 50); // allow some time for layout and rendering
}
function notify_test_finished()
{
embedding_element.ownerDocument.documentElement.removeAttribute('class');
}
</script>
</head>
<body onload="handle_load(event);" style="display:none;"></body>
</html>

View File

@ -0,0 +1,48 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: object should resize when SVG is unloaded</title>
<!--
This testcase checks that HTML <object> will resize correctly if it depends
on the intrinsic size of some embedded SVG, and then the SVG is replaced by
some other content (perhaps as a result of a link in the SVG being
clicked).
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
background: lime;
}
object {
background: red;
position: absolute;
left: 0;
top: 0;
}
</style>
</head>
<body>
<div style="width:300px; height:150px; background:red;"></div>
<object data="dynamic--object-svg-unloaded-a.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--display-block--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<div style="width:51px; height:51px; background:blue; display:block; padding:0; border:1px solid blue; margin:0;">
</div>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: display:block with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with display:block is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="display:block; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--display-inline--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
style="width:51px; height:51px; display:inline; padding:0; border:1px solid blue; margin:0;"/>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: display:inline with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with display:inline is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="display:inline; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--display-inline-block--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<div style="width:51px; height:51px; background:blue; display:inline-block; padding:0; border:1px solid blue; margin:0;">
</div>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: display:inline-block with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with display:inline-block is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="display:inline-block; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--float-left--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<div style="width:51px; height:51px; background:blue; float:left; padding:0; border:1px solid blue; margin:0;">
</div>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: float:left with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with float:left is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="float:left; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--float-right--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<div style="width:51px; height:51px; background:blue; float:right; padding:0; border:1px solid blue; margin:0;">
</div>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: float:right with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with float:right is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="float:right; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--position-absolute--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<div style="width:51px; height:51px; background:blue; position:absolute; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
</div>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: position:absolute with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with position:absolute is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="position:absolute; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,39 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test inline--position-relative--01.xhtml</title>
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
style="width:51px; height:51px; display:inline; position:relative; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;"/>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,46 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: position:relative with width="51" height="51"</title>
<!--
This testcase checks that SVG embedded inline with position:relative is
positioned correctly.
-->
</head>
<body>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
<svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
style="position:relative; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
<rect width="100%" height="100%" fill="blue"/>
</svg>
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
Padding text. Padding text. Padding text. Padding text. Padding text.
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="0" height="0"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width and height are both
zero, you should not see any red when viewing this file.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
border: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--0-0.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--0-0.html</title>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 408 B

View File

@ -0,0 +1,37 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--0-pct.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 1px solid blue;
margin: 50px;
width: 0;
height: 49%;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,43 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="0" height="49%"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is zero and the
intrinsic height is 49%, you should see a 1px blue border around rectangle
0px wide by 49% high when viewing this file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
border: 1px solid blue;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--0-pct.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--0-pct.html</title>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 412 B

View File

@ -0,0 +1,37 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--0-px.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 1px solid blue;
margin: 50px;
width: 0;
height: 70px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,44 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="0" height="70px"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is zero and the
intrinsic height is 70px, you should see a 1px blue border around a
rectangle 0px wide by 70px high when viewing this file. You should not see
any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
border: 1px solid blue;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--0-px.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--0-px.html</title>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 410 B

View File

@ -0,0 +1,37 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--pct-0.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 1px solid blue;
margin: 50px;
width: 49%;
height: 0;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,44 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="49%" height="0"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 49% and the
intrinsic height is zero, you should see a 1px blue border around a
rectangle 49% wide by 0px high when viewing this file. You should not see
any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
border: 1px solid blue;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--pct-0.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="49%" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--pct-0.html</title>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 412 B

View File

@ -0,0 +1,38 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--pct-pct.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 0;
margin: 50px;
width: 49%;
height: 49%;
background: blue;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="49%" height="49%"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width and height are both
49%, you should see a blue rectangle 49% wide by 49% high when viewing this
file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--pct-pct.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="49%" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--pct-pct.html</title>
<rect width="100%" height="100%" fill="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 417 B

View File

@ -0,0 +1,38 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--pct-px.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 0;
margin: 50px;
width: 49%;
height: 70px;
background: blue;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="49%" height="70px"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 49% and the
intrinsic height is 70px, you should see a blue rectangle 49% wide by 70px
high when viewing this file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--pct-px.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="49%" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--pct-px.html</title>
<rect width="100%" height="100%" fill="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 415 B

View File

@ -0,0 +1,37 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--px-0.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 1px solid blue;
margin: 50px;
width: 70px;
height: 0;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="70px" height="0"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 70px and the
intrinsic height is zero, you should see a 1px blue border around a
rectangle 70px wide by 0px high when viewing this file. You should not see
any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
}
object {
padding: 0;
border: 1px solid blue;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--px-0.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--px-0.html</title>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 410 B

View File

@ -0,0 +1,38 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--px-pct.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 0;
margin: 50px;
width: 70px;
height: 49%;
background: blue;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="70px" height="49%"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 70px and the
intrinsic height is 49%, you should see a blue rectangle 70px wide by 49%
high when viewing this file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--px-pct.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--px-pct.html</title>
<rect width="100%" height="100%" fill="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 415 B

View File

@ -0,0 +1,38 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Reference for test object--auto-auto--px-px.html</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
/* XXX Not sure why we get scrolling with 'div' but not 'object'. */
overflow: hidden;
}
div {
padding: 0;
border: 0;
margin: 50px;
width: 70px;
height: 70px;
background: blue;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:auto; height:auto; width="70px" height="70px"</title>
<!--
This testcase checks that the <object> element uses the intrinsic width and
height of the embedded SVG. Since the intrinsic width is 70px and the
intrinsic height is 70px, you should see a blue rectangle 70px wide by 70px
high when viewing this file. You should not see any red.
-->
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
width: 100%;
height: 100%;
}
object {
padding: 0;
margin: 50px;
background: red;
}
</style>
</head>
<body>
<object data="object--auto-auto--px-px.svg" type="image/svg+xml">
FAIL
</object>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>SVG embedded by reference by object--auto-auto--px-px.html</title>
<rect width="100%" height="100%" fill="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 413 B

View File

@ -0,0 +1,8 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>Reference SVG for comparisons</title>
<!-- empty -->
</svg>

After

Width:  |  Height:  |  Size: 244 B

View File

@ -0,0 +1,26 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
html, body {
height: 100%;
}
</style>
</head>
<body>
<img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
style="height:49%;"/>
</body>
</html>

View File

@ -0,0 +1,30 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
width: 49%;
height: 49%;
background: blue;
}
</style>
</head>
<body></body>
</html>

View File

@ -0,0 +1,30 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
width: 49%;
height: 70px;
background: blue;
}
</style>
</head>
<body></body>
</html>

View File

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
</style>
</head>
<body>
<img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
style="width:49%;"/>
</body>
</html>

View File

@ -0,0 +1,30 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
width: 70px;
height: 49%;
background: blue;
}
</style>
</head>
<body></body>
</html>

View File

@ -0,0 +1,30 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reference file for comparisons</title>
<style type="text/css">
* {
padding: 0;
border: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
width: 70px;
height: 70px;
background: blue;
}
</style>
</head>
<body></body>
</html>

View File

@ -0,0 +1,8 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>Testcase reference file for generic pass condition</title>
<rect width="100%" height="100%" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 297 B

View File

@ -0,0 +1,309 @@
# This directory contains tests that test the sizing of the SVG viewport into
# which SVG is rendered. It includes tests for standalone SVG, SVG embedded by
# reference using the HTML <object> element, and SVG rendered inline within
# XHTML.
#
# SVG's <svg> element is a "replaced element". The main specification texts
# covering how the <svg> element is sized are:
#
# http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport
# http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing
# http://www.w3.org/TR/CSS21/visudet.html
# Standalone tests
#
# To get reasonable test coverage of the implementation of the replaced element
# algorythm we test all permutations of the CSS 'width' and 'height' properties
# having the values zero, auto, a px value or a percentage value, and of the
# intrinsic width and height (the 'width' and 'height' attributes) having the
# values zero, a px value or a percentage value. This gives us 4*4*3*3 == 144
# tests. On top of that, there are 12 cases from the 144 permutations for which
# the 'viewBox' attribute should have an affect (see below).
#
# In the file names for the standalone tests that follow, the first two fields
# denote the type of value specified for the CSS 'width' and 'height'
# properties, and the third and four fields denote the type of value used for
# the intrinsic width and height (i.e. the 'width' and 'height' attributes).
#
# Note that the standalone SVG testcases can't test defaulting to 300x150 px
# because SVG always has an intrinsic width and height. To get the size of an
# SVG to default to 300x150 px the SVG will need to have a containing block
# that depends on the SVG's size (e.g. a floating containing block). Again, see
# below for those tests.
== standalone--0-0--0-0.svg pass-empty.svg
== standalone--0-0--0-pct.svg pass-empty.svg
== standalone--0-0--0-px.svg pass-empty.svg
== standalone--0-0--pct-0.svg pass-empty.svg
== standalone--0-0--pct-pct.svg pass-empty.svg
== standalone--0-0--pct-px.svg pass-empty.svg
== standalone--0-0--px-0.svg pass-empty.svg
== standalone--0-0--px-pct.svg pass-empty.svg
== standalone--0-0--px-px.svg pass-empty.svg
== standalone--0-auto--0-0.svg pass-empty.svg
== standalone--0-auto--0-pct.svg pass-empty.svg
== standalone--0-auto--0-px.svg pass-empty.svg
== standalone--0-auto--pct-0.svg pass-empty.svg
== standalone--0-auto--pct-pct.svg pass-empty.svg
== standalone--0-auto--pct-px.svg pass-empty.svg
== standalone--0-auto--px-0.svg pass-empty.svg
== standalone--0-auto--px-pct.svg pass-empty.svg
== standalone--0-auto--px-px.svg pass-empty.svg
== standalone--0-pct--0-0.svg pass-empty.svg
== standalone--0-pct--0-pct.svg pass-empty.svg
== standalone--0-pct--0-px.svg pass-empty.svg
== standalone--0-pct--pct-0.svg pass-empty.svg
== standalone--0-pct--pct-pct.svg pass-empty.svg
== standalone--0-pct--pct-px.svg pass-empty.svg
== standalone--0-pct--px-0.svg pass-empty.svg
== standalone--0-pct--px-pct.svg pass-empty.svg
== standalone--0-pct--px-px.svg pass-empty.svg
== standalone--0-px--0-0.svg pass-empty.svg
== standalone--0-px--0-pct.svg pass-empty.svg
== standalone--0-px--0-px.svg pass-empty.svg
== standalone--0-px--pct-0.svg pass-empty.svg
== standalone--0-px--pct-pct.svg pass-empty.svg
== standalone--0-px--pct-px.svg pass-empty.svg
== standalone--0-px--px-0.svg pass-empty.svg
== standalone--0-px--px-pct.svg pass-empty.svg
== standalone--0-px--px-px.svg pass-empty.svg
== standalone--auto-0--0-0.svg pass-empty.svg
== standalone--auto-0--0-pct.svg pass-empty.svg
== standalone--auto-0--0-px.svg pass-empty.svg
== standalone--auto-0--pct-0.svg pass-empty.svg
== standalone--auto-0--pct-pct.svg pass-empty.svg
== standalone--auto-0--pct-px.svg pass-empty.svg
== standalone--auto-0--px-0.svg pass-empty.svg
== standalone--auto-0--px-pct.svg pass-empty.svg
== standalone--auto-0--px-px.svg pass-empty.svg
== standalone--auto-auto--0-0.svg pass-empty.svg
== standalone--auto-auto--0-pct.svg pass-empty.svg
== standalone--auto-auto--0-px.svg pass-empty.svg
== standalone--auto-auto--pct-0.svg pass-empty.svg
== standalone--auto-auto--pct-pct.svg pass-pct-pct.xhtml
== standalone--auto-auto--pct-px.svg pass-pct-px.xhtml
== standalone--auto-auto--px-0.svg pass-empty.svg
== standalone--auto-auto--px-pct.svg pass-px-pct.xhtml
== standalone--auto-auto--px-px.svg pass-px-px.xhtml
== standalone--auto-pct--0-0.svg pass-empty.svg
== standalone--auto-pct--0-pct.svg pass-empty.svg
== standalone--auto-pct--0-px.svg pass-empty.svg
== standalone--auto-pct--pct-0.svg pass-pct-pct.xhtml
== standalone--auto-pct--pct-pct.svg pass-pct-pct.xhtml
== standalone--auto-pct--pct-px.svg pass-pct-pct.xhtml
== standalone--auto-pct--px-0.svg pass-px-pct.xhtml
== standalone--auto-pct--px-pct.svg pass-px-pct.xhtml
== standalone--auto-pct--px-px.svg pass-pct-height-square.xhtml # intrinsic ratio!
== standalone--auto-px--0-0.svg pass-empty.svg
== standalone--auto-px--0-pct.svg pass-empty.svg
== standalone--auto-px--0-px.svg pass-empty.svg
== standalone--auto-px--pct-0.svg pass-pct-px.xhtml
== standalone--auto-px--pct-pct.svg pass-pct-px.xhtml
== standalone--auto-px--pct-px.svg pass-pct-px.xhtml
== standalone--auto-px--px-0.svg pass-px-px.xhtml
== standalone--auto-px--px-pct.svg pass-px-px.xhtml
== standalone--auto-px--px-px.svg pass-px-px.xhtml # intrinsic ratio!
== standalone--pct-0--0-0.svg pass-empty.svg
== standalone--pct-0--0-pct.svg pass-empty.svg
== standalone--pct-0--0-px.svg pass-empty.svg
== standalone--pct-0--pct-0.svg pass-empty.svg
== standalone--pct-0--pct-pct.svg pass-empty.svg
== standalone--pct-0--pct-px.svg pass-empty.svg
== standalone--pct-0--px-0.svg pass-empty.svg
== standalone--pct-0--px-pct.svg pass-empty.svg
== standalone--pct-0--px-px.svg pass-empty.svg
== standalone--pct-auto--0-0.svg pass-empty.svg
== standalone--pct-auto--0-pct.svg pass-pct-pct.xhtml
== standalone--pct-auto--0-px.svg pass-pct-px.xhtml
== standalone--pct-auto--pct-0.svg pass-empty.svg
== standalone--pct-auto--pct-pct.svg pass-pct-pct.xhtml
== standalone--pct-auto--pct-px.svg pass-pct-px.xhtml
== standalone--pct-auto--px-0.svg pass-empty.svg
== standalone--pct-auto--px-pct.svg pass-pct-pct.xhtml
== standalone--pct-auto--px-px.svg pass-pct-width-square.xhtml # intrinsic ratio!
== standalone--pct-pct--0-0.svg pass-pct-pct.xhtml
== standalone--pct-pct--0-pct.svg pass-pct-pct.xhtml
== standalone--pct-pct--0-px.svg pass-pct-pct.xhtml
== standalone--pct-pct--pct-0.svg pass-pct-pct.xhtml
== standalone--pct-pct--pct-pct.svg pass-pct-pct.xhtml
== standalone--pct-pct--pct-px.svg pass-pct-pct.xhtml
== standalone--pct-pct--px-0.svg pass-pct-pct.xhtml
== standalone--pct-pct--px-pct.svg pass-pct-pct.xhtml
== standalone--pct-pct--px-px.svg pass-pct-pct.xhtml
== standalone--pct-px--0-0.svg pass-pct-px.xhtml
== standalone--pct-px--0-pct.svg pass-pct-px.xhtml
== standalone--pct-px--0-px.svg pass-pct-px.xhtml
== standalone--pct-px--pct-0.svg pass-pct-px.xhtml
== standalone--pct-px--pct-pct.svg pass-pct-px.xhtml
== standalone--pct-px--pct-px.svg pass-pct-px.xhtml
== standalone--pct-px--px-0.svg pass-pct-px.xhtml
== standalone--pct-px--px-pct.svg pass-pct-px.xhtml
== standalone--pct-px--px-px.svg pass-pct-px.xhtml
== standalone--px-0--0-0.svg pass-empty.svg
== standalone--px-0--0-pct.svg pass-empty.svg
== standalone--px-0--0-px.svg pass-empty.svg
== standalone--px-0--pct-0.svg pass-empty.svg
== standalone--px-0--pct-pct.svg pass-empty.svg
== standalone--px-0--pct-px.svg pass-empty.svg
== standalone--px-0--px-0.svg pass-empty.svg
== standalone--px-0--px-pct.svg pass-empty.svg
== standalone--px-0--px-px.svg pass-empty.svg
== standalone--px-auto--0-0.svg pass-empty.svg
== standalone--px-auto--0-pct.svg pass-px-pct.xhtml
== standalone--px-auto--0-px.svg pass-px-px.xhtml
== standalone--px-auto--pct-0.svg pass-empty.svg
== standalone--px-auto--pct-pct.svg pass-px-pct.xhtml
== standalone--px-auto--pct-px.svg pass-px-px.xhtml
== standalone--px-auto--px-0.svg pass-empty.svg
== standalone--px-auto--px-pct.svg pass-px-pct.xhtml
== standalone--px-auto--px-px.svg pass-px-px.xhtml # intrinsic ratio!
== standalone--px-pct--0-0.svg pass-px-pct.xhtml
== standalone--px-pct--0-pct.svg pass-px-pct.xhtml
== standalone--px-pct--0-px.svg pass-px-pct.xhtml
== standalone--px-pct--pct-0.svg pass-px-pct.xhtml
== standalone--px-pct--pct-pct.svg pass-px-pct.xhtml
== standalone--px-pct--pct-px.svg pass-px-pct.xhtml
== standalone--px-pct--px-0.svg pass-px-pct.xhtml
== standalone--px-pct--px-pct.svg pass-px-pct.xhtml
== standalone--px-pct--px-px.svg pass-px-pct.xhtml
== standalone--px-px--0-0.svg pass-px-px.xhtml
== standalone--px-px--0-pct.svg pass-px-px.xhtml
== standalone--px-px--0-px.svg pass-px-px.xhtml
== standalone--px-px--pct-0.svg pass-px-px.xhtml
== standalone--px-px--pct-pct.svg pass-px-px.xhtml
== standalone--px-px--pct-px.svg pass-px-px.xhtml
== standalone--px-px--px-0.svg pass-px-px.xhtml
== standalone--px-px--px-pct.svg pass-px-px.xhtml
== standalone--px-px--px-px.svg pass-px-px.xhtml
# As mentioned above, the 'viewBox' attribute may play a part in the sizing of
# the SVG viewport in 12 of the 144 standalone tests above. The 'viewBox'
# attribute only affects the replaced element sizing algorithm (by providing an
# intrinsic ratio) when the SVG 'width' and 'height' attributes don't provide
# an intrinsic ratio but the algorithm says the intrinsic ratio should be used
# if avaliable. In other words, this is when one of the CSS properties 'width'
# or 'height' has the value 'auto' and the other has a non-zero value, while
# one or both of the SVG 'width' and 'height' attributes has a percentage
# value. For the standalone tests above that means the value of the 'viewBox'
# attribute matters in the 12 cases that follow.
#
# XXX We could also check that 'viewBox' does NOT have an affect in the other
# cases.
#
# XXX What about cases like standalone--auto-pct--0-px--viewBox.svg? Is the
# intrinsic ratio zero and not used, or should we use the viewBox ratio?
== standalone--auto-pct--pct-pct--viewBox.svg pass-pct-height-square.xhtml
== standalone--auto-pct--pct-px--viewBox.svg pass-pct-height-square.xhtml
== standalone--auto-pct--px-pct--viewBox.svg pass-pct-height-square.xhtml
== standalone--auto-px--pct-pct--viewBox.svg pass-px-px.xhtml
== standalone--auto-px--pct-px--viewBox.svg pass-px-px.xhtml
== standalone--auto-px--px-pct--viewBox.svg pass-px-px.xhtml
== standalone--pct-auto--pct-pct--viewBox.svg pass-pct-width-square.xhtml
== standalone--pct-auto--pct-px--viewBox.svg pass-pct-width-square.xhtml
== standalone--pct-auto--px-pct--viewBox.svg pass-pct-width-square.xhtml
== standalone--px-auto--pct-pct--viewBox.svg pass-px-px.xhtml
== standalone--px-auto--pct-px--viewBox.svg pass-px-px.xhtml
== standalone--px-auto--px-pct--viewBox.svg pass-px-px.xhtml
# Sanity tests. These tests check that our choice of percentage width (49%)
# doesn't coincidently result in the same width as our choice of px width
# (70px) or the fall back width (300 px), and that our choice of percentage
# height (49%) doesn't coincidently result in the same height as our choice of
# px height (70px) or the fall back height (150 px). This ensures that we won't
# miss false positives for the tests:
#
# standalone--pct-xxx--px-xxx.svg
# standalone--xxx-pct--xxx-px.svg
# standalone--px-xxx--pct-xxx.svg
# standalone--xxx-px--xxx-pct.svg
#
# if the user agent ignores the CSS property and uses the attribute instead.
# This will happen if the content area width is 612 px or the content height is
# 306 px. Hopefully it's unlikely testers will encounter this.
!= standalone-sanity-width-pct.svg standalone-sanity-width-px.svg
!= standalone-sanity-width-pct.svg standalone-sanity-width-300px.svg
!= standalone-sanity-height-pct.svg standalone-sanity-height-px.svg
!= standalone-sanity-height-pct.svg standalone-sanity-height-150px.svg
# Embedded inline tests
#
# The standalone tests provide a reasonable workout for replaced element
# algorithm sizing, but we also want to test that SVG embedded inline is
# positioned correctly when the properties 'display', 'float' and 'position'
# are set to different values.
#
# We could certainly expand on these tests, but they provide reasonable base
# coverage.
== inline--display-block--01.xhtml inline--display-block--01-ref.xhtml
== inline--display-inline--01.xhtml inline--display-inline--01-ref.xhtml
== inline--display-inline-block--01.xhtml inline--display-inline-block--01-ref.xhtml
== inline--float-left--01.xhtml inline--float-left--01-ref.xhtml
== inline--float-right--01.xhtml inline--float-right--01-ref.xhtml
== inline--position-absolute--01.xhtml inline--position-absolute--01-ref.xhtml
== inline--position-relative--01.xhtml inline--position-relative--01-ref.xhtml
# Embedded by reference tests
#
# One issue when it comes to documents embedded by reference is whether
# non-'auto' values for the CSS 'width' and 'height' properties on the
# _embedded_ document's root element should be used as intrinsic values by
# replaced elements like HTML <object>. For the sake of simplicity we will
# ignore this case for now, but it's certainly worth revisiting at some point
# in the future.
#
# Since we have given the replaced element algorithm a reasonable workout in
# the standalone tests, for the embedded by reference tests we will simply
# check that the embedded SVG's intrinsic dimensions are used. The following
# tests do not have any width or height on the <object> element so they should
# be sized purely by the embedded SVG's intrinsic size.
== object--auto-auto--0-0.html pass-empty.svg # XXX add border
== object--auto-auto--0-pct.html object--auto-auto--0-pct--ref.html
== object--auto-auto--0-px.html object--auto-auto--0-px--ref.html
== object--auto-auto--pct-0.html object--auto-auto--pct-0--ref.html
== object--auto-auto--pct-pct.html object--auto-auto--pct-pct--ref.html
== object--auto-auto--pct-px.html object--auto-auto--pct-px--ref.html
== object--auto-auto--px-0.html object--auto-auto--px-0--ref.html
== object--auto-auto--px-pct.html object--auto-auto--px-pct--ref.html
== object--auto-auto--px-px.html object--auto-auto--px-px--ref.html
# Assorted tests to check that dynamic changes work correctly
#
# Here we have an assortment of different tests to check that updates occur
# correctly when changes are made that should result in a change in the size
# or position of the SVG.
== dynamic--inline-css-height.xhtml pass.svg
== dynamic--inline-css-width.xhtml pass.svg
== dynamic--inline-resize-cb-height.xhtml pass.svg
== dynamic--inline-resize-cb-width.xhtml pass.svg
skip == dynamic--inline-resize-window-height.xhtml pass.svg # XXX breaks the reftest run as the window height somehow is not restored
== dynamic--inline-resize-window-width.xhtml pass.svg
fails == dynamic--object-svg-unloaded.xhtml pass.svg

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="0" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="0" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 640 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="0" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="0" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 644 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="0" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="0" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 642 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="49%" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="49%" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 644 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="49%" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="49%" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 648 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="49%" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="49%" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 646 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="70" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="70" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 642 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="70" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="70" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 646 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:0;" width="70" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:0; width="70" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' and 'height' properties
to zero prevents the SVG from being displayed. You should not see any red
when viewing this file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 644 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="0" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="0" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="0" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="0" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="0" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="0" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="49%" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="49%" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="49%" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="49%" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 639 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="49%" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="49%" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 637 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="70" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="70" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="70" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="70" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 637 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:auto;" width="70" height="70">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:auto; width="70" height="70"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="0" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="0" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 629 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="0" height="10%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="0" height="10%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="0" height="10">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="0" height="10"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="10%" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10%" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:90%;" width="10%" height="10%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10%" height="10%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 637 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="10%" height="10">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10%" height="10"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="10" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="10" height="10%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10" height="10%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:49%;" width="10" height="10">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:49%; width="10" height="10"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:70px;" width="0" height="0">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:70px; width="0" height="0"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
style="width:0; height:70px;" width="0" height="49%">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
<title>Test: width:0; height:70px; width="0" height="49%"</title>
<desc>
This testcase checks that setting the CSS 'width' property to zero prevents
the SVG from being displayed. You should not see any red when viewing this
file.
</desc>
<rect width="1000" height="1000" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

Some files were not shown because too many files have changed in this diff Show More