]>
git.saurik.com Git - iphone-api.git/blob - WebCore/CSSBorderImageValue.h
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
25 #include <wtf/PassRefPtr.h>
26 #include <wtf/RefPtr.h>
32 class CSSBorderImageValue
: public CSSValue
{
34 static PassRefPtr
<CSSBorderImageValue
> create(PassRefPtr
<CSSValue
> image
, PassRefPtr
<Rect
> sliceRect
, int horizontalRule
, int verticalRule
)
36 return adoptRef(new CSSBorderImageValue(image
, sliceRect
, horizontalRule
, verticalRule
));
39 virtual String
cssText() const;
41 CSSValue
* imageValue() const { return m_image
.get(); }
43 virtual void addSubresourceStyleURLs(ListHashSet
<KURL
>&, const CSSStyleSheet
*);
46 RefPtr
<CSSValue
> m_image
;
48 // These four values are used to make "cuts" in the image. They can be numbers
50 RefPtr
<Rect
> m_imageSliceRect
;
52 // Values for how to handle the scaling/stretching/tiling of the image slices.
53 int m_horizontalSizeRule
; // Rule for how to adjust the widths of the top/middle/bottom
54 int m_verticalSizeRule
; // Rule for how to adjust the heights of the left/middle/right
57 CSSBorderImageValue(PassRefPtr
<CSSValue
> image
, PassRefPtr
<Rect
> sliceRect
, int horizontalRule
, int verticalRule
);
60 } // namespace WebCore
62 #endif // CSSBorderImageValue_h