Changeset 57779 in webkit


Ignore:
Timestamp:
Apr 17, 2010 6:37:55 AM (14 years ago)
Author:
jchaffraix@webkit.org
Message:

Crash while handling SVG font in the wrong namespace imported with @font-face
https://bugs.webkit.org/show_bug.cgi?id=18862

Reviewed by Darin Adler.

WebCore:

Test: fast/invalid/invalidSVGFont.html

  • loader/CachedFont.cpp:

(WebCore::CachedFont::getSVGFontById): Make sure we really get an SVGFontElement by using
getElementsByNameNS: the element factory chooses which element to create based on both
localName and namespace.

LayoutTests:

Test that load an SVG document not in the SVG namespace with @font-face does not
lead to a crash.

  • fast/invalid/invalidSVGFont-expected.txt: Added.
  • fast/invalid/invalidSVGFont.html: Added.
  • fast/invalid/resources/svgFontWrongNamespace.svg: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r57776 r57779  
     12010-04-17  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Crash while handling SVG font in the wrong namespace imported with @font-face
     6        https://bugs.webkit.org/show_bug.cgi?id=18862
     7
     8        Test that load an SVG document not in the SVG namespace with @font-face does not
     9        lead to a crash.
     10
     11        * fast/invalid/invalidSVGFont-expected.txt: Added.
     12        * fast/invalid/invalidSVGFont.html: Added.
     13        * fast/invalid/resources/svgFontWrongNamespace.svg: Added.
     14
    1152010-04-16  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/WebCore/ChangeLog

    r57776 r57779  
     12010-04-17  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Crash while handling SVG font in the wrong namespace imported with @font-face
     6        https://bugs.webkit.org/show_bug.cgi?id=18862
     7
     8        Test: fast/invalid/invalidSVGFont.html
     9
     10        * loader/CachedFont.cpp:
     11        (WebCore::CachedFont::getSVGFontById): Make sure we really get an SVGFontElement by using
     12        getElementsByNameNS: the element factory chooses which element to create based on both
     13        localName and namespace.
     14
    1152010-04-16  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/WebCore/loader/CachedFont.cpp

    r56412 r57779  
    158158{
    159159    ASSERT(m_isSVGFont);
    160     RefPtr<NodeList> list = m_externalSVGDocument->getElementsByTagName(SVGNames::fontTag.localName());
     160    RefPtr<NodeList> list = m_externalSVGDocument->getElementsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName());
    161161    if (!list)
    162162        return 0;
Note: See TracChangeset for help on using the changeset viewer.