⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 render_style.h

📁 konqueror3 embedded版本, KDE环境下的当家浏览器的嵌入式版本源码包.
💻 H
📖 第 1 页 / 共 4 页
字号:
    Length vertical_align;    EBoxSizing box_sizing;    signed int z_index :31;    bool z_auto        : 1;};//------------------------------------------------// Random visual rendering model attributes. Not inherited.enum EOverflow {    OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OMARQUEE};enum EVerticalAlign {    BASELINE, MIDDLE, SUB, SUPER, TEXT_TOP,    TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH};enum EClear{    CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3};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 &&		 palette == o.palette );    }    bool operator!=( const StyleVisualData &o ) const {        return !(*this == o);    }    LengthBox clip;    unsigned textDecoration : 4; // Text decorations defined *only* by this element.    QPalette palette;      //widget styling with IE attributes};//------------------------------------------------enum EBackgroundRepeat {    REPEAT, REPEAT_X, REPEAT_Y, NO_REPEAT};struct BackgroundLayer {public:    BackgroundLayer();    ~BackgroundLayer();    CachedImage* backgroundImage() const { return m_image; }    Length backgroundXPosition() const { return m_xPosition; }    Length backgroundYPosition() const { return m_yPosition; }    bool backgroundAttachment() const { return m_bgAttachment; }    EBackgroundRepeat backgroundRepeat() const { return m_bgRepeat; }    BackgroundLayer* next() const { return m_next; }    BackgroundLayer* next() { return m_next; }    bool isBackgroundImageSet() const { return m_imageSet; }    bool isBackgroundXPositionSet() const { return m_xPosSet; }    bool isBackgroundYPositionSet() const { return m_yPosSet; }    bool isBackgroundAttachmentSet() const { return m_attachmentSet; }    bool isBackgroundRepeatSet() const { return m_repeatSet; }    void setBackgroundImage(CachedImage* i) { m_image = i; m_imageSet = true; }    void setBackgroundXPosition(const Length& l) { m_xPosition = l; m_xPosSet = true; }    void setBackgroundYPosition(const Length& l) { m_yPosition = l; m_yPosSet = true; }    void setBackgroundAttachment(bool b) { m_bgAttachment = b; m_attachmentSet = true; }    void setBackgroundRepeat(EBackgroundRepeat r) { m_bgRepeat = r; m_repeatSet = true; }    void clearBackgroundImage() { m_imageSet = false; }    void clearBackgroundXPosition() { m_xPosSet = false; }    void clearBackgroundYPosition() { m_yPosSet = false; }    void clearBackgroundAttachment() { m_attachmentSet = false; }    void clearBackgroundRepeat() { m_repeatSet = false; }    void setNext(BackgroundLayer* n) { if (m_next != n) { delete m_next; m_next = n; } }    BackgroundLayer& operator=(const BackgroundLayer& o);    BackgroundLayer(const BackgroundLayer& o);    bool operator==(const BackgroundLayer& o) const;    bool operator!=(const BackgroundLayer& o) const {        return !(*this == o);    }    bool containsImage(CachedImage* c) const { if (c == m_image) return true; if (m_next) return m_next->containsImage(c); return false; }    bool hasImage() const {        if (m_image)            return true;        return m_next ? m_next->hasImage() : false;    }    bool hasFixedImage() const {        if (m_image && !m_bgAttachment)            return true;        return m_next ? m_next->hasFixedImage() : false;    }    void fillUnsetProperties();    void cullEmptyLayers();    CachedImage* m_image;    Length m_xPosition;    Length m_yPosition;    bool m_bgAttachment : 1;    EBackgroundRepeat m_bgRepeat : 2;    bool m_imageSet : 1;    bool m_attachmentSet : 1;    bool m_repeatSet : 1;    bool m_xPosSet : 1;    bool m_yPosSet : 1;    BackgroundLayer* m_next;};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);    }    BackgroundLayer m_background;    QColor m_color;    OutlineValue m_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;};// 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;};// 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);    bool operator==(const StyleCSS3NonInheritedData& o) const;    bool operator!=(const StyleCSS3NonInheritedData &o) const {        return !(*this == o);    }    float opacity;         // Whether or not we're transparent.#ifdef APPLE_CHANGES	// ### we don't have those (yet)    DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties#endif    DataRef<StyleMarqueeData> marquee; // Marquee properties};// 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.#ifdef APPLE_CHANGES        EUserModify userModify : 2; // Flag used for editing state        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.//// the inherited-decoration and inherited-shadow attributes// are inherited from the// first parent which is block level//enum EWhiteSpace {    NORMAL, PRE, NOWRAP, PRE_WRAP, PRE_LINE, 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,    /* reserved for later use: */    PBLEFT, PBRIGHT};class StyleInheritedData : public Shared<StyleInheritedData>{    StyleInheritedData& operator=(const 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;    khtml::Font font;    QColor color;    short border_hspacing;    short border_vspacing;    // Paged media properties.    short widows;    short orphans;    DOM::QuotesValueImpl* quotes;};enum EEmptyCell {    SHOW, HIDE};enum ECaptionSide {    CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT};enum EListStyleType {    // Symbols:     LDISC, LCIRCLE, LSQUARE, LBOX, LDIAMOND,    // Numeric:     LDECIMAL, DECIMAL_LEADING_ZERO, ARABIC_INDIC, LAO, PERSIAN, URDU, THAI, TIBETAN,    // Algorithmic:     LOWER_ROMAN, UPPER_ROMAN, HEBREW, ARMENIAN, GEORGIAN,    // Ideographic:     CJK_IDEOGRAPHIC, JAPANESE_FORMAL, JAPANESE_INFORMAL,     SIMP_CHINESE_FORMAL, SIMP_CHINESE_INFORMAL, TRAD_CHINESE_FORMAL, TRAD_CHINESE_INFORMAL,    // Alphabetic:     LOWER_GREEK, UPPER_GREEK, LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN,     HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA,    // Special:     LNONE};enum EListStylePosition { OUTSIDE, INSIDE };enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };enum ECursor {    CURSOR_AUTO, CURSOR_CROSS, CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_PROGRESS,  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 EUserInput {    UI_ENABLED, UI_DISABLED, UI_NONE};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -