Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SVG element #12974

Closed
jdm opened this issue Aug 22, 2016 · 7 comments
Closed

Support SVG element #12974

jdm opened this issue Aug 22, 2016 · 7 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Aug 22, 2016

Spec: https://www.w3.org/TR/SVG11/struct.html#SVGElement

Goals:

  • create a SVGElement type that is created by the parser
  • support the width and height attributes
  • use these attributes to create a new fragment in layout with the appropriate width and height

Blocks #12973.

@jdm
Copy link
Member Author

@jdm jdm commented Aug 22, 2016

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Aug 23, 2016

For the SVGElement type, we'll need to:

  • add components/script/dom/webidls/SVGElement.webidl based on https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement
  • add [Pref="..."] to the interface
  • add an implementation of the interface at components/script/dom/svgelement.rs
  • add a case to create_element in components/script/dom/create.rs, behind a PREFS.get("...").as_boolean().unwrap_or(false) check, for svg-namespaced elements with the svg local name, that creates the new SVGElement class.
@splav
Copy link
Contributor

@splav splav commented Sep 22, 2016

I would like to take this one.

@jdm jdm added the C-assigned label Sep 22, 2016
@jdm
Copy link
Member Author

@jdm jdm commented Sep 22, 2016

Great! Please ask questions about anything that's unclear.

@wafflespeanut
Copy link
Member

@wafflespeanut wafflespeanut commented Oct 4, 2016

@splav Any news on this?

@splav
Copy link
Contributor

@splav splav commented Oct 4, 2016

@wafflespeanut the fragment creation is the only thing left. I think I'll finish it today or tomorrow.

@wafflespeanut
Copy link
Member

@wafflespeanut wafflespeanut commented Oct 4, 2016

Glad to hear :)

@splav splav mentioned this issue Oct 4, 2016
4 of 5 tasks complete
bors-servo added a commit that referenced this issue Oct 5, 2016
Support SVG element

<!-- Please describe your changes on the following line: -->
minimal SVG element implementation
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12974 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13589)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Oct 7, 2016
Support SVG element

<!-- Please describe your changes on the following line: -->
minimal SVG element implementation
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12974 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13589)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Oct 7, 2016
Support SVG element

<!-- Please describe your changes on the following line: -->
minimal SVG element implementation
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12974 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13589)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Oct 7, 2016
Support SVG element

<!-- Please describe your changes on the following line: -->
minimal SVG element implementation
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12974 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13589)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.