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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 // Parse in-memory CSS rules | 294 // Parse in-memory CSS rules |
295 m_fontFaceRule->mutableProperties().addParsedProperty(CSSProperty(CSSPropert
ySrc, list)); | 295 m_fontFaceRule->mutableProperties().addParsedProperty(CSSProperty(CSSPropert
ySrc, list)); |
296 | 296 |
297 if (describesParentFont) { | 297 if (describesParentFont) { |
298 // Traverse parsed CSS values and associate CSSFontFaceSrcValue elements
with ourselves. | 298 // Traverse parsed CSS values and associate CSSFontFaceSrcValue elements
with ourselves. |
299 RefPtrWillBeRawPtr<CSSValue> src = m_fontFaceRule->properties().getPrope
rtyCSSValue(CSSPropertySrc); | 299 RefPtrWillBeRawPtr<CSSValue> src = m_fontFaceRule->properties().getPrope
rtyCSSValue(CSSPropertySrc); |
300 CSSValueList* srcList = toCSSValueList(src.get()); | 300 CSSValueList* srcList = toCSSValueList(src.get()); |
301 | 301 |
302 unsigned srcLength = srcList ? srcList->length() : 0; | 302 unsigned srcLength = srcList ? srcList->length() : 0; |
303 for (unsigned i = 0; i < srcLength; i++) { | 303 for (unsigned i = 0; i < srcLength; i++) { |
304 if (CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->itemW
ithoutBoundsCheck(i))) | 304 if (CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->item(
i))) |
305 item->setSVGFontFaceElement(this); | 305 item->setSVGFontFaceElement(this); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 document().styleResolverChanged(); | 309 document().styleResolverChanged(); |
310 } | 310 } |
311 | 311 |
312 Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNod
e* rootParent) | 312 Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNod
e* rootParent) |
313 { | 313 { |
314 SVGElement::insertedInto(rootParent); | 314 SVGElement::insertedInto(rootParent); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 void SVGFontFaceElement::trace(Visitor* visitor) | 352 void SVGFontFaceElement::trace(Visitor* visitor) |
353 { | 353 { |
354 visitor->trace(m_fontFaceRule); | 354 visitor->trace(m_fontFaceRule); |
355 visitor->trace(m_fontElement); | 355 visitor->trace(m_fontElement); |
356 SVGElement::trace(visitor); | 356 SVGElement::trace(visitor); |
357 } | 357 } |
358 | 358 |
359 } // namespace WebCore | 359 } // namespace WebCore |
360 | 360 |
361 #endif // ENABLE(SVG_FONTS) | 361 #endif // ENABLE(SVG_FONTS) |
OLD | NEW |