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

Side by Side Diff: sky/engine/core/rendering/style/FillLayer.cpp

Issue 893093002: Delete remaining masks dead code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 , m_yPosition(FillLayer::initialFillYPosition(type)) 49 , m_yPosition(FillLayer::initialFillYPosition(type))
50 , m_sizeLength(FillLayer::initialFillSizeLength(type)) 50 , m_sizeLength(FillLayer::initialFillSizeLength(type))
51 , m_attachment(FillLayer::initialFillAttachment(type)) 51 , m_attachment(FillLayer::initialFillAttachment(type))
52 , m_clip(FillLayer::initialFillClip(type)) 52 , m_clip(FillLayer::initialFillClip(type))
53 , m_origin(FillLayer::initialFillOrigin(type)) 53 , m_origin(FillLayer::initialFillOrigin(type))
54 , m_repeatX(FillLayer::initialFillRepeatX(type)) 54 , m_repeatX(FillLayer::initialFillRepeatX(type))
55 , m_repeatY(FillLayer::initialFillRepeatY(type)) 55 , m_repeatY(FillLayer::initialFillRepeatY(type))
56 , m_composite(FillLayer::initialFillComposite(type)) 56 , m_composite(FillLayer::initialFillComposite(type))
57 , m_sizeType(useInitialValues ? FillLayer::initialFillSizeType(type) : SizeN one) 57 , m_sizeType(useInitialValues ? FillLayer::initialFillSizeType(type) : SizeN one)
58 , m_blendMode(FillLayer::initialFillBlendMode(type)) 58 , m_blendMode(FillLayer::initialFillBlendMode(type))
59 , m_maskSourceType(FillLayer::initialFillMaskSourceType(type))
60 , m_backgroundXOrigin(LeftEdge) 59 , m_backgroundXOrigin(LeftEdge)
61 , m_backgroundYOrigin(TopEdge) 60 , m_backgroundYOrigin(TopEdge)
62 , m_imageSet(useInitialValues) 61 , m_imageSet(useInitialValues)
63 , m_attachmentSet(useInitialValues) 62 , m_attachmentSet(useInitialValues)
64 , m_clipSet(useInitialValues) 63 , m_clipSet(useInitialValues)
65 , m_originSet(useInitialValues) 64 , m_originSet(useInitialValues)
66 , m_repeatXSet(useInitialValues) 65 , m_repeatXSet(useInitialValues)
67 , m_repeatYSet(useInitialValues) 66 , m_repeatYSet(useInitialValues)
68 , m_xPosSet(useInitialValues) 67 , m_xPosSet(useInitialValues)
69 , m_yPosSet(useInitialValues) 68 , m_yPosSet(useInitialValues)
70 , m_backgroundXOriginSet(false) 69 , m_backgroundXOriginSet(false)
71 , m_backgroundYOriginSet(false) 70 , m_backgroundYOriginSet(false)
72 , m_compositeSet(useInitialValues || type == MaskFillLayer) 71 , m_compositeSet(useInitialValues)
73 , m_blendModeSet(useInitialValues) 72 , m_blendModeSet(useInitialValues)
74 , m_maskSourceTypeSet(useInitialValues)
75 , m_type(type) 73 , m_type(type)
76 { 74 {
77 } 75 }
78 76
79 FillLayer::FillLayer(const FillLayer& o) 77 FillLayer::FillLayer(const FillLayer& o)
80 : m_next(o.m_next ? new FillLayer(*o.m_next) : 0) 78 : m_next(o.m_next ? new FillLayer(*o.m_next) : 0)
81 , m_image(o.m_image) 79 , m_image(o.m_image)
82 , m_xPosition(o.m_xPosition) 80 , m_xPosition(o.m_xPosition)
83 , m_yPosition(o.m_yPosition) 81 , m_yPosition(o.m_yPosition)
84 , m_sizeLength(o.m_sizeLength) 82 , m_sizeLength(o.m_sizeLength)
85 , m_attachment(o.m_attachment) 83 , m_attachment(o.m_attachment)
86 , m_clip(o.m_clip) 84 , m_clip(o.m_clip)
87 , m_origin(o.m_origin) 85 , m_origin(o.m_origin)
88 , m_repeatX(o.m_repeatX) 86 , m_repeatX(o.m_repeatX)
89 , m_repeatY(o.m_repeatY) 87 , m_repeatY(o.m_repeatY)
90 , m_composite(o.m_composite) 88 , m_composite(o.m_composite)
91 , m_sizeType(o.m_sizeType) 89 , m_sizeType(o.m_sizeType)
92 , m_blendMode(o.m_blendMode) 90 , m_blendMode(o.m_blendMode)
93 , m_maskSourceType(o.m_maskSourceType)
94 , m_backgroundXOrigin(o.m_backgroundXOrigin) 91 , m_backgroundXOrigin(o.m_backgroundXOrigin)
95 , m_backgroundYOrigin(o.m_backgroundYOrigin) 92 , m_backgroundYOrigin(o.m_backgroundYOrigin)
96 , m_imageSet(o.m_imageSet) 93 , m_imageSet(o.m_imageSet)
97 , m_attachmentSet(o.m_attachmentSet) 94 , m_attachmentSet(o.m_attachmentSet)
98 , m_clipSet(o.m_clipSet) 95 , m_clipSet(o.m_clipSet)
99 , m_originSet(o.m_originSet) 96 , m_originSet(o.m_originSet)
100 , m_repeatXSet(o.m_repeatXSet) 97 , m_repeatXSet(o.m_repeatXSet)
101 , m_repeatYSet(o.m_repeatYSet) 98 , m_repeatYSet(o.m_repeatYSet)
102 , m_xPosSet(o.m_xPosSet) 99 , m_xPosSet(o.m_xPosSet)
103 , m_yPosSet(o.m_yPosSet) 100 , m_yPosSet(o.m_yPosSet)
104 , m_backgroundXOriginSet(o.m_backgroundXOriginSet) 101 , m_backgroundXOriginSet(o.m_backgroundXOriginSet)
105 , m_backgroundYOriginSet(o.m_backgroundYOriginSet) 102 , m_backgroundYOriginSet(o.m_backgroundYOriginSet)
106 , m_compositeSet(o.m_compositeSet) 103 , m_compositeSet(o.m_compositeSet)
107 , m_blendModeSet(o.m_blendModeSet) 104 , m_blendModeSet(o.m_blendModeSet)
108 , m_maskSourceTypeSet(o.m_maskSourceTypeSet)
109 , m_type(o.m_type) 105 , m_type(o.m_type)
110 { 106 {
111 } 107 }
112 108
113 FillLayer::~FillLayer() 109 FillLayer::~FillLayer()
114 { 110 {
115 delete m_next; 111 delete m_next;
116 } 112 }
117 113
118 FillLayer& FillLayer::operator=(const FillLayer& o) 114 FillLayer& FillLayer::operator=(const FillLayer& o)
(...skipping 12 matching lines...) Expand all
131 m_backgroundYOriginSet = o.m_backgroundYOriginSet; 127 m_backgroundYOriginSet = o.m_backgroundYOriginSet;
132 m_sizeLength = o.m_sizeLength; 128 m_sizeLength = o.m_sizeLength;
133 m_attachment = o.m_attachment; 129 m_attachment = o.m_attachment;
134 m_clip = o.m_clip; 130 m_clip = o.m_clip;
135 m_composite = o.m_composite; 131 m_composite = o.m_composite;
136 m_blendMode = o.m_blendMode; 132 m_blendMode = o.m_blendMode;
137 m_origin = o.m_origin; 133 m_origin = o.m_origin;
138 m_repeatX = o.m_repeatX; 134 m_repeatX = o.m_repeatX;
139 m_repeatY = o.m_repeatY; 135 m_repeatY = o.m_repeatY;
140 m_sizeType = o.m_sizeType; 136 m_sizeType = o.m_sizeType;
141 m_maskSourceType = o.m_maskSourceType;
142 137
143 m_imageSet = o.m_imageSet; 138 m_imageSet = o.m_imageSet;
144 m_attachmentSet = o.m_attachmentSet; 139 m_attachmentSet = o.m_attachmentSet;
145 m_clipSet = o.m_clipSet; 140 m_clipSet = o.m_clipSet;
146 m_compositeSet = o.m_compositeSet; 141 m_compositeSet = o.m_compositeSet;
147 m_blendModeSet = o.m_blendModeSet; 142 m_blendModeSet = o.m_blendModeSet;
148 m_originSet = o.m_originSet; 143 m_originSet = o.m_originSet;
149 m_repeatXSet = o.m_repeatXSet; 144 m_repeatXSet = o.m_repeatXSet;
150 m_repeatYSet = o.m_repeatYSet; 145 m_repeatYSet = o.m_repeatYSet;
151 m_xPosSet = o.m_xPosSet; 146 m_xPosSet = o.m_xPosSet;
152 m_yPosSet = o.m_yPosSet; 147 m_yPosSet = o.m_yPosSet;
153 m_maskSourceTypeSet = o.m_maskSourceTypeSet;
154 148
155 m_type = o.m_type; 149 m_type = o.m_type;
156 150
157 return *this; 151 return *this;
158 } 152 }
159 153
160 bool FillLayer::operator==(const FillLayer& o) const 154 bool FillLayer::operator==(const FillLayer& o) const
161 { 155 {
162 // We do not check the "isSet" booleans for each property, since those are o nly used during initial construction 156 // We do not check the "isSet" booleans for each property, since those are o nly used during initial construction
163 // to propagate patterns into layers. All layer comparisons happen after va lues have all been filled in anyway. 157 // to propagate patterns into layers. All layer comparisons happen after va lues have all been filled in anyway.
164 return dataEquivalent(m_image, o.m_image) && m_xPosition == o.m_xPosition && m_yPosition == o.m_yPosition 158 return dataEquivalent(m_image, o.m_image) && m_xPosition == o.m_xPosition && m_yPosition == o.m_yPosition
165 && m_backgroundXOrigin == o.m_backgroundXOrigin && m_backgroundYOrig in == o.m_backgroundYOrigin 159 && m_backgroundXOrigin == o.m_backgroundXOrigin && m_backgroundYOrig in == o.m_backgroundYOrigin
166 && m_attachment == o.m_attachment && m_clip == o.m_clip && m_composi te == o.m_composite 160 && m_attachment == o.m_attachment && m_clip == o.m_clip && m_composi te == o.m_composite
167 && m_blendMode == o.m_blendMode && m_origin == o.m_origin && m_repea tX == o.m_repeatX 161 && m_blendMode == o.m_blendMode && m_origin == o.m_origin && m_repea tX == o.m_repeatX
168 && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType && m_maskS ourceType == o.m_maskSourceType 162 && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType
169 && m_sizeLength == o.m_sizeLength && m_type == o.m_type 163 && m_sizeLength == o.m_sizeLength && m_type == o.m_type
170 && ((m_next && o.m_next) ? *m_next == *o.m_next : m_next == o.m_next ); 164 && ((m_next && o.m_next) ? *m_next == *o.m_next : m_next == o.m_next );
171 } 165 }
172 166
173 void FillLayer::fillUnsetProperties() 167 void FillLayer::fillUnsetProperties()
174 { 168 {
175 FillLayer* curr; 169 FillLayer* curr;
176 for (curr = this; curr && curr->isXPositionSet(); curr = curr->next()) { } 170 for (curr = this; curr && curr->isXPositionSet(); curr = curr->next()) { }
177 if (curr && curr != this) { 171 if (curr && curr != this) {
178 // We need to fill in the remaining values with the pattern specified. 172 // We need to fill in the remaining values with the pattern specified.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 363
370 return false; 364 return false;
371 } 365 }
372 366
373 bool FillLayer::hasRepeatXY() const 367 bool FillLayer::hasRepeatXY() const
374 { 368 {
375 return m_repeatX == RepeatFill && m_repeatY == RepeatFill; 369 return m_repeatX == RepeatFill && m_repeatY == RepeatFill;
376 } 370 }
377 371
378 } // namespace blink 372 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/FillLayer.h ('k') | sky/engine/core/rendering/style/NinePieceImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698