NEW101243
Add an SVG content model test
https://bugs.webkit.org/show_bug.cgi?id=101243
Summary Add an SVG content model test
Florin Malita
Reported 2012-11-05 12:04:49 PST
In support of https://bugs.webkit.org/show_bug.cgi?id=101216, we need a test to cover content model validation. The approach I'm currently exploring relies on window.internals.elementRenderTreeAsText() to check whether renderers are created for various parent/child SVG element combinations. Parsing DRT output is somewhat frail - if it turns out to not be viable maybe we could extend the window.internals API with something like hasRenderer(element).
Attachments
Patch (11.49 KB, patch)
2012-11-05 12:15 PST, Florin Malita
no flags
Patch (11.53 KB, patch)
2012-11-12 07:45 PST, Florin Malita
krit: review+
Florin Malita
Comment 1 2012-11-05 12:15:24 PST
Florin Malita
Comment 2 2012-11-05 12:20:25 PST
The patch is intended to be a flexible skeleton for SVG content validation. Adding a new element test should be as easy as adding a new validateTag() call and maybe some minor property tweaks in svgtags.js: validateTag('dasTag', [ 'validChild1', 'validChild2', 'VALID_CLASS1',...]);
Build Bot
Comment 3 2012-11-05 16:39:23 PST
Comment on attachment 172375 [details] Patch Attachment 172375 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14679337 New failing tests: svg/dom/content-model.html
Nikolas Zimmermann
Comment 4 2012-11-09 23:11:36 PST
Comment on attachment 172375 [details] Patch Looks good to me Florin, can you comment on the Mac ews error? svg/dom/content-model.html [ Failure ] Seems like the result doesn't match on Mac?
Florin Malita
Comment 5 2012-11-12 07:32:20 PST
(In reply to comment #4) > (From update of attachment 172375 [details]) > Looks good to me Florin, can you comment on the Mac ews error? > > svg/dom/content-model.html [ Failure ] > > Seems like the result doesn't match on Mac? Thanks Niko, I finally got around to test on a Mac: silly return outside a function causing syntax errors :) I'll update momentarily.
Florin Malita
Comment 6 2012-11-12 07:45:49 PST
Florin Malita
Comment 7 2012-11-26 09:51:43 PST
Bump.
Dirk Schulze
Comment 8 2012-11-26 10:12:50 PST
Comment on attachment 173646 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=173646&action=review > LayoutTests/svg/dom/resources/svgtags.js:28 > + feDiffuseLighting: { needParent: 'filter', needChld: [ 'fePointLight' ] }, This and other element descriptions are not complete. Can you add a FIXME that points that out, or make it complete please? Other then that, looks great.
Dirk Schulze
Comment 9 2013-02-15 23:48:35 PST
Comment on attachment 173646 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=173646&action=review >> LayoutTests/svg/dom/resources/svgtags.js:28 >> + feDiffuseLighting: { needParent: 'filter', needChld: [ 'fePointLight' ] }, > > This and other element descriptions are not complete. Can you add a FIXME that points that out, or make it complete please? Other then that, looks great. A short note that this should be extended at the beginning might be enough. r=me.
Note You need to log in before you can comment on or make changes to this bug.