[WPE][GTK] Add webkit_frame_get_id() API
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2019 16:46:39 +0000 (16:46 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2019 16:46:39 +0000 (16:46 +0000)
commit288bfb36a68a6a231aa869ec986fc0c4c096dafe
treee683a5c66e8ac5a3d3557fe17e3e5f54dfe72c33
parentc2237b883a4981a8ae654ecb67f5596c568cf57f
[WPE][GTK] Add webkit_frame_get_id() API
https://bugs.webkit.org/show_bug.cgi?id=197270

Reviewed by Carlos Garcia Campos.

Source/WebKit:

It's as simple as can be: just an API to return the ID of a frame.

* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
(webkit_frame_get_id):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
* WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
* WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-1.0-sections.txt:

Tools:

This was hard, but I added a test to verify that two different WebKitFrames of the same
WebKitWebPage return two different frame IDs.

* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::willSubmitFormCallback):
(WebKitFrameTest::testSubframe):
(registerTests):
* TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
(testWebKitFrameSubframe):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(willSubmitFormCallback):
* TestWebKitAPI/Tests/WebKitGLib/resources/form-in-frame.html: Added.
* TestWebKitAPI/Tests/WebKitGLib/resources/webkitglib-tests.gresource.xml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitFrame.h
Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitFrame.h
Source/WebKit/WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-1.0-sections.txt
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/resources/form-in-frame.html [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKitGLib/resources/webkitglib-tests.gresource.xml