Back out 12f76b9a2d78 (bug 541270) for failing to compile

This commit is contained in:
Phil Ringnalda 2012-06-22 19:12:35 -07:00
Родитель a3c7e68ef9
Коммит 9560bedbc9
6 изменённых файлов: 34 добавлений и 31 удалений

Просмотреть файл

@ -1,6 +1,9 @@
<html>
<body style="margin: 0">
<div style="background: black;
width: 50px; height: 50px"></div>
width: 25px; height: 25px"></div>
<!-- XXXdholbert The above div should actually be 50x50 instead of 25x25, but
bug 541270 makes our testcases render smaller than they should. Once
that bug is fixed, we need a s/25px/50px/ in this file. -->
</body>
</html>

Просмотреть файл

@ -1622,8 +1622,8 @@ HTTP(..) != 615121-2.html 615121-2-notref.html
== 617242-1.html 617242-1-ref.html
!= 618071.html 618071-notref.html
== 619117-1.html 619117-1-ref.html
skip-if(Android) HTTP(..) == 621253-1-externalFilter.html 621253-1-ref.html
skip-if(Android) == 621253-1-internalFilter.html 621253-1-ref.html
skip-if(Android) HTTP(..) == 621253-1-externalFilter.html 621253-1-ref.html # XXX update reference case after bug 541270 is fixed
skip-if(Android) == 621253-1-internalFilter.html 621253-1-ref.html # XXX update reference case after bug 541270 is fixed
HTTP(..) == 621253-2-externalFilter.html 621253-2-ref.html
== 621253-2-internalFilter.html 621253-2-ref.html
fails-if(Android) HTTP(..) == 619511-1.html 619511-1-ref.html

Просмотреть файл

@ -304,5 +304,5 @@ random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == tspan-rotate-06.svg tspa
== svg-effects-area-unzoomed.xhtml svg-effects-area-unzoomed-ref.xhtml
== svg-effects-area-zoomed-in.xhtml svg-effects-area-zoomed-in-ref.xhtml
== svg-effects-area-zoomed-out.xhtml svg-effects-area-zoomed-out-ref.xhtml
fails == svg-effects-area-zoomed-out.xhtml svg-effects-area-zoomed-out-ref.xhtml # Bug 541270
== href-attr-change-restyles.svg href-attr-change-restyles-ref.svg

Просмотреть файл

@ -68,7 +68,7 @@ public:
nsSVGFilterPaintCallback *aPaint,
const nsIntRect *aPostFilterDirtyRect,
const nsIntRect *aPreFilterDirtyRect,
const gfxRect *aOverrideBBox,
const nsIntRect *aOverrideSourceBBox,
const gfxMatrix *aOverrideUserToDeviceSpace = nsnull);
~nsAutoFilterInstance() {}
@ -85,7 +85,7 @@ nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame *aTarget,
nsSVGFilterPaintCallback *aPaint,
const nsIntRect *aPostFilterDirtyRect,
const nsIntRect *aPreFilterDirtyRect,
const gfxRect *aOverrideBBox,
const nsIntRect *aOverrideSourceBBox,
const gfxMatrix *aOverrideUserToDeviceSpace)
{
const nsSVGFilterElement *filter = aFilterFrame->GetFilterContent();
@ -95,7 +95,13 @@ nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame *aTarget,
PRUint16 primitiveUnits =
aFilterFrame->GetEnumValue(nsSVGFilterElement::PRIMITIVEUNITS);
gfxRect bbox = aOverrideBBox ? *aOverrideBBox : nsSVGUtils::GetBBox(aTarget);
gfxRect bbox;
if (aOverrideSourceBBox) {
bbox = gfxRect(aOverrideSourceBBox->x, aOverrideSourceBBox->y,
aOverrideSourceBBox->width, aOverrideSourceBBox->height);
} else {
bbox = nsSVGUtils::GetBBox(aTarget);
}
// Get the filter region (in the filtered element's user space):
@ -201,12 +207,11 @@ nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame *aTarget,
if (svgTarget) {
if (aOverrideUserToDeviceSpace) {
// If aOverrideUserToDeviceSpace is specified, it is a simple
// CSS-px-to-dev-px transform passed by nsSVGFilterFrame::
// GetPostFilterBounds() when requesting the filter expansion of the
// overflow rects in frame space. In this case GetCoveredRegion() is not
// what we want since it is in outer-<svg> space, so GetPostFilterBounds
// passes in the pre-filter bounds of the frame in frame space for us to
// use instead.
// CSS-px-to-dev-px transform passed by nsSVGFilterFrame::GetFilterBBox()
// when requesting the filter expansion of the overflow rects in frame
// space. In this case GetCoveredRegion() is not what we want since it is
// in outer-<svg> space, GetFilterBBox passes in the pre-filter bounds of
// the frame in frame space for us to use instead.
NS_ASSERTION(aPreFilterDirtyRect, "Who passed aOverrideUserToDeviceSpace?");
targetBoundsDeviceSpace = *aPreFilterDirtyRect;
} else {
@ -461,7 +466,7 @@ nsSVGFilterFrame::GetPreFilterNeededArea(nsIFrame *aFilteredFrame,
nsIntRect
nsSVGFilterFrame::GetPostFilterBounds(nsIFrame *aFilteredFrame,
const gfxRect *aOverrideBBox,
const nsIntRect *aOverrideBBox,
const nsIntRect *aPreFilterBounds)
{
bool overrideCTM = false;

Просмотреть файл

@ -69,16 +69,13 @@ public:
const nsIntRect& aPostFilterDirtyRect);
/**
* Returns the post-filter paint bounds of aFilteredFrame. The rects are
* relative to the origin of the outer-<svg> if aFilteredFrame is SVG, or
* else relative to aFilteredFrame itself.
* @param aOverrideBBox A user space rect that should be used as
* aFilteredFrame's bbox, if non-null.
* @param aPreFilterBounds The pre-filter visual overflow rect of
* aFilteredFrame in device pixels, if non-null.
* Returns the post-filter paint bounds of aFilteredFrame. The rects are in
* device pixels, relative to the origin of the outer-<svg> if aFilteredFrame
* is SVG, or else relative to aFilteredFrame itself.
* @param aOverrideBBox overrides the normal bbox for the source, if non-null
*/
nsIntRect GetPostFilterBounds(nsIFrame *aFilteredFrame,
const gfxRect *aOverrideBBox = nsnull,
const nsIntRect *aOverrideBBox = nsnull,
const nsIntRect *aPreFilterBounds = nsnull);
#ifdef DEBUG

Просмотреть файл

@ -249,20 +249,18 @@ nsRect
// Create an override bbox - see comment above:
PRUint32 appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
nsPoint firstFrameToUserSpace = GetOffsetToUserSpace(firstFrame);
// overrideBBox is in "user space", in _CSS_ pixels:
// overrideBBox is in "user space", in dev pixels:
// XXX Why are we rounding out to pixel boundaries? We don't do that in
// GetSVGBBoxForNonSVGFrame, and it doesn't appear to be necessary.
gfxRect overrideBBox =
nsLayoutUtils::RectToGfxRect(
GetPreEffectsVisualOverflowUnion(firstFrame, aFrame,
aPreEffectsOverflowRect,
firstFrameToUserSpace),
aFrame->PresContext()->AppUnitsPerCSSPixel());
overrideBBox.RoundOut();
nsIntRect overrideBBox =
GetPreEffectsVisualOverflowUnion(firstFrame, aFrame,
aPreEffectsOverflowRect,
firstFrameToUserSpace).
ToOutsidePixels(appUnitsPerDevPixel);
nsRect overflowRect =
filterFrame->GetPostFilterBounds(firstFrame, &overrideBBox).
ToAppUnits(aFrame->PresContext()->AppUnitsPerDevPixel());
ToAppUnits(appUnitsPerDevPixel);
// Return overflowRect relative to aFrame, rather than "user space":
return overflowRect - (aFrame->GetOffsetTo(firstFrame) + firstFrameToUserSpace);