| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 ASSERT(inDocument()); | 275 ASSERT(inDocument()); |
| 276 | 276 |
| 277 // we currently ignore all but the first src element, alternatively we could
concat them | 277 // we currently ignore all but the first src element, alternatively we could
concat them |
| 278 SVGFontFaceSrcElement* srcElement = 0; | 278 SVGFontFaceSrcElement* srcElement = 0; |
| 279 | 279 |
| 280 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi
bling()) { | 280 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi
bling()) { |
| 281 if (child->hasTagName(font_face_srcTag)) | 281 if (child->hasTagName(font_face_srcTag)) |
| 282 srcElement = static_cast<SVGFontFaceSrcElement*>(child); | 282 srcElement = static_cast<SVGFontFaceSrcElement*>(child); |
| 283 } | 283 } |
| 284 | 284 |
| 285 bool describesParentFont = parentNode()->hasTagName(fontTag); | 285 bool describesParentFont = parentNode()->hasTagName(SVGNames::fontTag); |
| 286 RefPtr<CSSValueList> list; | 286 RefPtr<CSSValueList> list; |
| 287 | 287 |
| 288 if (describesParentFont) { | 288 if (describesParentFont) { |
| 289 m_fontElement = static_cast<SVGFontElement*>(parentNode()); | 289 m_fontElement = static_cast<SVGFontElement*>(parentNode()); |
| 290 | 290 |
| 291 list = CSSValueList::createCommaSeparated(); | 291 list = CSSValueList::createCommaSeparated(); |
| 292 list->append(CSSFontFaceSrcValue::createLocal(fontFamily())); | 292 list->append(CSSFontFaceSrcValue::createLocal(fontFamily())); |
| 293 } else { | 293 } else { |
| 294 m_fontElement = 0; | 294 m_fontElement = 0; |
| 295 if (srcElement) | 295 if (srcElement) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 mappedElementSheet->remove(i); | 350 mappedElementSheet->remove(i); |
| 351 break; | 351 break; |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 document()->updateStyleSelector(); | 354 document()->updateStyleSelector(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 } // namespace WebCore | 357 } // namespace WebCore |
| 358 | 358 |
| 359 #endif // ENABLE(SVG_FONTS) | 359 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |