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

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

Issue 368733002: Split list marker updating into two steps (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/RenderListItem.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 while (!listNode) { 91 while (!listNode) {
92 current = NodeRenderingTraversal::parentElement(current); 92 current = NodeRenderingTraversal::parentElement(current);
93 if (!current) 93 if (!current)
94 break; 94 break;
95 if (isHTMLUListElement(*current) || isHTMLOListElement(*current)) 95 if (isHTMLUListElement(*current) || isHTMLOListElement(*current))
96 listNode = current; 96 listNode = current;
97 } 97 }
98 98
99 // If we are not in a list, tell the renderer so it can position us insi de. 99 // If we are not in a list, tell the renderer so it can position us insi de.
100 // We don't want to change our style to say "inside" since that would af fect nested nodes. 100 // We don't want to change our style to say "inside" since that would af fect nested nodes.
101 if (!listNode) { 101 if (!listNode)
102 listItemRenderer->setNotInList(true); 102 listItemRenderer->setNotInList(true);
103 listItemRenderer->updateMarkerLocation();
104 }
105 103
106 parseValue(fastGetAttribute(valueAttr)); 104 parseValue(fastGetAttribute(valueAttr));
107 } 105 }
108 } 106 }
109 107
110 inline void HTMLLIElement::parseValue(const AtomicString& value) 108 inline void HTMLLIElement::parseValue(const AtomicString& value)
111 { 109 {
112 ASSERT(renderer() && renderer()->isListItem()); 110 ASSERT(renderer() && renderer()->isListItem());
113 111
114 bool valueOK; 112 bool valueOK;
115 int requestedValue = value.toInt(&valueOK); 113 int requestedValue = value.toInt(&valueOK);
116 if (valueOK) 114 if (valueOK)
117 toRenderListItem(renderer())->setExplicitValue(requestedValue); 115 toRenderListItem(renderer())->setExplicitValue(requestedValue);
118 else 116 else
119 toRenderListItem(renderer())->clearExplicitValue(); 117 toRenderListItem(renderer())->clearExplicitValue();
120 } 118 }
121 119
122 } 120 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderListItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698