| 1 | /* |
| 2 | * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 | * Copyright (C) 2004-2013 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 "StyleMultiColData.h" |
| 24 | |
| 25 | #include "RenderStyle.h" |
| 26 | |
| 27 | namespace WebCore { |
| 28 | |
| 29 | StyleMultiColData::StyleMultiColData() |
| 30 | : count(RenderStyle::initialColumnCount()) |
| 31 | , autoWidth(true) |
| 32 | , autoCount(true) |
| 33 | , fill(static_cast<unsigned>(RenderStyle::initialColumnFill())) |
| 34 | , columnSpan(false) |
| 35 | , axis(static_cast<unsigned>(RenderStyle::initialColumnAxis())) |
| 36 | , progression(static_cast<unsigned>(RenderStyle::initialColumnProgression())) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | inline StyleMultiColData::StyleMultiColData(const StyleMultiColData& other) |
| 41 | : RefCounted<StyleMultiColData>() |
| 42 | , width(other.width) |
| 43 | , count(other.count) |
| 44 | , rule(other.rule) |
| 45 | , visitedLinkColumnRuleColor(other.visitedLinkColumnRuleColor) |
| 46 | , autoWidth(other.autoWidth) |
| 47 | , autoCount(other.autoCount) |
| 48 | , fill(other.fill) |
| 49 | , columnSpan(other.columnSpan) |
| 50 | , axis(other.axis) |
| 51 | , progression(other.progression) |
| 52 | { |
| 53 | } |
| 54 | |
| 55 | Ref<StyleMultiColData> StyleMultiColData::copy() const |
| 56 | { |
| 57 | return adoptRef(*new StyleMultiColData(*this)); |
| 58 | } |
| 59 | |
| 60 | bool StyleMultiColData::operator==(const StyleMultiColData& other) const |
| 61 | { |
| 62 | return width == other.width && count == other.count |
| 63 | && rule == other.rule && visitedLinkColumnRuleColor == other.visitedLinkColumnRuleColor |
| 64 | && autoWidth == other.autoWidth && autoCount == other.autoCount |
| 65 | && fill == other.fill && columnSpan == other.columnSpan |
| 66 | && axis == other.axis && progression == other.progression; |
| 67 | } |
| 68 | |
| 69 | } // namespace WebCore |
| 70 | |