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

Unified Diff: Source/core/css/CSSSelector.h

Issue 18228003: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/CSSSelector.h
diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
index 6a460c8f90bc021e85f2a2540a392684d3588304..94670fc9e2830721fccaa7d1ae3831ce16385fe7 100644
--- a/Source/core/css/CSSSelector.h
+++ b/Source/core/css/CSSSelector.h
@@ -254,13 +254,13 @@ namespace WebCore {
CSSSelector& operator=(const CSSSelector&);
struct RareData : public RefCounted<RareData> {
- static PassRefPtr<RareData> create(PassRefPtr<AtomicStringImpl> value) { return adoptRef(new RareData(value)); }
+ static PassRefPtr<RareData> create(PassRefPtr<StringImpl> value) { return adoptRef(new RareData(value)); }
~RareData();
bool parseNth();
bool matchNth(int count);
- AtomicStringImpl* m_value; // Plain pointer to keep things uniform with the union.
+ StringImpl* m_value; // Plain pointer to keep things uniform with the union.
int m_a; // Used for :nth-*
int m_b; // Used for :nth-*
QualifiedName m_attribute; // used for attribute selector
@@ -268,13 +268,13 @@ namespace WebCore {
OwnPtr<CSSSelectorList> m_selectorList; // Used for :-webkit-any and :not
private:
- RareData(PassRefPtr<AtomicStringImpl> value);
+ RareData(PassRefPtr<StringImpl> value);
};
void createRareData();
union DataUnion {
DataUnion() : m_value(0) { }
- AtomicStringImpl* m_value;
+ StringImpl* m_value;
QualifiedName::QualifiedNameImpl* m_tagQName;
RareData* m_rareData;
} m_data;
@@ -429,8 +429,8 @@ inline const QualifiedName& CSSSelector::tagQName() const
inline const AtomicString& CSSSelector::value() const
{
ASSERT(m_match != Tag);
- // AtomicString is really just an AtomicStringImpl* so the cast below is safe.
- // FIXME: Perhaps call sites could be changed to accept AtomicStringImpl?
+ // AtomicString is really just an StringImpl* so the cast below is safe.
+ // FIXME: Perhaps call sites could be changed to accept StringImpl?
return *reinterpret_cast<const AtomicString*>(m_hasRareData ? &m_data.m_rareData->m_value : &m_data.m_value);
}

Powered by Google App Engine
This is Rietveld 408576698