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

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

Issue 463123003: Cleanup namespace usage in Source/core/rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 4 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 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const Length& xPosition() const { return m_xPosition; } 69 const Length& xPosition() const { return m_xPosition; }
70 const Length& yPosition() const { return m_yPosition; } 70 const Length& yPosition() const { return m_yPosition; }
71 BackgroundEdgeOrigin backgroundXOrigin() const { return static_cast<Backgrou ndEdgeOrigin>(m_backgroundXOrigin); } 71 BackgroundEdgeOrigin backgroundXOrigin() const { return static_cast<Backgrou ndEdgeOrigin>(m_backgroundXOrigin); }
72 BackgroundEdgeOrigin backgroundYOrigin() const { return static_cast<Backgrou ndEdgeOrigin>(m_backgroundYOrigin); } 72 BackgroundEdgeOrigin backgroundYOrigin() const { return static_cast<Backgrou ndEdgeOrigin>(m_backgroundYOrigin); }
73 EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_a ttachment); } 73 EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_a ttachment); }
74 EFillBox clip() const { return static_cast<EFillBox>(m_clip); } 74 EFillBox clip() const { return static_cast<EFillBox>(m_clip); }
75 EFillBox origin() const { return static_cast<EFillBox>(m_origin); } 75 EFillBox origin() const { return static_cast<EFillBox>(m_origin); }
76 EFillRepeat repeatX() const { return static_cast<EFillRepeat>(m_repeatX); } 76 EFillRepeat repeatX() const { return static_cast<EFillRepeat>(m_repeatX); }
77 EFillRepeat repeatY() const { return static_cast<EFillRepeat>(m_repeatY); } 77 EFillRepeat repeatY() const { return static_cast<EFillRepeat>(m_repeatY); }
78 CompositeOperator composite() const { return static_cast<CompositeOperator>( m_composite); } 78 CompositeOperator composite() const { return static_cast<CompositeOperator>( m_composite); }
79 blink::WebBlendMode blendMode() const { return static_cast<blink::WebBlendMo de>(m_blendMode); } 79 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_blendMod e); }
80 const LengthSize& sizeLength() const { return m_sizeLength; } 80 const LengthSize& sizeLength() const { return m_sizeLength; }
81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp e); } 81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp e); }
82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp e), m_sizeLength); } 82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp e), m_sizeLength); }
83 EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType> (m_maskSourceType); } 83 EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType> (m_maskSourceType); }
84 84
85 const FillLayer* next() const { return m_next; } 85 const FillLayer* next() const { return m_next; }
86 FillLayer* next() { return m_next; } 86 FillLayer* next() { return m_next; }
87 FillLayer* ensureNext() 87 FillLayer* ensureNext()
88 { 88 {
89 if (!m_next) 89 if (!m_next)
(...skipping 20 matching lines...) Expand all
110 void setXPosition(const Length& position) { m_xPosition = position; m_xPosSe t = true; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; } 110 void setXPosition(const Length& position) { m_xPosition = position; m_xPosSe t = true; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; }
111 void setYPosition(const Length& position) { m_yPosition = position; m_yPosSe t = true; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; } 111 void setYPosition(const Length& position) { m_yPosition = position; m_yPosSe t = true; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; }
112 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin = origin; m_backgroundXOriginSet = true; } 112 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin = origin; m_backgroundXOriginSet = true; }
113 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin = origin; m_backgroundYOriginSet = true; } 113 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin = origin; m_backgroundYOriginSet = true; }
114 void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; } 114 void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; }
115 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } 115 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; }
116 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } 116 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; }
117 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } 117 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; }
118 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } 118 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; }
119 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t rue; } 119 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t rue; }
120 void setBlendMode(blink::WebBlendMode b) { m_blendMode = b; m_blendModeSet = true; } 120 void setBlendMode(WebBlendMode b) { m_blendMode = b; m_blendModeSet = true; }
121 void setSizeType(EFillSizeType b) { m_sizeType = b; } 121 void setSizeType(EFillSizeType b) { m_sizeType = b; }
122 void setSizeLength(const LengthSize& l) { m_sizeLength = l; } 122 void setSizeLength(const LengthSize& l) { m_sizeLength = l; }
123 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } 123 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; }
124 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour ceTypeSet = true; } 124 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour ceTypeSet = true; }
125 125
126 void clearImage() { m_image.clear(); m_imageSet = false; } 126 void clearImage() { m_image.clear(); m_imageSet = false; }
127 void clearXPosition() 127 void clearXPosition()
128 { 128 {
129 m_xPosSet = false; 129 m_xPosSet = false;
130 m_backgroundXOriginSet = false; 130 m_backgroundXOriginSet = false;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void fillUnsetProperties(); 180 void fillUnsetProperties();
181 void cullEmptyLayers(); 181 void cullEmptyLayers();
182 182
183 static EFillAttachment initialFillAttachment(EFillLayerType) { return Scroll BackgroundAttachment; } 183 static EFillAttachment initialFillAttachment(EFillLayerType) { return Scroll BackgroundAttachment; }
184 static EFillBox initialFillClip(EFillLayerType) { return BorderFillBox; } 184 static EFillBox initialFillClip(EFillLayerType) { return BorderFillBox; }
185 static EFillBox initialFillOrigin(EFillLayerType type) { return type == Back groundFillLayer ? PaddingFillBox : BorderFillBox; } 185 static EFillBox initialFillOrigin(EFillLayerType type) { return type == Back groundFillLayer ? PaddingFillBox : BorderFillBox; }
186 static EFillRepeat initialFillRepeatX(EFillLayerType) { return RepeatFill; } 186 static EFillRepeat initialFillRepeatX(EFillLayerType) { return RepeatFill; }
187 static EFillRepeat initialFillRepeatY(EFillLayerType) { return RepeatFill; } 187 static EFillRepeat initialFillRepeatY(EFillLayerType) { return RepeatFill; }
188 static CompositeOperator initialFillComposite(EFillLayerType) { return Compo siteSourceOver; } 188 static CompositeOperator initialFillComposite(EFillLayerType) { return Compo siteSourceOver; }
189 static blink::WebBlendMode initialFillBlendMode(EFillLayerType) { return bli nk::WebBlendModeNormal; } 189 static WebBlendMode initialFillBlendMode(EFillLayerType) { return WebBlendMo deNormal; }
190 static EFillSizeType initialFillSizeType(EFillLayerType) { return SizeLength ; } 190 static EFillSizeType initialFillSizeType(EFillLayerType) { return SizeLength ; }
191 static LengthSize initialFillSizeLength(EFillLayerType) { return LengthSize( ); } 191 static LengthSize initialFillSizeLength(EFillLayerType) { return LengthSize( ); }
192 static FillSize initialFillSize(EFillLayerType type) { return FillSize(initi alFillSizeType(type), initialFillSizeLength(type)); } 192 static FillSize initialFillSize(EFillLayerType type) { return FillSize(initi alFillSizeType(type), initialFillSizeLength(type)); }
193 static Length initialFillXPosition(EFillLayerType) { return Length(0.0, Perc ent); } 193 static Length initialFillXPosition(EFillLayerType) { return Length(0.0, Perc ent); }
194 static Length initialFillYPosition(EFillLayerType) { return Length(0.0, Perc ent); } 194 static Length initialFillYPosition(EFillLayerType) { return Length(0.0, Perc ent); }
195 static StyleImage* initialFillImage(EFillLayerType) { return 0; } 195 static StyleImage* initialFillImage(EFillLayerType) { return 0; }
196 static EMaskSourceType initialFillMaskSourceType(EFillLayerType) { return Ma skAlpha; } 196 static EMaskSourceType initialFillMaskSourceType(EFillLayerType) { return Ma skAlpha; }
197 197
198 private: 198 private:
199 friend class RenderStyle; 199 friend class RenderStyle;
(...skipping 11 matching lines...) Expand all
211 211
212 LengthSize m_sizeLength; 212 LengthSize m_sizeLength;
213 213
214 unsigned m_attachment : 2; // EFillAttachment 214 unsigned m_attachment : 2; // EFillAttachment
215 unsigned m_clip : 2; // EFillBox 215 unsigned m_clip : 2; // EFillBox
216 unsigned m_origin : 2; // EFillBox 216 unsigned m_origin : 2; // EFillBox
217 unsigned m_repeatX : 3; // EFillRepeat 217 unsigned m_repeatX : 3; // EFillRepeat
218 unsigned m_repeatY : 3; // EFillRepeat 218 unsigned m_repeatY : 3; // EFillRepeat
219 unsigned m_composite : 4; // CompositeOperator 219 unsigned m_composite : 4; // CompositeOperator
220 unsigned m_sizeType : 2; // EFillSizeType 220 unsigned m_sizeType : 2; // EFillSizeType
221 unsigned m_blendMode : 5; // blink::WebBlendMode 221 unsigned m_blendMode : 5; // WebBlendMode
222 unsigned m_maskSourceType : 1; // EMaskSourceType 222 unsigned m_maskSourceType : 1; // EMaskSourceType
223 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin 223 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin
224 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin 224 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin
225 225
226 unsigned m_imageSet : 1; 226 unsigned m_imageSet : 1;
227 unsigned m_attachmentSet : 1; 227 unsigned m_attachmentSet : 1;
228 unsigned m_clipSet : 1; 228 unsigned m_clipSet : 1;
229 unsigned m_originSet : 1; 229 unsigned m_originSet : 1;
230 unsigned m_repeatXSet : 1; 230 unsigned m_repeatXSet : 1;
231 unsigned m_repeatYSet : 1; 231 unsigned m_repeatYSet : 1;
232 unsigned m_xPosSet : 1; 232 unsigned m_xPosSet : 1;
233 unsigned m_yPosSet : 1; 233 unsigned m_yPosSet : 1;
234 unsigned m_backgroundXOriginSet : 1; 234 unsigned m_backgroundXOriginSet : 1;
235 unsigned m_backgroundYOriginSet : 1; 235 unsigned m_backgroundYOriginSet : 1;
236 unsigned m_compositeSet : 1; 236 unsigned m_compositeSet : 1;
237 unsigned m_blendModeSet : 1; 237 unsigned m_blendModeSet : 1;
238 unsigned m_maskSourceTypeSet : 1; 238 unsigned m_maskSourceTypeSet : 1;
239 239
240 unsigned m_type : 1; // EFillLayerType 240 unsigned m_type : 1; // EFillLayerType
241 241
242 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer 242 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer
243 }; 243 };
244 244
245 } // namespace blink 245 } // namespace blink
246 246
247 #endif // FillLayer_h 247 #endif // FillLayer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.cpp ('k') | Source/core/rendering/style/FillLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698