| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "core/html/HTMLElement.h" | 26 #include "core/html/HTMLElement.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class HTMLOListElement final : public HTMLElement { | 30 class HTMLOListElement final : public HTMLElement { |
| 31 DEFINE_WRAPPERTYPEINFO(); | 31 DEFINE_WRAPPERTYPEINFO(); |
| 32 | 32 |
| 33 public: | 33 public: |
| 34 DECLARE_NODE_FACTORY(HTMLOListElement); | 34 DECLARE_NODE_FACTORY(HTMLOListElement); |
| 35 | 35 |
| 36 int start() const { | 36 int start() const; |
| 37 return has_explicit_start_ ? start_ : (is_reversed_ ? ItemCount() : 1); | |
| 38 } | |
| 39 void setStart(int); | 37 void setStart(int); |
| 40 | 38 |
| 41 bool IsReversed() const { return is_reversed_; } | 39 bool IsReversed() const { return is_reversed_; } |
| 42 | 40 |
| 43 void ItemCountChanged() { should_recalculate_item_count_ = true; } | 41 void ItemCountChanged() { should_recalculate_item_count_ = true; } |
| 44 | 42 |
| 45 private: | 43 private: |
| 46 explicit HTMLOListElement(Document&); | 44 explicit HTMLOListElement(Document&); |
| 47 | 45 |
| 48 void UpdateItemValues(); | 46 void UpdateItemValues(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 65 unsigned item_count_; | 63 unsigned item_count_; |
| 66 | 64 |
| 67 bool has_explicit_start_ : 1; | 65 bool has_explicit_start_ : 1; |
| 68 bool is_reversed_ : 1; | 66 bool is_reversed_ : 1; |
| 69 bool should_recalculate_item_count_ : 1; | 67 bool should_recalculate_item_count_ : 1; |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 } // namespace blink | 70 } // namespace blink |
| 73 | 71 |
| 74 #endif // HTMLOListElement_h | 72 #endif // HTMLOListElement_h |
| OLD | NEW |