]>
git.saurik.com Git - iphone-api.git/blob - WebCore/StyleSheet.h
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
25 #include "PlatformString.h"
26 #include "StyleList.h"
27 #include <wtf/ListHashSet.h>
31 class CachedCSSStyleSheet
;
35 class StyleSheet
: public StyleList
{
37 virtual ~StyleSheet();
39 bool disabled() const { return m_disabled
; }
40 void setDisabled(bool disabled
) { m_disabled
= disabled
; styleSheetChanged(); }
42 Node
* ownerNode() const { return m_parentNode
; }
43 StyleSheet
*parentStyleSheet() const;
44 const String
& href() const { return m_strHref
; }
45 void setHref(const String
& href
) { m_strHref
= href
; }
46 const String
& title() const { return m_strTitle
; }
47 void setTitle(const String
& s
) { m_strTitle
= s
; }
48 MediaList
* media() const { return m_media
.get(); }
49 void setMedia(PassRefPtr
<MediaList
>);
51 virtual String
type() const = 0;
52 virtual bool isLoading() = 0;
53 virtual void styleSheetChanged() { }
55 virtual KURL
completeURL(const String
& url
) const;
56 virtual void addSubresourceStyleURLs(ListHashSet
<KURL
>&) { }
58 virtual bool parseString(const String
&, bool strict
= true) = 0;
61 StyleSheet(Node
* ownerNode
, const String
& href
);
62 StyleSheet(StyleSheet
* parentSheet
, const String
& href
);
63 StyleSheet(StyleBase
* owner
, const String
& href
);
66 virtual bool isStyleSheet() const { return true; }
71 RefPtr
<MediaList
> m_media
;