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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 return parent->locateNamespacePrefix(namespaceToLocate); 1567 return parent->locateNamespacePrefix(namespaceToLocate);
1568 1568
1569 return nullAtom; 1569 return nullAtom;
1570 } 1570 }
1571 1571
1572 const AtomicString Element::imageSourceURL() const { 1572 const AtomicString Element::imageSourceURL() const {
1573 return getAttribute(srcAttr); 1573 return getAttribute(srcAttr);
1574 } 1574 }
1575 1575
1576 bool Element::layoutObjectIsNeeded(const ComputedStyle& style) { 1576 bool Element::layoutObjectIsNeeded(const ComputedStyle& style) {
1577 return style.display() != EDisplay::None && 1577 return style.display() != EDisplay::kNone &&
1578 style.display() != EDisplay::Contents; 1578 style.display() != EDisplay::kContents;
1579 } 1579 }
1580 1580
1581 LayoutObject* Element::createLayoutObject(const ComputedStyle& style) { 1581 LayoutObject* Element::createLayoutObject(const ComputedStyle& style) {
1582 return LayoutObject::createObject(this, style); 1582 return LayoutObject::createObject(this, style);
1583 } 1583 }
1584 1584
1585 Node::InsertionNotificationRequest Element::insertedInto( 1585 Node::InsertionNotificationRequest Element::insertedInto(
1586 ContainerNode* insertionPoint) { 1586 ContainerNode* insertionPoint) {
1587 // need to do superclass processing first so isConnected() is true 1587 // need to do superclass processing first so isConnected() is true
1588 // by the time we reach updateId 1588 // by the time we reach updateId
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 3189
3190 const ComputedStyle* Element::nonLayoutObjectComputedStyle() const { 3190 const ComputedStyle* Element::nonLayoutObjectComputedStyle() const {
3191 if (layoutObject() || !hasRareData()) 3191 if (layoutObject() || !hasRareData())
3192 return nullptr; 3192 return nullptr;
3193 3193
3194 return elementRareData()->computedStyle(); 3194 return elementRareData()->computedStyle();
3195 } 3195 }
3196 3196
3197 bool Element::hasDisplayContentsStyle() const { 3197 bool Element::hasDisplayContentsStyle() const {
3198 if (const ComputedStyle* style = nonLayoutObjectComputedStyle()) 3198 if (const ComputedStyle* style = nonLayoutObjectComputedStyle())
3199 return style->display() == EDisplay::Contents; 3199 return style->display() == EDisplay::kContents;
3200 return false; 3200 return false;
3201 } 3201 }
3202 3202
3203 bool Element::shouldStoreNonLayoutObjectComputedStyle( 3203 bool Element::shouldStoreNonLayoutObjectComputedStyle(
3204 const ComputedStyle& style) const { 3204 const ComputedStyle& style) const {
3205 #if DCHECK_IS_ON() 3205 #if DCHECK_IS_ON()
3206 if (style.display() == EDisplay::Contents) 3206 if (style.display() == EDisplay::kContents)
3207 DCHECK(!layoutObject()); 3207 DCHECK(!layoutObject());
3208 #endif 3208 #endif
3209 3209
3210 return style.display() == EDisplay::Contents || 3210 return style.display() == EDisplay::kContents ||
3211 isHTMLOptGroupElement(*this) || isHTMLOptionElement(*this); 3211 isHTMLOptGroupElement(*this) || isHTMLOptionElement(*this);
3212 } 3212 }
3213 3213
3214 void Element::storeNonLayoutObjectComputedStyle( 3214 void Element::storeNonLayoutObjectComputedStyle(
3215 PassRefPtr<ComputedStyle> style) { 3215 PassRefPtr<ComputedStyle> style) {
3216 DCHECK(style); 3216 DCHECK(style);
3217 DCHECK(shouldStoreNonLayoutObjectComputedStyle(*style)); 3217 DCHECK(shouldStoreNonLayoutObjectComputedStyle(*style));
3218 ensureElementRareData().setComputedStyle(std::move(style)); 3218 ensureElementRareData().setComputedStyle(std::move(style));
3219 } 3219 }
3220 3220
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
4175 } 4175 }
4176 4176
4177 DEFINE_TRACE_WRAPPERS(Element) { 4177 DEFINE_TRACE_WRAPPERS(Element) {
4178 if (hasRareData()) { 4178 if (hasRareData()) {
4179 visitor->traceWrappers(elementRareData()); 4179 visitor->traceWrappers(elementRareData());
4180 } 4180 }
4181 ContainerNode::traceWrappers(visitor); 4181 ContainerNode::traceWrappers(visitor);
4182 } 4182 }
4183 4183
4184 } // namespace blink 4184 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp ('k') | third_party/WebKit/Source/core/dom/PseudoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698