Merge lp:~uriboni/oxide/find-in-page into lp:~oxide-developers/oxide/oxide.trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 1088 |
| Proposed branch: | lp:~uriboni/oxide/find-in-page |
| Merge into: | lp:~oxide-developers/oxide/oxide.trunk |
| Diff against target: |
863 lines (+587/-1) 15 files modified
qt/core/api/oxideqfindcontroller.cc (+97/-0) qt/core/api/oxideqfindcontroller.h (+71/-0) qt/core/api/oxideqfindcontroller_p.h (+46/-0) qt/core/browser/oxide_qt_web_view.cc (+16/-1) qt/core/browser/oxide_qt_web_view.h (+7/-0) qt/core/core.gyp (+9/-0) qt/core/glue/oxide_qt_web_view_proxy.h (+11/-0) qt/qmlplugin/oxide_qml_plugin.cc (+5/-0) qt/quick/api/oxideqquickwebview.cc (+7/-0) qt/quick/api/oxideqquickwebview_p.h (+10/-0) qt/tests/qmltests/api/tst_WebView_findController.html (+13/-0) qt/tests/qmltests/api/tst_WebView_findController.qml (+152/-0) qt/tests/qmltests/api/tst_WebView_findControllerManyResults.html (+9/-0) shared/browser/oxide_web_view.cc (+102/-0) shared/browser/oxide_web_view.h (+32/-0) |
| To merge this branch: | bzr merge lp:~uriboni/oxide/find-in-page |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Chris Coulson | 2015-05-04 | Approve on 2015-05-21 | |
|
Review via email:
|
|||
Description of the Change
Adds a new API to allow searching text within a page.
- 1063. By Ugo Riboni on 2015-05-04
-
Remove unrelated changes to cmake file
- 1064. By Ugo Riboni on 2015-05-04
-
Minor code style fixes
- 1065. By Ugo Riboni on 2015-05-11
-
Make findInPage group property constant to prevent non-notifyable property warnings
- 1066. By Ugo Riboni on 2015-05-12
-
Merge changes from trunk
| Olivier Tilloy (osomon) wrote : | # |
- 1067. By Ugo Riboni on 2015-05-12
-
Fix code style (braces, indentation)
- 1068. By Ugo Riboni on 2015-05-12
-
Improve some tests
- 1069. By Ugo Riboni on 2015-05-12
-
Remove useless initialization
- 1070. By Ugo Riboni on 2015-05-12
-
Add explanatory comment and fix indentation
- 1071. By Ugo Riboni on 2015-05-14
-
Merge changes from trunk
| Chris Coulson (chrisccoulson) wrote : | # |
Thanks for working on this. I have some general comments:
- I think I'd prefer WebView.
- The implementation doesn't need to live in qt/quick/api - it should go in qt/core/api as OxideQFindContr
- As we want to open up the C++ API in the future, the data members on the public class should be in a private class.
I've also left some comments inline.
- 1072. By Ugo Riboni on 2015-05-19
-
Refactor all the logic into an OxideQFindContr
oller class owned by oxide::qt::WebView. The QML API merely exposes it through the renamed findController property. Address other minor issues from code review. - 1073. By Ugo Riboni on 2015-05-19
-
Merge changes from trunk
- 1074. By Ugo Riboni on 2015-05-20
-
Move all non-QT code to oxide::WebView
| Ugo Riboni (uriboni) wrote : | # |
I think all your comments should be addressed at this point, except some to which I replied inline.
| Chris Coulson (chrisccoulson) wrote : | # |
Thanks. There's a few stylistic nits (eg, 4-space indents in some places) and some other things (eg, the constructor for OxideQFindContr
I'm going to approve this though, as I'm currently working on re-architecting oxide::WebView which is probably going to be quite disruptive to this branch - I've already created some merge conflicts with http://
| Ugo Riboni (uriboni) wrote : | # |
> Thanks. There's a few stylistic nits (eg, 4-space indents in some places) and
> some other things (eg, the constructor for OxideQFindContr
> exported). The API looks like it's fine now.
>
> I'm going to approve this though, as I'm currently working on re-architecting
> oxide::WebView which is probably going to be quite disruptive to this branch -
> I've already created some merge conflicts with http://
> /~oxide-
Thanks Chris.
Just to be clear, is there any further action needed from me on this branch ?
| Chris Coulson (chrisccoulson) wrote : | # |
There isn't - I'm going to clean up the merge conflicts I've created and then merge it in for you.
Thanks!

The API looks good to me (I’ll let Chris comment on the actual implementation). Here are a few comments, most of them on the unit tests:
- In test_case_ insensitive( ), the second test should be on a different string, otherwise the count might not have been updated yet.
- In test_new_ text_resets_ count() and in test_navigation _does_not_ reset() , next() should be called after verifying that the count is 2.
- In test_find_ on_invalid_ page(), waiting for a successful load doesn’t look right. Shouldn’t you use webView. waitForLoadFail ed() ?
- In test_navigation _does_not_ reset() , the comparison of text to "dolor" doesn’t need a tryCompare(), it should be a simple compare().
- In OxideQQuickWebV iewFindInPage’ s constructor, the explicit initialization of text_ is useless.
- In the implementation of WebView: :findInPage( ) and other methods, please avoid the use of a return statement on the same line as the condition, and always use curly braces, even for one-liner if blocks.