diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/css/CSSMediaRule.h | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/css/CSSMediaRule.h')
-rw-r--r-- | WebCore/css/CSSMediaRule.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/WebCore/css/CSSMediaRule.h b/WebCore/css/CSSMediaRule.h index f6a7e48..5eead7c 100644 --- a/WebCore/css/CSSMediaRule.h +++ b/WebCore/css/CSSMediaRule.h @@ -1,9 +1,7 @@ /* - * This file is part of the DOM implementation for KDE. - * * (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 2002-2003 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2002, 2006 Apple Computer, Inc. + * Copyright (C) 2002, 2006, 2008 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) * * This library is free software; you can redistribute it and/or @@ -26,39 +24,42 @@ #define CSSMediaRule_h #include "CSSRule.h" -#include <wtf/RefPtr.h> +#include "CSSRuleList.h" +#include "MediaList.h" +#include "PlatformString.h" // needed so bindings will compile namespace WebCore { class CSSRuleList; class MediaList; -typedef int ExceptionCode; - class CSSMediaRule : public CSSRule { public: - CSSMediaRule(StyleBase* parent); - CSSMediaRule(StyleBase* parent, const String& media); - CSSMediaRule(StyleBase* parent, MediaList* mediaList, CSSRuleList* ruleList); + static PassRefPtr<CSSMediaRule> create(CSSStyleSheet* parent, PassRefPtr<MediaList> media, PassRefPtr<CSSRuleList> rules) + { + return adoptRef(new CSSMediaRule(parent, media, rules)); + } virtual ~CSSMediaRule(); - virtual bool isMediaRule() { return true; } - MediaList* media() const { return m_lstMedia.get(); } CSSRuleList* cssRules() { return m_lstCSSRules.get(); } unsigned insertRule(const String& rule, unsigned index, ExceptionCode&); void deleteRule(unsigned index, ExceptionCode&); - // Inherited from CSSRule - virtual unsigned short type() const { return MEDIA_RULE; } - virtual String cssText() const; // Not part of the CSSOM unsigned append(CSSRule*); -protected: +private: + CSSMediaRule(CSSStyleSheet* parent, PassRefPtr<MediaList>, PassRefPtr<CSSRuleList>); + + virtual bool isMediaRule() { return true; } + + // Inherited from CSSRule + virtual unsigned short type() const { return MEDIA_RULE; } + RefPtr<MediaList> m_lstMedia; RefPtr<CSSRuleList> m_lstCSSRules; }; |