OLD | NEW |
| (Empty) |
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 "core/style/StyleSurroundData.h" | |
23 | |
24 namespace blink { | |
25 | |
26 StyleSurroundData::StyleSurroundData() | |
27 : margin_left_(kFixed), | |
28 margin_right_(kFixed), | |
29 margin_top_(kFixed), | |
30 margin_bottom_(kFixed), | |
31 padding_left_(kFixed), | |
32 padding_right_(kFixed), | |
33 padding_top_(kFixed), | |
34 padding_bottom_(kFixed) {} | |
35 | |
36 StyleSurroundData::StyleSurroundData(const StyleSurroundData& o) | |
37 : RefCounted<StyleSurroundData>(), | |
38 left_(o.left_), | |
39 right_(o.right_), | |
40 top_(o.top_), | |
41 bottom_(o.bottom_), | |
42 margin_left_(o.margin_left_), | |
43 margin_right_(o.margin_right_), | |
44 margin_top_(o.margin_top_), | |
45 margin_bottom_(o.margin_bottom_), | |
46 padding_left_(o.padding_left_), | |
47 padding_right_(o.padding_right_), | |
48 padding_top_(o.padding_top_), | |
49 padding_bottom_(o.padding_bottom_), | |
50 border_(o.border_) {} | |
51 | |
52 bool StyleSurroundData::operator==(const StyleSurroundData& o) const { | |
53 return (left_ == o.left_ && right_ == o.right_ && top_ == o.top_ && | |
54 bottom_ == o.bottom_) && | |
55 (margin_left_ == o.margin_left_ && margin_right_ == o.margin_right_ && | |
56 margin_top_ == o.margin_top_ && margin_bottom_ == o.margin_bottom_) && | |
57 (padding_left_ == o.padding_left_ && | |
58 padding_right_ == o.padding_right_ && | |
59 padding_top_ == o.padding_top_ && | |
60 padding_bottom_ == o.padding_bottom_) && | |
61 border_ == o.border_; | |
62 } | |
63 | |
64 } // namespace blink | |
OLD | NEW |