#60687 closed defect (bug) (fixed)
HTML API: Ensure that breadcrumbs are properly retained after seeking.
| Reported by: | dmsnell | Owned by: | dmsnell |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | HTML API | Version: | 6.5 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
In some cases, it's possible to seek back into a location found inside an element which has been completely closed before the seek. In these cases the breadcrumb stack is lost, and calling get_breadcrumbs() after the seek will return the wrong information.
This patch changes the seek() behavior to rewind to the start of the document and re-parse everything up until the sought-after bookmark location. This is a drastic choice but maintains the accuracy of the breadcrumbs. While slow, this can be later optimized in a way that preserves the parser state.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: Core-60687
In some cases, it's possible to seek back into a location found inside an element which has been completely closed before the seek. In these cases the breadcrumb stack is lost, and calling
get_breadcrumbs()after the seek will return the wrong information.This patch changes the
seek()behavior to rewind to the start of the document and re-parse everything up until the sought-after bookmark location. This is a drastic choice but maintains the accuracy of the breadcrumbs. While slow, this can be later optimized in a way that preserves the parser state.