fune/toolkit/library
Jan-Niklas Jaeschke eca7db5dd9 Bug 1867939, part 2: Implement Fragment Directive parser. r=hsivonen,dom-core
This patch provides functions to extract the fragment directive from a url / a hash
into an array of `TextDirective`s
as well as to create a fragment directive string from given text directives.

The algorithms are implemented as a rust crate.
Interface functions and data structures which are accessible from C++
are provided in `lib.rs`.
The actual implementation (using pure rust types)
lives in `fragment_directive_impl.rs`, tests live in `test.rs`.

The implementation currently only supports text directives.
Other future directive types are not considered and will be ignored.

The main function, `parse_fragment_directive()` takes a url / a url hash
as parameter and returns (as out parameter) a struct which contains the stripped input url,
the fragment directive string, and an array of parsed text directive objects.

Additionally, there are functions that create a full fragment directive string
from a list of text directives as well as a function that creates
a single text directive string from a text directive.

The `TextDirective` class, which is shared with C++, contains four
string elements for the prefix, start, end and suffix elements.
These strings are percent-decoded and do not contain identifiers
(like the `-` that indicates it being a prefix or suffix).
All elements besides `start` can be empty.

The implemented algorithms are used in the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D195685
2024-04-04 14:39:32 +00:00
..
build Bug 1878169 - dependentlibs.list Is missing files on macOS r=glandium 2024-02-06 06:42:40 +00:00
gtest
rust Bug 1867939, part 2: Implement Fragment Directive parser. r=hsivonen,dom-core 2024-04-04 14:39:32 +00:00
gecko.natvis
gen_buildid.py
libxul.so-gdb.py
libxul.symbols
moz.build Bug 1886371 part 1: Hook up our native UIA tree. r=nlapre,win-reviewers,rkraesig 2024-03-25 03:28:03 +00:00
nsDllMain.cpp
xulrunner.rc