Closed
Bug 354295
Opened 19 years ago
Closed 19 years ago
Gecko should change their fill="url(#invalidurl)" behavior to match Opera/Safari
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: mozilla, Assigned: longsonr)
References
Details
Attachments
(3 files, 3 obsolete files)
|
695 bytes,
image/svg+xml
|
Details | |
|
3.72 KB,
patch
|
roc
:
superreview+
|
Details | Diff | Splinter Review |
|
3.60 KB,
patch
|
tor
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Gecko should change their fill="url(#invalidurl)" behavior to match Opera/Safari
The SVG 1.1 FULL specification states that when an invalid paintserver URL is provided for fill/stroke, the document is "in error" and a "highly percievable error" message should be displayed.
No browser has any plans to implement these error messages however.
As a result, we've all implemented some sort of "fill fallback" behavior. Opera and (recently) Safari have chosen to fall back to 'black' (the default value) on an invalid fill. Gecko falls back to 'none'.
After discussing this with tor, we agree Gecko should change to match Safari/Opera in this instance.
Reproducible: Always
Steps to Reproduce:
See attached test case.
| Reporter | ||
Comment 1•19 years ago
|
||
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 2•19 years ago
|
||
Shouldn't we log an error in the Error Console in addition to this?
Comment 3•19 years ago
|
||
Sounds good to me.
| Assignee | ||
Comment 4•19 years ago
|
||
I've done the same thing for invalid strokes in that they will also default to black.
I also ignore the opacity if there is an error in order to make the black more obvious but I could continue to use the actual value instead.
| Assignee | ||
Updated•19 years ago
|
Attachment #245469 -
Flags: review?(tor)
Robert, did you want to add logging for this error?
Eric, does webkit respect the fill/stroke opacity in this situation?
| Assignee | ||
Comment 6•19 years ago
|
||
Attachment #245469 -
Attachment is obsolete: true
Attachment #245474 -
Flags: review?(tor)
That will spew a warning each time a invalid referenced gradient/pattern is painted or sized.
Comment 8•19 years ago
|
||
I don't think we should warn in this case. It's useful for things like gradient reference loops where it could be hard for the SVG author to track down the cause, but in this case it's fairly obvious where to look if things don't work.
| Assignee | ||
Comment 9•19 years ago
|
||
Attachment #245474 -
Attachment is obsolete: true
Attachment #245550 -
Flags: review?(tor)
Attachment #245474 -
Flags: review?(tor)
Attachment #245550 -
Flags: review?(tor) → review+
Updated•19 years ago
|
OS: Mac OS X 10.3 → All
| Assignee | ||
Comment 10•19 years ago
|
||
same as previous patch with addition of const to static variable.
Attachment #245550 -
Attachment is obsolete: true
Attachment #245563 -
Flags: superreview?(roc)
Attachment #245563 -
Flags: superreview?(roc) → superreview+
| Assignee | ||
Comment 11•19 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 12•19 years ago
|
||
Robert...
> I've done the same thing for invalid strokes in that they will also default to
> black.
The default stroke is "none" not "black". So I don't follow your logic.
> I also ignore the opacity if there is an error in order to make the black more
> obvious but I could continue to use the actual value instead.
WebKit would continue to respect the opacity I believe. It's a separate property. I'm not sure what Opera does. Unfortunately I'm not working on SVG much anymore...
| Reporter | ||
Comment 13•19 years ago
|
||
Either way. I'm not sure that it matters much. I'll leave the current SVG hackers to debate this all later. Thanks for the fix!
| Assignee | ||
Comment 14•19 years ago
|
||
(In reply to comment #12)
> Robert...
>
> > I've done the same thing for invalid strokes in that they will also default to
> > black.
>
> The default stroke is "none" not "black". So I don't follow your logic.
I mean that if you specify that an invalid stroke URL, you would now get a black stroke rather than no stroke.
>
> > I also ignore the opacity if there is an error in order to make the black more
> > obvious but I could continue to use the actual value instead.
>
> WebKit would continue to respect the opacity I believe. It's a separate
> property. I'm not sure what Opera does. Unfortunately I'm not working on SVG
> much anymore...
>
Tor, would you like me to produce another patch to honour opacity.
| Reporter | ||
Comment 15•19 years ago
|
||
> > The default stroke is "none" not "black". So I don't follow your logic.
> I mean that if you specify that an invalid stroke URL, you would now get a
> black stroke rather than no stroke.
I was referring to the fact that this bug was all about how previously invalid fills in Gecko were "none" instead of the default value of "black". This bug was to correct that. Now this patch has changed invalid strokes from the default value of "none" to "black". ;) So following the original intention of the bug, the fix is both a fix and a "regression".
Again, this is a super-minor-edgecase issue. I was just pointing out our logic-discrepancies.
Comment 16•19 years ago
|
||
FWIW, I agree with Eric, stroke and opacity should be fixed.
| Assignee | ||
Comment 17•19 years ago
|
||
Attachment #245758 -
Flags: superreview?(tor)
Attachment #245758 -
Flags: review?(tor)
Attachment #245758 -
Flags: superreview?(tor)
Attachment #245758 -
Flags: superreview+
Attachment #245758 -
Flags: review?(tor)
Attachment #245758 -
Flags: review+
| Assignee | ||
Comment 18•19 years ago
|
||
(In reply to comment #17)
> Created an attachment (id=245758) [edit]
> revert stroke change and honour opacity
>
Checked in.
You need to log in
before you can comment on or make changes to this bug.
Description
•