Source/WebKit2: [EFL][GTK][WK2] Remove unnecessary reinterpret_casts when setting...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 22:42:46 +0000 (22:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 22:42:46 +0000 (22:42 +0000)
commit2449b0974cbb98f7eb595445e7dddf5ec82ebfcd
tree89faa5d3f15ec56709dacf09a1d9233bdd8ae75b
parent316d8a72ec3a5518113032edbacea0bde4649d0c
Source/WebKit2: [EFL][GTK][WK2] Remove unnecessary reinterpret_casts when setting API clients
https://bugs.webkit.org/show_bug.cgi?id=125231

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-04
Reviewed by Anders Carlsson.

After r159988, WKClients have to be instantiated with a specific
version of that client and its Base field has to used when setting it.
Eg:

    WKFullScreenClientV0 wkClient = {
        {
            0, // version
            this, // clientInfo
        },
            willEnterFullScreen,
            willExitFullScreen
    };
    WKViewSetFullScreenClientGtk(this, &wkClient.base);

So we don't need the reinterpret_casts introduced in r160075.

* UIProcess/API/gtk/WebKitFullscreenClient.cpp:
(attachFullScreenClientToView): reinterpret_cast<WKFooClientBase*>(&client) -> &client.base
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
(attachRequestManagerClientToContext): Ditto.
* UIProcess/API/gtk/WebKitTextChecker.cpp:
(WebKitTextChecker::WebKitTextChecker): Ditto.
* UIProcess/API/gtk/WebKitWebInspector.cpp:
(webkitWebInspectorCreate): Ditto.
* UIProcess/efl/BatteryProvider.cpp:
(BatteryProvider::BatteryProvider): Ditto.
* UIProcess/efl/NetworkInfoProvider.cpp:
(NetworkInfoProvider::NetworkInfoProvider): Ditto.
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::PageUIClientEfl): Ditto.
* UIProcess/efl/RequestManagerClientEfl.cpp:
(WebKit::RequestManagerClientEfl::RequestManagerClientEfl): Ditto.
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::TextCheckerClientEfl): Ditto.
* UIProcess/efl/VibrationClientEfl.cpp:
(VibrationClientEfl::VibrationClientEfl): Ditto.
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::ViewClientEfl): Ditto.

Tools: [EFL][WK2] Buildfix after r160104
https://bugs.webkit.org/show_bug.cgi?id=125231

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-04
Reviewed by Anders Carlsson.

* TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp:
(TestWebKitAPI::TEST): reinterpret_cast<WKFooClientBase*>(&client) -> &client.base
* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp:
(TestWebKitAPI::setViewClient): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitFullscreenClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
Source/WebKit2/UIProcess/efl/BatteryProvider.cpp
Source/WebKit2/UIProcess/efl/NetworkInfoProvider.cpp
Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp
Source/WebKit2/UIProcess/efl/TextCheckerClientEfl.cpp
Source/WebKit2/UIProcess/efl/VibrationClientEfl.cpp
Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp
Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp