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

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

Issue 2135083003: Initialize gFunctionMap from CoreInitializer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // for example when parsing UA stylesheets, if evaluation is done 49 // for example when parsing UA stylesheets, if evaluation is done
50 // right after parsing. 50 // right after parsing.
51 // 51 //
52 // the boolean parameter is used to approximate results of evaluation, if 52 // the boolean parameter is used to approximate results of evaluation, if
53 // the device characteristics are not known. This can be used to prune the loadi ng 53 // the device characteristics are not known. This can be used to prune the loadi ng
54 // of stylesheets to only those which are probable to match. 54 // of stylesheets to only those which are probable to match.
55 55
56 class CORE_EXPORT MediaQueryEvaluator final : public GarbageCollectedFinalized<M ediaQueryEvaluator> { 56 class CORE_EXPORT MediaQueryEvaluator final : public GarbageCollectedFinalized<M ediaQueryEvaluator> {
57 WTF_MAKE_NONCOPYABLE(MediaQueryEvaluator); 57 WTF_MAKE_NONCOPYABLE(MediaQueryEvaluator);
58 public: 58 public:
59 static void init();
60
59 // Creates evaluator which evaluates only simple media queries 61 // Creates evaluator which evaluates only simple media queries
60 // Evaluator returns true for "all", and returns value of \mediaFeatureResul t 62 // Evaluator returns true for "all", and returns value of \mediaFeatureResul t
61 // for any media features. 63 // for any media features.
62 64
63 explicit MediaQueryEvaluator(bool mediaFeatureResult = false); 65 explicit MediaQueryEvaluator(bool mediaFeatureResult = false);
64 66
65 // Creates evaluator which evaluates only simple media queries 67 // Creates evaluator which evaluates only simple media queries
66 // Evaluator returns true for acceptedMediaType and returns value of \media featureResult 68 // Evaluator returns true for acceptedMediaType and returns value of \media featureResult
67 // for any media features. 69 // for any media features.
68 70
(...skipping 23 matching lines...) Expand all
92 private: 94 private:
93 const String mediaType() const; 95 const String mediaType() const;
94 96
95 String m_mediaType; 97 String m_mediaType;
96 bool m_expectedResult; 98 bool m_expectedResult;
97 Member<MediaValues> m_mediaValues; 99 Member<MediaValues> m_mediaValues;
98 }; 100 };
99 101
100 } // namespace blink 102 } // namespace blink
101 #endif 103 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/CoreInitializer.cpp ('k') | third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698