OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2005, 2006, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace WebCore { | 27 namespace WebCore { |
28 | 28 |
29 CSSFontFaceRule::CSSFontFaceRule(CSSStyleSheet* parent) | 29 CSSFontFaceRule::CSSFontFaceRule(CSSStyleSheet* parent) |
30 : CSSRule(parent) | 30 : CSSRule(parent) |
31 { | 31 { |
32 } | 32 } |
33 | 33 |
34 CSSFontFaceRule::~CSSFontFaceRule() | 34 CSSFontFaceRule::~CSSFontFaceRule() |
35 { | 35 { |
36 if (m_style) | |
37 m_style->setParentRule(0); | |
38 } | 36 } |
39 | 37 |
40 void CSSFontFaceRule::setDeclaration(PassRefPtr<CSSMutableStyleDeclaration> styl
e) | 38 void CSSFontFaceRule::setDeclaration(PassRefPtr<CSSMutableStyleDeclaration> styl
e) |
41 { | 39 { |
42 m_style = style; | 40 m_style = style; |
43 } | 41 } |
44 | 42 |
45 String CSSFontFaceRule::cssText() const | 43 String CSSFontFaceRule::cssText() const |
46 { | 44 { |
47 String result("@font-face"); | 45 String result("@font-face"); |
48 result += " { "; | 46 result += " { "; |
49 result += m_style->cssText(); | 47 result += m_style->cssText(); |
50 result += "}"; | 48 result += "}"; |
51 return result; | 49 return result; |
52 } | 50 } |
53 | 51 |
54 void CSSFontFaceRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) | 52 void CSSFontFaceRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) |
55 { | 53 { |
56 if (m_style) | 54 if (m_style) |
57 m_style->addSubresourceStyleURLs(urls); | 55 m_style->addSubresourceStyleURLs(urls); |
58 } | 56 } |
59 | 57 |
60 } // namespace WebCore | 58 } // namespace WebCore |
OLD | NEW |