1 /* 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) 7 * 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. 12 * 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. 17 * 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. 22 * 23 */ 24 25 #ifndef StyleRareInheritedData_h 26 #define StyleRareInheritedData_h 27 28 #include "AtomicString.h" 29 #include "Color.h" 30 #include <wtf/RefCounted.h> 31 #include <wtf/PassRefPtr.h> 32 33 namespace WebCore { 34 35 struct ShadowData; 36 37 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific properties. 38 // By grouping them together, we save space, and only allocate this object when someone 39 // actually uses one of these properties. 40 class StyleRareInheritedData : public RefCounted<StyleRareInheritedData> { 41 public: create()42 static PassRefPtr<StyleRareInheritedData> create() { return adoptRef(new StyleRareInheritedData); } copy()43 PassRefPtr<StyleRareInheritedData> copy() const { return adoptRef(new StyleRareInheritedData(*this)); } 44 ~StyleRareInheritedData(); 45 46 bool operator==(const StyleRareInheritedData& o) const; 47 bool operator!=(const StyleRareInheritedData& o) const 48 { 49 return !(*this == o); 50 } 51 bool shadowDataEquivalent(const StyleRareInheritedData&) const; 52 53 Color textStrokeColor; 54 float textStrokeWidth; 55 Color textFillColor; 56 #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR 57 Color tapHighlightColor; 58 #endif 59 60 ShadowData* textShadow; // Our text shadow information for shadowed text drawing. 61 AtomicString highlight; // Apple-specific extension for custom highlight rendering. 62 unsigned textSecurity : 2; // ETextSecurity 63 unsigned userModify : 2; // EUserModify (editing) 64 unsigned wordBreak : 2; // EWordBreak 65 unsigned wordWrap : 1; // EWordWrap 66 unsigned nbspMode : 1; // ENBSPMode 67 unsigned khtmlLineBreak : 1; // EKHTMLLineBreak 68 bool textSizeAdjust : 1; // An Apple extension. 69 unsigned resize : 2; // EResize 70 unsigned userSelect : 1; // EUserSelect 71 unsigned colorSpace : 1; // ColorSpace 72 73 private: 74 StyleRareInheritedData(); 75 StyleRareInheritedData(const StyleRareInheritedData&); 76 }; 77 78 } // namespace WebCore 79 80 #endif // StyleRareInheritedData_h 81