Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 55783002: Introduce BorderImageLength and BorderImageLengthBox (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved BorderImageLength{,Box} to core/rendering/style Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 const BorderValue& borderBottom() const { return surround->border.bottom(); } 466 const BorderValue& borderBottom() const { return surround->border.bottom(); }
467 467
468 const BorderValue& borderBefore() const; 468 const BorderValue& borderBefore() const;
469 const BorderValue& borderAfter() const; 469 const BorderValue& borderAfter() const;
470 const BorderValue& borderStart() const; 470 const BorderValue& borderStart() const;
471 const BorderValue& borderEnd() const; 471 const BorderValue& borderEnd() const;
472 472
473 const NinePieceImage& borderImage() const { return surround->border.image(); } 473 const NinePieceImage& borderImage() const { return surround->border.image(); }
474 StyleImage* borderImageSource() const { return surround->border.image().imag e(); } 474 StyleImage* borderImageSource() const { return surround->border.image().imag e(); }
475 LengthBox borderImageSlices() const { return surround->border.image().imageS lices(); } 475 LengthBox borderImageSlices() const { return surround->border.image().imageS lices(); }
476 LengthBox borderImageWidth() const { return surround->border.image().borderS lices(); } 476 LengthBox borderImageWidth() const { return surround->border.image().borderS lices().deprecatedLengthBox(); }
477 LengthBox borderImageOutset() const { return surround->border.image().outset (); } 477 LengthBox borderImageOutset() const { return surround->border.image().outset ().deprecatedLengthBox(); }
478 478
479 LengthSize borderTopLeftRadius() const { return surround->border.topLeft(); } 479 LengthSize borderTopLeftRadius() const { return surround->border.topLeft(); }
480 LengthSize borderTopRightRadius() const { return surround->border.topRight() ; } 480 LengthSize borderTopRightRadius() const { return surround->border.topRight() ; }
481 LengthSize borderBottomLeftRadius() const { return surround->border.bottomLe ft(); } 481 LengthSize borderBottomLeftRadius() const { return surround->border.bottomLe ft(); }
482 LengthSize borderBottomRightRadius() const { return surround->border.bottomR ight(); } 482 LengthSize borderBottomRightRadius() const { return surround->border.bottomR ight(); }
483 bool hasBorderRadius() const { return surround->border.hasBorderRadius(); } 483 bool hasBorderRadius() const { return surround->border.hasBorderRadius(); }
484 484
485 unsigned borderLeftWidth() const { return surround->border.borderLeftWidth() ; } 485 unsigned borderLeftWidth() const { return surround->border.borderLeftWidth() ; }
486 EBorderStyle borderLeftStyle() const { return surround->border.left().style( ); } 486 EBorderStyle borderLeftStyle() const { return surround->border.left().style( ); }
487 bool borderLeftIsTransparent() const { return surround->border.left().isTran sparent(); } 487 bool borderLeftIsTransparent() const { return surround->border.left().isTran sparent(); }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 Length maskYPosition() const { return rareNonInheritedData->m_mask.yPosition (); } 641 Length maskYPosition() const { return rareNonInheritedData->m_mask.yPosition (); }
642 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz eType(); } 642 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz eType(); }
643 LengthSize maskSizeLength() const { return rareNonInheritedData->m_mask.size Length(); } 643 LengthSize maskSizeLength() const { return rareNonInheritedData->m_mask.size Length(); }
644 FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_ma sk); } 644 FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_ma sk); }
645 const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask) ; } 645 const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask) ; }
646 646
647 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } 647 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; }
648 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } 648 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); }
649 LengthBox maskBoxImageSlices() const { return rareNonInheritedData->m_maskBo xImage.imageSlices(); } 649 LengthBox maskBoxImageSlices() const { return rareNonInheritedData->m_maskBo xImage.imageSlices(); }
650 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } 650 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); }
651 LengthBox maskBoxImageWidth() const { return rareNonInheritedData->m_maskBox Image.borderSlices(); } 651 LengthBox maskBoxImageWidth() const { return rareNonInheritedData->m_maskBox Image.borderSlices().deprecatedLengthBox(); }
652 LengthBox maskBoxImageOutset() const { return rareNonInheritedData->m_maskBo xImage.outset(); } 652 LengthBox maskBoxImageOutset() const { return rareNonInheritedData->m_maskBo xImage.outset().deprecatedLengthBox(); }
653 653
654 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); } 654 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); }
655 short horizontalBorderSpacing() const; 655 short horizontalBorderSpacing() const;
656 short verticalBorderSpacing() const; 656 short verticalBorderSpacing() const;
657 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); } 657 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); }
658 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); } 658 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); }
659 659
660 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); } 660 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); }
661 StyleImage* listStyleImage() const; 661 StyleImage* listStyleImage() const;
662 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); } 662 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 void setMaskBoxImageSlices(LengthBox slices) 1113 void setMaskBoxImageSlices(LengthBox slices)
1114 { 1114 {
1115 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); 1115 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices);
1116 } 1116 }
1117 void setMaskBoxImageSlicesFill(bool fill) 1117 void setMaskBoxImageSlicesFill(bool fill)
1118 { 1118 {
1119 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); 1119 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill);
1120 } 1120 }
1121 void setMaskBoxImageWidth(LengthBox slices) 1121 void setMaskBoxImageWidth(LengthBox slices)
1122 { 1122 {
1123 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 1123 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(BorderImag eLengthBox(slices));
1124 } 1124 }
1125 void setMaskBoxImageOutset(LengthBox outset) 1125 void setMaskBoxImageOutset(LengthBox outset)
1126 { 1126 {
1127 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); 1127 rareNonInheritedData.access()->m_maskBoxImage.setOutset(BorderImageLengt hBox(outset));
1128 } 1128 }
1129 void setMaskXPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_xPosition, length); } 1129 void setMaskXPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_xPosition, length); }
1130 void setMaskYPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_yPosition, length); } 1130 void setMaskYPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_yPosition, length); }
1131 void setMaskSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_mask.m_size Length, s); } 1131 void setMaskSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_mask.m_size Length, s); }
1132 1132
1133 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } 1133 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; }
1134 void setHorizontalBorderSpacing(short); 1134 void setHorizontalBorderSpacing(short);
1135 void setVerticalBorderSpacing(short); 1135 void setVerticalBorderSpacing(short);
1136 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } 1136 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
1137 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } 1137 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 1822 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1823 return false; 1823 return false;
1824 1824
1825 rareInheritedData.access()->m_textOrientation = textOrientation; 1825 rareInheritedData.access()->m_textOrientation = textOrientation;
1826 return true; 1826 return true;
1827 } 1827 }
1828 1828
1829 } // namespace WebCore 1829 } // namespace WebCore
1830 1830
1831 #endif // RenderStyle_h 1831 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/rendering/style/NinePieceImage.cpp ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698