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

Side by Side Diff: Source/core/layout/LayoutMenuList.cpp

Issue 1095043003: Convert LayoutObject renderer names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/layout/LayoutListItem.cpp ('k') | Source/core/layout/LayoutObject.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 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 didUpdateActiveOption(optionIndex); 284 didUpdateActiveOption(optionIndex);
285 } 285 }
286 286
287 void LayoutMenuList::setText(const String& s) 287 void LayoutMenuList::setText(const String& s)
288 { 288 {
289 if (s.isEmpty()) { 289 if (s.isEmpty()) {
290 if (!m_buttonText || !m_buttonText->isBR()) { 290 if (!m_buttonText || !m_buttonText->isBR()) {
291 // FIXME: We should not modify the structure of the render tree 291 // FIXME: We should not modify the structure of the render tree
292 // during layout. crbug.com/370462 292 // during layout. crbug.com/370462
293 DeprecatedDisableModifyRenderTreeStructureAsserts disabler; 293 DeprecatedDisableModifyLayoutTreeStructureAsserts disabler;
294 if (m_buttonText) 294 if (m_buttonText)
295 m_buttonText->destroy(); 295 m_buttonText->destroy();
296 m_buttonText = new LayoutBR(&document()); 296 m_buttonText = new LayoutBR(&document());
297 m_buttonText->setStyle(mutableStyle()); 297 m_buttonText->setStyle(mutableStyle());
298 addChild(m_buttonText); 298 addChild(m_buttonText);
299 } 299 }
300 } else { 300 } else {
301 if (m_buttonText && !m_buttonText->isBR()) { 301 if (m_buttonText && !m_buttonText->isBR()) {
302 m_buttonText->setText(s.impl(), true); 302 m_buttonText->setText(s.impl(), true);
303 } else { 303 } else {
304 // FIXME: We should not modify the structure of the render tree 304 // FIXME: We should not modify the structure of the render tree
305 // during layout. crbug.com/370462 305 // during layout. crbug.com/370462
306 DeprecatedDisableModifyRenderTreeStructureAsserts disabler; 306 DeprecatedDisableModifyLayoutTreeStructureAsserts disabler;
307 if (m_buttonText) 307 if (m_buttonText)
308 m_buttonText->destroy(); 308 m_buttonText->destroy();
309 m_buttonText = new LayoutText(&document(), s.impl()); 309 m_buttonText = new LayoutText(&document(), s.impl());
310 m_buttonText->setStyle(mutableStyle()); 310 m_buttonText->setStyle(mutableStyle());
311 // We need to set the text explicitly though it was specified in the 311 // We need to set the text explicitly though it was specified in the
312 // constructor because LayoutText doesn't refer to the text 312 // constructor because LayoutText doesn't refer to the text
313 // specified in the constructor in a case of re-transforming. 313 // specified in the constructor in a case of re-transforming.
314 m_buttonText->setText(s.impl(), true); 314 m_buttonText->setText(s.impl(), true);
315 addChild(m_buttonText); 315 addChild(m_buttonText);
316 } 316 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 HTMLElement* element = listItems[listIndex]; 623 HTMLElement* element = listItems[listIndex];
624 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select ed(); 624 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select ed();
625 } 625 }
626 626
627 void LayoutMenuList::provisionalSelectionChanged(unsigned listIndex) 627 void LayoutMenuList::provisionalSelectionChanged(unsigned listIndex)
628 { 628 {
629 setIndexToSelectOnCancel(listIndex); 629 setIndexToSelectOnCancel(listIndex);
630 } 630 }
631 631
632 } // namespace blink 632 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutListItem.cpp ('k') | Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698