• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  */
21 
22 #include "config.h"
23 #include "StyleBoxData.h"
24 
25 #include "RenderStyle.h"
26 #include "RenderStyleConstants.h"
27 
28 namespace WebCore {
29 
StyleBoxData()30 StyleBoxData::StyleBoxData()
31     : m_minWidth(RenderStyle::initialMinSize())
32     , m_maxWidth(RenderStyle::initialMaxSize())
33     , m_minHeight(RenderStyle::initialMinSize())
34     , m_maxHeight(RenderStyle::initialMaxSize())
35     , m_zIndex(0)
36     , m_hasAutoZIndex(true)
37     , m_boxSizing(CONTENT_BOX)
38 {
39 }
40 
StyleBoxData(const StyleBoxData & o)41 StyleBoxData::StyleBoxData(const StyleBoxData& o)
42     : RefCounted<StyleBoxData>()
43     , m_width(o.m_width)
44     , m_height(o.m_height)
45     , m_minWidth(o.m_minWidth)
46     , m_maxWidth(o.m_maxWidth)
47     , m_minHeight(o.m_minHeight)
48     , m_maxHeight(o.m_maxHeight)
49     , m_zIndex(o.m_zIndex)
50     , m_hasAutoZIndex(o.m_hasAutoZIndex)
51     , m_boxSizing(o.m_boxSizing)
52 {
53 }
54 
operator ==(const StyleBoxData & o) const55 bool StyleBoxData::operator==(const StyleBoxData& o) const
56 {
57     return m_width == o.m_width
58            && m_height == o.m_height
59            && m_minWidth == o.m_minWidth
60            && m_maxWidth == o.m_maxWidth
61            && m_minHeight == o.m_minHeight
62            && m_maxHeight == o.m_maxHeight
63            && m_zIndex == o.m_zIndex
64            && m_hasAutoZIndex == o.m_hasAutoZIndex
65            && m_boxSizing == o.m_boxSizing;
66 }
67 
68 } // namespace WebCore
69