| 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, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2008, 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef StyleRuleImport_h | 22 #ifndef StyleRuleImport_h |
| 23 #define StyleRuleImport_h | 23 #define StyleRuleImport_h |
| 24 | 24 |
| 25 #include "core/css/StyleRule.h" | 25 #include "core/css/StyleRule.h" |
| 26 #include "core/fetch/ResourcePtr.h" | |
| 27 #include "core/fetch/StyleSheetResourceClient.h" | 26 #include "core/fetch/StyleSheetResourceClient.h" |
| 28 #include "platform/heap/Handle.h" | 27 #include "platform/heap/Handle.h" |
| 29 | 28 |
| 30 namespace blink { | 29 namespace blink { |
| 31 | 30 |
| 32 class CSSStyleSheetResource; | 31 class CSSStyleSheetResource; |
| 33 class MediaQuerySet; | 32 class MediaQuerySet; |
| 34 class StyleSheetContents; | 33 class StyleSheetContents; |
| 35 | 34 |
| 36 class StyleRuleImport : public StyleRuleBase { | 35 class StyleRuleImport : public StyleRuleBase { |
| 37 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRuleImport); | 36 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRuleImport); |
| 37 WILL_BE_USING_PRE_FINALIZER(StyleRuleImport, dispose); |
| 38 public: | 38 public: |
| 39 static PassRefPtrWillBeRawPtr<StyleRuleImport> create(const String& href, Pa
ssRefPtrWillBeRawPtr<MediaQuerySet>); | 39 static PassRefPtrWillBeRawPtr<StyleRuleImport> create(const String& href, Pa
ssRefPtrWillBeRawPtr<MediaQuerySet>); |
| 40 | 40 |
| 41 ~StyleRuleImport(); | 41 ~StyleRuleImport(); |
| 42 | 42 |
| 43 StyleSheetContents* parentStyleSheet() const { return m_parentStyleSheet; } | 43 StyleSheetContents* parentStyleSheet() const { return m_parentStyleSheet; } |
| 44 void setParentStyleSheet(StyleSheetContents* sheet) { ASSERT(sheet); m_paren
tStyleSheet = sheet; } | 44 void setParentStyleSheet(StyleSheetContents* sheet) { ASSERT(sheet); m_paren
tStyleSheet = sheet; } |
| 45 void clearParentStyleSheet() { m_parentStyleSheet = nullptr; } | 45 void clearParentStyleSheet() { m_parentStyleSheet = nullptr; } |
| 46 | 46 |
| 47 String href() const { return m_strHref; } | 47 String href() const { return m_strHref; } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; | 78 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String&
charset, const CSSStyleSheetResource*); | 81 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String&
charset, const CSSStyleSheetResource*); |
| 82 friend class ImportedStyleSheetClient; | 82 friend class ImportedStyleSheetClient; |
| 83 | 83 |
| 84 StyleRuleImport(const String& href, PassRefPtrWillBeRawPtr<MediaQuerySet>); | 84 StyleRuleImport(const String& href, PassRefPtrWillBeRawPtr<MediaQuerySet>); |
| 85 | 85 |
| 86 void dispose(); |
| 87 |
| 86 RawPtrWillBeMember<StyleSheetContents> m_parentStyleSheet; | 88 RawPtrWillBeMember<StyleSheetContents> m_parentStyleSheet; |
| 87 | 89 |
| 88 ImportedStyleSheetClient m_styleSheetClient; | 90 ImportedStyleSheetClient m_styleSheetClient; |
| 89 String m_strHref; | 91 String m_strHref; |
| 90 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; | 92 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; |
| 91 RefPtrWillBeMember<StyleSheetContents> m_styleSheet; | 93 RefPtrWillBeMember<StyleSheetContents> m_styleSheet; |
| 92 ResourcePtr<CSSStyleSheetResource> m_resource; | 94 RefPtrWillBeMember<CSSStyleSheetResource> m_resource; |
| 93 bool m_loading; | 95 bool m_loading; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 DEFINE_STYLE_RULE_TYPE_CASTS(Import); | 98 DEFINE_STYLE_RULE_TYPE_CASTS(Import); |
| 97 | 99 |
| 98 } // namespace blink | 100 } // namespace blink |
| 99 | 101 |
| 100 #endif | 102 #endif |
| OLD | NEW |