[css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
[WebKit-https.git] / Source / WebCore / rendering / style / StyleGridData.cpp
1 /*
2  * Copyright (C) 2011 Google Inc. All Rights Reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  *  THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14  *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  *  DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17  *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  */
25
26 #include "config.h"
27 #include "StyleGridData.h"
28
29 #include "RenderStyle.h"
30
31 namespace WebCore {
32
33 StyleGridData::StyleGridData()
34     : gridColumns(RenderStyle::initialGridColumns())
35     , gridRows(RenderStyle::initialGridRows())
36     , namedGridColumnLines(RenderStyle::initialNamedGridColumnLines())
37     , namedGridRowLines(RenderStyle::initialNamedGridRowLines())
38     , orderedNamedGridColumnLines(RenderStyle::initialOrderedNamedGridColumnLines())
39     , orderedNamedGridRowLines(RenderStyle::initialOrderedNamedGridRowLines())
40     , autoRepeatNamedGridColumnLines(RenderStyle::initialNamedGridColumnLines())
41     , autoRepeatNamedGridRowLines(RenderStyle::initialNamedGridRowLines())
42     , autoRepeatOrderedNamedGridColumnLines(RenderStyle::initialOrderedNamedGridColumnLines())
43     , autoRepeatOrderedNamedGridRowLines(RenderStyle::initialOrderedNamedGridRowLines())
44     , gridAutoFlow(RenderStyle::initialGridAutoFlow())
45     , gridAutoRows(RenderStyle::initialGridAutoRows())
46     , gridAutoColumns(RenderStyle::initialGridAutoColumns())
47     , namedGridArea(RenderStyle::initialNamedGridArea())
48     , namedGridAreaRowCount(RenderStyle::initialNamedGridAreaCount())
49     , namedGridAreaColumnCount(RenderStyle::initialNamedGridAreaCount())
50     , gridColumnGap(RenderStyle::initialGridColumnGap())
51     , gridRowGap(RenderStyle::initialGridRowGap())
52     , gridAutoRepeatColumns(RenderStyle::initialGridAutoRepeatTracks())
53     , gridAutoRepeatRows(RenderStyle::initialGridAutoRepeatTracks())
54     , autoRepeatColumnsInsertionPoint(RenderStyle::initialGridAutoRepeatInsertionPoint())
55     , autoRepeatRowsInsertionPoint(RenderStyle::initialGridAutoRepeatInsertionPoint())
56     , autoRepeatColumnsType(RenderStyle::initialGridAutoRepeatType())
57     , autoRepeatRowsType(RenderStyle::initialGridAutoRepeatType())
58 {
59 }
60
61 inline StyleGridData::StyleGridData(const StyleGridData& o)
62     : RefCounted<StyleGridData>()
63     , gridColumns(o.gridColumns)
64     , gridRows(o.gridRows)
65     , namedGridColumnLines(o.namedGridColumnLines)
66     , namedGridRowLines(o.namedGridRowLines)
67     , orderedNamedGridColumnLines(o.orderedNamedGridColumnLines)
68     , orderedNamedGridRowLines(o.orderedNamedGridRowLines)
69     , autoRepeatNamedGridColumnLines(o.autoRepeatNamedGridColumnLines)
70     , autoRepeatNamedGridRowLines(o.autoRepeatNamedGridRowLines)
71     , autoRepeatOrderedNamedGridColumnLines(o.autoRepeatOrderedNamedGridColumnLines)
72     , autoRepeatOrderedNamedGridRowLines(o.autoRepeatOrderedNamedGridRowLines)
73     , gridAutoFlow(o.gridAutoFlow)
74     , gridAutoRows(o.gridAutoRows)
75     , gridAutoColumns(o.gridAutoColumns)
76     , namedGridArea(o.namedGridArea)
77     , namedGridAreaRowCount(o.namedGridAreaRowCount)
78     , namedGridAreaColumnCount(o.namedGridAreaColumnCount)
79     , gridColumnGap(o.gridColumnGap)
80     , gridRowGap(o.gridRowGap)
81     , gridAutoRepeatColumns(o.gridAutoRepeatColumns)
82     , gridAutoRepeatRows(o.gridAutoRepeatRows)
83     , autoRepeatColumnsInsertionPoint(o.autoRepeatColumnsInsertionPoint)
84     , autoRepeatRowsInsertionPoint(o.autoRepeatRowsInsertionPoint)
85     , autoRepeatColumnsType(o.autoRepeatColumnsType)
86     , autoRepeatRowsType(o.autoRepeatRowsType)
87 {
88 }
89
90 Ref<StyleGridData> StyleGridData::copy() const
91 {
92     return adoptRef(*new StyleGridData(*this));
93 }
94
95 } // namespace WebCore