📄 renderstyle.h
字号:
#if ENABLE(DASHBOARD_SUPPORT) Vector<StyleDashboardRegion> dashboardRegions() const { return rareNonInheritedData->m_dashboardRegions; } void setDashboardRegions(Vector<StyleDashboardRegion> regions) { SET_VAR(rareNonInheritedData, m_dashboardRegions, regions); } void setDashboardRegion(int type, const String& label, Length t, Length r, Length b, Length l, bool append) { StyleDashboardRegion region; region.label = label; region.offset.m_top = t; region.offset.m_right = r; region.offset.m_bottom = b; region.offset.m_left = l; region.type = type; if (!append) rareNonInheritedData.access()->m_dashboardRegions.clear(); rareNonInheritedData.access()->m_dashboardRegions.append(region); }#endif void resetBorder() { resetBorderImage(); resetBorderTop(); resetBorderRight(); resetBorderBottom(); resetBorderLeft(); resetBorderRadius(); } 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 resetBorderImage() { SET_VAR(surround, border.image, NinePieceImage()) } void resetBorderRadius() { resetBorderTopLeftRadius(); resetBorderTopRightRadius(); resetBorderBottomLeftRadius(); resetBorderBottomRightRadius(); } void resetBorderTopLeftRadius() { SET_VAR(surround, border.topLeft, initialBorderRadius()) } void resetBorderTopRightRadius() { SET_VAR(surround, border.topRight, initialBorderRadius()) } void resetBorderBottomLeftRadius() { SET_VAR(surround, border.bottomLeft, initialBorderRadius()) } void resetBorderBottomRightRadius() { SET_VAR(surround, border.bottomRight, initialBorderRadius()) } void resetOutline() { SET_VAR(background, m_outline, OutlineValue()) } void setBackgroundColor(const Color& v) { SET_VAR(background, m_color, v) } void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.image, b) } void setBorderTopLeftRadius(const IntSize& s) { SET_VAR(surround, border.topLeft, s) } void setBorderTopRightRadius(const IntSize& s) { SET_VAR(surround, border.topRight, s) } void setBorderBottomLeftRadius(const IntSize& s) { SET_VAR(surround, border.bottomLeft, s) } void setBorderBottomRightRadius(const IntSize& s) { SET_VAR(surround, border.bottomRight, s) } void setBorderRadius(const IntSize& s) { setBorderTopLeftRadius(s); setBorderTopRightRadius(s); setBorderBottomLeftRadius(s); setBorderBottomRightRadius(s); } void setBorderLeftWidth(unsigned short v) { SET_VAR(surround, border.left.width, v) } void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround, border.left.m_style, v) } void setBorderLeftColor(const Color& 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.m_style, v) } void setBorderRightColor(const Color& 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.m_style, v) } void setBorderTopColor(const Color& 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.m_style, v) } void setBorderBottomColor(const Color& v) { SET_VAR(surround, border.bottom.color, v) } void setOutlineWidth(unsigned short v) { SET_VAR(background, m_outline.width, v) } void setOutlineStyle(EBorderStyle v, bool isAuto = false) { SET_VAR(background, m_outline.m_style, v) SET_VAR(background, m_outline._auto, isAuto) } void setOutlineColor(const Color& v) { SET_VAR(background, m_outline.color, v) } void setOverflowX(EOverflow v) { noninherited_flags._overflowX = v; } void setOverflowY(EOverflow v) { noninherited_flags._overflowY = 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.m_left, v) } void setClipRight(Length v) { SET_VAR(visual, clip.m_right, v) } void setClipTop(Length v) { SET_VAR(visual, clip.m_top, v) } void setClipBottom(Length v) { SET_VAR(visual, clip.m_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; } bool setFontDescription(const FontDescription& v) { if (inherited->font.fontDescription() != v) { inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing()); return true; } return false; } // Only used for blending font sizes when animating. void setBlendedFontSize(int); void setColor(const Color& 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(TextDirection v) { inherited_flags._direction = v; } void setLineHeight(Length v) { SET_VAR(inherited, line_height, v) } void setZoom(float f) { SET_VAR(visual, m_zoom, f); setEffectiveZoom(effectiveZoom() * zoom()); } void setEffectiveZoom(float f) { SET_VAR(inherited, m_effectiveZoom, f) } void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; } void setWordSpacing(int v) { inherited.access()->font.setWordSpacing(v); } void setLetterSpacing(int v) { inherited.access()->font.setLetterSpacing(v); } void clearBackgroundLayers() { background.access()->m_background = FillLayer(BackgroundFillLayer); } void inheritBackgroundLayers(const FillLayer& parent) { background.access()->m_background = parent; } void adjustBackgroundLayers() { if (backgroundLayers()->next()) { accessBackgroundLayers()->cullEmptyLayers(); accessBackgroundLayers()->fillUnsetProperties(); } } void clearMaskLayers() { rareNonInheritedData.access()->m_mask = FillLayer(MaskFillLayer); } void inheritMaskLayers(const FillLayer& parent) { rareNonInheritedData.access()->m_mask = parent; } void adjustMaskLayers() { if (maskLayers()->next()) { accessMaskLayers()->cullEmptyLayers(); accessMaskLayers()->fillUnsetProperties(); } } void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData, m_maskBoxImage, b) } 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, counterIncrement, v) } void setCounterReset(short v) { SET_VAR(visual, counterReset, v) } void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } void setListStyleImage(StyleImage* v) { if (inherited->list_style_image != v) inherited.access()->list_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.m_top, v) } void setMarginBottom(Length v) { SET_VAR(surround, margin.m_bottom, v) } void setMarginLeft(Length v) { SET_VAR(surround, margin.m_left, v) } void setMarginRight(Length v) { SET_VAR(surround, margin.m_right, v) } void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)) } void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b) } void setPaddingTop(Length v) { SET_VAR(surround, padding.m_top, v) } void setPaddingBottom(Length v) { SET_VAR(surround, padding.m_bottom, v) } void setPaddingLeft(Length v) { SET_VAR(surround, padding.m_left, v) } void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v) } void setCursor( ECursor c ) { inherited_flags._cursor_style = c; } void addCursor(CachedImage*, const IntPoint& = IntPoint()); void setCursorList(PassRefPtr<CursorList>); void clearCursorList(); bool forceBackgroundsToWhite() const { return inherited_flags._force_backgrounds_to_white; } void setForceBackgroundsToWhite(bool b=true) { inherited_flags._force_backgrounds_to_white = b; } bool htmlHacks() const { return inherited_flags._htmlHacks; } void setHtmlHacks(bool b=true) { inherited_flags._htmlHacks = b; } bool hasAutoZIndex() const { 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#if ENABLE(XBL) void deleteBindingURIs() { SET_VAR(rareNonInheritedData, bindingURI, static_cast<BindingURI*>(0)); } void inheritBindingURIs(BindingURI* other) { SET_VAR(rareNonInheritedData, bindingURI, other->copy()); } void addBindingURI(StringImpl* uri);#endif void setOutlineOffset(int v) { SET_VAR(background, m_outline._offset, v) } void setTextShadow(ShadowData* val, bool add=false); void setTextStrokeColor(const Color& c) { SET_VAR(rareInheritedData, textStrokeColor, c) } void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidth, w) } void setTextFillColor(const Color& c) { SET_VAR(rareInheritedData, textFillColor, c) } void setOpacity(float f) { SET_VAR(rareNonInheritedData, opacity, f); } void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); } void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->flexibleBox, align, a); } void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; } void setBoxFlex(float f) { SET_VAR(rareNonInheritedData.access()->flexibleBox, flex, f); } void setBoxFlexGroup(unsigned int fg) { SET_VAR(rareNonInheritedData.access()->flexibleBox, flex_group, fg); } void setBoxLines(EBoxLines l) { SET_VAR(rareNonInheritedData.access()->flexibleBox, lines, l); } void setBoxOrdinalGroup(unsigned int og) { SET_VAR(rareNonInheritedData.access()->flexibleBox, ordinal_group, og); } void setBoxOrient(EBoxOrient o) { SET_VAR(rareNonInheritedData.access()->flexibleBox, orient, o); } void setBoxPack(EBoxAlignment p) { SET_VAR(rareNonInheritedData.access()->flexibleBox, pack, p); } void setBoxShadow(ShadowData* val, bool add=false); void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInheritedData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = reflect; } void setBoxSizing(EBoxSizing s) { SET_VAR(box, boxSizing, s); } void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->marquee, increment, f); } void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->marquee, speed, f); } void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->marquee, direction, d); } void setMarqueeBehavior(EMarqueeBehavior b) { SET_VAR(rareNonInheritedData.access()->marquee, behavior, b); } void setMarqueeLoopCount(int i) { SET_VAR(rareNonInheritedData.access()->marquee, loops, i); } void setUserModify(EUserModify u) { SET_VAR(rareInheritedData, userModify, u); } void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); } void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s); } void setTextOverflow(bool b) { SET_VAR(rareNonInheritedData, textOverflow, b); } void setMarginTopCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginTopCollapse, c); } void setMarginBottomCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginBottomCollapse, c); } void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); } void setWordWrap(EWordWrap b) { SET_VAR(rareInheritedData, wordWrap, b); } void setNBSPMode(ENBSPMode b) { SET_VAR(rareInheritedData, nbspMode, b); } void setKHTMLLineBreak(EKHTMLLineBreak b) { SET_VAR(rareInheritedData, khtmlLineBreak, b); } void setMatchNearestMailBlockquoteColor(EMatchNearestMailBlockquoteColor c) { SET_VAR(rareNonInheritedData, matchNearestMailBlockquoteColor, c); } void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); } void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -