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

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: 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().lengthBox(); }
477 LengthBox borderImageOutset() const { return surround->border.image().outset (); } 477 LengthBox borderImageOutset() const { return surround->border.image().outset ().lengthBox(); }
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 Length maskYPosition() const { return rareNonInheritedData->m_mask.yPosition (); } 643 Length maskYPosition() const { return rareNonInheritedData->m_mask.yPosition (); }
644 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz eType(); } 644 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz eType(); }
645 LengthSize maskSizeLength() const { return rareNonInheritedData->m_mask.size Length(); } 645 LengthSize maskSizeLength() const { return rareNonInheritedData->m_mask.size Length(); }
646 FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_ma sk); } 646 FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_ma sk); }
647 const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask) ; } 647 const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask) ; }
648 648
649 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } 649 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; }
650 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } 650 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); }
651 LengthBox maskBoxImageSlices() const { return rareNonInheritedData->m_maskBo xImage.imageSlices(); } 651 LengthBox maskBoxImageSlices() const { return rareNonInheritedData->m_maskBo xImage.imageSlices(); }
652 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } 652 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); }
653 LengthBox maskBoxImageWidth() const { return rareNonInheritedData->m_maskBox Image.borderSlices(); } 653 LengthBox maskBoxImageWidth() const { return rareNonInheritedData->m_maskBox Image.borderSlices().lengthBox(); }
654 LengthBox maskBoxImageOutset() const { return rareNonInheritedData->m_maskBo xImage.outset(); } 654 LengthBox maskBoxImageOutset() const { return rareNonInheritedData->m_maskBo xImage.outset().lengthBox(); }
655 655
656 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); } 656 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); }
657 short horizontalBorderSpacing() const; 657 short horizontalBorderSpacing() const;
658 short verticalBorderSpacing() const; 658 short verticalBorderSpacing() const;
659 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); } 659 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_fla gs._empty_cells); }
660 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); } 660 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); }
661 661
662 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); } 662 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); }
663 StyleImage* listStyleImage() const; 663 StyleImage* listStyleImage() const;
664 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); } 664 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); }
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 void setMaskBoxImageSlices(LengthBox slices) 1117 void setMaskBoxImageSlices(LengthBox slices)
1118 { 1118 {
1119 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); 1119 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices);
1120 } 1120 }
1121 void setMaskBoxImageSlicesFill(bool fill) 1121 void setMaskBoxImageSlicesFill(bool fill)
1122 { 1122 {
1123 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); 1123 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill);
1124 } 1124 }
1125 void setMaskBoxImageWidth(LengthBox slices) 1125 void setMaskBoxImageWidth(LengthBox slices)
1126 { 1126 {
1127 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 1127 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(LengthOrNu mberBox(slices));
1128 } 1128 }
1129 void setMaskBoxImageOutset(LengthBox outset) 1129 void setMaskBoxImageOutset(LengthBox outset)
1130 { 1130 {
1131 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); 1131 rareNonInheritedData.access()->m_maskBoxImage.setOutset(LengthOrNumberBo x(outset));
1132 } 1132 }
1133 void setMaskXPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_xPosition, length); } 1133 void setMaskXPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_xPosition, length); }
1134 void setMaskYPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_yPosition, length); } 1134 void setMaskYPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask. m_yPosition, length); }
1135 void setMaskSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_mask.m_size Length, s); } 1135 void setMaskSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_mask.m_size Length, s); }
1136 1136
1137 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } 1137 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; }
1138 void setHorizontalBorderSpacing(short); 1138 void setHorizontalBorderSpacing(short);
1139 void setVerticalBorderSpacing(short); 1139 void setVerticalBorderSpacing(short);
1140 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } 1140 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
1141 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } 1141 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 1828 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1829 return false; 1829 return false;
1830 1830
1831 rareInheritedData.access()->m_textOrientation = textOrientation; 1831 rareInheritedData.access()->m_textOrientation = textOrientation;
1832 return true; 1832 return true;
1833 } 1833 }
1834 1834
1835 } // namespace WebCore 1835 } // namespace WebCore
1836 1836
1837 #endif // RenderStyle_h 1837 #endif // RenderStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698