mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibWeb: Make DOM::Position's node mandatory
We can only construct positions if there's a node involved, which was already enforced by Position::create() only accepting a GC::Ref.
This commit is contained in:
parent
cd08b3b6f4
commit
51ce46859e
Notes:
github-actions[bot]
2025-08-20 11:26:01 +00:00
Author: https://github.com/gmta
Commit: 51ce46859e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5922
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 10 additions and 14 deletions
|
@ -477,14 +477,11 @@ Document::Document(JS::Realm& realm, const URL::URL& url, TemporaryDocumentForFr
|
|||
if (!cursor_position)
|
||||
return;
|
||||
|
||||
auto node = cursor_position->node();
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
auto navigable = this->navigable();
|
||||
if (!navigable || !navigable->is_focused())
|
||||
return;
|
||||
|
||||
auto node = cursor_position->node();
|
||||
node->document().update_layout(UpdateLayoutReason::CursorBlinkTimer);
|
||||
|
||||
if (node->paintable()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue