Skip to content

Conversation

FlorianRappl
Copy link
Contributor

@FlorianRappl FlorianRappl commented Apr 18, 2025

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

Release of 1.3.0 with some fixes and enhancements. Thanks a lot to @arekdygas, @TheJayMann, and everyone else for the contributions.

lahma and others added 30 commits January 26, 2025 21:02
Upgrade to NUKE 9 and remove obsolete NET 6 and 9 targets
Also are included a couple of tests for targeting windows using _top and
_parent.  This is to ensure correct windows are targeted, as well as
when adding support for targeting frames, targeting windows is not
regressed.
This allows a `BrowsingContext` to know whether it is for a frame or a
"top level window" so that predefined target values work as expected,
specifically the `_top` and `_parent` target values.
When a window context targets either `_parent` or `_top`, it should
instead target itself, even if it is a child window.  Targeting `_top`
should continue checking the parent until a window context is found. For
this reason, when targeting `_top` or `_parent`, the context should be
checked to determine if it is a frame context or a window context.
In order to allow targeting a frame by name, the child context needs the
name of the iframe.
The document in the request is only updated when the `src` or `srcdoc`
is updated.  Navigation elements with named targets only update the
named child `BrowsingContext` it is able to find, or creating a new one
if one is not found.  Thus, for an iframe's `CurrentDocument` to be
updateable by a navigation element, it needs to use its nested context,
rather than the request.  Also, when the iframe is being set up, a
nested context needs to be made and, if named, needs to be added to the
parent context so that it is available for navigation elements targeting
the iframe even if it does not have an intial document to load.
Targeting an named iframe works even if it is nested within an unnamed
iframe.  This is being added due to the previous design of nested
browsing contexts where unnamed child browsing contexts are not added
to the parent's collection of child brosing context, which prevents
(or at least makes very difficult) to navigate from a parent browsing
context to a child browsing context when attempting to find the target
browsing context.
The helper method for generating data uris has been removed as the
virtual requester is used for the tests instead.  Also, added a language
comment to the html raw string literals for editors that support this.
When multiple windows or iframes have the same name, only one can be the
target.  The new tests added perform checks to ensure the correct
priority is used and the correct target is selected when there is a name
collision.
When attempting to find a child browsing context by name, if one is not
found for the current context, then all child contexts should be
searched recursively.  This allows a browsing context to be targeted
even if it is deeply nested.  In order to get all child browsing
contexts, including annonymous browsing contexts, all attached browsing
contexts on the active document is used.
After attempting recursively find a child target, should none be found,
another attempt is made from the parent.  This second level recursion
ends once the topmost context is searched.
Adding new and modifying items in an interface is a breaking change, so
remove that and check for the class directly when accessing new
functionality.
After performing a recursive depth first search for a target on all
browsing contexts starting from the first and continuing until the
top-most, then all auxilary browsing context should be searched.  Also,
any new child context created which is not a frame context should be an
auxilary browsing context, and added as a direct child of the top-most
browsing context, rather than the browsing context attempting to create
it.  The order for searching auxilary browsing contexts is currently up
to the implementation to decide, so long as it is consistent.  The order
chosen in this implementation is the order the auxilary browsing
contexts were created.
Add support for finding targets in auxilary browsing contexts
This is something that I didn't even know could be done till I found an answer on StackOverflow detailing it, so I thought it might be helpful to put it right in the documentation.
This was a pitfall I encountered that I had to figure out myself. Hoping that documenting it can keep someone else from running into the same issue.
GetAttributeNode extension methods added to Element
FlorianRappl and others added 3 commits April 17, 2025 23:37
@FlorianRappl FlorianRappl added this to the 1.3.0 milestone Apr 18, 2025
@FlorianRappl FlorianRappl merged commit 1496823 into main Apr 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants