OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 using namespace SVGNames; | 48 using namespace SVGNames; |
49 | 49 |
50 inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Docu
ment* document) | 50 inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Docu
ment* document) |
51 : SVGElement(tagName, document) | 51 : SVGElement(tagName, document) |
52 , m_fontFaceRule(StyleRuleFontFace::create()) | 52 , m_fontFaceRule(StyleRuleFontFace::create()) |
53 , m_fontElement(0) | 53 , m_fontElement(0) |
54 { | 54 { |
55 ASSERT(hasTagName(font_faceTag)); | 55 ASSERT(hasTagName(font_faceTag)); |
56 ScriptWrappable::init(this); | 56 ScriptWrappable::init(this); |
57 RefPtr<StylePropertySet> styleDeclaration = StylePropertySet::create(CSSStri
ctMode); | 57 RefPtr<MutableStylePropertySet> styleDeclaration = MutableStylePropertySet::
create(CSSStrictMode); |
58 m_fontFaceRule->setProperties(styleDeclaration.release()); | 58 m_fontFaceRule->setProperties(styleDeclaration.release()); |
59 } | 59 } |
60 | 60 |
61 PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(const QualifiedName& t
agName, Document* document) | 61 PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(const QualifiedName& t
agName, Document* document) |
62 { | 62 { |
63 return adoptRef(new SVGFontFaceElement(tagName, document)); | 63 return adoptRef(new SVGFontFaceElement(tagName, document)); |
64 } | 64 } |
65 | 65 |
66 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName& attrN
ame) | 66 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName& attrN
ame) |
67 { | 67 { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang
e, Node* afterChange, int childCountDelta) | 350 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang
e, Node* afterChange, int childCountDelta) |
351 { | 351 { |
352 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); | 352 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); |
353 rebuildFontFace(); | 353 rebuildFontFace(); |
354 } | 354 } |
355 | 355 |
356 } // namespace WebCore | 356 } // namespace WebCore |
357 | 357 |
358 #endif // ENABLE(SVG_FONTS) | 358 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |