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

Side by Side Diff: Source/core/css/Pair.h

Issue 953693002: InlinedVisitor: Migrate css to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return generateCSSString(first()->cssText(), second()->cssText(), m_iden ticalValuesPolicy); 55 return generateCSSString(first()->cssText(), second()->cssText(), m_iden ticalValuesPolicy);
56 } 56 }
57 57
58 bool equals(const Pair& other) const 58 bool equals(const Pair& other) const
59 { 59 {
60 return compareCSSValuePtr(m_first, other.m_first) 60 return compareCSSValuePtr(m_first, other.m_first)
61 && compareCSSValuePtr(m_second, other.m_second) 61 && compareCSSValuePtr(m_second, other.m_second)
62 && m_identicalValuesPolicy == other.m_identicalValuesPolicy; 62 && m_identicalValuesPolicy == other.m_identicalValuesPolicy;
63 } 63 }
64 64
65 void trace(Visitor*); 65 DECLARE_TRACE();
66 66
67 private: 67 private:
68 Pair() 68 Pair()
69 : m_first(nullptr) 69 : m_first(nullptr)
70 , m_second(nullptr) 70 , m_second(nullptr)
71 , m_identicalValuesPolicy(DropIdenticalValues) { } 71 , m_identicalValuesPolicy(DropIdenticalValues) { }
72 72
73 Pair(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> first, PassRefPtrWillBeRawPtr <CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy) 73 Pair(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> first, PassRefPtrWillBeRawPtr <CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy)
74 : m_first(first) 74 : m_first(first)
75 , m_second(second) 75 , m_second(second)
76 , m_identicalValuesPolicy(identicalValuesPolicy) { } 76 , m_identicalValuesPolicy(identicalValuesPolicy) { }
77 77
78 static String generateCSSString(const String& first, const String& second, I denticalValuesPolicy identicalValuesPolicy) 78 static String generateCSSString(const String& first, const String& second, I denticalValuesPolicy identicalValuesPolicy)
79 { 79 {
80 if (identicalValuesPolicy == DropIdenticalValues && first == second) 80 if (identicalValuesPolicy == DropIdenticalValues && first == second)
81 return first; 81 return first;
82 return first + ' ' + second; 82 return first + ' ' + second;
83 } 83 }
84 84
85 RefPtrWillBeMember<CSSPrimitiveValue> m_first; 85 RefPtrWillBeMember<CSSPrimitiveValue> m_first;
86 RefPtrWillBeMember<CSSPrimitiveValue> m_second; 86 RefPtrWillBeMember<CSSPrimitiveValue> m_second;
87 IdenticalValuesPolicy m_identicalValuesPolicy; 87 IdenticalValuesPolicy m_identicalValuesPolicy;
88 }; 88 };
89 89
90 } // namespace 90 } // namespace
91 91
92 #endif 92 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698