Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLLIElement.cpp

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 Element* listNode = 0; 103 Element* listNode = 0;
104 Element* current = this; 104 Element* current = this;
105 while (!listNode) { 105 while (!listNode) {
106 current = LayoutTreeBuilderTraversal::parentElement(*current); 106 current = LayoutTreeBuilderTraversal::parentElement(*current);
107 if (!current) 107 if (!current)
108 break; 108 break;
109 if (isHTMLUListElement(*current) || isHTMLOListElement(*current)) 109 if (isHTMLUListElement(*current) || isHTMLOListElement(*current))
110 listNode = current; 110 listNode = current;
111 } 111 }
112 112
113 // If we are not in a list, tell the layoutObject so it can position us insi de. 113 // If we are not in a list, tell the layoutObject so it can position us
114 // We don't want to change our style to say "inside" since that would affect nested nodes. 114 // inside. We don't want to change our style to say "inside" since that
115 // would affect nested nodes.
115 if (!listNode) 116 if (!listNode)
116 liLayoutItem.setNotInList(true); 117 liLayoutItem.setNotInList(true);
117 118
118 parseValue(fastGetAttribute(valueAttr)); 119 parseValue(fastGetAttribute(valueAttr));
119 } 120 }
120 } 121 }
121 122
122 inline void HTMLLIElement::parseValue(const AtomicString& value) { 123 inline void HTMLLIElement::parseValue(const AtomicString& value) {
123 DCHECK(layoutObject()); 124 DCHECK(layoutObject());
124 DCHECK(layoutObject()->isListItem()); 125 DCHECK(layoutObject()->isListItem());
125 126
126 bool valueOK; 127 bool valueOK;
127 int requestedValue = value.toInt(&valueOK); 128 int requestedValue = value.toInt(&valueOK);
128 if (valueOK) 129 if (valueOK)
129 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue); 130 toLayoutListItem(layoutObject())->setExplicitValue(requestedValue);
130 else 131 else
131 toLayoutListItem(layoutObject())->clearExplicitValue(); 132 toLayoutListItem(layoutObject())->clearExplicitValue();
132 } 133 }
133 134
134 } // namespace blink 135 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLabelElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698