mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 00:19:18 +00:00
LibWeb: Implement plumbing for view transitions
This implements large parts of the CSS view-transitions-1 spec.
This commit is contained in:
parent
4f0e8236a0
commit
56739b4b16
Notes:
github-actions[bot]
2025-09-07 12:59:13 +00:00
Author: https://github.com/Psychpsyo
Commit: 56739b4b16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5155
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/kalenikaliaksandr ✅
22 changed files with 1516 additions and 4 deletions
|
@ -2587,6 +2587,22 @@ void Navigable::paste(String const& text)
|
|||
m_event_handler.handle_paste(text);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-view-transitions-1/#snapshot-containing-block
|
||||
CSSPixelRect Navigable::snapshot_containing_block()
|
||||
{
|
||||
// The snapshot containing block is a rectangle that covers all areas of the window that could potentially display
|
||||
// page content (and is therefore consistent regardless of root scrollbars or interactive widgets).
|
||||
|
||||
// Within a child navigable, the snapshot containing block is the union of the navigable’s viewport with any scrollbar gutters.
|
||||
// FIXME: Actually get the correct rectangle here.
|
||||
return viewport_rect();
|
||||
}
|
||||
// https://drafts.csswg.org/css-view-transitions-1/#snapshot-containing-block-size
|
||||
CSSPixelSize Navigable::snapshot_containing_block_size()
|
||||
{
|
||||
return this->snapshot_containing_block().size();
|
||||
}
|
||||
|
||||
void Navigable::register_navigation_observer(Badge<NavigationObserver>, NavigationObserver& navigation_observer)
|
||||
{
|
||||
auto result = m_navigation_observers.set(navigation_observer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue