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

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

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return select->spatialNavigationFocusedOption() == this; 410 return select->spatialNavigationFocusedOption() == this;
411 } 411 }
412 412
413 bool HTMLOptionElement::isDisplayNone() const { 413 bool HTMLOptionElement::isDisplayNone() const {
414 // If the style is not set, then the node is still unattached. 414 // If the style is not set, then the node is still unattached.
415 // We have to wait till it gets attached to read the display property. 415 // We have to wait till it gets attached to read the display property.
416 const ComputedStyle* style = nonLayoutObjectComputedStyle(); 416 const ComputedStyle* style = nonLayoutObjectComputedStyle();
417 if (!style) 417 if (!style)
418 return false; 418 return false;
419 419
420 if (style->display() != EDisplay::None) { 420 if (style->display() != EDisplay::kNone) {
421 // We need to check the parent's display property. Parent's 421 // We need to check the parent's display property. Parent's
422 // display:none doesn't override children's display properties in 422 // display:none doesn't override children's display properties in
423 // ComputedStyle. 423 // ComputedStyle.
424 Element* parent = parentElement(); 424 Element* parent = parentElement();
425 DCHECK(parent); 425 DCHECK(parent);
426 if (isHTMLOptGroupElement(*parent)) { 426 if (isHTMLOptGroupElement(*parent)) {
427 const ComputedStyle* parentStyle = parent->computedStyle() 427 const ComputedStyle* parentStyle = parent->computedStyle()
428 ? parent->computedStyle() 428 ? parent->computedStyle()
429 : parent->ensureComputedStyle(); 429 : parent->ensureComputedStyle();
430 return !parentStyle || parentStyle->display() == EDisplay::None; 430 return !parentStyle || parentStyle->display() == EDisplay::kNone;
431 } 431 }
432 } 432 }
433 return style->display() == EDisplay::None; 433 return style->display() == EDisplay::kNone;
434 } 434 }
435 435
436 String HTMLOptionElement::innerText() { 436 String HTMLOptionElement::innerText() {
437 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but 437 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but
438 // innerText behavior for Shadow DOM is unclear. We just return the same 438 // innerText behavior for Shadow DOM is unclear. We just return the same
439 // string before adding ShadowRoot. 439 // string before adding ShadowRoot.
440 return textContent(); 440 return textContent();
441 } 441 }
442 442
443 } // namespace blink 443 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp ('k') | third_party/WebKit/Source/core/html/HTMLRTElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698