LibWeb+LibWebView+WebContent: Reset pinch-to-zoom state on Ctrl/Cmd+0

This commit is contained in:
Aliaksandr Kalenik 2025-10-09 20:29:12 +02:00 committed by Alexander Kalenik
commit 835081d66e
Notes: github-actions[bot] 2025-10-10 13:39:13 +00:00
8 changed files with 26 additions and 0 deletions

View file

@ -182,4 +182,11 @@ CSSPixelPoint VisualViewport::map_to_layout_viewport(CSSPixelPoint position) con
return inverse.map(position.to_type<int>()).to_type<CSSPixels>();
}
void VisualViewport::reset()
{
m_scale = 1.0;
m_offset = { 0, 0 };
m_document->set_needs_display(InvalidateDisplayList::No);
}
}