~ubuntu-branches/ubuntu/maverick/webkit/maverick

« back to all changes in this revision

Viewing changes to WebCore/css/CSSMediaRule.h

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2007-08-19 15:54:12 UTC
  • Revision ID: james.westby@ubuntu.com-20070819155412-uxxg1h9plpghmtbi
Tags: upstream-0~svn25144
ImportĀ upstreamĀ versionĀ 0~svn25144

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the DOM implementation for KDE.
 
3
 *
 
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)
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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.
 
23
 */
 
24
 
 
25
#ifndef CSSMediaRule_h
 
26
#define CSSMediaRule_h
 
27
 
 
28
#include "CSSRule.h"
 
29
#include <wtf/RefPtr.h>
 
30
 
 
31
namespace WebCore {
 
32
 
 
33
class CSSRuleList;
 
34
class MediaList;
 
35
 
 
36
typedef int ExceptionCode;
 
37
 
 
38
class CSSMediaRule : public CSSRule {
 
39
public:
 
40
    CSSMediaRule(StyleBase* parent);
 
41
    CSSMediaRule(StyleBase* parent, const String& media);
 
42
    CSSMediaRule(StyleBase* parent, MediaList* mediaList, CSSRuleList* ruleList);
 
43
    virtual ~CSSMediaRule();
 
44
 
 
45
    virtual bool isMediaRule() { return true; }
 
46
 
 
47
    MediaList* media() const { return m_lstMedia.get(); }
 
48
    CSSRuleList* cssRules() { return m_lstCSSRules.get(); }
 
49
 
 
50
    unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
 
51
    void deleteRule(unsigned index, ExceptionCode&);
 
52
 
 
53
    // Inherited from CSSRule
 
54
    virtual unsigned short type() const { return MEDIA_RULE; }
 
55
 
 
56
    virtual String cssText() const;
 
57
 
 
58
    // Not part of the CSSOM
 
59
    unsigned append(CSSRule*);
 
60
 
 
61
protected:
 
62
    RefPtr<MediaList> m_lstMedia;
 
63
    RefPtr<CSSRuleList> m_lstCSSRules;
 
64
};
 
65
 
 
66
} // namespace WebCore
 
67
 
 
68
#endif // CSSMediaRule_h