mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
dom: improve code style
This commit is contained in:
@@ -37,14 +37,12 @@ pub const HTMLCollection = struct {
|
|||||||
// https://dom.spec.whatwg.org/#concept-tree-order
|
// https://dom.spec.whatwg.org/#concept-tree-order
|
||||||
fn get_next(root: *parser.Node, cur: *parser.Node) ?*parser.Node {
|
fn get_next(root: *parser.Node, cur: *parser.Node) ?*parser.Node {
|
||||||
// TODO deinit next
|
// TODO deinit next
|
||||||
var next = parser.nodeFirstChild(cur);
|
if (parser.nodeFirstChild(cur)) |next| {
|
||||||
if (next != null) {
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO deinit next
|
// TODO deinit next
|
||||||
next = parser.nodeNextSibling(cur);
|
if (parser.nodeNextSibling(cur)) |next| {
|
||||||
if (next != null) {
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user