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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.h

Issue 1474253002: Remove CSSPrimitiveValue::isDotsPer{Inch,Pixel,Centimeter} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return (type >= UnitType::Ems && type <= UnitType::UserUnits) || type == UnitType::QuirkyEms || type == UnitType::Rems || type == UnitType::Chs || isVie wportPercentageLength(type); 172 return (type >= UnitType::Ems && type <= UnitType::UserUnits) || type == UnitType::QuirkyEms || type == UnitType::Rems || type == UnitType::Chs || isVie wportPercentageLength(type);
173 } 173 }
174 bool isLength() const { return isLength(typeWithCalcResolved()); } 174 bool isLength() const { return isLength(typeWithCalcResolved()); }
175 bool isNumber() const { return typeWithCalcResolved() == UnitType::Number || typeWithCalcResolved() == UnitType::Integer; } 175 bool isNumber() const { return typeWithCalcResolved() == UnitType::Number || typeWithCalcResolved() == UnitType::Integer; }
176 bool isPercentage() const { return typeWithCalcResolved() == UnitType::Perce ntage; } 176 bool isPercentage() const { return typeWithCalcResolved() == UnitType::Perce ntage; }
177 bool isPx() const { return typeWithCalcResolved() == UnitType::Pixels; } 177 bool isPx() const { return typeWithCalcResolved() == UnitType::Pixels; }
178 bool isTime() const { return type() == UnitType::Seconds || type() == UnitTy pe::Milliseconds; } 178 bool isTime() const { return type() == UnitType::Seconds || type() == UnitTy pe::Milliseconds; }
179 bool isCalculated() const { return type() == UnitType::Calc; } 179 bool isCalculated() const { return type() == UnitType::Calc; }
180 bool isCalculatedPercentageWithNumber() const { return typeWithCalcResolved( ) == UnitType::CalcPercentageWithNumber; } 180 bool isCalculatedPercentageWithNumber() const { return typeWithCalcResolved( ) == UnitType::CalcPercentageWithNumber; }
181 bool isCalculatedPercentageWithLength() const { return typeWithCalcResolved( ) == UnitType::CalcPercentageWithLength; } 181 bool isCalculatedPercentageWithLength() const { return typeWithCalcResolved( ) == UnitType::CalcPercentageWithLength; }
182 static bool isDotsPerInch(UnitType type) { return type == UnitType::DotsPerI nch; }
183 static bool isDotsPerPixel(UnitType type) { return type == UnitType::DotsPer Pixel; }
184 static bool isDotsPerCentimeter(UnitType type) { return type == UnitType::Do tsPerCentimeter; }
185 static bool isResolution(UnitType type) { return type >= UnitType::DotsPerPi xel && type <= UnitType::DotsPerCentimeter; } 182 static bool isResolution(UnitType type) { return type >= UnitType::DotsPerPi xel && type <= UnitType::DotsPerCentimeter; }
186 bool isFlex() const { return typeWithCalcResolved() == UnitType::Fraction; } 183 bool isFlex() const { return typeWithCalcResolved() == UnitType::Fraction; }
187 bool isValueID() const { return type() == UnitType::ValueID; } 184 bool isValueID() const { return type() == UnitType::ValueID; }
188 bool colorIsDerivedFromElement() const; 185 bool colorIsDerivedFromElement() const;
189 186
190 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifier(CSSValueID valueID) 187 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifier(CSSValueID valueID)
191 { 188 {
192 return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID)); 189 return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID));
193 } 190 }
194 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(double value, UnitTy pe type) 191 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(double value, UnitTy pe type)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 }; 281 };
285 282
286 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; 283 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray;
287 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray; 284 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray;
288 285
289 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); 286 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue());
290 287
291 } // namespace blink 288 } // namespace blink
292 289
293 #endif // CSSPrimitiveValue_h 290 #endif // CSSPrimitiveValue_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698