#60687 closed defect (bug) (fixed)
HTML API: Ensure that breadcrumbs are properly retained after seeking.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | HTML API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
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.