chromium/third_party/blink/public/mojom/scroll/scroll_enums.mojom

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module blink.mojom;

// Information about the kind and source of the scroll. Used to effect
// different behavior based on the kind of scroll (e.g. whether to cancel an
// ongoing animation, update animators, etc.)
enum ScrollType {
  kUser = 0,
  kProgrammatic,
  kClamping,
  kCompositor,
  kAnchoring,
  // These are programmatic sequenced scrolls from SmoothScrollSequencer.
  // SetScrollOffset called with kSequencedScroll should not abort the smooth
  // scroll sequence.
  kSequenced,
  // Scrolls that are triggered by the CSS scroll-start property.
  kScrollStart,
};

// The scroll behavior set through 'scroll-behavior' CSS property.
enum ScrollBehavior {
  kAuto = 0,
  kInstant,
  kSmooth,
};