mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 509940 - Images with fill=none are not displayed. r=jwatt
This commit is contained in:
parent
65aad9ef5c
commit
7186fd81c3
13
layout/reftests/svg/image-fill-01.svg
Normal file
13
layout/reftests/svg/image-fill-01.svg
Normal 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" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<title>Testcase to ensure that fill is ignored for images</title>
|
||||
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
<rect width="64" height="64" fill="red"/>
|
||||
<image fill="none" width="64" height="64" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAJFJREFUaEPt1UEOg0AMBEHz/0ez8IY5zFqqKFdLkGrHz7yz/PO9wOrv7qf/81n983uBCwAl1EYgQCD8H5eQhCTUboAAgbCBcNwdaBdIgIAlbjdAgEDYQDjuDrQLJEDAErcbIEAgbCAcdwfaBRIgYInbDRAgEDYQjrsD7QIJELDE7QYIEAgbCMfdgXaBBAhkS3wAXsqyIo0zj4gAAAAASUVORK5CYII="/>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 823 B |
@ -79,6 +79,7 @@ include moz-only/reftest.list
|
||||
== gradient-live-01c.svg gradient-live-01-ref.svg
|
||||
== gradient-live-01d.svg gradient-live-01-ref.svg
|
||||
fails == inline-in-xul-basic-01.xul pass.svg
|
||||
== image-fill-01.svg pass.svg
|
||||
== image-scaling-01.svg pass.svg
|
||||
== image-scaling-02.svg pass.svg
|
||||
== invalid-text-01.svg pass.svg
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint);
|
||||
|
||||
// nsSVGPathGeometryFrame methods:
|
||||
NS_IMETHOD UpdateCoveredRegion();
|
||||
virtual PRUint16 GetHittestMask();
|
||||
|
||||
// nsIFrame interface:
|
||||
@ -306,7 +307,26 @@ nsSVGImageFrame::GetType() const
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGPathGeometryFrame methods:
|
||||
|
||||
// Lie about our fill/stroke so that hit detection works properly
|
||||
// Lie about our fill/stroke so that covered region and hit detection work properly
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGImageFrame::UpdateCoveredRegion()
|
||||
{
|
||||
mRect.Empty();
|
||||
|
||||
gfxContext context(nsSVGUtils::GetThebesComputationalSurface());
|
||||
|
||||
GeneratePath(&context);
|
||||
context.IdentityMatrix();
|
||||
|
||||
gfxRect extent = context.GetUserPathExtent();
|
||||
|
||||
if (!extent.IsEmpty()) {
|
||||
mRect = nsSVGUtils::ToAppPixelRect(PresContext(), extent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRUint16
|
||||
nsSVGImageFrame::GetHittestMask()
|
||||
|
@ -112,11 +112,11 @@ protected:
|
||||
|
||||
protected:
|
||||
virtual PRUint16 GetHittestMask();
|
||||
void GeneratePath(gfxContext *aContext,
|
||||
const gfxMatrix *aOverrideTransform = nsnull);
|
||||
|
||||
private:
|
||||
void Render(nsSVGRenderState *aContext);
|
||||
void GeneratePath(gfxContext *aContext,
|
||||
const gfxMatrix *aOverrideTransform = nsnull);
|
||||
|
||||
struct MarkerProperties {
|
||||
nsSVGMarkerProperty* mMarkerStart;
|
||||
|
Loading…
Reference in New Issue
Block a user