Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2dbebd6180a99f5c3e6f282707eac2fde1482b8a
      
https://github.com/WebKit/WebKit/commit/2dbebd6180a99f5c3e6f282707eac2fde1482b8a
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2025-08-04 (Mon, 04 Aug 2025)

  Changed paths:
    M Source/WebKit/Shared/JavaScriptEvaluationResult.cpp
    M Source/WebKit/Shared/JavaScriptEvaluationResult.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/NodeInfo.mm
    M Tools/TestWebKitAPI/cocoa/TestWKWebView.h
    M Tools/TestWebKitAPI/cocoa/TestWKWebView.mm

  Log Message:
  -----------
  Add ability for _WKNodeInfo to be used as an argument with 
WKWebView.callAsyncJavaScript
https://bugs.webkit.org/show_bug.cgi?id=296836
rdar://157338015

Reviewed by Ryosuke Niwa.

If the node does not exist any more, I chose to pass JS undefined in as a 
parameter.
This makes _WKNodeInfo kind of like a WeakRef, which returns undefined if the 
node doesn't exist any more.
If the node exists in a different document, I decided to also return JS 
undefined.
Both of these choices are arbitrary and non-final at this point.  Still 
prototyping its use.

* Source/WebKit/Shared/JavaScriptEvaluationResult.cpp:
(WebKit::JavaScriptEvaluationResult::toJS):
* Source/WebKit/Shared/JavaScriptEvaluationResult.mm:
(WebKit::JavaScriptEvaluationResult::toValue):
(WebKit::isSerializable):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/NodeInfo.mm:
(TestWebKitAPI::getContentFrameInfo):
(TestWebKitAPI::TEST(NodeInfo, Basic)):
(TestWebKitAPI::TEST(SerializedNode, Basic)):
* Tools/TestWebKitAPI/cocoa/TestWKWebView.h:
* Tools/TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView objectByEvaluatingJavaScript:inFrame:inContentWorld:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:]):
(-[WKWebView 
objectByCallingAsyncFunction:withArguments:inFrame:inContentWorld:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to