| 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) 2006, 2007, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2007, 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 void HTMLLIElement::parseAttribute(const QualifiedName& name, const AtomicString
& value) | 78 void HTMLLIElement::parseAttribute(const QualifiedName& name, const AtomicString
& value) |
| 79 { | 79 { |
| 80 if (name == valueAttr) { | 80 if (name == valueAttr) { |
| 81 if (renderer() && renderer()->isListItem()) | 81 if (renderer() && renderer()->isListItem()) |
| 82 parseValue(value); | 82 parseValue(value); |
| 83 } else | 83 } else |
| 84 HTMLElement::parseAttribute(name, value); | 84 HTMLElement::parseAttribute(name, value); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void HTMLLIElement::attach() | 87 void HTMLLIElement::attach(const AttachContext& context) |
| 88 { | 88 { |
| 89 ASSERT(!attached()); | 89 ASSERT(!attached()); |
| 90 | 90 |
| 91 HTMLElement::attach(); | 91 HTMLElement::attach(context); |
| 92 | 92 |
| 93 if (renderer() && renderer()->isListItem()) { | 93 if (renderer() && renderer()->isListItem()) { |
| 94 RenderListItem* listItemRenderer = toRenderListItem(renderer()); | 94 RenderListItem* listItemRenderer = toRenderListItem(renderer()); |
| 95 | 95 |
| 96 // Find the enclosing list node. | 96 // Find the enclosing list node. |
| 97 Element* listNode = 0; | 97 Element* listNode = 0; |
| 98 Element* current = this; | 98 Element* current = this; |
| 99 while (!listNode) { | 99 while (!listNode) { |
| 100 current = current->parentElement(); | 100 current = current->parentElement(); |
| 101 if (!current) | 101 if (!current) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 119 | 119 |
| 120 bool valueOK; | 120 bool valueOK; |
| 121 int requestedValue = value.toInt(&valueOK); | 121 int requestedValue = value.toInt(&valueOK); |
| 122 if (valueOK) | 122 if (valueOK) |
| 123 toRenderListItem(renderer())->setExplicitValue(requestedValue); | 123 toRenderListItem(renderer())->setExplicitValue(requestedValue); |
| 124 else | 124 else |
| 125 toRenderListItem(renderer())->clearExplicitValue(); | 125 toRenderListItem(renderer())->clearExplicitValue(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } | 128 } |
| OLD | NEW |