| 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, 2009, 2010, 2012 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010, 2012 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 result.append(mediaText); | 65 result.append(mediaText); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 result.append(';'); | 68 result.append(';'); |
| 69 | 69 |
| 70 return result.toString(); | 70 return result.toString(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 CSSStyleSheet* CSSImportRule::styleSheet() const | 73 CSSStyleSheet* CSSImportRule::styleSheet() const |
| 74 { | 74 { |
| 75 // TODO(yukishiino): CSSImportRule.styleSheet attribute is not nullable, |
| 76 // thus this function must not return nullptr. |
| 75 if (!m_importRule->styleSheet()) | 77 if (!m_importRule->styleSheet()) |
| 76 return nullptr; | 78 return nullptr; |
| 77 | 79 |
| 78 if (!m_styleSheetCSSOMWrapper) | 80 if (!m_styleSheetCSSOMWrapper) |
| 79 m_styleSheetCSSOMWrapper = CSSStyleSheet::create(m_importRule->styleShee
t(), const_cast<CSSImportRule*>(this)); | 81 m_styleSheetCSSOMWrapper = CSSStyleSheet::create(m_importRule->styleShee
t(), const_cast<CSSImportRule*>(this)); |
| 80 return m_styleSheetCSSOMWrapper.get(); | 82 return m_styleSheetCSSOMWrapper.get(); |
| 81 } | 83 } |
| 82 | 84 |
| 83 void CSSImportRule::reattach(StyleRuleBase*) | 85 void CSSImportRule::reattach(StyleRuleBase*) |
| 84 { | 86 { |
| 85 // FIXME: Implement when enabling caching for stylesheets with import rules. | 87 // FIXME: Implement when enabling caching for stylesheets with import rules. |
| 86 ASSERT_NOT_REACHED(); | 88 ASSERT_NOT_REACHED(); |
| 87 } | 89 } |
| 88 | 90 |
| 89 DEFINE_TRACE(CSSImportRule) | 91 DEFINE_TRACE(CSSImportRule) |
| 90 { | 92 { |
| 91 visitor->trace(m_importRule); | 93 visitor->trace(m_importRule); |
| 92 visitor->trace(m_mediaCSSOMWrapper); | 94 visitor->trace(m_mediaCSSOMWrapper); |
| 93 visitor->trace(m_styleSheetCSSOMWrapper); | 95 visitor->trace(m_styleSheetCSSOMWrapper); |
| 94 CSSRule::trace(visitor); | 96 CSSRule::trace(visitor); |
| 95 } | 97 } |
| 96 | 98 |
| 97 } // namespace blink | 99 } // namespace blink |
| OLD | NEW |