Skip to content

Iframes aren't reactivated when their page is restored from bfcache #13096

Open

Description

@zcorpan

When a traversal restores a bfcached top-level document, the documents of its child navigables aren't reactivated. Get all navigables whose current session history entry will change or reload only checks a navigable's children when its own document doesn't change:

If targetEntry's document is navigable's active document, and targetEntry's document state's reload pending is false, then extend navigablesToCheck with the child navigables of navigable.

The algorithm that gets navigables needing only a history length/index update has the same condition, and reactivate a document doesn't recurse into descendants. So the iframes don't get pageshow, their history.length/index and navigation.entries() aren't updated, and no dispose fires for entries pruned while the page was in bfcache.

entries-after-bfcache-in-iframe.html expects the iframe to get pageshow and dispose and its entries() to shrink. It passes in Chrome Canary and Safari TP, and fails in Firefox Nightly.

Maybe reactivating a document should also reactivate its descendants, each with its own entries for the navigation API.

(Found while looking into #13085.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions