| Index: third_party/WebKit/Source/core/animation/ScrollTimeline.h
|
| diff --git a/third_party/WebKit/Source/core/animation/ScrollTimeline.h b/third_party/WebKit/Source/core/animation/ScrollTimeline.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8159d814164b178070723af990bbe6e4fed0c650
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/animation/ScrollTimeline.h
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2017 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 ScrollTimeline_h
|
| +#define ScrollTimeline_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "core/animation/AnimationTimeline.h"
|
| +#include "core/animation/ScrollTimelineOptions.h"
|
| +#include "core/dom/Element.h"
|
| +#include "platform/bindings/ScriptWrappable.h"
|
| +#include "platform/wtf/text/WTFString.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class CORE_EXPORT ScrollTimeline final : public AnimationTimeline {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| + public:
|
| + enum ScrollDirection {
|
| + Auto,
|
| + Block,
|
| + Inline,
|
| + };
|
| +
|
| + static ScrollTimeline* Create(const Document&,
|
| + ScrollTimelineOptions,
|
| + ExceptionState&);
|
| +
|
| + // AnimationTimeline overrides.
|
| + // TODO(smcgruer): We shouldn't have to override this many methods. Instead,
|
| + // DocumentTimeline should own the |CurrentTimeInternal| methods so that we
|
| + // only have to override |currentTime|.
|
| + double currentTime(bool& is_null) override;
|
| + double currentTime() override;
|
| + double CurrentTimeInternal(bool& is_null) override;
|
| + double CurrentTimeInternal() override;
|
| +
|
| + // IDL API implementation.
|
| + Element* scrollSource();
|
| + String orientation();
|
| + void timeRange(DoubleOrScrollTimelineAutoKeyword&);
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| + private:
|
| + ScrollTimeline(const Document&, Element*, ScrollDirection, double);
|
| +
|
| + Member<Element> scroll_source_;
|
| + ScrollDirection orientation_;
|
| + double time_range_;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|