mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
WebContent: Fix const-correctness issues
This commit is contained in:
parent
025bdcf34c
commit
38b6eedd54
3 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2022, Tobias Christiansen <tobyase@serenityos.org>
|
||||
|
@ -117,7 +117,7 @@ void ConnectionFromClient::set_viewport_rect(Gfx::IntRect const& rect)
|
|||
|
||||
void ConnectionFromClient::add_backing_store(i32 backing_store_id, Gfx::ShareableBitmap const& bitmap)
|
||||
{
|
||||
m_backing_stores.set(backing_store_id, *bitmap.bitmap());
|
||||
m_backing_stores.set(backing_store_id, *const_cast<Gfx::ShareableBitmap&>(bitmap).bitmap());
|
||||
}
|
||||
|
||||
void ConnectionFromClient::remove_backing_store(i32 backing_store_id)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -60,7 +60,7 @@ Gfx::Palette PageHost::palette() const
|
|||
return Gfx::Palette(*m_palette_impl);
|
||||
}
|
||||
|
||||
void PageHost::set_palette_impl(Gfx::PaletteImpl const& impl)
|
||||
void PageHost::set_palette_impl(Gfx::PaletteImpl& impl)
|
||||
{
|
||||
m_palette_impl = impl;
|
||||
if (auto* document = page().top_level_browsing_context().active_document())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
virtual void paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap&) override;
|
||||
|
||||
void set_palette_impl(Gfx::PaletteImpl const&);
|
||||
void set_palette_impl(Gfx::PaletteImpl&);
|
||||
void set_viewport_rect(Web::DevicePixelRect const&);
|
||||
void set_screen_rects(Vector<Gfx::IntRect, 4> const& rects, size_t main_screen_index) { m_screen_rect = rects[main_screen_index].to_type<Web::DevicePixels>(); }
|
||||
void set_device_pixels_per_css_pixel(float device_pixels_per_css_pixel) { m_device_pixels_per_css_pixel = device_pixels_per_css_pixel; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue