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/css/CSSComputedStyleDeclaration.cpp

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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) 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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return result.toString(); 396 return result.toString();
397 } 397 }
398 398
399 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& exce ptionState) 399 void CSSComputedStyleDeclaration::setCSSText(const String&, ExceptionState& exce ptionState)
400 { 400 {
401 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore read-only."); 401 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore read-only.");
402 } 402 }
403 403
404 static CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) 404 static CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize)
405 { 405 {
406 ASSERT_ARG(keywordSize, keywordSize); 406 DCHECK_NE(keywordSize, 0);
407 ASSERT_ARG(keywordSize, keywordSize <= 8); 407 DCHECK_LE(keywordSize, 8);
408 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); 408 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1);
409 } 409 }
410 410
411 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d ouble value, const ComputedStyle& style) 411 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d ouble value, const ComputedStyle& style)
412 { 412 {
413 return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::UnitType::Pixels); 413 return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::UnitType::Pixels);
414 } 414 }
415 415
416 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValu ePreferringKeyword() const 416 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValu ePreferringKeyword() const
417 { 417 {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 703 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
704 } 704 }
705 705
706 DEFINE_TRACE(CSSComputedStyleDeclaration) 706 DEFINE_TRACE(CSSComputedStyleDeclaration)
707 { 707 {
708 visitor->trace(m_node); 708 visitor->trace(m_node);
709 CSSStyleDeclaration::trace(visitor); 709 CSSStyleDeclaration::trace(visitor);
710 } 710 }
711 711
712 } // namespace blink 712 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataTransfer.cpp ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698