| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 33 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 struct FillSize { | 37 struct FillSize { |
| 38 FillSize() | 38 FillSize() |
| 39 : type(SizeLength) | 39 : type(SizeLength) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 FillSize(EFillSizeType t, LengthSize l) | 43 FillSize(EFillSizeType t, const LengthSize& l) |
| 44 : type(t) | 44 : type(t) |
| 45 , size(l) | 45 , size(l) |
| 46 { | 46 { |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool operator==(const FillSize& o) const | 49 bool operator==(const FillSize& o) const |
| 50 { | 50 { |
| 51 return type == o.type && size == o.size; | 51 return type == o.type && size == o.size; |
| 52 } | 52 } |
| 53 bool operator!=(const FillSize& o) const | 53 bool operator!=(const FillSize& o) const |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 bool isClipSet() const { return m_clipSet; } | 94 bool isClipSet() const { return m_clipSet; } |
| 95 bool isOriginSet() const { return m_originSet; } | 95 bool isOriginSet() const { return m_originSet; } |
| 96 bool isRepeatXSet() const { return m_repeatXSet; } | 96 bool isRepeatXSet() const { return m_repeatXSet; } |
| 97 bool isRepeatYSet() const { return m_repeatYSet; } | 97 bool isRepeatYSet() const { return m_repeatYSet; } |
| 98 bool isCompositeSet() const { return m_compositeSet; } | 98 bool isCompositeSet() const { return m_compositeSet; } |
| 99 bool isBlendModeSet() const { return m_blendModeSet; } | 99 bool isBlendModeSet() const { return m_blendModeSet; } |
| 100 bool isSizeSet() const { return m_sizeType != SizeNone; } | 100 bool isSizeSet() const { return m_sizeType != SizeNone; } |
| 101 bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; } | 101 bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; } |
| 102 | 102 |
| 103 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; } | 103 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; } |
| 104 void setXPosition(Length position) { m_xPosition = position; m_xPosSet = tru
e; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; } | 104 void setXPosition(const Length& position) { m_xPosition = position; m_xPosSe
t = true; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; } |
| 105 void setYPosition(Length position) { m_yPosition = position; m_yPosSet = tru
e; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; } | 105 void setYPosition(const Length& position) { m_yPosition = position; m_yPosSe
t = true; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; } |
| 106 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin
= origin; m_backgroundXOriginSet = true; } | 106 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin
= origin; m_backgroundXOriginSet = true; } |
| 107 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin
= origin; m_backgroundYOriginSet = true; } | 107 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin
= origin; m_backgroundYOriginSet = true; } |
| 108 void setAttachment(EFillAttachment attachment) { m_attachment = attachment;
m_attachmentSet = true; } | 108 void setAttachment(EFillAttachment attachment) { m_attachment = attachment;
m_attachmentSet = true; } |
| 109 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } | 109 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } |
| 110 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } | 110 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } |
| 111 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } | 111 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } |
| 112 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } | 112 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } |
| 113 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t
rue; } | 113 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t
rue; } |
| 114 void setBlendMode(blink::WebBlendMode b) { m_blendMode = b; m_blendModeSet =
true; } | 114 void setBlendMode(blink::WebBlendMode b) { m_blendMode = b; m_blendModeSet =
true; } |
| 115 void setSizeType(EFillSizeType b) { m_sizeType = b; } | 115 void setSizeType(EFillSizeType b) { m_sizeType = b; } |
| 116 void setSizeLength(LengthSize l) { m_sizeLength = l; } | 116 void setSizeLength(const LengthSize& l) { m_sizeLength = l; } |
| 117 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } | 117 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } |
| 118 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour
ceTypeSet = true; } | 118 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour
ceTypeSet = true; } |
| 119 | 119 |
| 120 void clearImage() { m_image.clear(); m_imageSet = false; } | 120 void clearImage() { m_image.clear(); m_imageSet = false; } |
| 121 void clearXPosition() | 121 void clearXPosition() |
| 122 { | 122 { |
| 123 m_xPosSet = false; | 123 m_xPosSet = false; |
| 124 m_backgroundXOriginSet = false; | 124 m_backgroundXOriginSet = false; |
| 125 } | 125 } |
| 126 void clearYPosition() | 126 void clearYPosition() |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 unsigned m_maskSourceTypeSet : 1; | 237 unsigned m_maskSourceTypeSet : 1; |
| 238 | 238 |
| 239 unsigned m_type : 1; // EFillLayerType | 239 unsigned m_type : 1; // EFillLayerType |
| 240 | 240 |
| 241 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this
to bottom layer | 241 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this
to bottom layer |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 } // namespace WebCore | 244 } // namespace WebCore |
| 245 | 245 |
| 246 #endif // FillLayer_h | 246 #endif // FillLayer_h |
| OLD | NEW |