Skip to content

Truly independent web browser

1.1 KB
Raw Blame
// Copyright (c) 2026-present, the Ladybird developers.
//
// SPDX-License-Identifier: BSD-2-Clause

// NB: The IPC compiler cannot check that each struct here lists every field of its C++ type. A field left out
//     here does not cross IPC.

#include <LibWebCommon/Page/AsyncScrollNodeStableID.h>

[ExistingCpp, RustDerive=Hash+PartialOrd+Ord]
enum Web::AsyncScrollNodeKind : u8 {
    Viewport = 0,
    Element = 1,
    PseudoElement = 2,
    VisualViewport = 3,
}

[ExistingCpp, RustDerive=Copy+Eq+Hash+PartialOrd+Ord]
struct Web::AsyncScrollNodeStableID {
    Web::UniqueNodeID node_id;
    Web::AsyncScrollNodeKind kind;
    u8 pseudo_element_type;
}

[ExistingCpp, RustDerive=Copy]
struct Web::CompositorScrollOffset {
    Web::AsyncScrollNodeStableID scroll_node;
    Web::CSSPixelPoint offset;
}

[ExistingCpp, RustDerive=Copy+Eq+Hash]
struct Web::ScrollbarDraggedByCompositor {
    Web::CompositorContextId context_id;
    Web::AsyncScrollNodeStableID scroller_stable_node_id;
}

[ExistingCpp, RustDerive=Copy+Eq+Hash]
struct Web::OverlayScrollbarVisibility {
    Web::AsyncScrollNodeStableID scroller_stable_node_id;
    bool vertical;
    bool hidden;
}