Bug 97094

Summary: [EFL][WK2] Same page navigation does not update view URI
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit EFLAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, kenneth, lucas.de.marchi, rakuco, ryuan.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 97081    
Attachments:
Description Flags
Patch
none
Patch none

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.