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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); } 1075 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); }
1076 void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage() ); } 1076 void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage() ); }
1077 void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initia lBorderRadius()); } 1077 void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initia lBorderRadius()); }
1078 void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, init ialBorderRadius()); } 1078 void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, init ialBorderRadius()); }
1079 void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()); } 1079 void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()); }
1080 void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight , initialBorderRadius()); } 1080 void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight , initialBorderRadius()); }
1081 1081
1082 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); } 1082 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); }
1083 1083
1084 void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_im age, b); } 1084 void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_im age, b); }
1085 void setBorderImageSource(PassRefPtrWillBeRawPtr<StyleImage>); 1085 void setBorderImageSource(RawPtr<StyleImage>);
1086 void setBorderImageSlices(const LengthBox&); 1086 void setBorderImageSlices(const LengthBox&);
1087 void setBorderImageSlicesFill(bool); 1087 void setBorderImageSlicesFill(bool);
1088 void setBorderImageWidth(const BorderImageLengthBox&); 1088 void setBorderImageWidth(const BorderImageLengthBox&);
1089 void setBorderImageOutset(const BorderImageLengthBox&); 1089 void setBorderImageOutset(const BorderImageLengthBox&);
1090 1090
1091 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border. m_topLeft, s); } 1091 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border. m_topLeft, s); }
1092 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border .m_topRight, s); } 1092 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border .m_topRight, s); }
1093 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, bord er.m_bottomLeft, s); } 1093 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, bord er.m_bottomLeft, s); }
1094 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, bor der.m_bottomRight, s); } 1094 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, bor der.m_bottomRight, s); }
1095 1095
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 1199
1200 void adjustMaskLayers() 1200 void adjustMaskLayers()
1201 { 1201 {
1202 if (maskLayers().next()) { 1202 if (maskLayers().next()) {
1203 accessMaskLayers().cullEmptyLayers(); 1203 accessMaskLayers().cullEmptyLayers();
1204 accessMaskLayers().fillUnsetProperties(); 1204 accessMaskLayers().fillUnsetProperties();
1205 } 1205 }
1206 } 1206 }
1207 1207
1208 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData , m_maskBoxImage, b); } 1208 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData , m_maskBoxImage, b); }
1209 void setMaskBoxImageSource(PassRefPtrWillBeRawPtr<StyleImage> v) { rareNonIn heritedData.access()->m_maskBoxImage.setImage(v); } 1209 void setMaskBoxImageSource(RawPtr<StyleImage> v) { rareNonInheritedData.acce ss()->m_maskBoxImage.setImage(v); }
1210 void setMaskBoxImageSlices(const LengthBox& slices) 1210 void setMaskBoxImageSlices(const LengthBox& slices)
1211 { 1211 {
1212 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); 1212 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices);
1213 } 1213 }
1214 void setMaskBoxImageSlicesFill(bool fill) 1214 void setMaskBoxImageSlicesFill(bool fill)
1215 { 1215 {
1216 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); 1216 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill);
1217 } 1217 }
1218 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) 1218 void setMaskBoxImageWidth(const BorderImageLengthBox& slices)
1219 { 1219 {
1220 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 1220 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices);
1221 } 1221 }
1222 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) 1222 void setMaskBoxImageOutset(const BorderImageLengthBox& outset)
1223 { 1223 {
1224 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); 1224 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset);
1225 } 1225 }
1226 1226
1227 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } 1227 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; }
1228 void setHorizontalBorderSpacing(short); 1228 void setHorizontalBorderSpacing(short);
1229 void setVerticalBorderSpacing(short); 1229 void setVerticalBorderSpacing(short);
1230 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } 1230 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
1231 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } 1231 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
1232 1232
1233 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } 1233 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
1234 void setListStyleImage(PassRefPtrWillBeRawPtr<StyleImage>); 1234 void setListStyleImage(RawPtr<StyleImage>);
1235 void setListStylePosition(EListStylePosition v) { inherited_flags._list_styl e_position = v; } 1235 void setListStylePosition(EListStylePosition v) { inherited_flags._list_styl e_position = v; }
1236 1236
1237 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); } 1237 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); }
1238 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v ); } 1238 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v ); }
1239 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); } 1239 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); }
1240 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v); } 1240 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v); }
1241 void setMarginStart(const Length&); 1241 void setMarginStart(const Length&);
1242 void setMarginEnd(const Length&); 1242 void setMarginEnd(const Length&);
1243 1243
1244 void resetPadding() { SET_VAR(surround, padding, LengthBox(Fixed)); } 1244 void resetPadding() { SET_VAR(surround, padding, LengthBox(Fixed)); }
1245 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } 1245 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); }
1246 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } 1246 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); }
1247 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom, v); } 1247 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom, v); }
1248 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v); } 1248 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v); }
1249 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v ); } 1249 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v ); }
1250 1250
1251 void setCursor(ECursor c) { inherited_flags._cursor_style = c; } 1251 void setCursor(ECursor c) { inherited_flags._cursor_style = c; }
1252 void addCursor(PassRefPtrWillBeRawPtr<StyleImage>, bool hotSpotSpecified, co nst IntPoint& hotSpot = IntPoint()); 1252 void addCursor(RawPtr<StyleImage>, bool hotSpotSpecified, const IntPoint& ho tSpot = IntPoint());
1253 void setCursorList(PassRefPtrWillBeRawPtr<CursorList>); 1253 void setCursorList(RawPtr<CursorList>);
1254 void clearCursorList(); 1254 void clearCursorList();
1255 1255
1256 void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = i nsideLink; } 1256 void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = i nsideLink; }
1257 void setIsLink(bool b) { noninherited_flags.isLink = b; } 1257 void setIsLink(bool b) { noninherited_flags.isLink = b; }
1258 1258
1259 PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdj ust>(inherited_flags.m_printColorAdjust); } 1259 PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdj ust>(inherited_flags.m_printColorAdjust); }
1260 void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printCo lorAdjust = value; } 1260 void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printCo lorAdjust = value; }
1261 1261
1262 // A stacking context is painted atomically and defines a stacking order, wh ereas 1262 // A stacking context is painted atomically and defines a stacking order, wh ereas
1263 // a containing stacking context defines in which order the stacking context s 1263 // a containing stacking context defines in which order the stacking context s
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 1530
1531 EBaselineShift baselineShift() const { return svgStyle().baselineShift(); } 1531 EBaselineShift baselineShift() const { return svgStyle().baselineShift(); }
1532 const Length& baselineShiftValue() const { return svgStyle().baselineShiftVa lue(); } 1532 const Length& baselineShiftValue() const { return svgStyle().baselineShiftVa lue(); }
1533 void setBaselineShiftValue(const Length& value) 1533 void setBaselineShiftValue(const Length& value)
1534 { 1534 {
1535 SVGComputedStyle& svgStyle = accessSVGStyle(); 1535 SVGComputedStyle& svgStyle = accessSVGStyle();
1536 svgStyle.setBaselineShift(BS_LENGTH); 1536 svgStyle.setBaselineShift(BS_LENGTH);
1537 svgStyle.setBaselineShiftValue(value); 1537 svgStyle.setBaselineShiftValue(value);
1538 } 1538 }
1539 1539
1540 void setShapeOutside(PassRefPtrWillBeRawPtr<ShapeValue> value) 1540 void setShapeOutside(RawPtr<ShapeValue> value)
1541 { 1541 {
1542 if (rareNonInheritedData->m_shapeOutside == value) 1542 if (rareNonInheritedData->m_shapeOutside == value)
1543 return; 1543 return;
1544 rareNonInheritedData.access()->m_shapeOutside = value; 1544 rareNonInheritedData.access()->m_shapeOutside = value;
1545 } 1545 }
1546 ShapeValue* shapeOutside() const { return rareNonInheritedData->m_shapeOutsi de.get(); } 1546 ShapeValue* shapeOutside() const { return rareNonInheritedData->m_shapeOutsi de.get(); }
1547 1547
1548 static ShapeValue* initialShapeOutside() { return 0; } 1548 static ShapeValue* initialShapeOutside() { return 0; }
1549 1549
1550 void setClipPath(PassRefPtr<ClipPathOperation> operation) 1550 void setClipPath(PassRefPtr<ClipPathOperation> operation)
(...skipping 15 matching lines...) Expand all
1566 float clampedShapeImageThreshold = clampTo<float>(shapeImageThreshold, 0 , 1); 1566 float clampedShapeImageThreshold = clampTo<float>(shapeImageThreshold, 0 , 1);
1567 SET_VAR(rareNonInheritedData, m_shapeImageThreshold, clampedShapeImageTh reshold); 1567 SET_VAR(rareNonInheritedData, m_shapeImageThreshold, clampedShapeImageTh reshold);
1568 } 1568 }
1569 static float initialShapeImageThreshold() { return 0; } 1569 static float initialShapeImageThreshold() { return 0; }
1570 1570
1571 bool hasContent() const { return contentData(); } 1571 bool hasContent() const { return contentData(); }
1572 ContentData* contentData() const { return rareNonInheritedData->m_content.ge t(); } 1572 ContentData* contentData() const { return rareNonInheritedData->m_content.ge t(); }
1573 bool contentDataEquivalent(const ComputedStyle* otherStyle) const { return c onst_cast<ComputedStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*co nst_cast<ComputedStyle*>(otherStyle)->rareNonInheritedData); } 1573 bool contentDataEquivalent(const ComputedStyle* otherStyle) const { return c onst_cast<ComputedStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*co nst_cast<ComputedStyle*>(otherStyle)->rareNonInheritedData); }
1574 void clearContent(); 1574 void clearContent();
1575 void setContent(const String&, bool add = false); 1575 void setContent(const String&, bool add = false);
1576 void setContent(PassRefPtrWillBeRawPtr<StyleImage>, bool add = false); 1576 void setContent(RawPtr<StyleImage>, bool add = false);
1577 void setContent(PassOwnPtr<CounterContent>, bool add = false); 1577 void setContent(PassOwnPtr<CounterContent>, bool add = false);
1578 void setContent(QuoteType, bool add = false); 1578 void setContent(QuoteType, bool add = false);
1579 1579
1580 const CounterDirectiveMap* counterDirectives() const; 1580 const CounterDirectiveMap* counterDirectives() const;
1581 CounterDirectiveMap& accessCounterDirectives(); 1581 CounterDirectiveMap& accessCounterDirectives();
1582 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; 1582 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const;
1583 void clearIncrementDirectives(); 1583 void clearIncrementDirectives();
1584 void clearResetDirectives(); 1584 void clearResetDirectives();
1585 1585
1586 QuotesData* quotes() const { return rareInheritedData->quotes.get(); } 1586 QuotesData* quotes() const { return rareInheritedData->quotes.get(); }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi tedLinkTextFillColor(); } 1891 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi tedLinkTextFillColor(); }
1892 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi sitedLinkTextStrokeColor(); } 1892 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi sitedLinkTextStrokeColor(); }
1893 1893
1894 StyleColor decorationColorIncludingFallback(bool visitedLink) const; 1894 StyleColor decorationColorIncludingFallback(bool visitedLink) const;
1895 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; 1895 Color colorIncludingFallback(int colorProperty, bool visitedLink) const;
1896 1896
1897 Color stopColor() const { return svgStyle().stopColor(); } 1897 Color stopColor() const { return svgStyle().stopColor(); }
1898 Color floodColor() const { return svgStyle().floodColor(); } 1898 Color floodColor() const { return svgStyle().floodColor(); }
1899 Color lightingColor() const { return svgStyle().lightingColor(); } 1899 Color lightingColor() const { return svgStyle().lightingColor(); }
1900 1900
1901 void appendContent(PassOwnPtrWillBeRawPtr<ContentData>); 1901 void appendContent(RawPtr<ContentData>);
1902 void addAppliedTextDecoration(const AppliedTextDecoration&); 1902 void addAppliedTextDecoration(const AppliedTextDecoration&);
1903 void applyMotionPathTransform(float originX, float originY, TransformationMa trix&) const; 1903 void applyMotionPathTransform(float originX, float originY, TransformationMa trix&) const;
1904 1904
1905 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con st; 1905 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con st;
1906 bool diffNeedsFullLayout(const ComputedStyle& other) const; 1906 bool diffNeedsFullLayout(const ComputedStyle& other) const;
1907 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const; 1907 bool diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const;
1908 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; 1908 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const;
1909 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff erence&) const; 1909 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff erence&) const;
1910 1910
1911 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat h) const; 1911 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat h) const;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 } 2018 }
2019 2019
2020 inline bool ComputedStyle::hasPseudoElementStyle() const 2020 inline bool ComputedStyle::hasPseudoElementStyle() const
2021 { 2021 {
2022 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 2022 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
2023 } 2023 }
2024 2024
2025 } // namespace blink 2025 } // namespace blink
2026 2026
2027 #endif // ComputedStyle_h 2027 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698