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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 // Match Batiks default value | 255 // Match Batiks default value |
256 return static_cast<int>(ceilf(unitsPerEm() * 0.2f)); | 256 return static_cast<int>(ceilf(unitsPerEm() * 0.2f)); |
257 } | 257 } |
258 | 258 |
259 String SVGFontFaceElement::fontFamily() const | 259 String SVGFontFaceElement::fontFamily() const |
260 { | 260 { |
261 return m_styleDeclaration->getPropertyValue(CSSPropertyFontFamily); | 261 return m_styleDeclaration->getPropertyValue(CSSPropertyFontFamily); |
262 } | 262 } |
263 | 263 |
| 264 SVGFontElement* SVGFontFaceElement::associatedFontElement() const |
| 265 { |
| 266 return m_fontElement.get(); |
| 267 } |
| 268 |
264 void SVGFontFaceElement::rebuildFontFace() | 269 void SVGFontFaceElement::rebuildFontFace() |
265 { | 270 { |
266 if (!inDocument()) | 271 if (!inDocument()) |
267 return; | 272 return; |
268 | 273 |
269 // we currently ignore all but the first src element, alternatively we could
concat them | 274 // we currently ignore all but the first src element, alternatively we could
concat them |
270 SVGFontFaceSrcElement* srcElement = 0; | 275 SVGFontFaceSrcElement* srcElement = 0; |
271 | 276 |
272 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi
bling()) { | 277 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi
bling()) { |
273 if (child->hasTagName(font_face_srcTag)) | 278 if (child->hasTagName(font_face_srcTag)) |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 mappedElementSheet->remove(i); | 347 mappedElementSheet->remove(i); |
343 break; | 348 break; |
344 } | 349 } |
345 } | 350 } |
346 document()->styleSelectorChanged(DeferRecalcStyle); | 351 document()->styleSelectorChanged(DeferRecalcStyle); |
347 } | 352 } |
348 | 353 |
349 } // namespace WebCore | 354 } // namespace WebCore |
350 | 355 |
351 #endif // ENABLE(SVG_FONTS) | 356 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |