Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ddf79a30220e5397021a067a8d6e17455a0281b
      
https://github.com/WebKit/WebKit/commit/1ddf79a30220e5397021a067a8d6e17455a0281b
  Author: Rob Buis <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to