2
* This file is part of the DOM implementation for KDE.
4
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
5
* (C) 2002-2003 Dirk Mueller (mueller@kde.org)
6
* Copyright (C) 2002, 2006 Apple Computer, Inc.
7
* Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Library General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Library General Public License for more details.
19
* You should have received a copy of the GNU Library General Public License
20
* along with this library; see the file COPYING.LIB. If not, write to
21
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
* Boston, MA 02111-1307, USA.
25
#ifndef CSSMediaRule_h
26
#define CSSMediaRule_h
29
#include <wtf/RefPtr.h>
36
typedef int ExceptionCode;
38
class CSSMediaRule : public CSSRule {
40
CSSMediaRule(StyleBase* parent);
41
CSSMediaRule(StyleBase* parent, const String& media);
42
CSSMediaRule(StyleBase* parent, MediaList* mediaList, CSSRuleList* ruleList);
43
virtual ~CSSMediaRule();
45
virtual bool isMediaRule() { return true; }
47
MediaList* media() const { return m_lstMedia.get(); }
48
CSSRuleList* cssRules() { return m_lstCSSRules.get(); }
50
unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
51
void deleteRule(unsigned index, ExceptionCode&);
53
// Inherited from CSSRule
54
virtual unsigned short type() const { return MEDIA_RULE; }
56
virtual String cssText() const;
58
// Not part of the CSSOM
59
unsigned append(CSSRule*);
62
RefPtr<MediaList> m_lstMedia;
63
RefPtr<CSSRuleList> m_lstCSSRules;
66
} // namespace WebCore
68
#endif // CSSMediaRule_h