Skip to content

Conversation

@akallabeth
Copy link
Contributor

@akallabeth akallabeth commented Apr 23, 2025

A new take on #942

  • Now notify for all navigation events (start, redirect, commit and finish)
  • Tested linux, windows and mac so far

Possible TODO:

  • Add a second callback for navigation failures?

@akallabeth akallabeth force-pushed the navigation-listener branch 5 times, most recently from bd048a3 to 7848897 Compare April 24, 2025 07:13
@akallabeth
Copy link
Contributor Author

ok, your workflow checks failed due to a typo of mine (NavigationDelegate vs navigationDelegate - wondering why I did get proper callbacks on mac nonetheless.)

@akallabeth
Copy link
Contributor Author

akallabeth commented Apr 25, 2025

not sure which formatting issue you have here.
doing a git clang-format -f origin/master returns empty,
also running clang-format -i -style=file <filename> does not change anything here. got clang-format 19 here.

when running the cmake target there is a diff, but that is in a file that I did not touch?

07:47 $ cmake --build ../build-webview-Desktop_clang-Debug/ --target webview_format_check 2>&1 |tee log.txt
[0/2] Re-checking globbed directories...
[1/2] Checking files with clang-format...
FAILED: CMakeFiles/webview_format_check /home/xxx/src/build-webview-Desktop_clang-Debug/CMakeFiles/webview_format_check 
cd /home/xxx/src/build-webview-Desktop_clang-Debug && /usr/bin/cmake -D CMD=check -D BINARY_DIR=/home/xxx/src/build-webview-Desktop_clang-Debug -D SOURCE_DIR=/home/xxx/src/webview -D CLANG_FORMAT_EXE=/usr/bin/clang-format -D STRICT=1 -P /home/xxx/src/webview/cmake/clang_format.cmake
/home/xxx/src/webview/core/include/webview/detail/platform/linux/webkitgtk/dmabuf.hh:89:23: error: code should be clang-formatted [-Wclang-format-violations]
  struct ::stat buffer {};
                      ^
CMake Error at /home/xxx/src/webview/cmake/clang_format.cmake:36 (message):
  clang-format check failed.


ninja: build stopped: subcommand failed.

[edit] also running cmake --build <builddir> --target webview_reformat only shows up that, not the formatting issue spotted on the ci

this allows easy manipulation of the webview during the callback.
@akallabeth akallabeth force-pushed the navigation-listener branch from 979e35e to b534178 Compare April 25, 2025 07:14
@akallabeth
Copy link
Contributor Author

ok, fired up an old ubuntu 22.04 vm and ran it there.
looks like I missed a tab instead of spaces, should work now.

If the webview is attached a double free will occur if reference count
is decreased again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Pull request is a feature

Development

Successfully merging this pull request may close these issues.

3 participants