mirror of
https://github.com/servo/servo
synced 2026-05-10 17:12:23 +02:00
1. `get_known_element`: Refactor to follow same step of spec (which reduces unnecessary search) and implement previously missing step 4.2: If node is stale return error with error code stale element reference. An element is stale if its node document is not the active document or if it is not connected. 2. Refactor `find_node_by_unique_id_in_document` to make it not check error and really return a `Option<DomRoot<Node>>` as the name suggests. This will greatly reduce duplication when implement [get a known shadow root](https://w3c.github.io/webdriver/#dfn-get-a-known-shadow-root) soon Testing: All WebDriver Conformance test after removing two problematic commits in #37520 Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>