| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 DataRef<StyleRareInheritedData> rareInheritedData; | 125 DataRef<StyleRareInheritedData> rareInheritedData; |
| 126 DataRef<StyleInheritedData> inherited; | 126 DataRef<StyleInheritedData> inherited; |
| 127 | 127 |
| 128 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp
and implicitlyInherited() in StyleResolver.cpp | 128 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp
and implicitlyInherited() in StyleResolver.cpp |
| 129 | 129 |
| 130 // inherit | 130 // inherit |
| 131 struct InheritedFlags { | 131 struct InheritedFlags { |
| 132 bool operator==(const InheritedFlags& other) const | 132 bool operator==(const InheritedFlags& other) const |
| 133 { | 133 { |
| 134 return (_empty_cells == other._empty_cells) | 134 return (_empty_cells == other._empty_cells) |
| 135 && (_caption_side == other._caption_side) | |
| 136 && (_visibility == other._visibility) | 135 && (_visibility == other._visibility) |
| 137 && (_text_align == other._text_align) | 136 && (_text_align == other._text_align) |
| 138 && (m_textUnderline == other.m_textUnderline) | 137 && (m_textUnderline == other.m_textUnderline) |
| 139 && (_direction == other._direction) | 138 && (_direction == other._direction) |
| 140 && (_white_space == other._white_space) | 139 && (_white_space == other._white_space) |
| 141 && (m_rtlOrdering == other.m_rtlOrdering) | 140 && (m_rtlOrdering == other.m_rtlOrdering) |
| 142 && (_pointerEvents == other._pointerEvents); | 141 && (_pointerEvents == other._pointerEvents); |
| 143 } | 142 } |
| 144 | 143 |
| 145 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } | 144 bool operator!=(const InheritedFlags& other) const { return !(*this == o
ther); } |
| 146 | 145 |
| 147 unsigned _empty_cells : 1; // EEmptyCell | 146 unsigned _empty_cells : 1; // EEmptyCell |
| 148 unsigned _caption_side : 2; // ECaptionSide | |
| 149 unsigned _visibility : 2; // EVisibility | 147 unsigned _visibility : 2; // EVisibility |
| 150 unsigned _text_align : 4; // ETextAlign | 148 unsigned _text_align : 4; // ETextAlign |
| 151 unsigned m_textUnderline : 1; | 149 unsigned m_textUnderline : 1; |
| 152 unsigned _direction : 1; // TextDirection | 150 unsigned _direction : 1; // TextDirection |
| 153 unsigned _white_space : 3; // EWhiteSpace | 151 unsigned _white_space : 3; // EWhiteSpace |
| 154 | 152 |
| 155 // non CSS2 inherited | 153 // non CSS2 inherited |
| 156 unsigned m_rtlOrdering : 1; // Order | 154 unsigned m_rtlOrdering : 1; // Order |
| 157 unsigned _pointerEvents : 4; // EPointerEvents | 155 unsigned _pointerEvents : 4; // EPointerEvents |
| 158 | 156 |
| 159 // 19 bits | 157 // 19 bits |
| 160 } inherited_flags; | 158 } inherited_flags; |
| 161 | 159 |
| 162 // don't inherit | 160 // don't inherit |
| 163 struct NonInheritedFlags { | 161 struct NonInheritedFlags { |
| 164 bool operator==(const NonInheritedFlags& other) const | 162 bool operator==(const NonInheritedFlags& other) const |
| 165 { | 163 { |
| 166 return effectiveDisplay == other.effectiveDisplay | 164 return effectiveDisplay == other.effectiveDisplay |
| 167 && originalDisplay == other.originalDisplay | 165 && originalDisplay == other.originalDisplay |
| 168 && overflowX == other.overflowX | 166 && overflowX == other.overflowX |
| 169 && overflowY == other.overflowY | 167 && overflowY == other.overflowY |
| 170 && verticalAlign == other.verticalAlign | 168 && verticalAlign == other.verticalAlign |
| 171 && position == other.position | 169 && position == other.position |
| 172 && tableLayout == other.tableLayout | 170 && tableLayout == other.tableLayout |
| 173 && pageBreakBefore == other.pageBreakBefore | |
| 174 && pageBreakAfter == other.pageBreakAfter | |
| 175 && pageBreakInside == other.pageBreakInside | |
| 176 && styleType == other.styleType | 171 && styleType == other.styleType |
| 177 && affectedByFocus == other.affectedByFocus | 172 && affectedByFocus == other.affectedByFocus |
| 178 && affectedByHover == other.affectedByHover | 173 && affectedByHover == other.affectedByHover |
| 179 && affectedByActive == other.affectedByActive | 174 && affectedByActive == other.affectedByActive |
| 180 && unicodeBidi == other.unicodeBidi | 175 && unicodeBidi == other.unicodeBidi |
| 181 && explicitInheritance == other.explicitInheritance | 176 && explicitInheritance == other.explicitInheritance |
| 182 && currentColor == other.currentColor | 177 && currentColor == other.currentColor |
| 183 && unique == other.unique | 178 && unique == other.unique |
| 184 && emptyState == other.emptyState | 179 && emptyState == other.emptyState |
| 185 && firstChildState == other.firstChildState | 180 && firstChildState == other.firstChildState |
| (...skipping 11 matching lines...) Expand all Loading... |
| 197 unsigned position : 1; // EPosition | 192 unsigned position : 1; // EPosition |
| 198 unsigned tableLayout : 1; // ETableLayout | 193 unsigned tableLayout : 1; // ETableLayout |
| 199 unsigned unicodeBidi : 3; // EUnicodeBidi | 194 unsigned unicodeBidi : 3; // EUnicodeBidi |
| 200 | 195 |
| 201 // This is set if we used viewport units when resolving a length. | 196 // This is set if we used viewport units when resolving a length. |
| 202 // It is mutable so we can pass around const RenderStyles to resolve len
gths. | 197 // It is mutable so we can pass around const RenderStyles to resolve len
gths. |
| 203 mutable unsigned hasViewportUnits : 1; | 198 mutable unsigned hasViewportUnits : 1; |
| 204 | 199 |
| 205 // 32 bits | 200 // 32 bits |
| 206 | 201 |
| 207 unsigned pageBreakBefore : 2; // EPageBreak | |
| 208 unsigned pageBreakAfter : 2; // EPageBreak | |
| 209 unsigned pageBreakInside : 2; // EPageBreak | |
| 210 | |
| 211 unsigned styleType : 6; // PseudoId | 202 unsigned styleType : 6; // PseudoId |
| 212 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited
property | 203 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited
property |
| 213 unsigned currentColor : 1; // At least one color has the value 'currentC
olor' | 204 unsigned currentColor : 1; // At least one color has the value 'currentC
olor' |
| 214 unsigned unique : 1; // Style can not be shared. | 205 unsigned unique : 1; // Style can not be shared. |
| 215 | 206 |
| 216 unsigned emptyState : 1; | 207 unsigned emptyState : 1; |
| 217 unsigned firstChildState : 1; | 208 unsigned firstChildState : 1; |
| 218 unsigned lastChildState : 1; | 209 unsigned lastChildState : 1; |
| 219 | 210 |
| 220 unsigned affectedByFocus : 1; | 211 unsigned affectedByFocus : 1; |
| 221 unsigned affectedByHover : 1; | 212 unsigned affectedByHover : 1; |
| 222 unsigned affectedByActive : 1; | 213 unsigned affectedByActive : 1; |
| 223 | 214 |
| 224 unsigned isLink : 1; | 215 unsigned isLink : 1; |
| 225 // If you add more style bits here, you will also need to update RenderS
tyle::copyNonInheritedFrom() | 216 // If you add more style bits here, you will also need to update RenderS
tyle::copyNonInheritedFrom() |
| 226 // 63 bits | 217 // 63 bits |
| 227 } noninherited_flags; | 218 } noninherited_flags; |
| 228 | 219 |
| 229 // !END SYNC! | 220 // !END SYNC! |
| 230 | 221 |
| 231 protected: | 222 protected: |
| 232 void setBitDefaults() | 223 void setBitDefaults() |
| 233 { | 224 { |
| 234 inherited_flags._empty_cells = initialEmptyCells(); | 225 inherited_flags._empty_cells = initialEmptyCells(); |
| 235 inherited_flags._caption_side = initialCaptionSide(); | |
| 236 inherited_flags._visibility = initialVisibility(); | 226 inherited_flags._visibility = initialVisibility(); |
| 237 inherited_flags._text_align = initialTextAlign(); | 227 inherited_flags._text_align = initialTextAlign(); |
| 238 inherited_flags.m_textUnderline = false; | 228 inherited_flags.m_textUnderline = false; |
| 239 inherited_flags._direction = initialDirection(); | 229 inherited_flags._direction = initialDirection(); |
| 240 inherited_flags._white_space = initialWhiteSpace(); | 230 inherited_flags._white_space = initialWhiteSpace(); |
| 241 inherited_flags.m_rtlOrdering = initialRTLOrdering(); | 231 inherited_flags.m_rtlOrdering = initialRTLOrdering(); |
| 242 inherited_flags._pointerEvents = initialPointerEvents(); | 232 inherited_flags._pointerEvents = initialPointerEvents(); |
| 243 | 233 |
| 244 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay
= initialDisplay(); | 234 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay
= initialDisplay(); |
| 245 noninherited_flags.overflowX = initialOverflowX(); | 235 noninherited_flags.overflowX = initialOverflowX(); |
| 246 noninherited_flags.overflowY = initialOverflowY(); | 236 noninherited_flags.overflowY = initialOverflowY(); |
| 247 noninherited_flags.verticalAlign = initialVerticalAlign(); | 237 noninherited_flags.verticalAlign = initialVerticalAlign(); |
| 248 noninherited_flags.position = initialPosition(); | 238 noninherited_flags.position = initialPosition(); |
| 249 noninherited_flags.tableLayout = initialTableLayout(); | 239 noninherited_flags.tableLayout = initialTableLayout(); |
| 250 noninherited_flags.unicodeBidi = initialUnicodeBidi(); | 240 noninherited_flags.unicodeBidi = initialUnicodeBidi(); |
| 251 noninherited_flags.pageBreakBefore = initialPageBreak(); | |
| 252 noninherited_flags.pageBreakAfter = initialPageBreak(); | |
| 253 noninherited_flags.pageBreakInside = initialPageBreak(); | |
| 254 noninherited_flags.explicitInheritance = false; | 241 noninherited_flags.explicitInheritance = false; |
| 255 noninherited_flags.currentColor = false; | 242 noninherited_flags.currentColor = false; |
| 256 noninherited_flags.unique = false; | 243 noninherited_flags.unique = false; |
| 257 noninherited_flags.emptyState = false; | 244 noninherited_flags.emptyState = false; |
| 258 noninherited_flags.firstChildState = false; | 245 noninherited_flags.firstChildState = false; |
| 259 noninherited_flags.lastChildState = false; | 246 noninherited_flags.lastChildState = false; |
| 260 noninherited_flags.hasViewportUnits = false; | 247 noninherited_flags.hasViewportUnits = false; |
| 261 noninherited_flags.affectedByFocus = false; | 248 noninherited_flags.affectedByFocus = false; |
| 262 noninherited_flags.affectedByHover = false; | 249 noninherited_flags.affectedByHover = false; |
| 263 noninherited_flags.affectedByActive = false; | 250 noninherited_flags.affectedByActive = false; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 const Length& backgroundXPosition() const { return m_background->background(
).xPosition(); } | 534 const Length& backgroundXPosition() const { return m_background->background(
).xPosition(); } |
| 548 const Length& backgroundYPosition() const { return m_background->background(
).yPosition(); } | 535 const Length& backgroundYPosition() const { return m_background->background(
).yPosition(); } |
| 549 EFillSizeType backgroundSizeType() const { return m_background->background()
.sizeType(); } | 536 EFillSizeType backgroundSizeType() const { return m_background->background()
.sizeType(); } |
| 550 const LengthSize& backgroundSizeLength() const { return m_background->backgr
ound().sizeLength(); } | 537 const LengthSize& backgroundSizeLength() const { return m_background->backgr
ound().sizeLength(); } |
| 551 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr
ound; } | 538 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr
ound; } |
| 552 const FillLayer& backgroundLayers() const { return m_background->background(
); } | 539 const FillLayer& backgroundLayers() const { return m_background->background(
); } |
| 553 | 540 |
| 554 short horizontalBorderSpacing() const; | 541 short horizontalBorderSpacing() const; |
| 555 short verticalBorderSpacing() const; | 542 short verticalBorderSpacing() const; |
| 556 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla
gs._empty_cells); } | 543 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla
gs._empty_cells); } |
| 557 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite
d_flags._caption_side); } | |
| 558 | 544 |
| 559 const Length& marginTop() const { return surround->margin.top(); } | 545 const Length& marginTop() const { return surround->margin.top(); } |
| 560 const Length& marginBottom() const { return surround->margin.bottom(); } | 546 const Length& marginBottom() const { return surround->margin.bottom(); } |
| 561 const Length& marginLeft() const { return surround->margin.left(); } | 547 const Length& marginLeft() const { return surround->margin.left(); } |
| 562 const Length& marginRight() const { return surround->margin.right(); } | 548 const Length& marginRight() const { return surround->margin.right(); } |
| 563 const Length& marginBefore() const { return surround->margin.before(); } | 549 const Length& marginBefore() const { return surround->margin.before(); } |
| 564 const Length& marginAfter() const { return surround->margin.after(); } | 550 const Length& marginAfter() const { return surround->margin.after(); } |
| 565 const Length& marginStart() const { return surround->margin.start(direction(
)); } | 551 const Length& marginStart() const { return surround->margin.start(direction(
)); } |
| 566 const Length& marginEnd() const { return surround->margin.end(direction());
} | 552 const Length& marginEnd() const { return surround->margin.end(direction());
} |
| 567 const Length& marginStartUsing(const RenderStyle* otherStyle) const { return
surround->margin.start(otherStyle->direction()); } | 553 const Length& marginStartUsing(const RenderStyle* otherStyle) const { return
surround->margin.start(otherStyle->direction()); } |
| 568 const Length& marginEndUsing(const RenderStyle* otherStyle) const { return s
urround->margin.end(otherStyle->direction()); } | 554 const Length& marginEndUsing(const RenderStyle* otherStyle) const { return s
urround->margin.end(otherStyle->direction()); } |
| 569 const Length& marginBeforeUsing(const RenderStyle* otherStyle) const { retur
n surround->margin.before(); } | 555 const Length& marginBeforeUsing(const RenderStyle* otherStyle) const { retur
n surround->margin.before(); } |
| 570 const Length& marginAfterUsing(const RenderStyle* otherStyle) const { return
surround->margin.after(); } | 556 const Length& marginAfterUsing(const RenderStyle* otherStyle) const { return
surround->margin.after(); } |
| 571 | 557 |
| 572 const LengthBox& paddingBox() const { return surround->padding; } | 558 const LengthBox& paddingBox() const { return surround->padding; } |
| 573 const Length& paddingTop() const { return surround->padding.top(); } | 559 const Length& paddingTop() const { return surround->padding.top(); } |
| 574 const Length& paddingBottom() const { return surround->padding.bottom(); } | 560 const Length& paddingBottom() const { return surround->padding.bottom(); } |
| 575 const Length& paddingLeft() const { return surround->padding.left(); } | 561 const Length& paddingLeft() const { return surround->padding.left(); } |
| 576 const Length& paddingRight() const { return surround->padding.right(); } | 562 const Length& paddingRight() const { return surround->padding.right(); } |
| 577 const Length& paddingBefore() const { return surround->padding.before(); } | 563 const Length& paddingBefore() const { return surround->padding.before(); } |
| 578 const Length& paddingAfter() const { return surround->padding.after(); } | 564 const Length& paddingAfter() const { return surround->padding.after(); } |
| 579 const Length& paddingStart() const { return surround->padding.start(directio
n()); } | 565 const Length& paddingStart() const { return surround->padding.start(directio
n()); } |
| 580 const Length& paddingEnd() const { return surround->padding.end(direction())
; } | 566 const Length& paddingEnd() const { return surround->padding.end(direction())
; } |
| 581 | 567 |
| 582 bool isLink() const { return noninherited_flags.isLink; } | 568 bool isLink() const { return noninherited_flags.isLink; } |
| 583 | 569 |
| 584 short widows() const { return rareInheritedData->widows; } | 570 short widows() const { return rareInheritedData->widows; } |
| 585 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } | 571 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } |
| 586 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakInside); } | |
| 587 EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninher
ited_flags.pageBreakBefore); } | |
| 588 EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninheri
ted_flags.pageBreakAfter); } | |
| 589 | 572 |
| 590 // CSS3 Getter Methods | 573 // CSS3 Getter Methods |
| 591 | 574 |
| 592 int outlineOffset() const | 575 int outlineOffset() const |
| 593 { | 576 { |
| 594 if (m_background->outline().style() == BNONE) | 577 if (m_background->outline().style() == BNONE) |
| 595 return 0; | 578 return 0; |
| 596 return m_background->outline().offset(); | 579 return m_background->outline().offset(); |
| 597 } | 580 } |
| 598 | 581 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 { | 861 { |
| 879 if (backgroundLayers().next()) { | 862 if (backgroundLayers().next()) { |
| 880 accessBackgroundLayers().cullEmptyLayers(); | 863 accessBackgroundLayers().cullEmptyLayers(); |
| 881 accessBackgroundLayers().fillUnsetProperties(); | 864 accessBackgroundLayers().fillUnsetProperties(); |
| 882 } | 865 } |
| 883 } | 866 } |
| 884 | 867 |
| 885 void setHorizontalBorderSpacing(short); | 868 void setHorizontalBorderSpacing(short); |
| 886 void setVerticalBorderSpacing(short); | 869 void setVerticalBorderSpacing(short); |
| 887 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } | 870 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } |
| 888 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } | |
| 889 | 871 |
| 890 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa
tio, b); } | 872 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa
tio, b); } |
| 891 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as
pectRatioDenominator, v); } | 873 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as
pectRatioDenominator, v); } |
| 892 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe
ctRatioNumerator, v); } | 874 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe
ctRatioNumerator, v); } |
| 893 | 875 |
| 894 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); } | 876 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); } |
| 895 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v
); } | 877 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v
); } |
| 896 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); } | 878 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); } |
| 897 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v);
} | 879 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v);
} |
| 898 void setMarginStart(const Length&); | 880 void setMarginStart(const Length&); |
| 899 void setMarginEnd(const Length&); | 881 void setMarginEnd(const Length&); |
| 900 | 882 |
| 901 void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)); } | 883 void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)); } |
| 902 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } | 884 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } |
| 903 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } | 885 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } |
| 904 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom,
v); } | 886 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom,
v); } |
| 905 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v);
} | 887 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v);
} |
| 906 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v
); } | 888 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v
); } |
| 907 | 889 |
| 908 void setIsLink(bool b) { noninherited_flags.isLink = b; } | 890 void setIsLink(bool b) { noninherited_flags.isLink = b; } |
| 909 | 891 |
| 910 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } | 892 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } |
| 911 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } | 893 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b
ox, m_zIndex, 0); } |
| 912 unsigned zIndex() const { return m_box->zIndex(); } | 894 unsigned zIndex() const { return m_box->zIndex(); } |
| 913 void setZIndex(unsigned v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR
(m_box, m_zIndex, v); } | 895 void setZIndex(unsigned v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR
(m_box, m_zIndex, v); } |
| 914 | 896 |
| 915 void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true);
SET_VAR(rareInheritedData, widows, initialWidows()); } | 897 void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true);
SET_VAR(rareInheritedData, widows, initialWidows()); } |
| 916 void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false)
; SET_VAR(rareInheritedData, widows, w); } | 898 void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false)
; SET_VAR(rareInheritedData, widows, w); } |
| 917 | 899 |
| 918 // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page
.html#page-break-props | |
| 919 void setPageBreakInside(EPageBreak b) { ASSERT(b == PBAUTO || b == PBAVOID);
noninherited_flags.pageBreakInside = b; } | |
| 920 void setPageBreakBefore(EPageBreak b) { noninherited_flags.pageBreakBefore =
b; } | |
| 921 void setPageBreakAfter(EPageBreak b) { noninherited_flags.pageBreakAfter = b
; } | |
| 922 | |
| 923 // CSS3 Setters | 900 // CSS3 Setters |
| 924 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v);
} | 901 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v);
} |
| 925 void setTextShadow(PassRefPtr<ShadowList>); | 902 void setTextShadow(PassRefPtr<ShadowList>); |
| 926 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInher
itedData, textStrokeColor, setTextStrokeColor, c); } | 903 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInher
itedData, textStrokeColor, setTextStrokeColor, c); } |
| 927 void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidt
h, w); } | 904 void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidt
h, w); } |
| 928 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInherit
edData, textFillColor, setTextFillColor, c); } | 905 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInherit
edData, textFillColor, setTextFillColor, c); } |
| 929 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(rareNo
nInheritedData, opacity, v); } | 906 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(rareNo
nInheritedData, opacity, v); } |
| 930 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb
ox-20090723/#alignment | 907 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb
ox-20090723/#alignment |
| 931 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco
rationBreak, b); } | 908 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco
rationBreak, b); } |
| 932 void setBoxShadow(PassRefPtr<ShadowList>); | 909 void setBoxShadow(PassRefPtr<ShadowList>); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 void setHasCurrentColor() { noninherited_flags.currentColor = true; } | 1039 void setHasCurrentColor() { noninherited_flags.currentColor = true; } |
| 1063 bool hasCurrentColor() const { return noninherited_flags.currentColor; } | 1040 bool hasCurrentColor() const { return noninherited_flags.currentColor; } |
| 1064 | 1041 |
| 1065 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() ||
hasOutline() || boxShadow() || hasFilter(); } | 1042 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() ||
hasOutline() || boxShadow() || hasFilter(); } |
| 1066 | 1043 |
| 1067 // Initial values for all the properties | 1044 // Initial values for all the properties |
| 1068 static EBorderStyle initialBorderStyle() { return BNONE; } | 1045 static EBorderStyle initialBorderStyle() { return BNONE; } |
| 1069 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } | 1046 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } |
| 1070 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } | 1047 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } |
| 1071 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed)
, Length(0, Fixed)); } | 1048 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed)
, Length(0, Fixed)); } |
| 1072 static ECaptionSide initialCaptionSide() { return CAPTOP; } | |
| 1073 static LengthBox initialClip() { return LengthBox(); } | 1049 static LengthBox initialClip() { return LengthBox(); } |
| 1074 static TextDirection initialDirection() { return LTR; } | 1050 static TextDirection initialDirection() { return LTR; } |
| 1075 static TextOrientation initialTextOrientation() { return TextOrientationVert
icalRight; } | 1051 static TextOrientation initialTextOrientation() { return TextOrientationVert
icalRight; } |
| 1076 static ObjectFit initialObjectFit() { return ObjectFitFill; } | 1052 static ObjectFit initialObjectFit() { return ObjectFitFill; } |
| 1077 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } | 1053 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } |
| 1078 static EDisplay initialDisplay() { return FLEX; } | 1054 static EDisplay initialDisplay() { return FLEX; } |
| 1079 static EEmptyCell initialEmptyCells() { return SHOW; } | 1055 static EEmptyCell initialEmptyCells() { return SHOW; } |
| 1080 static EOverflow initialOverflowX() { return OVISIBLE; } | 1056 static EOverflow initialOverflowX() { return OVISIBLE; } |
| 1081 static EOverflow initialOverflowY() { return OVISIBLE; } | 1057 static EOverflow initialOverflowY() { return OVISIBLE; } |
| 1082 static EPageBreak initialPageBreak() { return PBAUTO; } | |
| 1083 static EPosition initialPosition() { return StaticPosition; } | 1058 static EPosition initialPosition() { return StaticPosition; } |
| 1084 static ETableLayout initialTableLayout() { return TAUTO; } | 1059 static ETableLayout initialTableLayout() { return TAUTO; } |
| 1085 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | 1060 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } |
| 1086 static EVisibility initialVisibility() { return VISIBLE; } | 1061 static EVisibility initialVisibility() { return VISIBLE; } |
| 1087 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | 1062 static EWhiteSpace initialWhiteSpace() { return NORMAL; } |
| 1088 static short initialHorizontalBorderSpacing() { return 0; } | 1063 static short initialHorizontalBorderSpacing() { return 0; } |
| 1089 static short initialVerticalBorderSpacing() { return 0; } | 1064 static short initialVerticalBorderSpacing() { return 0; } |
| 1090 static Color initialColor() { return Color::black; } | 1065 static Color initialColor() { return Color::black; } |
| 1091 static unsigned initialBorderWidth() { return 3; } | 1066 static unsigned initialBorderWidth() { return 3; } |
| 1092 static unsigned short initialColumnRuleWidth() { return 3; } | 1067 static unsigned short initialColumnRuleWidth() { return 3; } |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 | 1233 |
| 1259 rareInheritedData.access()->m_textOrientation = textOrientation; | 1234 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1260 return true; | 1235 return true; |
| 1261 } | 1236 } |
| 1262 | 1237 |
| 1263 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1238 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
| 1264 | 1239 |
| 1265 } // namespace blink | 1240 } // namespace blink |
| 1266 | 1241 |
| 1267 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ | 1242 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ |
| OLD | NEW |