diff options
Diffstat (limited to 'WebCore/svg')
-rw-r--r-- | WebCore/svg/SVGDocumentExtensions.cpp | 8 | ||||
-rw-r--r-- | WebCore/svg/SVGFont.cpp | 2 | ||||
-rw-r--r-- | WebCore/svg/SVGFontFaceElement.cpp | 5 | ||||
-rw-r--r-- | WebCore/svg/SVGFontFaceElement.h | 4 |
4 files changed, 14 insertions, 5 deletions
diff --git a/WebCore/svg/SVGDocumentExtensions.cpp b/WebCore/svg/SVGDocumentExtensions.cpp index 3fd9761..7f7ba67 100644 --- a/WebCore/svg/SVGDocumentExtensions.cpp +++ b/WebCore/svg/SVGDocumentExtensions.cpp @@ -93,8 +93,12 @@ void SVGDocumentExtensions::startAnimations() // FIXME: Eventually every "Time Container" will need a way to latch on to some global timer // starting animations for a document will do this "latching" #if ENABLE(SVG_ANIMATION) - HashSet<SVGSVGElement*>::iterator end = m_timeContainers.end(); - for (HashSet<SVGSVGElement*>::iterator itr = m_timeContainers.begin(); itr != end; ++itr) + // FIXME: We hold a ref pointers to prevent a shadow tree from getting removed out from underneath us. + // In the future we should refactor the use-element to avoid this. See https://webkit.org/b/53704 + Vector<RefPtr<SVGSVGElement> > timeContainers; + timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end()); + Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); + for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin(); itr != end; ++itr) (*itr)->timeContainer()->begin(); #endif } diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp index 898c259..25dbbe3 100644 --- a/WebCore/svg/SVGFont.cpp +++ b/WebCore/svg/SVGFont.cpp @@ -241,7 +241,7 @@ struct SVGTextRunWalker { { ASSERT(0 <= from && from <= to && to - from <= run.length()); - const String text = Font::normalizeSpaces(String(run.data(from), run.length())); + const String text = Font::normalizeSpaces(String(run.data(from), to - from)); Vector<SVGGlyphIdentifier::ArabicForm> chars(charactersWithArabicForm(text, run.rtl())); SVGGlyphIdentifier identifier; diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp index 515ce04..97f457d 100644 --- a/WebCore/svg/SVGFontFaceElement.cpp +++ b/WebCore/svg/SVGFontFaceElement.cpp @@ -262,6 +262,11 @@ String SVGFontFaceElement::fontFamily() const return m_styleDeclaration->getPropertyValue(CSSPropertyFontFamily); } +SVGFontElement* SVGFontFaceElement::associatedFontElement() const +{ + return m_fontElement.get(); +} + void SVGFontFaceElement::rebuildFontFace() { ASSERT(inDocument()); diff --git a/WebCore/svg/SVGFontFaceElement.h b/WebCore/svg/SVGFontFaceElement.h index 3ee71d8..ead2e1f 100644 --- a/WebCore/svg/SVGFontFaceElement.h +++ b/WebCore/svg/SVGFontFaceElement.h @@ -47,7 +47,7 @@ namespace WebCore { int descent() const; String fontFamily() const; - SVGFontElement* associatedFontElement() const { return m_fontElement; } + SVGFontElement* associatedFontElement() const; void rebuildFontFace(); void removeFromMappedElementSheet(); @@ -63,7 +63,7 @@ namespace WebCore { RefPtr<CSSFontFaceRule> m_fontFaceRule; RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration; - SVGFontElement* m_fontElement; + RefPtr<SVGFontElement> m_fontElement; }; } // namespace WebCore |