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

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

Issue 38573005: Web Animations CSS: Fix crash when transitioning background or mask properties (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month 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 | Annotate | Revision Log
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 22 matching lines...) Expand all
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 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(useInitialValues ? FillLayer::initialFillSizeType(type) : SizeN one)
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(useInitialValues)
61 , m_attachmentSet(false) 61 , m_attachmentSet(useInitialValues)
62 , m_clipSet(false) 62 , m_clipSet(useInitialValues)
63 , m_originSet(false) 63 , m_originSet(useInitialValues)
64 , m_repeatXSet(false) 64 , m_repeatXSet(useInitialValues)
65 , m_repeatYSet(false) 65 , m_repeatYSet(useInitialValues)
66 , m_xPosSet(false) 66 , m_xPosSet(useInitialValues)
67 , m_yPosSet(false) 67 , m_yPosSet(useInitialValues)
68 , m_backgroundXOriginSet(false) 68 , m_backgroundXOriginSet(useInitialValues)
69 , m_backgroundYOriginSet(false) 69 , m_backgroundYOriginSet(useInitialValues)
70 , m_compositeSet(type == MaskFillLayer) 70 , m_compositeSet(useInitialValues || type == MaskFillLayer)
71 , m_blendModeSet(false) 71 , m_blendModeSet(useInitialValues)
72 , m_maskSourceTypeSet(false) 72 , m_maskSourceTypeSet(useInitialValues)
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/style/FillLayer.h ('k') | Source/core/rendering/style/StyleBackgroundData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698