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

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: Fix a crashers (everything is building!) 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
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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 { 393 {
394 // If m_style is not set, then the node is still unattached. 394 // If m_style is not set, then the node is still unattached.
395 // We have to wait till it gets attached to read the display property. 395 // We have to wait till it gets attached to read the display property.
396 if (!m_style) 396 if (!m_style)
397 return false; 397 return false;
398 398
399 if (m_style->display() != NONE) { 399 if (m_style->display() != NONE) {
400 Element* parent = parentElement(); 400 Element* parent = parentElement();
401 ASSERT(parent); 401 ASSERT(parent);
402 if (isHTMLOptGroupElement(*parent)) { 402 if (isHTMLOptGroupElement(*parent)) {
403 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty le() : parent->computedStyle(); 403 const RenderStyle* parentStyle = parent->renderStyle() ? parent->ren derStyle() : parent->computedStyle();
404 return !parentStyle || parentStyle->display() == NONE; 404 return !parentStyle || parentStyle->display() == NONE;
405 } 405 }
406 } 406 }
407 return m_style->display() == NONE; 407 return m_style->display() == NONE;
408 } 408 }
409 409
410 } // namespace blink 410 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698