Changeset 116129 in webkit
- Timestamp:
- May 4, 2012 11:28:05 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116127 r116129 1 2012-05-04 Tony Chang <tony@chromium.org> 2 3 fix bit packing in FillLayer on Windows 4 https://bugs.webkit.org/show_bug.cgi?id=85636 5 6 Reviewed by Ryosuke Niwa. 7 8 Use unsigned for all bit packed types. I manually verified that 9 the current uses of these member variables always assign true or false. 10 11 No new tests, adding a compile assert to verify bit packing. 12 13 * rendering/style/FillLayer.cpp: 14 (SameSizeAsFillLayer): Added compile assert. 15 (WebCore): 16 (WebCore::FillLayer::FillLayer): Reorder m_sizeLength so bit packed fields are adjacent. 17 (WebCore::FillLayer::operator=): Ditto. 18 * rendering/style/FillLayer.h: 19 (FillLayer): Convert bools to unsigned to match other bit packed fields. 20 1 21 2012-05-04 Tommy Widenflycht <tommyw@google.com> 2 22 -
trunk/Source/WebCore/rendering/style/FillLayer.cpp
r80868 r116129 24 24 25 25 namespace WebCore { 26 27 struct SameSizeAsFillLayer { 28 FillLayer* m_next; 29 30 RefPtr<StyleImage> m_image; 31 32 Length m_xPosition; 33 Length m_yPosition; 34 35 LengthSize m_sizeLength; 36 37 unsigned m_bitfields; 38 }; 39 40 COMPILE_ASSERT(sizeof(FillLayer) == sizeof(SameSizeAsFillLayer), FillLayer_should_stay_small); 26 41 27 42 FillLayer::FillLayer(EFillLayerType type) … … 30 45 , m_xPosition(FillLayer::initialFillXPosition(type)) 31 46 , m_yPosition(FillLayer::initialFillYPosition(type)) 47 , m_sizeLength(FillLayer::initialFillSizeLength(type)) 32 48 , m_attachment(FillLayer::initialFillAttachment(type)) 33 49 , m_clip(FillLayer::initialFillClip(type)) … … 37 53 , m_composite(FillLayer::initialFillComposite(type)) 38 54 , m_sizeType(SizeNone) 39 , m_sizeLength(FillLayer::initialFillSizeLength(type))40 55 , m_imageSet(false) 41 56 , m_attachmentSet(false) … … 56 71 , m_xPosition(o.m_xPosition) 57 72 , m_yPosition(o.m_yPosition) 73 , m_sizeLength(o.m_sizeLength) 58 74 , m_attachment(o.m_attachment) 59 75 , m_clip(o.m_clip) … … 63 79 , m_composite(o.m_composite) 64 80 , m_sizeType(o.m_sizeType) 65 , m_sizeLength(o.m_sizeLength)66 81 , m_imageSet(o.m_imageSet) 67 82 , m_attachmentSet(o.m_attachmentSet) … … 92 107 m_xPosition = o.m_xPosition; 93 108 m_yPosition = o.m_yPosition; 109 m_sizeLength = o.m_sizeLength; 94 110 m_attachment = o.m_attachment; 95 111 m_clip = o.m_clip; … … 99 115 m_repeatY = o.m_repeatY; 100 116 m_sizeType = o.m_sizeType; 101 m_sizeLength = o.m_sizeLength;102 117 103 118 m_imageSet = o.m_imageSet; -
trunk/Source/WebCore/rendering/style/FillLayer.h
r101177 r116129 175 175 Length m_yPosition; 176 176 177 LengthSize m_sizeLength; 178 177 179 unsigned m_attachment : 2; // EFillAttachment 178 180 unsigned m_clip : 2; // EFillBox … … 183 185 unsigned m_sizeType : 2; // EFillSizeType 184 186 185 LengthSize m_sizeLength; 186 187 bool m_imageSet : 1; 188 bool m_attachmentSet : 1; 189 bool m_clipSet : 1; 190 bool m_originSet : 1; 191 bool m_repeatXSet : 1; 192 bool m_repeatYSet : 1; 193 bool m_xPosSet : 1; 194 bool m_yPosSet : 1; 195 bool m_compositeSet : 1; 187 unsigned m_imageSet : 1; 188 unsigned m_attachmentSet : 1; 189 unsigned m_clipSet : 1; 190 unsigned m_originSet : 1; 191 unsigned m_repeatXSet : 1; 192 unsigned m_repeatYSet : 1; 193 unsigned m_xPosSet : 1; 194 unsigned m_yPosSet : 1; 195 unsigned m_compositeSet : 1; 196 196 197 197 unsigned m_type : 1; // EFillLayerType
Note: See TracChangeset
for help on using the changeset viewer.