• 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     : z_index(0)
32     , z_auto(true)
33     , boxSizing(CONTENT_BOX)
34 {
35     // Initialize our min/max widths/heights.
36     min_width = min_height = RenderStyle::initialMinSize();
37     max_width = max_height = RenderStyle::initialMaxSize();
38 }
39 
StyleBoxData(const StyleBoxData & o)40 StyleBoxData::StyleBoxData(const StyleBoxData& o)
41     : RefCounted<StyleBoxData>()
42     , width(o.width)
43     , height(o.height)
44     , min_width(o.min_width)
45     , max_width(o.max_width)
46     , min_height(o.min_height)
47     , max_height(o.max_height)
48     , z_index(o.z_index)
49     , z_auto(o.z_auto)
50     , boxSizing(o.boxSizing)
51 {
52 }
53 
operator ==(const StyleBoxData & o) const54 bool StyleBoxData::operator==(const StyleBoxData& o) const
55 {
56     return width == o.width &&
57            height == o.height &&
58            min_width == o.min_width &&
59            max_width == o.max_width &&
60            min_height == o.min_height &&
61            max_height == o.max_height &&
62            z_index == o.z_index &&
63            z_auto == o.z_auto &&
64            boxSizing == o.boxSizing;
65 }
66 
67 } // namespace WebCore
68