Closed
Bug 193825
Opened 22 years ago
Closed 20 years ago
implement <svg:clipPath>
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: harald.albrecht, Assigned: tor)
References
Details
Attachments
(3 files, 7 obsolete files)
|
489 bytes,
image/svg+xml
|
Details | |
|
18.89 KB,
patch
|
scootermorris
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
|
62.35 KB,
patch
|
scootermorris
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3b) Gecko/20030130
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3b) Gecko/20030130
Instead of clipping away everthing outside the clip path, Mozilla draws
everything outside and the part covered by the clip path is just black (problem
with the clip mask?).
Reproducible: Always
Steps to Reproduce:
1. load the attached example svg in Mozilla
Actual Results:
The part covered by the clip path is drawn in black. All other parts of the
graphic that should have been clipped away appear normally.
Expected Results:
Only the part of the graphic within the clipped part should be drawn.
| Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•21 years ago
|
||
The problem here is that <clipPath> is not recognised by Mozilla SVG yet, so the
clipPath is not applied. Worse, because Mozilla SVG transparently ignores
unknown tags (by creating a nsSVGGenericContainerFrame for them), the SVG
content contained within the clipPath gets drawn.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: using "clip-path" results in clip path appearing as a black filled shape over all other graphics → implement <svg:clipPath>
Attachment #158798 -
Attachment is obsolete: true
Attachment #160276 -
Attachment is obsolete: true
Comment 7•21 years ago
|
||
(In reply to comment #5)
> Created an attachment (id=163745)
> changes to shared mozilla files
>
Is there a reason that mClipPath is not part of the constructor for nsStyleSVG,
etc, like mClipRule?
Comment 8•21 years ago
|
||
Comment on attachment 163746 [details] [diff] [review]
changes/new svg-only files
>Index: content/svg/content/src/nsSVGClipPathElement.cpp
>===================================================================
>RCS file: content/svg/content/src/nsSVGClipPathElement.cpp
>diff -N content/svg/content/src/nsSVGClipPathElement.cpp
>--- /dev/null 1 Jan 1970 00:00:00 -0000
>+++ content/svg/content/src/nsSVGClipPathElement.cpp 28 Oct 2004 20:48:15 -0000
>+
>+/* readonly attribute nsIDOMSVGAnimatedEnumeration gradientUnits; */
Looks like the wrong comment...
>+NS_IMETHODIMP nsSVGClipPathElement::GetClipPathUnits(nsIDOMSVGAnimatedEnumeration * *aClipPathUnits)
>+{
>Index: dom/public/idl/svg/nsIDOMSVGClipPathElement.idl
>===================================================================
>RCS file: dom/public/idl/svg/nsIDOMSVGClipPathElement.idl
>diff -N dom/public/idl/svg/nsIDOMSVGClipPathElement.idl
>--- /dev/null 1 Jan 1970 00:00:00 -0000
>+++ dom/public/idl/svg/nsIDOMSVGClipPathElement.idl 28 Oct 2004 20:48:15 -0000
>+{
>+ // Extended to provide enumerations for gradientUnits
Same wrong comment....
>+ // These constants are taken from SVGUnitTypes
>+ const unsigned short SVG_CPUNITS_UNKNOWN = 0;
>+ const unsigned short SVG_CPUNITS_OBJECTBOUNDINGBOX = 1;
>+ const unsigned short SVG_CPUNITS_USERSPACEONUSE = 2;
>+
>+ readonly attribute nsIDOMSVGAnimatedEnumeration clipPathUnits;
>+};
>Index: layout/svg/base/src/nsSVGClipPathFrame.cpp
>===================================================================
>RCS file: layout/svg/base/src/nsSVGClipPathFrame.cpp
>diff -N layout/svg/base/src/nsSVGClipPathFrame.cpp
>+NS_IMETHODIMP
>+nsSVGClipPathFrame::QueryInterface(REFNSIID aIID, void** aInstancePtr)
>+{
>+ if (nsnull == aInstancePtr) {
>+ return NS_ERROR_NULL_POINTER;
>+ }
>+ if (aIID.Equals(nsSVGClipPathFrame::GetCID())) {
>+ *aInstancePtr = (void*)(nsSVGClipPathFrame*)this;
>+ NS_ADDREF_THIS();
>+ return NS_OK;
>+ }
>+ return (nsSVGDefsFrame::QueryInterface(aIID, aInstancePtr));
>+}
Hmmmm.. the need for a specific version of QueryInterface keeps coming up. Did
anyone ever
respond with any approach that would allow you to avoid overloading
QueryInterface?
mClipPath is part of nsStyleSVGReset instead, as the property does not inherit.
No, discussion hasn't turned up a simpler way of doing the QI.
Attachment #163746 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•21 years ago
|
||
Attachment #163745 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•21 years ago
|
||
Attachment #164246 -
Attachment is obsolete: true
| Assignee | ||
Comment 12•20 years ago
|
||
Attachment #166243 -
Attachment is obsolete: true
Attachment #169870 -
Flags: review?(scootermorris)
| Assignee | ||
Comment 13•20 years ago
|
||
Attachment #166244 -
Attachment is obsolete: true
Attachment #169871 -
Flags: review?(scootermorris)
Comment 14•20 years ago
|
||
Comment on attachment 169870 [details] [diff] [review]
changes to shared mozilla files (update to tip, fixes)
scooter/r+
Attachment #169870 -
Flags: review?(scootermorris) → review+
Comment 15•20 years ago
|
||
Comment on attachment 169871 [details] [diff] [review]
changes/new svg-only files (update to tip, fixes)
scooter/r+
Attachment #169871 -
Flags: review?(scootermorris) → review+
Attachment #169870 -
Flags: superreview?(dbaron)
Comment on attachment 169870 [details] [diff] [review]
changes to shared mozilla files (update to tip, fixes)
You should add to nsStyleContext::DumpRegressionData.
in nsStyleSVGReset constructor, use nsnull rather than NULL
in nsStyleSVG, put all the PRUint8 values next to each other so the struct
packs better (and perhaps separate the others by type as well, int8, int32,
pointer and float), preferably starting with the larger things (i.e., pointer,
float, int32, int8)
Attachment #169870 -
Flags: superreview?(dbaron) → superreview+
| Assignee | ||
Comment 17•20 years ago
|
||
Checked in. Reordering nsStyleSVG reduced it from 88 to 76 bytes.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•