| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 2 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 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 | 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, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef CounterNode_h | 22 #ifndef CounterNode_h |
| 23 #define CounterNode_h | 23 #define CounterNode_h |
| 24 | 24 |
| 25 #include "wtf/Forward.h" | 25 #include "wtf/Forward.h" |
| 26 #include "wtf/Noncopyable.h" | 26 #include "wtf/Noncopyable.h" |
| 27 #include "wtf/RefCounted.h" | 27 #include "wtf/RefCounted.h" |
| 28 | 28 |
| 29 // This implements a counter tree that is used for finding parents in counters()
lookup, | 29 // This implements a counter tree that is used for finding parents in counters() |
| 30 // and for propagating count changes when nodes are added or removed. | 30 // lookup, and for propagating count changes when nodes are added or removed. |
| 31 | 31 |
| 32 // Parents represent unique counters and their scope, which are created either e
xplicitly | 32 // Parents represent unique counters and their scope, which are created either |
| 33 // by "counter-reset" style rules or implicitly by referring to a counter that i
s not in scope. | 33 // explicitly by "counter-reset" style rules or implicitly by referring to a |
| 34 // Such nodes are tagged as "reset" nodes, although they are not all due to "cou
nter-reset". | 34 // counter that is not in scope. |
| 35 // Such nodes are tagged as "reset" nodes, although they are not all due to |
| 36 // "counter-reset". |
| 35 | 37 |
| 36 // Not that layout tree children are often counter tree siblings due to counter
scoping rules. | 38 // Not that layout tree children are often counter tree siblings due to counter |
| 39 // scoping rules. |
| 37 | 40 |
| 38 namespace blink { | 41 namespace blink { |
| 39 | 42 |
| 40 class LayoutObject; | 43 class LayoutObject; |
| 41 class LayoutCounter; | 44 class LayoutCounter; |
| 42 | 45 |
| 43 class CounterNode : public RefCounted<CounterNode> { | 46 class CounterNode : public RefCounted<CounterNode> { |
| 44 public: | 47 public: |
| 45 static PassRefPtr<CounterNode> create(LayoutObject&, bool isReset, int value); | 48 static PassRefPtr<CounterNode> create(LayoutObject&, bool isReset, int value); |
| 46 ~CounterNode(); | 49 ~CounterNode(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 }; | 98 }; |
| 96 | 99 |
| 97 } // namespace blink | 100 } // namespace blink |
| 98 | 101 |
| 99 #ifndef NDEBUG | 102 #ifndef NDEBUG |
| 100 // Outside the WebCore namespace for ease of invocation from gdb. | 103 // Outside the WebCore namespace for ease of invocation from gdb. |
| 101 void showCounterTree(const blink::CounterNode*); | 104 void showCounterTree(const blink::CounterNode*); |
| 102 #endif | 105 #endif |
| 103 | 106 |
| 104 #endif // CounterNode_h | 107 #endif // CounterNode_h |
| OLD | NEW |