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

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

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: 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) 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 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return CSSPrimitiveValue::create(length.value(), 111 return CSSPrimitiveValue::create(length.value(),
112 CSSPrimitiveValue::UnitType::Pixels); 112 CSSPrimitiveValue::UnitType::Pixels);
113 return CSSValue::create(length, style.effectiveZoom()); 113 return CSSValue::create(length, style.effectiveZoom());
114 } 114 }
115 115
116 static CSSValueList* createPositionListForLayer(CSSPropertyID propertyID, 116 static CSSValueList* createPositionListForLayer(CSSPropertyID propertyID,
117 const FillLayer& layer, 117 const FillLayer& layer,
118 const ComputedStyle& style) { 118 const ComputedStyle& style) {
119 CSSValueList* positionList = CSSValueList::createSpaceSeparated(); 119 CSSValueList* positionList = CSSValueList::createSpaceSeparated();
120 if (layer.isBackgroundXOriginSet()) { 120 if (layer.isBackgroundXOriginSet()) {
121 ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || 121 DCHECK(propertyID == CSSPropertyBackgroundPosition ||
122 propertyID == CSSPropertyWebkitMaskPosition); 122 propertyID == CSSPropertyWebkitMaskPosition);
123 positionList->append( 123 positionList->append(
124 *CSSIdentifierValue::create(layer.backgroundXOrigin())); 124 *CSSIdentifierValue::create(layer.backgroundXOrigin()));
125 } 125 }
126 positionList->append( 126 positionList->append(
127 *zoomAdjustedPixelValueForLength(layer.xPosition(), style)); 127 *zoomAdjustedPixelValueForLength(layer.xPosition(), style));
128 if (layer.isBackgroundYOriginSet()) { 128 if (layer.isBackgroundYOriginSet()) {
129 ASSERT(propertyID == CSSPropertyBackgroundPosition || 129 ASSERT(propertyID == CSSPropertyBackgroundPosition ||
130 propertyID == CSSPropertyWebkitMaskPosition); 130 propertyID == CSSPropertyWebkitMaskPosition);
131 positionList->append( 131 positionList->append(
132 *CSSIdentifierValue::create(layer.backgroundYOrigin())); 132 *CSSIdentifierValue::create(layer.backgroundYOrigin()));
(...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3579 case CSSPropertyAll: 3579 case CSSPropertyAll:
3580 return nullptr; 3580 return nullptr;
3581 default: 3581 default:
3582 break; 3582 break;
3583 } 3583 }
3584 ASSERT_NOT_REACHED(); 3584 ASSERT_NOT_REACHED();
3585 return nullptr; 3585 return nullptr;
3586 } 3586 }
3587 3587
3588 } // namespace blink 3588 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698