Chromium Code Reviews| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 if (!inDocument()) { | 271 if (!inDocument()) { |
| 272 ASSERT(!m_fontElement); | 272 ASSERT(!m_fontElement); |
| 273 return; | 273 return; |
| 274 } | 274 } |
| 275 | 275 |
| 276 // we currently ignore all but the first src element, alternatively we could concat them | 276 // we currently ignore all but the first src element, alternatively we could concat them |
| 277 SVGFontFaceSrcElement* srcElement = 0; | 277 SVGFontFaceSrcElement* srcElement = 0; |
| 278 | 278 |
| 279 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi bling()) { | 279 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi bling()) { |
| 280 if (child->hasTagName(font_face_srcTag)) | 280 if (child->hasTagName(font_face_srcTag)) |
| 281 srcElement = static_cast<SVGFontFaceSrcElement*>(child); | 281 srcElement = toSVGFontFaceSrcElement(child); |
|
Stephen Chennney
2014/01/10 12:32:53
Ditto.
gyuyoung-inactive
2014/01/12 04:37:31
Done.
| |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool describesParentFont = parentNode()->hasTagName(SVGNames::fontTag); | 284 bool describesParentFont = parentNode()->hasTagName(SVGNames::fontTag); |
| 285 RefPtr<CSSValueList> list; | 285 RefPtr<CSSValueList> list; |
| 286 | 286 |
| 287 if (describesParentFont) { | 287 if (describesParentFont) { |
| 288 m_fontElement = toSVGFontElement(parentNode()); | 288 m_fontElement = toSVGFontElement(parentNode()); |
| 289 | 289 |
| 290 list = CSSValueList::createCommaSeparated(); | 290 list = CSSValueList::createCommaSeparated(); |
| 291 list->append(CSSFontFaceSrcValue::createLocal(fontFamily())); | 291 list->append(CSSFontFaceSrcValue::createLocal(fontFamily())); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 | 345 |
| 346 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta) | 346 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta) |
| 347 { | 347 { |
| 348 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); | 348 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); |
| 349 rebuildFontFace(); | 349 rebuildFontFace(); |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace WebCore | 352 } // namespace WebCore |
| 353 | 353 |
| 354 #endif // ENABLE(SVG_FONTS) | 354 #endif // ENABLE(SVG_FONTS) |
| OLD | NEW |