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

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

Issue 19804005: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSSelector.cpp ('k') | Source/core/css/RuleFeature.h » ('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 * 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "core/rendering/style/RenderStyle.h" 51 #include "core/rendering/style/RenderStyle.h"
52 #include "wtf/HashMap.h" 52 #include "wtf/HashMap.h"
53 53
54 namespace WebCore { 54 namespace WebCore {
55 55
56 using namespace MediaFeatureNames; 56 using namespace MediaFeatureNames;
57 57
58 enum MediaFeaturePrefix { MinPrefix, MaxPrefix, NoPrefix }; 58 enum MediaFeaturePrefix { MinPrefix, MaxPrefix, NoPrefix };
59 59
60 typedef bool (*EvalFunc)(CSSValue*, RenderStyle*, Frame*, MediaFeaturePrefix); 60 typedef bool (*EvalFunc)(CSSValue*, RenderStyle*, Frame*, MediaFeaturePrefix);
61 typedef HashMap<AtomicStringImpl*, EvalFunc> FunctionMap; 61 typedef HashMap<StringImpl*, EvalFunc> FunctionMap;
62 static FunctionMap* gFunctionMap; 62 static FunctionMap* gFunctionMap;
63 63
64 MediaQueryEvaluator::MediaQueryEvaluator(bool mediaFeatureResult) 64 MediaQueryEvaluator::MediaQueryEvaluator(bool mediaFeatureResult)
65 : m_frame(0) 65 : m_frame(0)
66 , m_style(0) 66 , m_style(0)
67 , m_expResult(mediaFeatureResult) 67 , m_expResult(mediaFeatureResult)
68 { 68 {
69 } 69 }
70 70
71 MediaQueryEvaluator::MediaQueryEvaluator(const AtomicString& acceptedMediaType, bool mediaFeatureResult) 71 MediaQueryEvaluator::MediaQueryEvaluator(const AtomicString& acceptedMediaType, bool mediaFeatureResult)
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // and let trampoline functions override the prefix if prefix is 688 // and let trampoline functions override the prefix if prefix is
689 // used 689 // used
690 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); 690 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl());
691 if (func) 691 if (func)
692 return func(expr->value(), m_style.get(), m_frame, NoPrefix); 692 return func(expr->value(), m_style.get(), m_frame, NoPrefix);
693 693
694 return false; 694 return false;
695 } 695 }
696 696
697 } // namespace 697 } // namespace
OLDNEW
« no previous file with comments | « Source/core/css/CSSSelector.cpp ('k') | Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698