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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | « Source/core/html/HTMLOptGroupElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('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 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 { 187 {
188 if (name == valueAttr) { 188 if (name == valueAttr) {
189 if (HTMLDataListElement* dataList = ownerDataListElement()) 189 if (HTMLDataListElement* dataList = ownerDataListElement())
190 dataList->optionElementChildrenChanged(); 190 dataList->optionElementChildrenChanged();
191 } else if (name == disabledAttr) { 191 } else if (name == disabledAttr) {
192 bool oldDisabled = m_disabled; 192 bool oldDisabled = m_disabled;
193 m_disabled = !value.isNull(); 193 m_disabled = !value.isNull();
194 if (oldDisabled != m_disabled) { 194 if (oldDisabled != m_disabled) {
195 pseudoStateChanged(CSSSelector::PseudoDisabled); 195 pseudoStateChanged(CSSSelector::PseudoDisabled);
196 pseudoStateChanged(CSSSelector::PseudoEnabled); 196 pseudoStateChanged(CSSSelector::PseudoEnabled);
197 if (renderer() && renderer()->style()->hasAppearance()) 197 if (layoutObject() && layoutObject()->style()->hasAppearance())
198 LayoutTheme::theme().stateChanged(renderer(), EnabledControlStat e); 198 LayoutTheme::theme().stateChanged(layoutObject(), EnabledControl State);
199 } 199 }
200 } else if (name == selectedAttr) { 200 } else if (name == selectedAttr) {
201 if (bool willBeSelected = !value.isNull()) 201 if (bool willBeSelected = !value.isNull())
202 setSelected(willBeSelected); 202 setSelected(willBeSelected);
203 } else if (name == labelAttr) { 203 } else if (name == labelAttr) {
204 updateLabel(); 204 updateLabel();
205 } else 205 } else
206 HTMLElement::parseAttribute(name, value); 206 HTMLElement::parseAttribute(name, value);
207 } 207 }
208 208
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 return m_style; 310 return m_style;
311 } 311 }
312 312
313 void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change) 313 void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change)
314 { 314 {
315 if (change == NoChange) 315 if (change == NoChange)
316 return; 316 return;
317 317
318 // FIXME: We ask our owner select to repaint regardless of which property ch anged. 318 // FIXME: We ask our owner select to repaint regardless of which property ch anged.
319 if (HTMLSelectElement* select = ownerSelectElement()) { 319 if (HTMLSelectElement* select = ownerSelectElement()) {
320 if (LayoutObject* renderer = select->renderer()) 320 if (LayoutObject* renderer = select->layoutObject())
321 renderer->setShouldDoFullPaintInvalidation(); 321 renderer->setShouldDoFullPaintInvalidation();
322 } 322 }
323 } 323 }
324 324
325 String HTMLOptionElement::textIndentedToRespectGroupLabel() const 325 String HTMLOptionElement::textIndentedToRespectGroupLabel() const
326 { 326 {
327 ContainerNode* parent = parentNode(); 327 ContainerNode* parent = parentNode();
328 if (parent && isHTMLOptGroupElement(*parent)) 328 if (parent && isHTMLOptGroupElement(*parent))
329 return " " + text(); 329 return " " + text();
330 return text(); 330 return text();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 ASSERT(parent); 416 ASSERT(parent);
417 if (isHTMLOptGroupElement(*parent)) { 417 if (isHTMLOptGroupElement(*parent)) {
418 LayoutStyle* parentStyle = parent->layoutStyle() ? parent->layoutSty le() : parent->computedStyle(); 418 LayoutStyle* parentStyle = parent->layoutStyle() ? parent->layoutSty le() : parent->computedStyle();
419 return !parentStyle || parentStyle->display() == NONE; 419 return !parentStyle || parentStyle->display() == NONE;
420 } 420 }
421 } 421 }
422 return m_style->display() == NONE; 422 return m_style->display() == NONE;
423 } 423 }
424 424
425 } // namespace blink 425 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698