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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated change after Doug's review. Created 5 years, 10 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/HTMLFormControlElementTest.cpp ('k') | Source/core/html/forms/InputType.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 { 400 {
401 // If m_style is not set, then the node is still unattached. 401 // If m_style is not set, then the node is still unattached.
402 // We have to wait till it gets attached to read the display property. 402 // We have to wait till it gets attached to read the display property.
403 if (!m_style) 403 if (!m_style)
404 return false; 404 return false;
405 405
406 if (m_style->display() != NONE) { 406 if (m_style->display() != NONE) {
407 Element* parent = parentElement(); 407 Element* parent = parentElement();
408 ASSERT(parent); 408 ASSERT(parent);
409 if (isHTMLOptGroupElement(*parent)) { 409 if (isHTMLOptGroupElement(*parent)) {
410 LayoutStyle* parentStyle = parent->layoutStyle() ? parent->layoutSty le() : parent->computedStyle(); 410 const LayoutStyle* parentStyle = parent->layoutStyle() ? parent->lay outStyle() : parent->computedStyle();
411 return !parentStyle || parentStyle->display() == NONE; 411 return !parentStyle || parentStyle->display() == NONE;
412 } 412 }
413 } 413 }
414 return m_style->display() == NONE; 414 return m_style->display() == NONE;
415 } 415 }
416 416
417 } // namespace blink 417 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElementTest.cpp ('k') | Source/core/html/forms/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698