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

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

Issue 1115353002: Update renderer to layoutObject in core/html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/HTMLOptionElement.h ('k') | Source/core/html/HTMLPlugInElement.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 * (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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 void HTMLOptionElement::setLabel(const AtomicString& label) 311 void HTMLOptionElement::setLabel(const AtomicString& label)
312 { 312 {
313 setAttribute(labelAttr, label); 313 setAttribute(labelAttr, label);
314 } 314 }
315 315
316 void HTMLOptionElement::updateNonComputedStyle() 316 void HTMLOptionElement::updateNonComputedStyle()
317 { 317 {
318 m_style = originalStyleForLayoutObject(); 318 m_style = originalStyleForLayoutObject();
319 if (HTMLSelectElement* select = ownerSelectElement()) 319 if (HTMLSelectElement* select = ownerSelectElement())
320 select->updateListOnRenderer(); 320 select->updateListOnLayoutObject();
321 } 321 }
322 322
323 ComputedStyle* HTMLOptionElement::nonLayoutObjectComputedStyle() const 323 ComputedStyle* HTMLOptionElement::nonLayoutObjectComputedStyle() const
324 { 324 {
325 return m_style.get(); 325 return m_style.get();
326 } 326 }
327 327
328 PassRefPtr<ComputedStyle> HTMLOptionElement::customStyleForLayoutObject() 328 PassRefPtr<ComputedStyle> HTMLOptionElement::customStyleForLayoutObject()
329 { 329 {
330 updateNonComputedStyle(); 330 updateNonComputedStyle();
331 return m_style; 331 return m_style;
332 } 332 }
333 333
334 void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change) 334 void HTMLOptionElement::didRecalcStyle(StyleRecalcChange change)
335 { 335 {
336 if (change == NoChange) 336 if (change == NoChange)
337 return; 337 return;
338 338
339 // FIXME: We ask our owner select to repaint regardless of which property ch anged. 339 // FIXME: We ask our owner select to repaint regardless of which property ch anged.
340 if (HTMLSelectElement* select = ownerSelectElement()) { 340 if (HTMLSelectElement* select = ownerSelectElement()) {
341 if (LayoutObject* renderer = select->layoutObject()) 341 if (LayoutObject* layoutObject = select->layoutObject())
342 renderer->setShouldDoFullPaintInvalidation(); 342 layoutObject->setShouldDoFullPaintInvalidation();
343 } 343 }
344 } 344 }
345 345
346 String HTMLOptionElement::textIndentedToRespectGroupLabel() const 346 String HTMLOptionElement::textIndentedToRespectGroupLabel() const
347 { 347 {
348 ContainerNode* parent = parentNode(); 348 ContainerNode* parent = parentNode();
349 if (parent && isHTMLOptGroupElement(*parent)) 349 if (parent && isHTMLOptGroupElement(*parent))
350 return " " + text(); 350 return " " + text();
351 return text(); 351 return text();
352 } 352 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 ASSERT(parent); 437 ASSERT(parent);
438 if (isHTMLOptGroupElement(*parent)) { 438 if (isHTMLOptGroupElement(*parent)) {
439 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle(); 439 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle();
440 return !parentStyle || parentStyle->display() == NONE; 440 return !parentStyle || parentStyle->display() == NONE;
441 } 441 }
442 } 442 }
443 return m_style->display() == NONE; 443 return m_style->display() == NONE;
444 } 444 }
445 445
446 } // namespace blink 446 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptionElement.h ('k') | Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698