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

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

Issue 1729013002: blink: Rename enums and functions to not collide with chromium style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-3: . 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 * CSS Media Query Evaluator 2 * CSS Media Query Evaluator
3 * 3 *
4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return nullAtom; 108 return nullAtom;
109 } 109 }
110 110
111 bool MediaQueryEvaluator::mediaTypeMatch(const String& mediaTypeToMatch) const 111 bool MediaQueryEvaluator::mediaTypeMatch(const String& mediaTypeToMatch) const
112 { 112 {
113 return mediaTypeToMatch.isEmpty() 113 return mediaTypeToMatch.isEmpty()
114 || equalIgnoringCase(mediaTypeToMatch, MediaTypeNames::all) 114 || equalIgnoringCase(mediaTypeToMatch, MediaTypeNames::all)
115 || equalIgnoringCase(mediaTypeToMatch, mediaType()); 115 || equalIgnoringCase(mediaTypeToMatch, mediaType());
116 } 116 }
117 117
118 static bool applyRestrictor(MediaQuery::Restrictor r, bool value) 118 static bool applyRestrictor(MediaQuery::RestrictorType r, bool value)
119 { 119 {
120 return r == MediaQuery::Not ? !value : value; 120 return r == MediaQuery::Not ? !value : value;
121 } 121 }
122 122
123 bool MediaQueryEvaluator::eval(const MediaQuery* query, MediaQueryResultList* vi ewportDependentMediaQueryResults, MediaQueryResultList* deviceDependentMediaQuer yResults) const 123 bool MediaQueryEvaluator::eval(const MediaQuery* query, MediaQueryResultList* vi ewportDependentMediaQueryResults, MediaQueryResultList* deviceDependentMediaQuer yResults) const
124 { 124 {
125 if (!mediaTypeMatch(query->mediaType())) 125 if (!mediaTypeMatch(query->mediaType()))
126 return applyRestrictor(query->restrictor(), false); 126 return applyRestrictor(query->restrictor(), false);
127 127
128 const ExpressionHeapVector& expressions = query->expressions(); 128 const ExpressionHeapVector& expressions = query->expressions();
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // Call the media feature evaluation function. Assume no prefix and let 665 // Call the media feature evaluation function. Assume no prefix and let
666 // trampoline functions override the prefix if prefix is used. 666 // trampoline functions override the prefix if prefix is used.
667 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); 667 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl());
668 if (func) 668 if (func)
669 return func(expr->expValue(), NoPrefix, *m_mediaValues); 669 return func(expr->expValue(), NoPrefix, *m_mediaValues);
670 670
671 return false; 671 return false;
672 } 672 }
673 673
674 } // namespace blink 674 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuery.cpp ('k') | third_party/WebKit/Source/core/css/RemoteFontFaceSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698