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

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

Issue 18228003: 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
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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 // and let trampoline functions override the prefix if prefix is 685 // and let trampoline functions override the prefix if prefix is
686 // used 686 // used
687 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); 687 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl());
688 if (func) 688 if (func)
689 return func(expr->value(), m_style.get(), m_frame, NoPrefix); 689 return func(expr->value(), m_style.get(), m_frame, NoPrefix);
690 690
691 return false; 691 return false;
692 } 692 }
693 693
694 } // namespace 694 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698