Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 22 matching lines...) Expand all Loading... | |
| 33 Length m_yPosition; | 33 Length m_yPosition; |
| 34 | 34 |
| 35 LengthSize m_sizeLength; | 35 LengthSize m_sizeLength; |
| 36 | 36 |
| 37 unsigned m_bitfields: 32; | 37 unsigned m_bitfields: 32; |
| 38 unsigned m_bitfields2: 1; | 38 unsigned m_bitfields2: 1; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 COMPILE_ASSERT(sizeof(FillLayer) == sizeof(SameSizeAsFillLayer), FillLayer_shoul d_stay_small); | 41 COMPILE_ASSERT(sizeof(FillLayer) == sizeof(SameSizeAsFillLayer), FillLayer_shoul d_stay_small); |
| 42 | 42 |
| 43 FillLayer::FillLayer(EFillLayerType type) | 43 FillLayer::FillLayer(EFillLayerType type, bool isInitiallySet) |
|
Steve Block
2013/11/03 10:16:48
Would something like useInitialSize be a better na
alancutter (OOO until 2018)
2013/11/04 00:45:24
Renamed to useInitialValues.
| |
| 44 : m_next(0) | 44 : m_next(0) |
| 45 , m_image(FillLayer::initialFillImage(type)) | 45 , m_image(FillLayer::initialFillImage(type)) |
| 46 , m_xPosition(FillLayer::initialFillXPosition(type)) | 46 , m_xPosition(FillLayer::initialFillXPosition(type)) |
| 47 , m_yPosition(FillLayer::initialFillYPosition(type)) | 47 , m_yPosition(FillLayer::initialFillYPosition(type)) |
| 48 , m_sizeLength(FillLayer::initialFillSizeLength(type)) | 48 , m_sizeLength(FillLayer::initialFillSizeLength(type)) |
| 49 , m_attachment(FillLayer::initialFillAttachment(type)) | 49 , m_attachment(FillLayer::initialFillAttachment(type)) |
| 50 , m_clip(FillLayer::initialFillClip(type)) | 50 , m_clip(FillLayer::initialFillClip(type)) |
| 51 , m_origin(FillLayer::initialFillOrigin(type)) | 51 , m_origin(FillLayer::initialFillOrigin(type)) |
| 52 , m_repeatX(FillLayer::initialFillRepeatX(type)) | 52 , m_repeatX(FillLayer::initialFillRepeatX(type)) |
| 53 , m_repeatY(FillLayer::initialFillRepeatY(type)) | 53 , m_repeatY(FillLayer::initialFillRepeatY(type)) |
| 54 , m_composite(FillLayer::initialFillComposite(type)) | 54 , m_composite(FillLayer::initialFillComposite(type)) |
| 55 , m_sizeType(SizeNone) // SizeNone indicates size is unset. | 55 , m_sizeType(isInitiallySet ? FillLayer::initialFillSizeType(type) : SizeNon e) |
| 56 , m_blendMode(FillLayer::initialFillBlendMode(type)) | 56 , m_blendMode(FillLayer::initialFillBlendMode(type)) |
| 57 , m_maskSourceType(FillLayer::initialFillMaskSourceType(type)) | 57 , m_maskSourceType(FillLayer::initialFillMaskSourceType(type)) |
| 58 , m_backgroundXOrigin(LeftEdge) | 58 , m_backgroundXOrigin(LeftEdge) |
| 59 , m_backgroundYOrigin(TopEdge) | 59 , m_backgroundYOrigin(TopEdge) |
| 60 , m_imageSet(false) | 60 , m_imageSet(isInitiallySet) |
| 61 , m_attachmentSet(false) | 61 , m_attachmentSet(isInitiallySet) |
| 62 , m_clipSet(false) | 62 , m_clipSet(isInitiallySet) |
| 63 , m_originSet(false) | 63 , m_originSet(isInitiallySet) |
| 64 , m_repeatXSet(false) | 64 , m_repeatXSet(isInitiallySet) |
| 65 , m_repeatYSet(false) | 65 , m_repeatYSet(isInitiallySet) |
| 66 , m_xPosSet(false) | 66 , m_xPosSet(isInitiallySet) |
| 67 , m_yPosSet(false) | 67 , m_yPosSet(isInitiallySet) |
| 68 , m_backgroundXOriginSet(false) | 68 , m_backgroundXOriginSet(isInitiallySet) |
| 69 , m_backgroundYOriginSet(false) | 69 , m_backgroundYOriginSet(isInitiallySet) |
| 70 , m_compositeSet(type == MaskFillLayer) | 70 , m_compositeSet(isInitiallySet || type == MaskFillLayer) |
| 71 , m_blendModeSet(false) | 71 , m_blendModeSet(isInitiallySet) |
| 72 , m_maskSourceTypeSet(false) | 72 , m_maskSourceTypeSet(isInitiallySet) |
| 73 , m_type(type) | 73 , m_type(type) |
| 74 { | 74 { |
| 75 } | 75 } |
| 76 | 76 |
| 77 FillLayer::FillLayer(const FillLayer& o) | 77 FillLayer::FillLayer(const FillLayer& o) |
| 78 : m_next(o.m_next ? new FillLayer(*o.m_next) : 0) | 78 : m_next(o.m_next ? new FillLayer(*o.m_next) : 0) |
| 79 , m_image(o.m_image) | 79 , m_image(o.m_image) |
| 80 , m_xPosition(o.m_xPosition) | 80 , m_xPosition(o.m_xPosition) |
| 81 , m_yPosition(o.m_yPosition) | 81 , m_yPosition(o.m_yPosition) |
| 82 , m_sizeLength(o.m_sizeLength) | 82 , m_sizeLength(o.m_sizeLength) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 369 | 369 |
| 370 return false; | 370 return false; |
| 371 } | 371 } |
| 372 | 372 |
| 373 bool FillLayer::hasRepeatXY() const | 373 bool FillLayer::hasRepeatXY() const |
| 374 { | 374 { |
| 375 return m_repeatX == RepeatFill && m_repeatY == RepeatFill; | 375 return m_repeatX == RepeatFill && m_repeatY == RepeatFill; |
| 376 } | 376 } |
| 377 | 377 |
| 378 } // namespace WebCore | 378 } // namespace WebCore |
| OLD | NEW |