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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Renamed members Created 4 years, 2 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
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 return select->spatialNavigationFocusedOption() == this; 452 return select->spatialNavigationFocusedOption() == this;
453 } 453 }
454 454
455 bool HTMLOptionElement::isDisplayNone() const 455 bool HTMLOptionElement::isDisplayNone() const
456 { 456 {
457 // If m_style is not set, then the node is still unattached. 457 // If m_style is not set, then the node is still unattached.
458 // We have to wait till it gets attached to read the display property. 458 // We have to wait till it gets attached to read the display property.
459 if (!m_style) 459 if (!m_style)
460 return false; 460 return false;
461 461
462 if (m_style->display() != NONE) { 462 if (m_style->display() != EDisplay::None) {
463 // We need to check the parent's display property. Parent's 463 // We need to check the parent's display property. Parent's
464 // display:none doesn't override children's display properties in 464 // display:none doesn't override children's display properties in
465 // ComputedStyle. 465 // ComputedStyle.
466 Element* parent = parentElement(); 466 Element* parent = parentElement();
467 DCHECK(parent); 467 DCHECK(parent);
468 if (isHTMLOptGroupElement(*parent)) { 468 if (isHTMLOptGroupElement(*parent)) {
469 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle(); 469 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle();
470 return !parentStyle || parentStyle->display() == NONE; 470 return !parentStyle || parentStyle->display() == EDisplay::None;
471 } 471 }
472 } 472 }
473 return m_style->display() == NONE; 473 return m_style->display() == EDisplay::None;
474 } 474 }
475 475
476 } // namespace blink 476 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698