[Webkit-unassigned] [Bug 134186] Make it clear to get m_svgExtensions using svgExtensions()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 23 07:33:28 PDT 2014


--- Comment #12 from Jeongeun Kim <je_julie.kim at samsung.com>  2014-08-23 07:33:33 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > > > Source/WebCore/svg/SVGDocumentExtensions.h:76
> > > > -    const HashSet<SVGFontFaceElement*>& svgFontFaceElements() const { return m_svgFontFaceElements; }
> > > > +    const HashSet<SVGFontFaceElement*>& svgFontFaceElements() { return m_svgFontFaceElements; }
> > > 
> > > How did you come to the decision to make this function non-const?
> > Actually, that is one of my worries and the part that I'd like to hear your opinion. 
> > I changed it to non-const and it's according to change of  'svgExtensions()' but I think it's not good.
> > Do I need to keep 'const SVGDocumentExtensions* svgExtensions()' for this part?
> I don't know at the moment. I will look through the code shortly. Can you save me some time and elaborate on the callers of svgFontFaceElements()? Regardless, it doesn't seem correct to make svgFontFaceElements() non-const given that it doesn't modify state.

When StyleResolver is created, svg font face rules are added to fontSelector using svgFontFaceElements through iterating svgFontFaceElements(). That code is located at StyleResolver::StyleResolver(Document& document, bool matchAuthorAndUserStyles) in StyleResolver.cpp.
At that time, it's used only for collecting data without any modification. 

The field, m_svgFontFaceElements, which is gotten from svgFontFaceElements(),
is collected when SVGFontFaceElement is inserted at SVGFontFaceElement::insertedInto.


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