Bug 141374

Summary: Make SVGUseElement work without creating any SVGElementInstance objects
Product: WebKit Reporter: Darin Adler <darin>
Component: SVGAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, andersca, bfulgham, sabouhallawa, sam, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 140602    
Attachments:
Description Flags
Patch sam: review+

Description Darin Adler 2015-02-08 13:58:25 PST
Make SVGUseElement work without creating any SVGElementInstance objects
Comment 1 Darin Adler 2015-02-08 14:32:28 PST
Created attachment 246250 [details]
Patch
Comment 2 Sam Weinig 2015-02-08 15:13:15 PST
Comment on attachment 246250 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246250&action=review

> Source/WebCore/dom/TypedElementDescendantIterator.h:83
> +template<typename ElementType> class DoubleTypedElementDescendantIteratorAdapter {

A part of me says this should really be MultipleTypedElementDescendantIteratorAdapter and use a std::tuple. Another part of me says that can wait until someone needs TripleTypedElementDescendantIteratorAdapter.

> Source/WebCore/svg/SVGUseElement.cpp:500
> +    // This can be combined with buildShadowTree.

Seems like this should either be a FIXME or just done now.
Comment 3 Darin Adler 2015-02-08 15:20:42 PST
Comment on attachment 246250 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246250&action=review

>> Source/WebCore/dom/TypedElementDescendantIterator.h:83
>> +template<typename ElementType> class DoubleTypedElementDescendantIteratorAdapter {
> 
> A part of me says this should really be MultipleTypedElementDescendantIteratorAdapter and use a std::tuple. Another part of me says that can wait until someone needs TripleTypedElementDescendantIteratorAdapter.

I think I would have done it that way if I knew how.

>> Source/WebCore/svg/SVGUseElement.cpp:500
>> +    // This can be combined with buildShadowTree.
> 
> Seems like this should either be a FIXME or just done now.

Made it a FIXME.
Comment 4 Darin Adler 2015-02-08 15:22:28 PST
Committed r179807: <http://trac.webkit.org/changeset/179807>
Comment 5 Alex Christensen 2015-02-10 09:15:10 PST
Something about the associateClonesWithOriginals, associateReplacementCloneWithOriginal, and associateReplacementClonesWithOriginals helpers makes Visual Studio crash and complain that it is too complex.
Comment 6 Brent Fulgham 2015-02-10 11:09:49 PST
(In reply to comment #5)
> Something about the associateClonesWithOriginals,
> associateReplacementCloneWithOriginal, and
> associateReplacementClonesWithOriginals helpers makes Visual Studio crash
> and complain that it is too complex.

Are you seeing this locally? I have to see what EWS is complaining about.

If you are having trouble with a local build, make sure you are using VS2013 SP4. They fixed some compiler bugs that might be relevant here.
Comment 7 Alex Christensen 2015-02-10 13:25:39 PST
It also caused the buildbots to fail.  

https://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/85440/steps/compile-webkit/logs/stdio

SVGAllInOne.obj is probably 0 bytes because of this problem.
Comment 8 Alex Christensen 2015-02-10 21:59:11 PST
Fixed with https://bugs.webkit.org/show_bug.cgi?id=141461