[Webkit-unassigned] [Bug 126133] Make CachedSVGDocument independent of CSS Filters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 22 11:05:14 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=126133





--- Comment #6 from Dirk Schulze <krit at webkit.org>  2013-12-22 11:03:13 PST ---
(In reply to comment #5)
> (From update of attachment 219870 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219870&action=review
> 
> > Source/WebCore/loader/SVGDocumentConsumer.h:46
> > +class SVGDocumentConsumer {
> > +public:
> > +    CachedSVGDocumentReference* cachedSVGDocumentReference() const { return m_cachedSVGDocumentReference.get(); }
> > +    void setCachedSVGDocumentReference(PassOwnPtr<CachedSVGDocumentReference> cachedSVGDocumentReference) { m_cachedSVGDocumentReference = cachedSVGDocumentReference; }
> > +
> > +private:
> > +    OwnPtr<CachedSVGDocumentReference> m_cachedSVGDocumentReference;
> > +};    
> 
> This class is just a pointer. I don't see why we are introducing it and making code more abstract. Also name seem off. It doesn't 'consume' anything.

I think there is a misunderstanding. I do not try to fix the layer violation with this patch. Right now, CachedSVGDocumentReference can just be used by FilterOperation (specifically ReferencedFilterOperation). We have more situations like clip-path, SVG patterns and gradients that can be referenced from external resources as well. These operators need access to CachedSVGDocumentReference as well. See next paragraph...

> 
> We use unique_ptr not OwnPtr.

Takes some time to adapt to "new" C++ rules. Thanks.

> 
> > Source/WebCore/platform/graphics/filters/FilterOperation.h:160
> > +class ReferenceFilterOperation : public FilterOperation, public SVGDocumentConsumer {
> 
> Why is ReferenceFilterOperation inheriting SVGDocumentConsumer instead of having one as a member?

The abstraction SVGDocumentConsumer is used to access the CachedSVGDocumentReference. All inheriting classes are "consuming" CachedSVGDocumentReference that is why I think SVGDocumentConsumer is the right name.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list