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

Unified Diff: Source/core/css/MediaQueryEvaluator.cpp

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/DeprecatedStyleBuilder.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryEvaluator.cpp
diff --git a/Source/core/css/MediaQueryEvaluator.cpp b/Source/core/css/MediaQueryEvaluator.cpp
index 97b6248baae6c66a8111de76a6c5821a52b36ac1..2ded0b59dfe788d4e517ba4061d06ebf720f367c 100644
--- a/Source/core/css/MediaQueryEvaluator.cpp
+++ b/Source/core/css/MediaQueryEvaluator.cpp
@@ -236,7 +236,7 @@ static bool orientationMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* fr
int width = viewportSize(view).width();
int height = viewportSize(view).height();
if (value && value->isPrimitiveValue()) {
- const int id = toCSSPrimitiveValue(value)->getIdent();
+ const CSSValueID id = toCSSPrimitiveValue(value)->getValueID();
if (width > height) // Square viewport is portrait.
return CSSValueLandscape == id;
return CSSValuePortrait == id;
@@ -585,7 +585,7 @@ static bool viewModeMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame
if (!value)
return true;
- return toCSSPrimitiveValue(value)->getIdent() == CSSValueWindowed;
+ return toCSSPrimitiveValue(value)->getValueID() == CSSValueWindowed;
}
enum PointerDeviceType { TouchPointer, MousePointer, NoPointer, UnknownPointer };
@@ -642,7 +642,7 @@ static bool pointerMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame,
if (!value->isPrimitiveValue())
return false;
- const int id = toCSSPrimitiveValue(value)->getIdent();
+ const CSSValueID id = toCSSPrimitiveValue(value)->getValueID();
return (pointer == NoPointer && id == CSSValueNone)
|| (pointer == TouchPointer && id == CSSValueCoarse)
|| (pointer == MousePointer && id == CSSValueFine);
@@ -663,8 +663,7 @@ static bool scanMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, Me
// If a platform interface supplies progressive/interlace info for TVs in the
// future, it needs to be handled here. For now, assume a modern TV with
// progressive display.
- const int id = toCSSPrimitiveValue(value)->getIdent();
- return id == CSSValueProgressive;
+ return toCSSPrimitiveValue(value)->getValueID() == CSSValueProgressive;
}
static void createFunctionMap()
« no previous file with comments | « Source/core/css/DeprecatedStyleBuilder.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698