2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 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.
21 #ifndef CSSBorderImageValue_h
22 #define CSSBorderImageValue_h
24 #include "CSSBorderImageSliceValue.h"
25 #include <wtf/PassRefPtr.h>
26 #include <wtf/RefPtr.h>
32 class CSSBorderImageValue : public CSSValue {
34 static PassRefPtr<CSSBorderImageValue> create(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue> imageSlice,
35 PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
37 return adoptRef(new CSSBorderImageValue(image, imageSlice, borderSlice, outset, repeat));
39 virtual ~CSSBorderImageValue();
41 virtual String cssText() const;
43 CSSValue* imageValue() const { return m_image.get(); }
45 virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
48 RefPtr<CSSValue> m_image;
50 // These four values are used to make "cuts" in the image. They can be numbers
52 RefPtr<CSSBorderImageSliceValue> m_imageSlice;
54 // These four values are used to make "cuts" in the border image drawing area.
55 // They can be numbers, percentages or lengths.
56 RefPtr<CSSValue> m_borderSlice;
58 // The outset values are used to inflate the border image drawing area.
59 RefPtr<CSSValue> m_outset;
61 // Values for how to handle the scaling/stretching/tiling of the image slices.
62 RefPtr<CSSValue> m_repeat;
65 CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue>, PassRefPtr<CSSValue> borderSlice,
66 PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
67 virtual bool isBorderImageValue() const { return true; }
70 } // namespace WebCore
72 #endif // CSSBorderImageValue_h