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

📄 render_style.h

📁 khtml在gtk上的移植版本
💻 H
📖 第 1 页 / 共 4 页
字号:
    EListStyleType listStyleType() const { return inherited_flags._list_style_type; }    CachedImage *listStyleImage() const { return inherited->style_image; }    EListStylePosition listStylePosition() const { return inherited_flags._list_style_position; }    Length marginTop() const { return surround->margin.top; }    Length marginBottom() const {  return surround->margin.bottom; }    Length marginLeft() const {  return surround->margin.left; }    Length marginRight() const {  return surround->margin.right; }    Length paddingTop() const {  return surround->padding.top; }    Length paddingBottom() const {  return surround->padding.bottom; }    Length paddingLeft() const { return surround->padding.left; }    Length paddingRight() const {  return surround->padding.right; }    ECursor cursor() const { return inherited_flags._cursor_style; }        CachedImage *cursorImage() const { return inherited->cursor_image; }    short widows() const { return inherited->widows; }    short orphans() const { return inherited->orphans; }    EPageBreak pageBreakInside() const { return inherited->page_break_inside; }    EPageBreak pageBreakBefore() const { return noninherited_flags._page_break_before; }    EPageBreak pageBreakAfter() const { return noninherited_flags._page_break_after; }        // CSS3 Getter Methods#ifndef KHTML_NO_XBL    BindingURI* bindingURIs() const { return css3NonInheritedData->bindingURI; }#endif    int outlineOffset() const {         if (background->outline.style == BNONE || background->outline.style == BHIDDEN) return 0; return background->outline._offset;    }    ShadowData* textShadow() const { return css3InheritedData->textShadow; }    float opacity() { return css3NonInheritedData->opacity; }    EBoxAlignment boxAlign() { return css3NonInheritedData->flexibleBox->align; }    EBoxDirection boxDirection() { return inherited_flags._box_direction; }    float boxFlex() { return css3NonInheritedData->flexibleBox->flex; }    unsigned int boxFlexGroup() { return css3NonInheritedData->flexibleBox->flex_group; }    EBoxLines boxLines() { return css3NonInheritedData->flexibleBox->lines; }    unsigned int boxOrdinalGroup() { return css3NonInheritedData->flexibleBox->ordinal_group; }    EBoxOrient boxOrient() { return css3NonInheritedData->flexibleBox->orient; }    EBoxAlignment boxPack() { return css3NonInheritedData->flexibleBox->pack; }    Length marqueeIncrement() { return css3NonInheritedData->marquee->increment; }    int marqueeSpeed() { return css3NonInheritedData->marquee->speed; }    int marqueeLoopCount() { return css3NonInheritedData->marquee->loops; }    EMarqueeBehavior marqueeBehavior() { return css3NonInheritedData->marquee->behavior; }    EMarqueeDirection marqueeDirection() { return css3NonInheritedData->marquee->direction; }    EUserModify userModify() const { return css3InheritedData->userModify; }    EUserDrag userDrag() const { return css3NonInheritedData->userDrag; }    EUserSelect userSelect() const { return css3NonInheritedData->userSelect; }    bool textOverflow() const { return css3NonInheritedData->textOverflow; }    // End CSS3 Getters#if APPLE_CHANGES    // Apple-specific property getter methods    int lineClamp() const { return css3NonInheritedData->lineClamp; }    bool textSizeAdjust() const { return css3InheritedData->textSizeAdjust; }#endif// attribute setter methods    void setDisplay(EDisplay v) {  noninherited_flags._effectiveDisplay = v; }    void setOriginalDisplay(EDisplay v) {  noninherited_flags._originalDisplay = v; }    void setPosition(EPosition v) {  noninherited_flags._position = v; }    void setFloating(EFloat v) {  noninherited_flags._floating = v; }    void setLeft(Length v)  {  SET_VAR(surround,offset.left,v) }    void setRight(Length v) {  SET_VAR(surround,offset.right,v) }    void setTop(Length v)   {  SET_VAR(surround,offset.top,v) }    void setBottom(Length v){  SET_VAR(surround,offset.bottom,v) }    void setWidth(Length v)  { SET_VAR(box,width,v) }    void setHeight(Length v) { SET_VAR(box,height,v) }    void setMinWidth(Length v)  { SET_VAR(box,min_width,v) }    void setMaxWidth(Length v)  { SET_VAR(box,max_width,v) }    void setMinHeight(Length v) { SET_VAR(box,min_height,v) }    void setMaxHeight(Length v) { SET_VAR(box,max_height,v) }    void resetBorderTop() { SET_VAR(surround, border.top, BorderValue()) }    void resetBorderRight() { SET_VAR(surround, border.right, BorderValue()) }    void resetBorderBottom() { SET_VAR(surround, border.bottom, BorderValue()) }    void resetBorderLeft() { SET_VAR(surround, border.left, BorderValue()) }    void resetOutline() { SET_VAR(background, outline, OutlineValue()) }        void setBorderLeftWidth(unsigned short v)   {  SET_VAR(surround,border.left.width,v) }    void setBorderLeftStyle(EBorderStyle v)     {  SET_VAR(surround,border.left.style,v) }    void setBorderLeftColor(const QColor & v)   {  SET_VAR(surround,border.left.color,v) }    void setBorderRightWidth(unsigned short v)  {  SET_VAR(surround,border.right.width,v) }    void setBorderRightStyle(EBorderStyle v)    {  SET_VAR(surround,border.right.style,v) }    void setBorderRightColor(const QColor & v)  {  SET_VAR(surround,border.right.color,v) }    void setBorderTopWidth(unsigned short v)    {  SET_VAR(surround,border.top.width,v) }    void setBorderTopStyle(EBorderStyle v)      {  SET_VAR(surround,border.top.style,v) }    void setBorderTopColor(const QColor & v)    {  SET_VAR(surround,border.top.color,v) }        void setBorderBottomWidth(unsigned short v) {  SET_VAR(surround,border.bottom.width,v) }    void setBorderBottomStyle(EBorderStyle v)   {  SET_VAR(surround,border.bottom.style,v) }    void setBorderBottomColor(const QColor & v) {  SET_VAR(surround,border.bottom.color,v) }    void setOutlineWidth(unsigned short v) {  SET_VAR(background,outline.width,v) }    void setOutlineStyle(EBorderStyle v, bool isAuto = false)       {          SET_VAR(background,outline.style,v)        SET_VAR(background,outline._auto, isAuto)    }    void setOutlineColor(const QColor & v) {  SET_VAR(background,outline.color,v) }    void setOverflow(EOverflow v) {  noninherited_flags._overflow = v; }    void setVisibility(EVisibility v) { inherited_flags._visibility = v; }    void setVerticalAlign(EVerticalAlign v) { noninherited_flags._vertical_align = v; }    void setVerticalAlignLength(Length l) { SET_VAR(box, vertical_align, l ) }    void setHasClip(bool b = true) { SET_VAR(visual,hasClip,b) }    void setClipLeft(Length v) { SET_VAR(visual,clip.left,v) }    void setClipRight(Length v) { SET_VAR(visual,clip.right,v) }    void setClipTop(Length v) { SET_VAR(visual,clip.top,v) }    void setClipBottom(Length v) { SET_VAR(visual,clip.bottom,v) }    void setClip( Length top, Length right, Length bottom, Length left );        void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags._unicodeBidi = b; }    void setClear(EClear v) {  noninherited_flags._clear = v; }    void setTableLayout(ETableLayout v) {  noninherited_flags._table_layout = v; }    void ssetColSpan(short v) { SET_VAR(visual,colspan,v) }    bool setFontDef(const khtml::FontDef & v) {        // bah, this doesn't compare pointers. broken! (Dirk)        if (!(inherited->font.fontDef == v)) {            inherited.access()->font = Font( v, inherited->font.letterSpacing, inherited->font.wordSpacing );            return true;        }        return false;    }    void setColor(const QColor & v) { SET_VAR(inherited,color,v) }    void setTextIndent(Length v) { SET_VAR(inherited,indent,v) }    void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }    void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }    void addToTextDecorationsInEffect(int v) { inherited_flags._text_decorations |= v; }    void setTextDecorationsInEffect(int v) { inherited_flags._text_decorations = v; }    void setTextDecoration(int v) { SET_VAR(visual, textDecoration, v); }    void setDirection(EDirection v) { inherited_flags._direction = v; }    void setLineHeight(Length v) { SET_VAR(inherited,line_height,v) }    void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; }    void setWordSpacing(int v) { SET_VAR(inherited,font.wordSpacing,v) }    void setLetterSpacing(int v) { SET_VAR(inherited,font.letterSpacing,v) }    void setBackgroundColor(const QColor & v) {  SET_VAR(background,color,v) }    void setBackgroundImage(CachedImage *v) {  SET_VAR(background,image,v) }    void setBackgroundRepeat(EBackgroundRepeat v) {  noninherited_flags._bg_repeat = v; }    void setBackgroundAttachment(bool scroll) {  noninherited_flags._bg_attachment = scroll; }    void setBackgroundXPosition(Length v) {  SET_VAR(background,x_position,v) }    void setBackgroundYPosition(Length v) {  SET_VAR(background,y_position,v) }    void setBorderCollapse(bool collapse) { inherited_flags._border_collapse = collapse; }    void setHorizontalBorderSpacing(short v) { SET_VAR(inherited,horizontal_border_spacing,v) }    void setVerticalBorderSpacing(short v) { SET_VAR(inherited,vertical_border_spacing,v) }    void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }    void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }    void setCounterIncrement(short v) {  SET_VAR(visual,counter_increment,v) }    void setCounterReset(short v) {  SET_VAR(visual,counter_reset,v) }    void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }    void setListStyleImage(CachedImage *v) {  SET_VAR(inherited,style_image,v)}    void setListStylePosition(EListStylePosition v) { inherited_flags._list_style_position = v; }    void resetMargin() { SET_VAR(surround, margin, LengthBox(Fixed)) }    void setMarginTop(Length v)     {  SET_VAR(surround,margin.top,v) }    void setMarginBottom(Length v)  {  SET_VAR(surround,margin.bottom,v) }    void setMarginLeft(Length v)    {  SET_VAR(surround,margin.left,v) }    void setMarginRight(Length v)   {  SET_VAR(surround,margin.right,v) }    void resetPadding() { SET_VAR(surround, padding, LengthBox(Variable)) }    void setPaddingTop(Length v)    {  SET_VAR(surround,padding.top,v) }    void setPaddingBottom(Length v) {  SET_VAR(surround,padding.bottom,v) }    void setPaddingLeft(Length v)   {  SET_VAR(surround,padding.left,v) }    void setPaddingRight(Length v)  {  SET_VAR(surround,padding.right,v) }    void setCursor( ECursor c ) { inherited_flags._cursor_style = c; }    void setCursorImage( CachedImage *v ) { SET_VAR(inherited,cursor_image,v) }    bool shouldCorrectTextColor() const { return inherited_flags._should_correct_text_color; }    void setShouldCorrectTextColor(bool b=true) { inherited_flags._should_correct_text_color = b; }    bool htmlHacks() const { return inherited_flags._htmlHacks; }    void setHtmlHacks(bool b=true) { inherited_flags._htmlHacks = b; }    bool hasAutoZIndex() { return box->z_auto; }    void setHasAutoZIndex() { SET_VAR(box, z_auto, true); SET_VAR(box, z_index, 0) }    int zIndex() const { return box->z_index; }    void setZIndex(int v) { SET_VAR(box, z_auto, false); SET_VAR(box, z_index, v) }    void setWidows(short w) { SET_VAR(inherited, widows, w); }    void setOrphans(short o) { SET_VAR(inherited, orphans, o); }    void setPageBreakInside(EPageBreak b) { SET_VAR(inherited, page_break_inside, b); }    void setPageBreakBefore(EPageBreak b) { noninherited_flags._page_break_before = b; }    void setPageBreakAfter(EPageBreak b) { noninherited_flags._page_break_after = b; }        // CSS3 Setters#ifndef KHTML_NO_XBL    void deleteBindingURIs() {         delete css3NonInheritedData->bindingURI;         SET_VAR(css3NonInheritedData, bindingURI, 0);    }    void inheritBindingURIs(BindingURI* other) {        SET_VAR(css3NonInheritedData, bindingURI, other->copy());    }    void addBindingURI(DOM::DOMStringImpl* uri);#endif    void setOutlineOffset(unsigned short v) {  SET_VAR(background,outline._offset,v) }    void setTextShadow(ShadowData* val, bool add=false);    void setOpacity(float f) { SET_VAR(css3NonInheritedData, opacity, f); }    void setBoxAlign(EBoxAlignment a) { SET_VAR(css3NonInheritedData.access()->flexibleBox, align, a); }    void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; }    void setBoxFlex(float f) { SET_VAR(css3NonInheritedData.access()->flexibleBox, flex, f); }    void setBoxFlexGroup(unsigned int fg) { SET_VAR(css3NonInheritedData.access()->flexibleBox, flex_group, fg); }    void setBoxLines(EBoxLines l) { SET_VAR(css3NonInheritedData.access()->flexibleBox, lines, l); }    void setBoxOrdinalGroup(unsigned int og) { SET_VAR(css3NonInheritedData.access()->flexibleBox, ordinal_group, og); }    void setBoxOrient(EBoxOrient o) { SET_VAR(css3NonInheritedData.access()->flexibleBox, orient, o); }    void setBoxPack(EBoxAlignment p) { SET_VAR(css3NonInheritedData.access()->flexibleBox, pack, p); }    void setMarqueeIncrement(const Length& f) { SET_VAR(css3NonInheritedData.access()->marquee, increment, f); }    void setMarqueeSpeed(int f) { SET_VAR(css3NonInheritedData.access()->marquee, speed, f); }    void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(css3NonInheritedData.access()->marquee, direction, d); }    void setMarqueeBehavior(EMarqueeBehavior b) { SET_VAR(css3NonInheritedData.access()->marquee, behavior, b); }    void setMarqueeLoopCount(int i) { SET_VAR(css3NonInheritedData.access()->marquee, loops, i); }    void setUserModify(EUserModify u) { SET_VAR(css3InheritedData, userModify, u); }    void setUserDrag(EUserDrag d) { SET_VAR(css3NonInheritedData, userDrag, d); }    void setUserSelect(EUserSelect s) { SET_VAR(css3NonInheritedData, userSelect, s); }    void setTextOverflow(bool b) { SET_VAR(css3NonInheritedData, textOverflow, b); }    // End CSS3 Setters   #if APPLE_CHANGES    // Apple-specific property setters    void setLineClamp(int c) { SET_VAR(css3NonInheritedData, lineClamp, c); }    void setTextSizeAdjust(bool b) { SET_VAR(css3InheritedData, textSizeAdjust, b); }#endif    QPalette palette() const { return visual->palette; }    void setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c);    void resetPalette() // Called when the desktop color scheme changes.    {        const_cast<StyleVisualData *>(visual.get())->palette = QApplication::palette();    }    ContentData* contentData() { return content; }    bool contentDataEquivalent(RenderStyle* otherStyle);    void setContent(DOM::DOMStringImpl* s, bool add = false);    void setContent(CachedObject* o, bool add = false);    bool inheritedNotEqual( RenderStyle *other ) const;    enum Diff { Equal, NonVisible = Equal, Visible, Position, Layout, CbLayout };    Diff diff( const RenderStyle *other ) const;    bool isDisplayReplacedType() {        return display() == INLINE_BLOCK || display() == INLINE_BOX || display() == INLINE_TABLE;    }    bool isDisplayInlineType() {        return display() == INLINE || isDisplayReplacedType();    }    bool isOriginalDisplayInlineType() {        return originalDisplay() == INLINE || originalDisplay() == INLINE_BLOCK ||               originalDisplay() == INLINE_BOX || originalDisplay() == INLINE_TABLE;    }        // To obtain at any time the pseudo state for a given link.    PseudoState pseudoState() const { return m_pseudoState; }    void setPseudoState(PseudoState s) { m_pseudoState = s; }        // To tell if this style matched attribute selectors. This makes it impossible to share.    bool affectedByAttributeSelectors() const { return m_affectedByAttributeSelectors; }    void setAffectedByAttributeSelectors() { m_affectedByAttributeSelectors = true; }    // Initial values for all the properties    static bool initialBackgroundAttachment() { return true; }    static EBackgroundRepeat initialBackgroundRepeat() { return REPEAT; }    static bool initialBorderCollapse() { return false; }    static EBorderStyle initialBorderStyle() { return BNONE; }    static ECaptionSide initialCaptionSide() { return CAPTOP; }    static EClear initialClear() { return CNONE; }    static EDirection initialDirection() { return LTR; }    static EDisplay initialDisplay() { return INLINE; }    static EEmptyCell initialEmptyCells() { return SHOW; }    static EFloat initialFloating() { return FNONE; }    static EListStylePosition initialListStylePosition() { return OUTSIDE; }    static EListStyleType initialListStyleType() { return DISC; }    static EOverflow initialOverflow() { return OVISIBLE; }    static EPageBreak initialPageBreak() { return PBAUTO; }    static EPosition initialPosition() { return STATIC; }    static ETableLayout initialTableLayout() { return TAUTO; }    static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }    static ETextTransform initialTextTransform() { return TTNONE; }    static EVisibility initialVisibility() { return VISIBLE; }    static EWhiteSpace initialWhiteSpace() { return NORMAL; }    static Length initialBackgroundXPosition() { return Length(); }    static Length initialBackgroundYPosition() { return Length(); }    static short initialHorizontalBorderSpacing() { return 0; }    static short initialVerticalBorderSpacing() { return 0; }    static ECursor initialCursor() { return CURSOR_AUTO; }    static QColor initialColor() { return Qt::black; }    static CachedImage* initialBackgroundImage() { return 0; }    static CachedImage* initialListStyleImage() { return 0; }    static unsigned short initialBorderWidth() { return 3; }    static int initialLetterWordSpacing() { return 0; }    static Length initialSize() { return Length(); }    static Length initialMinSize() { return Length(0, Fixed); }    static Length initialMaxSize() { return Length(UNDEFINED, Fixed); }    static Length initialOffset() { return Length(); }    static Length initialMargin() { return Length(Fixed); }    static Length initialPadding() { return Length(Variable); }    static Length initialTextIndent() { return Length(Fixed); }    static EVerticalAlign initialVerticalAlign() { return BASELINE; }    static int initialWidows() { return 2; }    static int initialOrphans() { return 2; }    static Length initialLineHeight() { return Length(-100, Percent); }    static ETextAlign initialTextAlign() { return TAAUTO; }    static ETextDecoration initialTextDecoration() { return TDNONE; }    static int initialOutlineOffset() { return 0; }    static float initialOpacity() { return 1.0f; }    static EBoxAlignment initialBoxAlign() { return BSTRETCH; }    static EBoxDirection initialBoxDirection() { return BNORMAL; }    static EBoxLines initialBoxLines() { return SINGLE; }    static EBoxOrient initialBoxOrient() { return HORIZONTAL; }    static EBoxAlignment initialBoxPack() { return BSTART; }    static float initialBoxFlex() { return 0.0f; }    static int initialBoxFlexGroup() { return 1; }    static int initialBoxOrdinalGroup() { return 1; }    static int initialMarqueeLoopCount() { return -1; }    static int initialMarqueeSpeed() { return 85; }    static Length initialMarqueeIncrement() { return Length(6, Fixed); }    static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; }    static EMarqueeDirection initialMarqueeDirection() { return MAUTO; }    static EUserModify initialUserModify() { return READ_ONLY; }    static EUserDrag initialUserDrag() { return DRAG_AUTO; }    static EUserSelect initialUserSelect() { return SELECT_AUTO; }    static bool initialTextOverflow() { return false; }#if APPLE_CHANGES    // Keep these at the end.    static int initialLineClamp() { return -1; }    static bool initialTextSizeAdjust() { return true; }#endif};} // namespace#endif

⌨️ 快捷键说明

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