[webkit-gtk] Clearing the WebKitBackForwardList in WebKit2

Konstantin Tokarev annulen at yandex.ru
Fri Mar 17 06:29:34 PDT 2017

17.03.2017, 04:06, "Michael Catanzaro" <mcatanzaro at igalia.com>:
> On Thu, 2017-03-16 at 20:31 -0400, Scott Talbert wrote:
>>  Hi all,
>>  I'm working on porting wxWidgets' webview module over to use
>>  WebKit2.  One
>>  of the few things I haven't been able to finish yet is clearing the
>>  WebKitBackForwardList, which seems to be absent in the WebKit2 API.
>>  Is
>>  there a technical reason this can't be done, or is it just that it
>>  hasn't
>>  been added yet?
> I don't remember the reason why, but it's read-only by design and there
> are no plans to change that. Maybe somebody else remembers the
> reasoning behind this? We'd need to get permission from the WebKit2
> owners, who have shot it down in the past.

Brady Eidson told me on IRC that having mutable back/forward lists in WK1
public API resulted in various bugs that Apple team had to deal with:

"Crashers, hangs, back/forward list getting into an inconsistent state because
the client modified during navigation, because the client modified while a
navigation was scheduled, security bugs resulting from the client doing things
unsafe within the security model of the web, etc etc..."

See also https://bugs.webkit.org/show_bug.cgi?id=69358#c5

Though allowing to clear BackFrowardList is not the same as making it "freely

> Still, it seems like it ought to be possible to at least clear it
> somehow. Maybe try creating a new WebKitWebViewSessionState and
> restoring it into the web view? I suspect that won't work, but it's
> worth trying.
> Sorry this wasn't a great answer,
> Michael
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk


More information about the webkit-gtk mailing list