mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Userland: Take StringView in MimeData::data() and has_{format,text,urls}
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/4f638d3af2 Pull-request: https://github.com/SerenityOS/serenity/pull/21179 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -28,8 +28,8 @@ DragOperation::Outcome DragOperation::exec()
|
||||
VERIFY(m_mime_data);
|
||||
|
||||
Gfx::ShareableBitmap drag_bitmap;
|
||||
if (m_mime_data->has_format("image/x-raw-bitmap")) {
|
||||
auto data = m_mime_data->data("image/x-raw-bitmap");
|
||||
if (m_mime_data->has_format("image/x-raw-bitmap"sv)) {
|
||||
auto data = m_mime_data->data("image/x-raw-bitmap"sv);
|
||||
auto bitmap = Gfx::Bitmap::create_from_serialized_byte_buffer(move(data)).release_value_but_fixme_should_propagate_errors();
|
||||
drag_bitmap = bitmap->to_shareable_bitmap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user