mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This caused us to lose our gn check certification. :( Turns out gn check was just ignoring all the header paths it didn't understand and so gn check passing for sky wasn't meaning much. I tried to straighten out some of the mess in this CL, but its going to take several more rounds of massaging before gn check passes again. On the bright side (almost) all of our headers are absolute now. Turns out my script (attached to the bug) didn't notice ../ includes but I'll fix that in the next patch. R=abarth@chromium.org BUG=435361 Review URL: https://codereview.chromium.org/746023002
82 lines
2.4 KiB
C++
82 lines
2.4 KiB
C++
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CSSTransitionData_h
|
|
#define CSSTransitionData_h
|
|
|
|
#include "gen/sky/core/CSSPropertyNames.h"
|
|
#include "sky/engine/core/animation/css/CSSTimingData.h"
|
|
#include "sky/engine/wtf/Vector.h"
|
|
|
|
namespace blink {
|
|
|
|
class CSSTransitionData final : public CSSTimingData {
|
|
public:
|
|
enum TransitionPropertyType {
|
|
TransitionNone,
|
|
TransitionSingleProperty,
|
|
TransitionUnknown,
|
|
TransitionAll
|
|
};
|
|
|
|
// FIXME: We shouldn't allow 'none' to be used alongside other properties.
|
|
struct TransitionProperty {
|
|
TransitionProperty(CSSPropertyID id)
|
|
: propertyType(TransitionSingleProperty)
|
|
, propertyId(id)
|
|
{
|
|
ASSERT(id != CSSPropertyInvalid);
|
|
}
|
|
|
|
TransitionProperty(const String& string)
|
|
: propertyType(TransitionUnknown)
|
|
, propertyId(CSSPropertyInvalid)
|
|
, propertyString(string)
|
|
{
|
|
}
|
|
|
|
TransitionProperty(TransitionPropertyType type)
|
|
: propertyType(type)
|
|
, propertyId(CSSPropertyInvalid)
|
|
{
|
|
ASSERT(type == TransitionNone || type == TransitionAll);
|
|
}
|
|
|
|
bool operator==(const TransitionProperty& other) const { return propertyType == other.propertyType && propertyId == other.propertyId && propertyString == other.propertyString; }
|
|
|
|
TransitionPropertyType propertyType;
|
|
CSSPropertyID propertyId;
|
|
String propertyString;
|
|
};
|
|
|
|
static PassOwnPtr<CSSTransitionData> create()
|
|
{
|
|
return adoptPtr(new CSSTransitionData);
|
|
}
|
|
|
|
static PassOwnPtr<CSSTransitionData> create(const CSSTransitionData& transitionData)
|
|
{
|
|
return adoptPtr(new CSSTransitionData(transitionData));
|
|
}
|
|
|
|
bool transitionsMatchForStyleRecalc(const CSSTransitionData& other) const;
|
|
|
|
Timing convertToTiming(size_t index) const;
|
|
|
|
const Vector<TransitionProperty>& propertyList() const { return m_propertyList; }
|
|
Vector<TransitionProperty>& propertyList() { return m_propertyList; }
|
|
|
|
static TransitionProperty initialProperty() { return TransitionProperty(TransitionAll); }
|
|
|
|
private:
|
|
CSSTransitionData();
|
|
explicit CSSTransitionData(const CSSTransitionData&);
|
|
|
|
Vector<TransitionProperty> m_propertyList;
|
|
};
|
|
|
|
} // namespace blink
|
|
|
|
#endif // CSSTransitionData_h
|