Chromium Code Reviews| Index: Source/core/css/MediaQueryExp.h |
| diff --git a/Source/core/css/MediaQueryExp.h b/Source/core/css/MediaQueryExp.h |
| index 4717180475c376437e01ab67321eb596dab3e08a..e2549f64abb3c834fb5f634e0e0e2dc73472f246 100644 |
| --- a/Source/core/css/MediaQueryExp.h |
| +++ b/Source/core/css/MediaQueryExp.h |
| @@ -33,7 +33,6 @@ |
| #include "core/css/CSSValue.h" |
| #include "wtf/PassOwnPtr.h" |
| #include "wtf/RefPtr.h" |
| -#include "wtf/text/AtomicString.h" |
| namespace WebCore { |
| class CSSParserValueList; |
| @@ -41,16 +40,16 @@ class CSSParserValueList; |
| class MediaQueryExp : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryExp> { |
| WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| public: |
| - static PassOwnPtrWillBeRawPtr<MediaQueryExp> create(const AtomicString& mediaFeature, CSSParserValueList*); |
| + static PassOwnPtrWillBeRawPtr<MediaQueryExp> create(const String& mediaFeature, CSSParserValueList*); |
| ~MediaQueryExp(); |
| - AtomicString mediaFeature() const { return m_mediaFeature; } |
| + String mediaFeature() const { return m_mediaFeature; } |
|
abarth-chromium
2014/03/06 08:03:57
This can return a const String&
|
| CSSValue* value() const { return m_value.get(); } |
| bool operator==(const MediaQueryExp& other) const |
| { |
| - return (other.m_mediaFeature == m_mediaFeature) |
| + return (other.m_mediaFeatureHash == m_mediaFeatureHash) |
|
abarth-chromium
2014/03/06 08:03:57
Why do you need a hash?
Don't you need to check m
|
| && ((!other.m_value && !m_value) |
| || (other.m_value && m_value && other.m_value->equals(*m_value))); |
| } |
| @@ -66,9 +65,10 @@ public: |
| MediaQueryExp(const MediaQueryExp& other); |
| private: |
| - MediaQueryExp(const AtomicString& mediaFeature, PassRefPtrWillBeRawPtr<CSSValue>); |
| + MediaQueryExp(StringImpl*, PassRefPtrWillBeRawPtr<CSSValue>); |
|
abarth-chromium
2014/03/06 08:03:57
Why not const String& ?
|
| - AtomicString m_mediaFeature; |
| + String m_mediaFeature; |
| + unsigned m_mediaFeatureHash; |
|
abarth-chromium
2014/03/06 08:03:57
Is this needed for performance?
|
| RefPtrWillBeMember<CSSValue> m_value; |
| }; |