Skip to content

Truly independent web browser

LibWeb: Remove unused anchor_resolved_size

Shannon Booth1c9526fc4e3d
diff --git a/Libraries/LibWeb/Painting/BoxViews.cpp b/Libraries/LibWeb/Painting/BoxViews.cpp
index 4a91c94ba02..1bc023f809d 100644
--- a/Libraries/LibWeb/Painting/BoxViews.cpp
+++ b/Libraries/LibWeb/Painting/BoxViews.cpp
@@ -156,28 +156,6 @@ BoxModelMetrics box_model(Layout::Node const& node)
};
}
-Optional<CSSPixels> anchor_resolved_size(Layout::Node const& node, CSS::PropertyID property_id)
-{
- auto property = [&] {
- switch (property_id) {
- case CSS::PropertyID::MinWidth:
- return Layout::RustFFI::FfiAnchorSizedProperty::MinWidth;
- case CSS::PropertyID::MinHeight:
- return Layout::RustFFI::FfiAnchorSizedProperty::MinHeight;
- case CSS::PropertyID::MaxWidth:
- return Layout::RustFFI::FfiAnchorSizedProperty::MaxWidth;
- case CSS::PropertyID::MaxHeight:
- return Layout::RustFFI::FfiAnchorSizedProperty::MaxHeight;
- default:
- VERIFY_NOT_REACHED();
- }
- }();
- CSSPixels size;
- if (!Layout::RustFFI::layout_script_anchor_resolved_size(node.document_host(), committed_row_slot(node), property, &size))
- return {};
- return size;
-}
-
CSSPixels border_box_width(Layout::Node const& node)
{
auto border_box = box_model(node).border_box();
diff --git a/Libraries/LibWeb/Painting/BoxViews.h b/Libraries/LibWeb/Painting/BoxViews.h
index 8113c491d05..40b7217cddb 100644
--- a/Libraries/LibWeb/Painting/BoxViews.h
+++ b/Libraries/LibWeb/Painting/BoxViews.h
@@ -46,7 +46,6 @@ WEB_API CSSPixels content_height(Layout::Node const&);
WEB_API CSSPixels border_box_width(Layout::Node const&);
WEB_API CSSPixels border_box_height(Layout::Node const&);
WEB_API BoxModelMetrics box_model(Layout::Node const&);
-WEB_API Optional<CSSPixels> anchor_resolved_size(Layout::Node const&, CSS::PropertyID);
WEB_API CSSPixelRect transform_reference_box(Layout::Node const&);
WEB_API Optional<CSSPixelRect> scrollable_overflow_rect(Layout::Node const&);
WEB_API bool has_scrollable_overflow(Layout::Node const&);
diff --git a/Libraries/LibWeb/Rust/src/layout/script_entries.rs b/Libraries/LibWeb/Rust/src/layout/script_entries.rs
index a83ee5b5b34..65253a5bafe 100644
--- a/Libraries/LibWeb/Rust/src/layout/script_entries.rs
+++ b/Libraries/LibWeb/Rust/src/layout/script_entries.rs
@@ -761,8 +761,7 @@ pub enum FfiAnchorSizedProperty {
/// Writes the size `property` of the absolutely positioned box `slot` resolved to in the committed layout to `out`,
/// when its anchor-size() functions resolved against an anchor box.
-#[unsafe(no_mangle)]
-pub extern "C" fn layout_script_anchor_resolved_size(
+pub fn layout_script_anchor_resolved_size(
host: &DocumentHost,
slot: NodeSlotId,
property: FfiAnchorSizedProperty,