Changeset 74622 in webkit


Ignore:
Timestamp:
Dec 24, 2010 2:38:53 AM (13 years ago)
Author:
jschuh@chromium.org
Message:

2010-12-24 Justin Schuh <jschuh@chromium.org>

Reviewed by Darin Adler.

SVGFontFaceElement::rebuildFontFace() should exit when not in document
https://bugs.webkit.org/show_bug.cgi?id=51571

  • svg/custom/use-invalid-font-face-expected.txt: Added.
  • svg/custom/use-invalid-font-face.svg: Added.

2010-12-24 Justin Schuh <jschuh@chromium.org>

Reviewed by Darin Adler.

SVGFontFaceElement::rebuildFontFace() should exit when not in document
https://bugs.webkit.org/show_bug.cgi?id=51571

We were hitting a NULL deref crash. Since most of the callers checked
inDocument() anyway, I moved it into the start of rebuildFontFace.

Test: svg/custom/use-invalid-font-face.svg

  • svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::parseMappedAttribute): (WebCore::SVGFontFaceElement::rebuildFontFace): (WebCore::SVGFontFaceElement::childrenChanged):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r74614 r74622  
     12010-12-24  Justin Schuh  <jschuh@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        SVGFontFaceElement::rebuildFontFace() should exit when not in document
     6        https://bugs.webkit.org/show_bug.cgi?id=51571
     7
     8        * svg/custom/use-invalid-font-face-expected.txt: Added.
     9        * svg/custom/use-invalid-font-face.svg: Added.
     10
    1112010-12-23  Yuta Kitamura  <yutak@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r74619 r74622  
     12010-12-24  Justin Schuh  <jschuh@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        SVGFontFaceElement::rebuildFontFace() should exit when not in document
     6        https://bugs.webkit.org/show_bug.cgi?id=51571
     7
     8        We were hitting a NULL deref crash. Since most of the callers checked
     9        inDocument() anyway, I moved it into the start of rebuildFontFace.
     10
     11        Test: svg/custom/use-invalid-font-face.svg
     12
     13        * svg/SVGFontFaceElement.cpp:
     14        (WebCore::SVGFontFaceElement::parseMappedAttribute):
     15        (WebCore::SVGFontFaceElement::rebuildFontFace):
     16        (WebCore::SVGFontFaceElement::childrenChanged):
     17
    1182010-12-24  Justin Schuh  <jschuh@chromium.org>
    219
  • trunk/WebCore/svg/SVGFontFaceElement.cpp

    r74493 r74622  
    115115    if (propId > 0) {
    116116        m_styleDeclaration->setProperty(propId, attr->value(), false);
    117         if (inDocument())
    118             rebuildFontFace();
     117        rebuildFontFace();
    119118        return;
    120119    }
     
    265264void SVGFontFaceElement::rebuildFontFace()
    266265{
    267     ASSERT(inDocument());
     266    if (!inDocument())
     267        return;
    268268
    269269    // we currently ignore all but the first src element, alternatively we could concat them
     
    329329{
    330330    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
    331     if (inDocument())
    332         rebuildFontFace();
     331    rebuildFontFace();
    333332}
    334333
Note: See TracChangeset for help on using the changeset viewer.