[webkit-changes] [WebKit/WebKit] 1ddf79: [Navigation] Implement canGoForward/canGoBackward

Rob Buis noreply at github.com
Tue Feb 13 04:46:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ddf79a30220e5397021a067a8d6e17455a0281b
      https://github.com/WebKit/WebKit/commit/1ddf79a30220e5397021a067a8d6e17455a0281b
  Author: Rob Buis <rbuis at igalia.com>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M Source/WebCore/page/Navigation.cpp
    M Source/WebCore/page/Navigation.h

  Log Message:
  -----------
  [Navigation] Implement canGoForward/canGoBackward
https://bugs.webkit.org/show_bug.cgi?id=268454

Reviewed by Anne van Kesteren.

Implement canGoForward/canGoBackward as specified here:
https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoback
https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoforward

This PR also makes m_currentEntryIndex a std::optional, this is more convenient as
it avoids signed/unsigned confusion/casting.

* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::canGoBack const):
(WebCore::Navigation::canGoForward const):
(WebCore::Navigation::currentEntry const):
* Source/WebCore/page/Navigation.h:

Canonical link: https://commits.webkit.org/274542@main




More information about the webkit-changes mailing list