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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 const ComputedStyle* style = 339 const ComputedStyle* style =
340 m_node->ensureComputedStyle(m_pseudoElementSpecifier); 340 m_node->ensureComputedStyle(m_pseudoElementSpecifier);
341 if (!style) 341 if (!style)
342 return false; 342 return false;
343 343
344 return style->getFontDescription().isMonospace(); 344 return style->getFontDescription().isMonospace();
345 } 345 }
346 const ComputedStyle* CSSComputedStyleDeclaration::computeComputedStyle() const { 346 const ComputedStyle* CSSComputedStyleDeclaration::computeComputedStyle() const {
347 Node* styledNode = this->styledNode(); 347 Node* styledNode = this->styledNode();
348 ASSERT(styledNode); 348 DCHECK(styledNode);
349 return styledNode->ensureComputedStyle( 349 return styledNode->ensureComputedStyle(
350 styledNode->isPseudoElement() ? PseudoIdNone : m_pseudoElementSpecifier); 350 styledNode->isPseudoElement() ? PseudoIdNone : m_pseudoElementSpecifier);
351 } 351 }
352 352
353 Node* CSSComputedStyleDeclaration::styledNode() const { 353 Node* CSSComputedStyleDeclaration::styledNode() const {
354 if (!m_node) 354 if (!m_node)
355 return nullptr; 355 return nullptr;
356 if (m_node->isElementNode()) { 356 if (m_node->isElementNode()) {
357 if (PseudoElement* element = 357 if (PseudoElement* element =
358 toElement(m_node)->pseudoElement(m_pseudoElementSpecifier)) 358 toElement(m_node)->pseudoElement(m_pseudoElementSpecifier))
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 const String& propertyName) { 492 const String& propertyName) {
493 CSSPropertyID propertyID = cssPropertyID(propertyName); 493 CSSPropertyID propertyID = cssPropertyID(propertyName);
494 if (!propertyID) 494 if (!propertyID)
495 return String(); 495 return String();
496 if (propertyID == CSSPropertyVariable) { 496 if (propertyID == CSSPropertyVariable) {
497 const CSSValue* value = getPropertyCSSValue(AtomicString(propertyName)); 497 const CSSValue* value = getPropertyCSSValue(AtomicString(propertyName));
498 if (value) 498 if (value)
499 return value->cssText(); 499 return value->cssText();
500 return String(); 500 return String();
501 } 501 }
502 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID)); 502 DCHECK(CSSPropertyMetadata::isEnabledProperty(propertyID));
503 return getPropertyValue(propertyID); 503 return getPropertyValue(propertyID);
504 } 504 }
505 505
506 String CSSComputedStyleDeclaration::getPropertyPriority(const String&) { 506 String CSSComputedStyleDeclaration::getPropertyPriority(const String&) {
507 // All computed styles have a priority of not "important". 507 // All computed styles have a priority of not "important".
508 return ""; 508 return "";
509 } 509 }
510 510
511 String CSSComputedStyleDeclaration::getPropertyShorthand(const String&) { 511 String CSSComputedStyleDeclaration::getPropertyShorthand(const String&) {
512 return ""; 512 return "";
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 "These styles are computed, and therefore the '" + 563 "These styles are computed, and therefore the '" +
564 getPropertyNameString(id) + "' property is read-only."); 564 getPropertyNameString(id) + "' property is read-only.");
565 } 565 }
566 566
567 DEFINE_TRACE(CSSComputedStyleDeclaration) { 567 DEFINE_TRACE(CSSComputedStyleDeclaration) {
568 visitor->trace(m_node); 568 visitor->trace(m_node);
569 CSSStyleDeclaration::trace(visitor); 569 CSSStyleDeclaration::trace(visitor);
570 } 570 }
571 571
572 } // namespace blink 572 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCalculationValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698