ladybird/Libraries/LibWeb/HTML/DragDataStore.cpp
InvalidUsernameException 28ba610f32 Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers
This reduces the number of recompiled files as follow:
- Bitmap.h: 1309 -> 101
- ImmutableBitmap.h: 1218 -> 75
2025-11-28 18:32:48 +01:00

35 lines
723 B
C++

/*
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/Bitmap.h>
#include <LibWeb/HTML/DataTransfer.h>
#include <LibWeb/HTML/DragDataStore.h>
namespace Web::HTML {
NonnullRefPtr<DragDataStore> DragDataStore::create()
{
return adopt_ref(*new DragDataStore());
}
DragDataStore::DragDataStore()
: m_allowed_effects_state(DataTransferEffect::uninitialized)
{
}
DragDataStore::~DragDataStore() = default;
bool DragDataStore::has_text_item() const
{
for (auto const& item : m_item_list) {
if (item.kind == DragDataStoreItem::Kind::Text && item.type_string == "text/plain"sv)
return true;
}
return false;
}
}