| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 LayoutBoxExtent imageOutsets(const NinePieceImage&) const; | 336 LayoutBoxExtent imageOutsets(const NinePieceImage&) const; |
| 337 bool hasBorderImageOutsets() const | 337 bool hasBorderImageOutsets() const |
| 338 { | 338 { |
| 339 return borderImage().hasImage() && borderImage().outset().nonZero(); | 339 return borderImage().hasImage() && borderImage().outset().nonZero(); |
| 340 } | 340 } |
| 341 LayoutBoxExtent borderImageOutsets() const | 341 LayoutBoxExtent borderImageOutsets() const |
| 342 { | 342 { |
| 343 return imageOutsets(borderImage()); | 343 return imageOutsets(borderImage()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 LayoutBoxExtent maskBoxImageOutsets() const | |
| 347 { | |
| 348 return imageOutsets(maskBoxImage()); | |
| 349 } | |
| 350 | |
| 351 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets();
} | 346 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets();
} |
| 352 FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets(
) : FilterOutsets(); } | 347 FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets(
) : FilterOutsets(); } |
| 353 | 348 |
| 354 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO
rdering); } | 349 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO
rdering); } |
| 355 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } | 350 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } |
| 356 | 351 |
| 357 // attribute getter methods | 352 // attribute getter methods |
| 358 | 353 |
| 359 EDisplay display() const { return static_cast<EDisplay>(noninherited_flags.e
ffectiveDisplay); } | 354 EDisplay display() const { return static_cast<EDisplay>(noninherited_flags.e
ffectiveDisplay); } |
| 360 EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited
_flags.originalDisplay); } | 355 EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited
_flags.originalDisplay); } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 EFillAttachment backgroundAttachment() const { return static_cast<EFillAttac
hment>(m_background->background().attachment()); } | 555 EFillAttachment backgroundAttachment() const { return static_cast<EFillAttac
hment>(m_background->background().attachment()); } |
| 561 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background-
>background().clip()); } | 556 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background-
>background().clip()); } |
| 562 EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_backgroun
d->background().origin()); } | 557 EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_backgroun
d->background().origin()); } |
| 563 const Length& backgroundXPosition() const { return m_background->background(
).xPosition(); } | 558 const Length& backgroundXPosition() const { return m_background->background(
).xPosition(); } |
| 564 const Length& backgroundYPosition() const { return m_background->background(
).yPosition(); } | 559 const Length& backgroundYPosition() const { return m_background->background(
).yPosition(); } |
| 565 EFillSizeType backgroundSizeType() const { return m_background->background()
.sizeType(); } | 560 EFillSizeType backgroundSizeType() const { return m_background->background()
.sizeType(); } |
| 566 const LengthSize& backgroundSizeLength() const { return m_background->backgr
ound().sizeLength(); } | 561 const LengthSize& backgroundSizeLength() const { return m_background->backgr
ound().sizeLength(); } |
| 567 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr
ound; } | 562 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr
ound; } |
| 568 const FillLayer& backgroundLayers() const { return m_background->background(
); } | 563 const FillLayer& backgroundLayers() const { return m_background->background(
); } |
| 569 | 564 |
| 570 StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image();
} | |
| 571 EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInh
eritedData->m_mask.repeatX()); } | |
| 572 EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInh
eritedData->m_mask.repeatY()); } | |
| 573 CompositeOperator maskComposite() const { return static_cast<CompositeOperat
or>(rareNonInheritedData->m_mask.composite()); } | |
| 574 EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedDat
a->m_mask.clip()); } | |
| 575 EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedD
ata->m_mask.origin()); } | |
| 576 const Length& maskXPosition() const { return rareNonInheritedData->m_mask.xP
osition(); } | |
| 577 const Length& maskYPosition() const { return rareNonInheritedData->m_mask.yP
osition(); } | |
| 578 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz
eType(); } | |
| 579 const LengthSize& maskSizeLength() const { return rareNonInheritedData->m_ma
sk.sizeLength(); } | |
| 580 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask
; } | |
| 581 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; } | |
| 582 | |
| 583 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_
maskBoxImage; } | |
| 584 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask
BoxImage.image(); } | |
| 585 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m
_maskBoxImage.imageSlices(); } | |
| 586 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox
Image.fill(); } | |
| 587 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri
tedData->m_maskBoxImage.borderSlices(); } | |
| 588 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher
itedData->m_maskBoxImage.outset(); } | |
| 589 | |
| 590 short horizontalBorderSpacing() const; | 565 short horizontalBorderSpacing() const; |
| 591 short verticalBorderSpacing() const; | 566 short verticalBorderSpacing() const; |
| 592 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla
gs._empty_cells); } | 567 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla
gs._empty_cells); } |
| 593 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite
d_flags._caption_side); } | 568 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite
d_flags._caption_side); } |
| 594 | 569 |
| 595 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in
herited_flags._list_style_type); } | 570 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in
herited_flags._list_style_type); } |
| 596 StyleImage* listStyleImage() const; | 571 StyleImage* listStyleImage() const; |
| 597 EListStylePosition listStylePosition() const { return static_cast<EListStyle
Position>(inherited_flags._list_style_position); } | 572 EListStylePosition listStylePosition() const { return static_cast<EListStyle
Position>(inherited_flags._list_style_position); } |
| 598 | 573 |
| 599 const Length& marginTop() const { return surround->margin.top(); } | 574 const Length& marginTop() const { return surround->margin.top(); } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPo
sition; } | 696 LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPo
sition; } |
| 722 | 697 |
| 723 // Return true if any transform related property (currently transform, trans
formStyle3D or perspective) | 698 // Return true if any transform related property (currently transform, trans
formStyle3D or perspective) |
| 724 // indicates that we are transforming | 699 // indicates that we are transforming |
| 725 bool hasTransformRelatedProperty() const { return hasTransform() || preserve
s3D() || hasPerspective(); } | 700 bool hasTransformRelatedProperty() const { return hasTransform() || preserve
s3D() || hasPerspective(); } |
| 726 | 701 |
| 727 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }
; | 702 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }
; |
| 728 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize,
ApplyTransformOrigin = IncludeTransformOrigin) const; | 703 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize,
ApplyTransformOrigin = IncludeTransformOrigin) const; |
| 729 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App
lyTransformOrigin = IncludeTransformOrigin) const; | 704 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App
lyTransformOrigin = IncludeTransformOrigin) const; |
| 730 | 705 |
| 731 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar
eNonInheritedData->m_maskBoxImage.hasImage(); } | |
| 732 | |
| 733 unsigned tabSize() const { return rareInheritedData->m_tabSize; } | 706 unsigned tabSize() const { return rareInheritedData->m_tabSize; } |
| 734 | 707 |
| 735 // End CSS3 Getters | 708 // End CSS3 Getters |
| 736 | 709 |
| 737 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat
a->m_wrapFlow); } | 710 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat
a->m_wrapFlow); } |
| 738 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh
eritedData->m_wrapThrough); } | 711 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh
eritedData->m_wrapThrough); } |
| 739 | 712 |
| 740 // Apple-specific property getter methods | 713 // Apple-specific property getter methods |
| 741 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } | 714 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } |
| 742 const CSSAnimationData* animations() const { return rareNonInheritedData->m_
animations.get(); } | 715 const CSSAnimationData* animations() const { return rareNonInheritedData->m_
animations.get(); } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 void setLetterSpacing(float); | 897 void setLetterSpacing(float); |
| 925 | 898 |
| 926 void adjustBackgroundLayers() | 899 void adjustBackgroundLayers() |
| 927 { | 900 { |
| 928 if (backgroundLayers().next()) { | 901 if (backgroundLayers().next()) { |
| 929 accessBackgroundLayers().cullEmptyLayers(); | 902 accessBackgroundLayers().cullEmptyLayers(); |
| 930 accessBackgroundLayers().fillUnsetProperties(); | 903 accessBackgroundLayers().fillUnsetProperties(); |
| 931 } | 904 } |
| 932 } | 905 } |
| 933 | 906 |
| 934 void adjustMaskLayers() | |
| 935 { | |
| 936 if (maskLayers().next()) { | |
| 937 accessMaskLayers().cullEmptyLayers(); | |
| 938 accessMaskLayers().fillUnsetProperties(); | |
| 939 } | |
| 940 } | |
| 941 | |
| 942 void setMaskImage(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()-
>m_mask.setImage(v); } | |
| 943 | |
| 944 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData
, m_maskBoxImage, b); } | |
| 945 void setMaskBoxImageSource(PassRefPtr<StyleImage> v) { rareNonInheritedData.
access()->m_maskBoxImage.setImage(v); } | |
| 946 void setMaskBoxImageSlices(const LengthBox& slices) | |
| 947 { | |
| 948 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); | |
| 949 } | |
| 950 void setMaskBoxImageSlicesFill(bool fill) | |
| 951 { | |
| 952 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); | |
| 953 } | |
| 954 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) | |
| 955 { | |
| 956 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); | |
| 957 } | |
| 958 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) | |
| 959 { | |
| 960 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); | |
| 961 } | |
| 962 void setMaskXPosition(const Length& length) { SET_VAR(rareNonInheritedData,
m_mask.m_xPosition, length); } | |
| 963 void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData,
m_mask.m_yPosition, length); } | |
| 964 void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask
.m_sizeLength, s); } | |
| 965 | |
| 966 void setHorizontalBorderSpacing(short); | 907 void setHorizontalBorderSpacing(short); |
| 967 void setVerticalBorderSpacing(short); | 908 void setVerticalBorderSpacing(short); |
| 968 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } | 909 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } |
| 969 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } | 910 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } |
| 970 | 911 |
| 971 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa
tio, b); } | 912 void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRa
tio, b); } |
| 972 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as
pectRatioDenominator, v); } | 913 void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_as
pectRatioDenominator, v); } |
| 973 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe
ctRatioNumerator, v); } | 914 void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspe
ctRatioNumerator, v); } |
| 974 | 915 |
| 975 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type =
v; } | 916 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type =
v; } |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN
one; } | 1215 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN
one; } |
| 1275 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom
; } | 1216 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom
; } |
| 1276 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha
sisPositionOver; } | 1217 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha
sisPositionOver; } |
| 1277 static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock |
LineBoxContainInline | LineBoxContainReplaced; } | 1218 static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock |
LineBoxContainInline | LineBoxContainReplaced; } |
| 1278 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft
; } | 1219 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft
; } |
| 1279 static EImageRendering initialImageRendering() { return ImageRenderingAuto;
} | 1220 static EImageRendering initialImageRendering() { return ImageRenderingAuto;
} |
| 1280 static ImageResolutionSource initialImageResolutionSource() { return ImageRe
solutionSpecified; } | 1221 static ImageResolutionSource initialImageResolutionSource() { return ImageRe
solutionSpecified; } |
| 1281 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu
tionNoSnap; } | 1222 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu
tionNoSnap; } |
| 1282 static float initialImageResolution() { return 1; } | 1223 static float initialImageResolution() { return 1; } |
| 1283 static StyleImage* initialBorderImageSource() { return 0; } | 1224 static StyleImage* initialBorderImageSource() { return 0; } |
| 1284 static StyleImage* initialMaskBoxImageSource() { return 0; } | |
| 1285 static TouchAction initialTouchAction() { return TouchActionAuto; } | 1225 static TouchAction initialTouchAction() { return TouchActionAuto; } |
| 1286 static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayS
cript; } | 1226 static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayS
cript; } |
| 1287 static ShadowList* initialBoxShadow() { return 0; } | 1227 static ShadowList* initialBoxShadow() { return 0; } |
| 1288 static ShadowList* initialTextShadow() { return 0; } | 1228 static ShadowList* initialTextShadow() { return 0; } |
| 1289 | 1229 |
| 1290 static unsigned initialTabSize() { return 8; } | 1230 static unsigned initialTabSize() { return 8; } |
| 1291 | 1231 |
| 1292 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } | 1232 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } |
| 1293 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } | 1233 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } |
| 1294 | 1234 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 | 1304 |
| 1365 rareInheritedData.access()->m_textOrientation = textOrientation; | 1305 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1366 return true; | 1306 return true; |
| 1367 } | 1307 } |
| 1368 | 1308 |
| 1369 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1309 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
| 1370 | 1310 |
| 1371 } // namespace blink | 1311 } // namespace blink |
| 1372 | 1312 |
| 1373 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ | 1313 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ |
| OLD | NEW |