| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void HTMLLIElement::parseAttribute(const QualifiedName& name, const AtomicString
& oldValue, const AtomicString& value) | 84 void HTMLLIElement::parseAttribute(const QualifiedName& name, const AtomicString
& oldValue, const AtomicString& value) |
| 85 { | 85 { |
| 86 if (name == valueAttr) { | 86 if (name == valueAttr) { |
| 87 if (layoutObject() && layoutObject()->isListItem()) | 87 if (layoutObject() && layoutObject()->isListItem()) |
| 88 parseValue(value); | 88 parseValue(value); |
| 89 } else { | 89 } else { |
| 90 HTMLElement::parseAttribute(name, oldValue, value); | 90 HTMLElement::parseAttribute(name, oldValue, value); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 void HTMLLIElement::attach(const AttachContext& context) | 94 void HTMLLIElement::attachLayoutTree(const AttachContext& context) |
| 95 { | 95 { |
| 96 HTMLElement::attach(context); | 96 HTMLElement::attachLayoutTree(context); |
| 97 | 97 |
| 98 if (layoutObject() && layoutObject()->isListItem()) { | 98 if (layoutObject() && layoutObject()->isListItem()) { |
| 99 LayoutLIItem liLayoutItem = LayoutLIItem(toLayoutListItem(layoutObject()
)); | 99 LayoutLIItem liLayoutItem = LayoutLIItem(toLayoutListItem(layoutObject()
)); |
| 100 | 100 |
| 101 ASSERT(!document().childNeedsDistributionRecalc()); | 101 ASSERT(!document().childNeedsDistributionRecalc()); |
| 102 | 102 |
| 103 // Find the enclosing list node. | 103 // Find the enclosing list node. |
| 104 Element* listNode = 0; | 104 Element* listNode = 0; |
| 105 Element* current = this; | 105 Element* current = this; |
| 106 while (!listNode) { | 106 while (!listNode) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 126 | 126 |
| 127 bool valueOK; | 127 bool valueOK; |
| 128 int requestedValue = value.toInt(&valueOK); | 128 int requestedValue = value.toInt(&valueOK); |
| 129 if (valueOK) | 129 if (valueOK) |
| 130 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue); | 130 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue); |
| 131 else | 131 else |
| 132 toLayoutListItem(layoutObject())->clearExplicitValue(); | 132 toLayoutListItem(layoutObject())->clearExplicitValue(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace blink | 135 } // namespace blink |
| OLD | NEW |