Bug 97094 - [EFL][WK2] Same page navigation does not update view URI
Summary: [EFL][WK2] Same page navigation does not update view URI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 97081
  Show dependency treegraph
 
Reported: 2012-09-19 04:35 PDT by Chris Dumez
Modified: 2012-09-20 01:34 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.62 KB, patch)
2012-09-19 04:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.54 KB, patch)
2012-09-19 23:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-09-19 04:35:13 PDT
In case of same page navigation, the view URI is currently not updated because we don't handle didSameDocumentNavigationForFrame callback in WKPageLoaderClient.
Comment 1 Chris Dumez 2012-09-19 04:40:55 PDT
Created attachment 164712 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-09-19 10:43:45 PDT
Comment on attachment 164712 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164712&action=review

> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:224
> +struct URIChangedData {
> +    URIChangedData(const char* uri, double timeoutSeconds, Ecore_Task_Cb callback)
> +        : expectedURI(uri)
> +        , done(false)
> +        , timer(0)
> +        , didTimeOut(false)
> +    {
> +        if (timeoutSeconds >= 0)
> +            timer = ecore_timer_add(timeoutSeconds, callback, this);
> +    }
> +

Maybe it is about time to make a base class?

> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:237
> +static void onURIChanged(void* userData, Evas_Object* webView, void* eventInfo)

Why are we callign it URI when everyone(?) else calls it URL in webkit?
Comment 3 Chris Dumez 2012-09-19 23:13:01 PDT
Comment on attachment 164712 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164712&action=review

>> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:224
>> +
> 
> Maybe it is about time to make a base class?

Sure, I can clean this up.

>> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:237
>> +static void onURIChanged(void* userData, Evas_Object* webView, void* eventInfo)
> 
> Why are we callign it URI when everyone(?) else calls it URL in webkit?

Probably out of consistency with EFL WebKit1. Considering the ewk_view method is called ewk_view_uri_get(), I think using URI here is consistent.
Comment 4 Chris Dumez 2012-09-19 23:17:27 PDT
Created attachment 164845 [details]
Patch

Refactor the callback data in Test framework.
Comment 5 Kenneth Rohde Christiansen 2012-09-20 00:08:04 PDT
Comment on attachment 164845 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164845&action=review

This looks so much better

> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:174
> +    if (strcmp(ewk_view_title_get(webView), data->expectedValue().data()))

why not just value() ?
Comment 6 WebKit Review Bot 2012-09-20 00:15:48 PDT
Comment on attachment 164845 [details]
Patch

Clearing flags on attachment: 164845

Committed r129099: <http://trac.webkit.org/changeset/129099>
Comment 7 WebKit Review Bot 2012-09-20 00:15:53 PDT
All reviewed patches have been landed.  Closing bug.