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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 810 }
811 811
812 bool MediaQueryEvaluator::eval(const MediaQueryExp* expr) const { 812 bool MediaQueryEvaluator::eval(const MediaQueryExp* expr) const {
813 if (!m_mediaValues || !m_mediaValues->hasValues()) 813 if (!m_mediaValues || !m_mediaValues->hasValues())
814 return true; 814 return true;
815 815
816 DCHECK(gFunctionMap); 816 DCHECK(gFunctionMap);
817 817
818 // Call the media feature evaluation function. Assume no prefix and let 818 // Call the media feature evaluation function. Assume no prefix and let
819 // trampoline functions override the prefix if prefix is used. 819 // trampoline functions override the prefix if prefix is used.
820 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); 820 EvalFunc func = gFunctionMap->at(expr->mediaFeature().impl());
821 if (func) 821 if (func)
822 return func(expr->expValue(), NoPrefix, *m_mediaValues); 822 return func(expr->expValue(), NoPrefix, *m_mediaValues);
823 823
824 return false; 824 return false;
825 } 825 }
826 826
827 } // namespace blink 827 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceCache.cpp ('k') | third_party/WebKit/Source/core/css/PropertyRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698