mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Rename DOM::Node::id() to unique_id()
The old name was pretty confusing, since it had nothing to do with the common "id" content attribute. This makes way for using id() to return the "id" attribute instead. :^)
This commit is contained in:
parent
1030776f92
commit
6b580d68a3
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/awesomekling
Commit: 6b580d68a3
Pull-request: https://github.com/SerenityOS/serenity/pull/21746
Reviewed-by: https://github.com/AtkinsSJ ✅
8 changed files with 27 additions and 27 deletions
|
@ -517,7 +517,7 @@ Messages::WebContentServer::InspectDomNodeResponse ConnectionFromClient::inspect
|
|||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
Web::DOM::Node* node = Web::DOM::Node::from_id(node_id);
|
||||
Web::DOM::Node* node = Web::DOM::Node::from_unique_id(node_id);
|
||||
// Note: Nodes without layout (aka non-visible nodes, don't have style computed)
|
||||
if (!node || !node->layout_node()) {
|
||||
return { false, "", "", "", "", "" };
|
||||
|
@ -642,7 +642,7 @@ Messages::WebContentServer::GetHoveredNodeIdResponse ConnectionFromClient::get_h
|
|||
if (auto* document = page().top_level_browsing_context().active_document()) {
|
||||
auto hovered_node = document->hovered_node();
|
||||
if (hovered_node)
|
||||
return hovered_node->id();
|
||||
return hovered_node->unique_id();
|
||||
}
|
||||
return (i32)0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue