Closed
Bug 238327
Opened 20 years ago
Closed 20 years ago
implement <svg:style>
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
References
Details
Attachments
(3 files, 2 obsolete files)
238 bytes,
text/xml
|
Details | |
18.86 KB,
patch
|
alex
:
review+
|
Details | Diff | Splinter Review |
14.34 KB,
patch
|
peterv
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Patch comming up
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #144528 -
Flags: review?(alex)
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #144529 -
Flags: superreview?(jst)
Attachment #144529 -
Flags: review?(jst)
Assignee | ||
Comment 3•20 years ago
|
||
Peter: could you have a look at the transformiix changes? They should be very straitforward.
Assignee | ||
Comment 4•20 years ago
|
||
Note that the new element requires a type="text/css" attribute, as required by spec. The adobe plugin also requires the attribute so I think it should be fine that we follow the spec.
Comment 5•20 years ago
|
||
Comment on attachment 144529 [details] [diff] [review] changes to non-svg code r+sr=jst
Attachment #144529 -
Flags: superreview?(jst)
Attachment #144529 -
Flags: superreview+
Attachment #144529 -
Flags: review?(jst)
Attachment #144529 -
Flags: review+
Assignee | ||
Comment 6•20 years ago
|
||
Forgot to diff the mozilla/dom directory
Attachment #144528 -
Attachment is obsolete: true
Assignee | ||
Comment 7•20 years ago
|
||
Same here, exact same patch as previous but including changes to mozilla/dom directory
Attachment #144529 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #144540 -
Flags: superreview?(jst)
Attachment #144540 -
Flags: review?(peterv)
Assignee | ||
Updated•20 years ago
|
Attachment #144539 -
Flags: review?(alex)
Assignee | ||
Updated•20 years ago
|
Attachment #144528 -
Flags: review?(alex)
Assignee | ||
Comment 8•20 years ago
|
||
Comment on attachment 144540 [details] [diff] [review] changes to non-svg code Ack, didn't see that the previous version was already reviewed (yay, that was fast!). Anyway, this patch is exactly the same as previous, i've just appended the dom-changes. Jst, could you r/sr those too? I marked peterv as reviewer so that he can take a look at the transformiix changes.
Comment 9•20 years ago
|
||
Comment on attachment 144540 [details] [diff] [review] changes to non-svg code sr=jst
Attachment #144540 -
Flags: superreview?(jst) → superreview+
Comment 10•20 years ago
|
||
Comment on attachment 144539 [details] [diff] [review] svg-changes r=afri >Index: content/shared/public/nsSVGAtomList.h >=================================================================== >+SVG_ATOM(space, "sacee") Should be "space". Also we should probably add some code to nsCSSFrameConstructor to not build frames for <style> (and <script>) elements. I can put that into the <script> patch if you want.
Attachment #144539 -
Flags: review?(alex) → review+
Comment 11•20 years ago
|
||
Comment on attachment 144539 [details] [diff] [review] svg-changes >Index: content/svg/content/src/nsSVGStyleElement.cpp >=================================================================== >+ * Contributor(s): >+ * Alex Fritze <alex.fritze@crocodile-clips.com> (original author) You should also remove me from the contributor list here.
Comment 12•20 years ago
|
||
> Also we should probably add some code to nsCSSFrameConstructor to not build
> frames for <style> (and <script>) elements. I can put that into the <script>
> patch if you want.
For HTML, that should be covered by ua.css (which sets those elements to
display:none); for SVG, that should be covered by the "foreign elements in an
SVG context have no frames" stuff. No?
Comment 13•20 years ago
|
||
(In reply to comment #12) > > Also we should probably add some code to nsCSSFrameConstructor to not build > > frames for <style> (and <script>) elements. I can put that into the <script> > > patch if you want. > > For HTML, that should be covered by ua.css (which sets those elements to > display:none); for SVG, that should be covered by the "foreign elements in an > SVG context have no frames" stuff. No? Well, this is about native <svg:style> & <svg:script>, so doesn't fall under either of these cases afaics. We could do something similar to HTML & set these elements as display:none in the svg useragent css file, but even then we need some hacking in nsCSSFrameCTOR to correctly handle 'display:none' for SVG.
Comment 14•20 years ago
|
||
>> for SVG, that should be covered by the "foreign elements in an
>> SVG context have no frames" stuff. No?
>
> Well, this is about native <svg:style> & <svg:script>, so doesn't fall under
> either of these cases afaics.
Wouldn't svg:script count as a foreign element, unless it has an explicit
mapping to an SVG primitive? I don't know how our SVG frame constructor works,
so I'll just shut up now. :-)
Comment 15•20 years ago
|
||
(In reply to comment #14) > Wouldn't svg:script count as a foreign element, unless it has an explicit > mapping to an SVG primitive? No, we build generic svg container frames for unknown SVG elements. The reason is to get XBL-bindings working. Consider <binding id="foo" extends="svg:generic">. Here the frame constructor will generate an svg container frame because it sees the unknown svg tag 'generic'. We build frames for 'real' foreign content btw. But that's ok in my opinion since for valid svg docs there shouldn't be any foreign content in an svg context anyway (unless of course in <svg:foreignObject>).
Assignee | ||
Comment 16•20 years ago
|
||
Adding 'svg|script, svg|style { display: none }' to ua.css, and making the css-frameconstructor honor that seems like the right solution to me. That way you can also do 'svg|circle { display:none }' and have all circles hidden, which i think would be kind'a cool
Comment 17•20 years ago
|
||
(In reply to comment #16) > Adding 'svg|script, svg|style { display: none }' to ua.css, and making the > css-frameconstructor honor that seems like the right solution to me. That way > you can also do 'svg|circle { display:none }' and have all circles hidden, which > i think would be kind'a cool layout/svg/base/src/svg.css gets pulled into ua.css, so that'll be the right place. Thinking about it, the frame constructor might already be honouring display:none, even for svg content.
Assignee | ||
Comment 18•20 years ago
|
||
display:none works fine, i.e. the element is not rendered (and I would assume no frame is created for it). Which is as it should be according to: http://www.w3.org/TR/SVG10/painting.html#DisplayProperty So i'll add the following to svg.css: style { display: none; }
Comment 19•20 years ago
|
||
Comment on attachment 144540 [details] [diff] [review] changes to non-svg code We're a bit inconsistent between normal element creation and XSLT element creation, since XSLT checks by QIing to nsIStyleSheetLinkingElement and doesn't look at the tag at all, maybe somehing we should think about synching. IsContentOfType(eSTYLE)?
Attachment #144540 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 20•20 years ago
|
||
jst didn't want an eSTYLE (which i sort of understand). We did come up with an idea that should compleatly remove the need for the sink/resulthandler to know about style-elements though. I'll file a separate bug on that.
Assignee | ||
Comment 21•20 years ago
|
||
Checked in. Thanks for reviews!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 22•20 years ago
|
||
I think that comment #10 below got overlooked. The "space" atom is still "sacee" in the checked in code.
Assignee | ||
Comment 23•20 years ago
|
||
Thanks! Fixed that and the licenceerror from comment 11
Comment 24•20 years ago
|
||
*** Bug 236044 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•