| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 void inheritReset(CounterDirectives& parent) | 61 void inheritReset(CounterDirectives& parent) |
| 62 { | 62 { |
| 63 m_resetValue = parent.m_resetValue; | 63 m_resetValue = parent.m_resetValue; |
| 64 m_isResetSet = parent.m_isResetSet; | 64 m_isResetSet = parent.m_isResetSet; |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool isIncrement() const { return m_isIncrementSet; } | 67 bool isIncrement() const { return m_isIncrementSet; } |
| 68 int incrementValue() const { return m_incrementValue; } | 68 int incrementValue() const { return m_incrementValue; } |
| 69 void addIncrementValue(int value) | 69 void addIncrementValue(int value) |
| 70 { | 70 { |
| 71 m_incrementValue = clampToInteger((double)m_incrementValue + value); | 71 m_incrementValue = clampTo<int>((double)m_incrementValue + value); |
| 72 m_isIncrementSet = true; | 72 m_isIncrementSet = true; |
| 73 } | 73 } |
| 74 void clearIncrement() | 74 void clearIncrement() |
| 75 { | 75 { |
| 76 m_incrementValue = 0; | 76 m_incrementValue = 0; |
| 77 m_isIncrementSet = false; | 77 m_isIncrementSet = false; |
| 78 } | 78 } |
| 79 void inheritIncrement(CounterDirectives& parent) | 79 void inheritIncrement(CounterDirectives& parent) |
| 80 { | 80 { |
| 81 m_incrementValue = parent.m_incrementValue; | 81 m_incrementValue = parent.m_incrementValue; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 102 bool operator==(const CounterDirectives&, const CounterDirectives&); | 102 bool operator==(const CounterDirectives&, const CounterDirectives&); |
| 103 inline bool operator!=(const CounterDirectives& a, const CounterDirectives& b) {
return !(a == b); } | 103 inline bool operator!=(const CounterDirectives& a, const CounterDirectives& b) {
return !(a == b); } |
| 104 | 104 |
| 105 typedef HashMap<AtomicString, CounterDirectives> CounterDirectiveMap; | 105 typedef HashMap<AtomicString, CounterDirectives> CounterDirectiveMap; |
| 106 | 106 |
| 107 PassOwnPtr<CounterDirectiveMap> clone(const CounterDirectiveMap&); | 107 PassOwnPtr<CounterDirectiveMap> clone(const CounterDirectiveMap&); |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| 110 | 110 |
| 111 #endif // CounterDirectives_h | 111 #endif // CounterDirectives_h |
| OLD | NEW |