📄 render_style.h
字号:
};enum ETableLayout { TAUTO, TFIXED};enum EUnicodeBidi { UBNormal, Embed, Override};class StyleVisualData : public Shared<StyleVisualData>{public: StyleVisualData(); ~StyleVisualData(); StyleVisualData(const StyleVisualData& o ); bool operator==( const StyleVisualData &o ) const { return ( clip == o.clip && hasClip == o.hasClip && colspan == o.colspan && counter_increment == o.counter_increment && counter_reset == o.counter_reset && palette == o.palette && textDecoration == o.textDecoration); } bool operator!=( const StyleVisualData &o ) const { return !(*this == o); } LengthBox clip; bool hasClip : 1; int textDecoration : 4; // Text decorations defined *only* by this element. short colspan; // for html, not a css2 attribute short counter_increment; //ok, so these are not visual mode spesific short counter_reset; //can't go to inherited, since these are not inherited QPalette palette; //widget styling with IE attributes};//------------------------------------------------enum EBackgroundRepeat { REPEAT, REPEAT_X, REPEAT_Y, NO_REPEAT};class StyleBackgroundData : public Shared<StyleBackgroundData>{public: StyleBackgroundData(); ~StyleBackgroundData() {} StyleBackgroundData(const StyleBackgroundData& o ); bool operator==(const StyleBackgroundData& o) const; bool operator!=(const StyleBackgroundData &o) const { return !(*this == o); } QColor color; CachedImage *image; Length x_position; Length y_position; OutlineValue outline;};//------------------------------------------------// CSS3 Marquee Propertiesenum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE, MUNFURL };enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };class StyleMarqueeData : public Shared<StyleMarqueeData>{public: StyleMarqueeData(); StyleMarqueeData(const StyleMarqueeData& o); bool operator==(const StyleMarqueeData& o) const; bool operator!=(const StyleMarqueeData& o) const { return !(*this == o); } Length increment; int speed; int loops; // -1 means infinite. EMarqueeBehavior behavior : 3; EMarqueeDirection direction : 3;}; //------------------------------------------------// CSS3 Flexible Box Propertiesenum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BJUSTIFY, BBASELINE };enum EBoxOrient { HORIZONTAL, VERTICAL };enum EBoxLines { SINGLE, MULTIPLE };enum EBoxDirection { BNORMAL, BREVERSE };class StyleFlexibleBoxData : public Shared<StyleFlexibleBoxData>{public: StyleFlexibleBoxData(); StyleFlexibleBoxData(const StyleFlexibleBoxData& o); bool operator==(const StyleFlexibleBoxData& o) const; bool operator!=(const StyleFlexibleBoxData &o) const { return !(*this == o); } float flex; unsigned int flex_group; unsigned int ordinal_group; EBoxAlignment align : 3; EBoxAlignment pack: 3; EBoxOrient orient: 1; EBoxLines lines : 1;};// This struct holds information about shadows for the text-shadow and box-shadow properties.struct ShadowData { ShadowData(int _x, int _y, int _blur, const QColor& _color) :x(_x), y(_y), blur(_blur), color(_color), next(0) {} ShadowData(const ShadowData& o); ~ShadowData() { delete next; } bool operator==(const ShadowData& o) const; bool operator!=(const ShadowData &o) const { return !(*this == o); } int x; int y; int blur; QColor color; ShadowData* next;};#ifndef KHTML_NO_XBLstruct BindingURI { BindingURI(DOM::DOMStringImpl*); ~BindingURI(); BindingURI* copy(); bool operator==(const BindingURI& o) const; bool operator!=(const BindingURI& o) const { return !(*this == o); } BindingURI* next() { return m_next; } void setNext(BindingURI* n) { m_next = n; } DOM::DOMStringImpl* uri() { return m_uri; } BindingURI* m_next; DOM::DOMStringImpl* m_uri;};#endif//------------------------------------------------// CSS3 User Modify Propertiesenum EUserModify { READ_ONLY, READ_WRITE};// CSS3 User Drag Valuesenum EUserDrag { DRAG_AUTO, DRAG_NONE, DRAG_ELEMENT};// CSS3 User Select Valuesenum EUserSelect { SELECT_AUTO, SELECT_NONE, SELECT_TEXT};// This struct is for rarely used non-inherited CSS3 properties. By grouping them together,// we save space, and only allocate this object when someone actually uses// a non-inherited CSS3 property.class StyleCSS3NonInheritedData : public Shared<StyleCSS3NonInheritedData>{public: StyleCSS3NonInheritedData(); ~StyleCSS3NonInheritedData(); StyleCSS3NonInheritedData(const StyleCSS3NonInheritedData& o);#ifndef KHTML_NO_XBL bool bindingsEquivalent(const StyleCSS3NonInheritedData& o) const;#endif bool operator==(const StyleCSS3NonInheritedData& o) const; bool operator!=(const StyleCSS3NonInheritedData &o) const { return !(*this == o); } #if APPLE_CHANGES int lineClamp; // An Apple extension. Not really CSS3 but not worth making a new struct over.#endif float opacity; // Whether or not we're transparent. DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties DataRef<StyleMarqueeData> marquee; // Marquee properties EUserDrag userDrag : 2; // Whether or not a drag can be initiated by this element. EUserSelect userSelect : 2; // Whether or not the element is selectable. bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."#ifndef KHTML_NO_XBL BindingURI* bindingURI; // The XBL binding URI list.#endif};// This struct is for rarely used inherited CSS3 properties. By grouping them together,// we save space, and only allocate this object when someone actually uses// an inherited CSS3 property.class StyleCSS3InheritedData : public Shared<StyleCSS3InheritedData>{public: StyleCSS3InheritedData(); ~StyleCSS3InheritedData(); StyleCSS3InheritedData(const StyleCSS3InheritedData& o); bool operator==(const StyleCSS3InheritedData& o) const; bool operator!=(const StyleCSS3InheritedData &o) const { return !(*this == o); } bool shadowDataEquivalent(const StyleCSS3InheritedData& o) const; ShadowData* textShadow; // Our text shadow information for shadowed text drawing. EUserModify userModify : 2; // Flag used for editing state#if APPLE_CHANGES bool textSizeAdjust : 1; // An Apple extension. Not really CSS3 but not worth making a new struct over.#endif private: StyleCSS3InheritedData &operator=(const StyleCSS3InheritedData &);};//------------------------------------------------// Inherited attributes.//enum EWhiteSpace { NORMAL, PRE, NOWRAP, KHTML_NOWRAP};enum ETextAlign { TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, KHTML_LEFT, KHTML_RIGHT, KHTML_CENTER};enum ETextTransform { CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE};enum EDirection { LTR, RTL};enum ETextDecoration { TDNONE = 0x0 , UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH= 0x4, BLINK = 0x8};enum EPageBreak { PBAUTO, PBALWAYS, PBAVOID};class StyleInheritedData : public Shared<StyleInheritedData>{public: StyleInheritedData(); ~StyleInheritedData(); StyleInheritedData(const StyleInheritedData& o ); bool operator==(const StyleInheritedData& o) const; bool operator != ( const StyleInheritedData &o ) const { return !(*this == o); } Length indent; // could be packed in a short but doesn't // make a difference currently because of padding Length line_height; CachedImage *style_image; CachedImage *cursor_image; khtml::Font font; QColor color; short horizontal_border_spacing; short vertical_border_spacing; // Paged media properties. short widows; short orphans; EPageBreak page_break_inside : 2;};enum EEmptyCell { SHOW, HIDE};enum ECaptionSide{ CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT};enum EListStyleType { DISC, CIRCLE, SQUARE, LDECIMAL, DECIMAL_LEADING_ZERO, LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK, LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN, HEBREW, ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC, HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE};enum EListStylePosition { OUTSIDE, INSIDE };enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };enum ECursor { CURSOR_AUTO, CURSOR_CROSS, CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_MOVE, CURSOR_E_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_N_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_S_RESIZE, CURSOR_W_RESIZE, CURSOR_TEXT, CURSOR_WAIT, CURSOR_HELP};enum ContentType { CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER};struct ContentData { ContentData() :_contentType(CONTENT_NONE), _nextContent(0) {} ~ContentData(); void clearContent(); ContentType contentType() { return _contentType; } DOM::DOMStringImpl* contentText() { if (contentType() == CONTENT_TEXT) return _content.text; return 0; } CachedObject* contentObject() { if (contentType() == CONTENT_OBJECT) return _content.object; return 0; } ContentType _contentType; union { CachedObject* object;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -