2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
25 #ifndef StyleRareInheritedData_h
26 #define StyleRareInheritedData_h
28 #include "AtomicString.h"
30 #include <wtf/RefCounted.h>
31 #include <wtf/PassRefPtr.h>
33 #include "TextSizeAdjustment.h"
39 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific properties.
40 // By grouping them together, we save space, and only allocate this object when someone
41 // actually uses one of these properties.
42 class StyleRareInheritedData
: public RefCounted
<StyleRareInheritedData
> {
44 static PassRefPtr
<StyleRareInheritedData
> create() { return adoptRef(new StyleRareInheritedData
); }
45 PassRefPtr
<StyleRareInheritedData
> copy() const { return adoptRef(new StyleRareInheritedData(*this)); }
46 ~StyleRareInheritedData();
48 bool operator==(const StyleRareInheritedData
& o
) const;
49 bool operator!=(const StyleRareInheritedData
& o
) const
53 bool shadowDataEquivalent(const StyleRareInheritedData
&) const;
55 Color textStrokeColor
;
56 float textStrokeWidth
;
59 ShadowData
* textShadow
; // Our text shadow information for shadowed text drawing.
60 AtomicString highlight
; // Apple-specific extension for custom highlight rendering.
61 unsigned textSecurity
: 2; // ETextSecurity
62 unsigned userModify
: 2; // EUserModify (editing)
63 unsigned wordBreak
: 2; // EWordBreak
64 unsigned wordWrap
: 1; // EWordWrap
65 unsigned nbspMode
: 1; // ENBSPMode
66 unsigned khtmlLineBreak
: 1; // EKHTMLLineBreak
67 TextSizeAdjustment textSizeAdjust
; // An Apple extension to an Apple extension.
68 unsigned resize
: 2; // EResize
69 unsigned userSelect
: 1; // EUserSelect
70 unsigned touchCalloutEnabled
: 1;
71 Color tapHighlightColor
;
72 Color compositionFillColor
;
73 Color compositionFrameColor
;
76 StyleRareInheritedData();
77 StyleRareInheritedData(const StyleRareInheritedData
&);
80 } // namespace WebCore
82 #endif // StyleRareInheritedData_h