1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibGfx: Templatize Point, Size, and Rect

This commit is contained in:
Matthew Olsson 2020-07-25 21:31:47 -07:00 committed by Andreas Kling
parent 7a1c328417
commit 335916d8db
33 changed files with 404 additions and 835 deletions

View file

@ -27,7 +27,7 @@
#pragma once
#include <AK/OwnPtr.h>
#include <LibGfx/FloatRect.h>
#include <LibGfx/Rect.h>
#include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Painting/StackingContext.h>

View file

@ -90,7 +90,7 @@ void LayoutFrame::did_set_rect()
LayoutReplaced::did_set_rect();
ASSERT(node().hosted_frame());
node().hosted_frame()->set_size(size().to_int_size());
node().hosted_frame()->set_size(size().to_type<int>());
}
}

View file

@ -29,7 +29,6 @@
#include <AK/NonnullRefPtr.h>
#include <AK/TypeCasts.h>
#include <AK/Vector.h>
#include <LibGfx/FloatRect.h>
#include <LibGfx/Rect.h>
#include <LibWeb/CSS/StyleProperties.h>
#include <LibWeb/Forward.h>

View file

@ -59,7 +59,7 @@ void LayoutWidget::did_set_rect()
void LayoutWidget::update_widget()
{
auto adjusted_widget_position = absolute_rect().location().to_int_point();
auto adjusted_widget_position = absolute_rect().location().to_type<int>();
auto& page_view = static_cast<const PageView&>(frame().page().client());
adjusted_widget_position.move_by(-page_view.horizontal_scrollbar().value(), -page_view.vertical_scrollbar().value());
widget().move_to(adjusted_widget_position);

View file

@ -27,7 +27,7 @@
#pragma once
#include <AK/Weakable.h>
#include <LibGfx/FloatRect.h>
#include <LibGfx/Rect.h>
#include <LibGfx/Forward.h>
#include <LibWeb/Forward.h>