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

Unified Diff: trunk/Source/core/css/Pair.h

Issue 23465021: Revert 157745 "Add support for the object-position CSS property." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « trunk/Source/core/css/CSSPropertyNames.in ('k') | trunk/Source/core/css/resolver/StyleBuilderCustom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/css/Pair.h
===================================================================
--- trunk/Source/core/css/Pair.h (revision 157750)
+++ trunk/Source/core/css/Pair.h (working copy)
@@ -34,69 +34,52 @@
// it (eliminating some extra -webkit- internal properties).
class Pair : public RefCounted<Pair> {
public:
- enum IdenticalValuesPolicy { DropIdenticalValues, KeepIdenticalValues };
-
static PassRefPtr<Pair> create()
{
return adoptRef(new Pair);
}
- static PassRefPtr<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy)
+ static PassRefPtr<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
{
- return adoptRef(new Pair(first, second, identicalValuesPolicy));
+ return adoptRef(new Pair(first, second));
}
virtual ~Pair() { }
CSSPrimitiveValue* first() const { return m_first.get(); }
CSSPrimitiveValue* second() const { return m_second.get(); }
- IdenticalValuesPolicy identicalValuesPolicy() const { return m_identicalValuesPolicy; }
void setFirst(PassRefPtr<CSSPrimitiveValue> first) { m_first = first; }
void setSecond(PassRefPtr<CSSPrimitiveValue> second) { m_second = second; }
- void setIdenticalValuesPolicy(IdenticalValuesPolicy identicalValuesPolicy) { m_identicalValuesPolicy = identicalValuesPolicy; }
String cssText() const
{
- return generateCSSString(first()->cssText(), second()->cssText(), m_identicalValuesPolicy);
- }
- bool equals(const Pair& other) const
- {
- return compareCSSValuePtr(m_first, other.m_first)
- && compareCSSValuePtr(m_second, other.m_second)
- && m_identicalValuesPolicy == other.m_identicalValuesPolicy;
+ return generateCSSString(first()->cssText(), second()->cssText());
}
+ bool equals(const Pair& other) const { return compareCSSValuePtr(m_first, other.m_first) && compareCSSValuePtr(m_second, other.m_second); }
+
String serializeResolvingVariables(const HashMap<AtomicString, String>& variables) const
{
- return generateCSSString(
- first()->customSerializeResolvingVariables(variables),
- second()->customSerializeResolvingVariables(variables),
- m_identicalValuesPolicy);
+ return generateCSSString(first()->customSerializeResolvingVariables(variables),
+ second()->customSerializeResolvingVariables(variables));
}
bool hasVariableReference() const { return first()->hasVariableReference() || second()->hasVariableReference(); }
private:
- Pair()
- : m_first(0)
- , m_second(0)
- , m_identicalValuesPolicy(DropIdenticalValues) { }
+ Pair() : m_first(0), m_second(0) { }
+ Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
+ : m_first(first), m_second(second) { }
- Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy)
- : m_first(first)
- , m_second(second)
- , m_identicalValuesPolicy(identicalValuesPolicy) { }
-
- static String generateCSSString(const String& first, const String& second, IdenticalValuesPolicy identicalValuesPolicy)
+ static String generateCSSString(const String& first, const String& second)
{
- if (identicalValuesPolicy == DropIdenticalValues && first == second)
+ if (first == second)
return first;
return first + ' ' + second;
}
RefPtr<CSSPrimitiveValue> m_first;
RefPtr<CSSPrimitiveValue> m_second;
- IdenticalValuesPolicy m_identicalValuesPolicy;
};
} // namespace
« no previous file with comments | « trunk/Source/core/css/CSSPropertyNames.in ('k') | trunk/Source/core/css/resolver/StyleBuilderCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698