WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94248
[EFL][WK2] ewk_back_forward_list_item properties should be in sync with WebProcessProxy::m_backForwardListItemMap
https://bugs.webkit.org/show_bug.cgi?id=94248
Summary
[EFL][WK2] ewk_back_forward_list_item properties should be in sync with WebPr...
Mikhail Pozdnyakov
Reported
2012-08-16 13:32:25 PDT
Currently ewk_back_forward_list_item properties are initialized from WKBackForwardListItemRef once in the constructor and then just stored. This is erroneous approach as back forward items can be initialized within several iterations, meaning several ipc calls to UI process and several updates of WebProcessProxy::m_backForwardListItemMap where the items are stored. Hence the values of ewk_back_forward_list_item properties should be updated with the corresponding WKBackForwardListItem.. functions invokes every time they are called.
Attachments
patch
(5.24 KB, patch)
2012-08-16 13:47 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
patch v2
(5.10 KB, patch)
2012-08-16 14:13 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
patch v3
(5.00 KB, patch)
2012-08-17 00:01 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
patch v4
(5.05 KB, patch)
2012-08-17 06:55 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
patch v4
(4.81 KB, patch)
2012-08-17 07:00 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Mikhail Pozdnyakov
Comment 1
2012-08-16 13:47:56 PDT
Created
attachment 158892
[details]
patch
Chris Dumez
Comment 2
2012-08-16 13:51:36 PDT
Comment on
attachment 158892
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158892&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:92 > + return item->uri = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyURL(wkItem));
Personally, I would prefer this on 2 lines.
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:99 > + return item->title = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyTitle(item->wkItem.get()));
Ditto. + You should use wkItem directly instead of item->wkItem.get().
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:106 > + return item->originalUri = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyOriginalURL(item->wkItem.get()));
Ditto.
Mikhail Pozdnyakov
Comment 3
2012-08-16 14:13:53 PDT
Created
attachment 158897
[details]
patch v2 Chris, thanks for review!
Chris Dumez
Comment 4
2012-08-16 14:20:00 PDT
Comment on
attachment 158897
[details]
patch v2 LGTM.
Gyuyoung Kim
Comment 5
2012-08-16 19:12:34 PDT
Comment on
attachment 158897
[details]
patch v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=158897&action=review
> Source/WebKit2/ChangeLog:14 > + with the corresponding WKBackForwardListItem.. functions invokes every time
Use '.' instead '..' at the end of WKBackForwardListItem.
> Source/WebKit2/ChangeLog:17 > + * PlatformEfl.cmake:
PlatformEfl.cmake is not modified by this patch.
> Source/WebKit2/ChangeLog:24 > + * UIProcess/API/efl/tests/resources/default_test_page.html:
ditto.
Mikhail Pozdnyakov
Comment 6
2012-08-17 00:01:44 PDT
Created
attachment 159014
[details]
patch v3 Fixed ChangeLog
Kenneth Rohde Christiansen
Comment 7
2012-08-17 04:11:56 PDT
Comment on
attachment 159014
[details]
patch v3 View in context:
https://bugs.webkit.org/attachment.cgi?id=159014&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:42 > + mutable WKEinaSharedString uri;
hmm you need to assign to this from const methods? maybe mention in the changelog
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:69 > + if (!(item)->wkItem) { \ > + EINA_LOG_CRIT("item->wkItem is NULL."); \ > + return __VA_ARGS__; \ > + } \ > + if (!(item)->wkItem.get()) { \ > + EINA_LOG_CRIT("item->wkItem.get() is NULL."); \ > + return __VA_ARGS__; \ > + } \
It is a RetainPtr class... what is the diff between checking if wkItem is Null and wkItem.get() ?
Mikhail Pozdnyakov
Comment 8
2012-08-17 06:55:43 PDT
Created
attachment 159113
[details]
patch v4 Took Kenneth feedback into consideration.
Mikhail Pozdnyakov
Comment 9
2012-08-17 07:00:59 PDT
Created
attachment 159117
[details]
patch v4
Mikhail Pozdnyakov
Comment 10
2012-08-17 07:02:57 PDT
Comment on
attachment 159014
[details]
patch v3 View in context:
https://bugs.webkit.org/attachment.cgi?id=159014&action=review
>> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:69 >> + } \ > > It is a RetainPtr class... what is the diff between checking if wkItem is Null and wkItem.get() ?
Agree, it has bool operator overloaded. Thanks for the catch.
Thiago Marcos P. Santos
Comment 11
2012-08-17 09:05:10 PDT
Comment on
attachment 159117
[details]
patch v4 View in context:
https://bugs.webkit.org/attachment.cgi?id=159117&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:44 > + mutable WKEinaSharedString uri; > + mutable WKEinaSharedString title; > + mutable WKEinaSharedString originalUri;
Controversial but I think it is a legit case of using mutable. Looks to me it is because the getter is lazy initialized, right?
> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp:66 > +#define EWK_BACK_FORWARD_LIST_ITEM_WK_GET_OR_RETURN(item, wkItem_, ...) \ > + if (!(item)) { \ > + EINA_LOG_CRIT("item is NULL."); \ > + return __VA_ARGS__; \ > + } \ > + if (!(item)->wkItem) { \ > + EINA_LOG_CRIT("item->wkItem is NULL."); \ > + return __VA_ARGS__; \ > + } \ > + WKBackForwardListItemRef wkItem_ = (item)->wkItem.get()
Why are you using __VA_ARGS__ here?
WebKit Review Bot
Comment 12
2012-08-18 14:47:22 PDT
Comment on
attachment 159117
[details]
patch v4 Clearing flags on attachment: 159117 Committed
r125969
: <
http://trac.webkit.org/changeset/125969
>
WebKit Review Bot
Comment 13
2012-08-18 14:47:28 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug