Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: Source/core/svg/SVGFontFaceElement.cpp

Issue 68643007: Remove QualifiedName argument from SVGElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGFontFaceElement.h ('k') | Source/core/svg/SVGFontFaceFormatElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
39 #include "core/platform/graphics/Font.h" 39 #include "core/platform/graphics/Font.h"
40 #include "core/svg/SVGDocumentExtensions.h" 40 #include "core/svg/SVGDocumentExtensions.h"
41 #include "core/svg/SVGFontElement.h" 41 #include "core/svg/SVGFontElement.h"
42 #include "core/svg/SVGFontFaceSrcElement.h" 42 #include "core/svg/SVGFontFaceSrcElement.h"
43 #include "core/svg/SVGGlyphElement.h" 43 #include "core/svg/SVGGlyphElement.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 using namespace SVGNames; 47 using namespace SVGNames;
48 48
49 inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Docu ment& document) 49 inline SVGFontFaceElement::SVGFontFaceElement(Document& document)
50 : SVGElement(tagName, document) 50 : SVGElement(font_faceTag, document)
51 , m_fontFaceRule(StyleRuleFontFace::create()) 51 , m_fontFaceRule(StyleRuleFontFace::create())
52 , m_fontElement(0) 52 , m_fontElement(0)
53 { 53 {
54 ASSERT(hasTagName(font_faceTag));
55 ScriptWrappable::init(this); 54 ScriptWrappable::init(this);
56 RefPtr<MutableStylePropertySet> styleDeclaration = MutableStylePropertySet:: create(HTMLStandardMode); 55 RefPtr<MutableStylePropertySet> styleDeclaration = MutableStylePropertySet:: create(HTMLStandardMode);
57 m_fontFaceRule->setProperties(styleDeclaration.release()); 56 m_fontFaceRule->setProperties(styleDeclaration.release());
58 } 57 }
59 58
60 PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(const QualifiedName& t agName, Document& document) 59 PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(Document& document)
61 { 60 {
62 return adoptRef(new SVGFontFaceElement(tagName, document)); 61 return adoptRef(new SVGFontFaceElement(document));
63 } 62 }
64 63
65 static CSSPropertyID cssPropertyIdForFontFaceAttributeName(const QualifiedName& attrName) 64 static CSSPropertyID cssPropertyIdForFontFaceAttributeName(const QualifiedName& attrName)
66 { 65 {
67 if (!attrName.namespaceURI().isNull()) 66 if (!attrName.namespaceURI().isNull())
68 return CSSPropertyInvalid; 67 return CSSPropertyInvalid;
69 68
70 static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0; 69 static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0;
71 if (!propertyNameToIdMap) { 70 if (!propertyNameToIdMap) {
72 propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>; 71 propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 347
349 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta) 348 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta)
350 { 349 {
351 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); 350 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta);
352 rebuildFontFace(); 351 rebuildFontFace();
353 } 352 }
354 353
355 } // namespace WebCore 354 } // namespace WebCore
356 355
357 #endif // ENABLE(SVG_FONTS) 356 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFontFaceElement.h ('k') | Source/core/svg/SVGFontFaceFormatElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698