Bug 92463 - [EFL][WK2] Stop using C API to interact with the page in Ewk_View
Summary: [EFL][WK2] Stop using C API to interact with the page in Ewk_View
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Depends on:
Blocks: 61838
  Show dependency treegraph
Reported: 2012-07-26 23:28 PDT by Chris Dumez
Modified: 2012-07-27 04:52 PDT (History)
8 users (show)

See Also:

Patch (9.48 KB, patch)
2012-07-26 23:44 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (11.38 KB, patch)
2012-07-27 02:08 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (9.52 KB, patch)
2012-07-27 02:10 PDT, Chris Dumez
hausmann: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (9.38 KB, patch)
2012-07-27 04:30 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-07-26 23:28:31 PDT
We currently use the C API to interact with the PageProxy in Ewk_View even though we keep a pointer to the PageProxy object. This means we call toAPI() on our PageProxy object all the time for no reason.
Comment 1 Chris Dumez 2012-07-26 23:44:13 PDT
Created attachment 154855 [details]
Comment 2 Simon Hausmann 2012-07-27 01:09:52 PDT
Comment on attachment 154855 [details]

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

I think the patch looks good, apart from the boolean trap below:

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:630
> +    priv->pageClient->page()->reload(true);

This and the other invocation of reload() a few lines up is a classic example of the boolean trap. I suggest to replace it with a comment:

    ->reload(/*bypassCache*/ true);
Comment 3 Chris Dumez 2012-07-27 02:08:35 PDT
Created attachment 154880 [details]

Take Simon's feedback into consideration.
Comment 4 Chris Dumez 2012-07-27 02:09:18 PDT
Comment on attachment 154880 [details]

Patch is broken.
Comment 5 Chris Dumez 2012-07-27 02:10:45 PDT
Created attachment 154881 [details]
Comment 6 WebKit Review Bot 2012-07-27 04:14:59 PDT
Comment on attachment 154881 [details]

Rejecting attachment 154881 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:

Parsed 2 diffs from patch file(s).
patching file Source/WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Hunk #3 FAILED at 593.
Hunk #7 succeeded at 768 with fuzz 2.
1 out of 17 hunks FAILED -- saving rejects to file Source/WebKit2/UIProcess/API/efl/ewk_view.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Simon Haus..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13373325
Comment 7 Chris Dumez 2012-07-27 04:30:37 PDT
Created attachment 154901 [details]
Patch for landing

Rebase on master. Could someone please cq+ ?
Comment 8 WebKit Review Bot 2012-07-27 04:52:37 PDT
Comment on attachment 154901 [details]
Patch for landing

Clearing flags on attachment: 154901

Committed r123866: <http://trac.webkit.org/changeset/123866>
Comment 9 WebKit Review Bot 2012-07-27 04:52:43 PDT
All reviewed patches have been landed.  Closing bug.