Skip to content

xpath: Cast query result to desired type - #39764

Merged
simonwuelker merged 5 commits into
servo:mainfrom
simonwuelker:xpath-result-cast
Oct 13, 2025
Merged

simonwuelker merged 5 commits into
servo:mainfrom
simonwuelker:xpath-result-cast

Conversation

@simonwuelker

Copy link
Copy Markdown
Member

When running an XPath query, users supply a target result type (eg XPathResult.NUMBER_TYPE). When this type does match the return value of the query, then we need to convert to it.

See https://searchfox.org/firefox-main/rev/ab5bf2401717970560597083d6ac72915bde2d89/dom/xslt/xpath/XPathResult.cpp#160 for the relevant part in gecko.

Testing: This change adds a test
Part of #34527

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#55351) with upstreamable changes.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 This change no longer contains upstreamable changes to WPT; closed existing upstream pull request (web-platform-tests/wpt#55351).

@simonwuelker
simonwuelker force-pushed the xpath-result-cast branch 2 times, most recently from 5c2effc to 242762d Compare October 11, 2025 18:42
@servo-highfive servo-highfive added the S-needs-rebase There are merge conflict errors. label Oct 11, 2025
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 12, 2025
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-rebase There are merge conflict errors. labels Oct 12, 2025
@simonwuelker
simonwuelker added this pull request to the merge queue Oct 13, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 13, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2025
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 13, 2025
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@servo-highfive servo-highfive removed the S-tests-failed The changes caused existing tests to fail. label Oct 13, 2025
@jdm
jdm added this pull request to the merge queue Oct 13, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 13, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2025
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 13, 2025
@simonwuelker
simonwuelker added this pull request to the merge queue Oct 13, 2025
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 13, 2025
Merged via the queue into servo:main with commit 84d3033 Oct 13, 2025
31 checks passed
@simonwuelker
simonwuelker deleted the xpath-result-cast branch October 13, 2025 16:34
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants