Open
Bug 832483
Opened 11 years ago
Updated 2 years ago
Let context-fill, context-stroke values be used as colours
Categories
(Core :: SVG, defect)
Tracking
()
NEW
People
(Reporter: eflores, Unassigned)
References
Details
Attachments
(3 files)
114.16 KB,
patch
|
Details | Diff | Splinter Review | |
8.67 KB,
patch
|
Details | Diff | Splinter Review | |
31.14 KB,
patch
|
Details | Diff | Splinter Review |
In the current SVG fonts implementation, context-fill and context-stroke are valid paint values, but not colours. It would be useful to use the fallback colour when either is used in a colour property, e.g. stop-color.
Reporter | ||
Comment 2•11 years ago
|
||
Attachment #719779 -
Flags: review?(roc)
Reporter | ||
Comment 3•11 years ago
|
||
Let context-fill and context-stroke be used in stop-color, and context-fill-opacity and context-stroke-opacity be used in stop-opacity. Not marking r? yet as waiting to hear whether we can unprefix the context-* values.
Reporter | ||
Comment 4•11 years ago
|
||
Attachment #719781 -
Flags: review?(roc)
Comment on attachment 719781 [details] [diff] [review] Non-style system changes Review of attachment 719781 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/svg/nsSVGStopFrame.h @@ +21,5 @@ > + NS_NewSVGStopFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); > + > + bool mIsResolved; > + nscolor mStopColor; > + float mStopOpacity; These should go at the end of the class, by convention. Is it really worth caching mStopColor/mStopOpacity?
Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5) > Is it really worth caching mStopColor/mStopOpacity? There are uses where the context fill/stroke won't be visible, so we have to cache these. A (very) contrived example would be if a document D were to use an SVG glyph G, which itself used an SVG glyph H; then G has a gradient which uses context-fill to get the fill colour from D; and then H uses context-fill to use that gradient from G.
Why can't we get the colors on-demand via mFillPattern in that case?
Attachment #719781 -
Flags: review?(roc)
Attachment #719779 -
Flags: review?(roc)
Reporter | ||
Updated•8 years ago
|
Assignee: edwin → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•