| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (name == typeAttr) { | 74 if (name == typeAttr) { |
| 75 CSSValueID typeValue = listTypeToCSSValueID(value); | 75 CSSValueID typeValue = listTypeToCSSValueID(value); |
| 76 if (typeValue != CSSValueInvalid) | 76 if (typeValue != CSSValueInvalid) |
| 77 addPropertyToPresentationAttributeStyle(style, CSSPropertyListStyleType, | 77 addPropertyToPresentationAttributeStyle(style, CSSPropertyListStyleType, |
| 78 typeValue); | 78 typeValue); |
| 79 } else { | 79 } else { |
| 80 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 80 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 void HTMLLIElement::parseAttribute(const QualifiedName& name, | 84 void HTMLLIElement::parseAttribute(const AttributeModificationParams& params) { |
| 85 const AtomicString& oldValue, | 85 if (params.name == valueAttr) { |
| 86 const AtomicString& value) { | |
| 87 if (name == valueAttr) { | |
| 88 if (layoutObject() && layoutObject()->isListItem()) | 86 if (layoutObject() && layoutObject()->isListItem()) |
| 89 parseValue(value); | 87 parseValue(params.newValue); |
| 90 } else { | 88 } else { |
| 91 HTMLElement::parseAttribute(name, oldValue, value); | 89 HTMLElement::parseAttribute(params); |
| 92 } | 90 } |
| 93 } | 91 } |
| 94 | 92 |
| 95 void HTMLLIElement::attachLayoutTree(const AttachContext& context) { | 93 void HTMLLIElement::attachLayoutTree(const AttachContext& context) { |
| 96 HTMLElement::attachLayoutTree(context); | 94 HTMLElement::attachLayoutTree(context); |
| 97 | 95 |
| 98 if (layoutObject() && layoutObject()->isListItem()) { | 96 if (layoutObject() && layoutObject()->isListItem()) { |
| 99 LayoutLIItem liLayoutItem = LayoutLIItem(toLayoutListItem(layoutObject())); | 97 LayoutLIItem liLayoutItem = LayoutLIItem(toLayoutListItem(layoutObject())); |
| 100 | 98 |
| 101 DCHECK(!document().childNeedsDistributionRecalc()); | 99 DCHECK(!document().childNeedsDistributionRecalc()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 126 DCHECK(layoutObject()->isListItem()); | 124 DCHECK(layoutObject()->isListItem()); |
| 127 | 125 |
| 128 int requestedValue = 0; | 126 int requestedValue = 0; |
| 129 if (parseHTMLInteger(value, requestedValue)) | 127 if (parseHTMLInteger(value, requestedValue)) |
| 130 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue); | 128 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue); |
| 131 else | 129 else |
| 132 toLayoutListItem(layoutObject())->clearExplicitValue(); | 130 toLayoutListItem(layoutObject())->clearExplicitValue(); |
| 133 } | 131 } |
| 134 | 132 |
| 135 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |