mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 936271 - Ignore dynamic session history entries r=yoric
This commit is contained in:
parent
107799a35a
commit
d9a213f4df
@ -105,6 +105,21 @@ let SessionHistoryInternal = {
|
||||
return data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether a given session history entry has been added dynamically.
|
||||
*
|
||||
* @param shEntry
|
||||
* The session history entry.
|
||||
* @return bool
|
||||
*/
|
||||
isDynamic: function (shEntry) {
|
||||
// shEntry.isDynamicallyAdded() is true for dynamically added
|
||||
// <iframe> and <frameset>, but also for <html> (the root of the
|
||||
// document) so we use shEntry.parent to ensure that we're not looking
|
||||
// at the root of the document
|
||||
return shEntry.parent && shEntry.isDynamicallyAdded();
|
||||
},
|
||||
|
||||
/**
|
||||
* Get an object that is a serialized representation of a History entry.
|
||||
*
|
||||
@ -183,7 +198,7 @@ let SessionHistoryInternal = {
|
||||
for (let i = 0; i < shEntry.childCount; i++) {
|
||||
let child = shEntry.GetChildAt(i);
|
||||
|
||||
if (child) {
|
||||
if (child && !this.isDynamic(child)) {
|
||||
// Don't try to restore framesets containing wyciwyg URLs.
|
||||
// (cf. bug 424689 and bug 450595)
|
||||
if (child.URI.schemeIs("wyciwyg")) {
|
||||
|
Loading…
Reference in New Issue
Block a user