Bug 36907

Summary: [Chromium] WebFrame should have a method to execute script and return the evaluated value
Product: WebKit Reporter: Jay Campan <jcampan>
Component: WebKit APIAssignee: Jay Campan <jcampan>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, dglazkov, eric, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Adding a method to WebFrame to evaluate a JS expression.
fishd: review+, fishd: commit-queue-
Fixing class name order none

Description Jay Campan 2010-03-31 16:23:33 PDT
In the Chromium API, the WebFrame class should have a method that executes some JavaScript and returns the value it evaluates to.
Comment 1 Jay Campan 2010-03-31 16:31:43 PDT
Created attachment 52221 [details]
Adding a method to WebFrame to evaluate a JS expression.
Comment 2 Eric Seidel (no email) 2010-04-01 16:00:58 PDT
Seems like a good idea to me, but Adam, Dimitry or Darin are better reviewers for this sort of change.
Comment 3 Darin Fisher (:fishd, Google) 2010-04-01 16:27:49 PDT
Comment on attachment 52221 [details]
Adding a method to WebFrame to evaluate a JS expression.

> Index: WebKit/chromium/public/WebFrame.h
...
>  namespace v8 {
>  class Context;
> +template <class T> class Handle;
>  template <class T> class Local;
> +class Value;
> +
>  }

nit:  please change the above to:

namespace v8 {
class Context;
class Value;
template <class T> class Handle;
template <class T> class Local;
}

with that, R=me
Comment 4 Jay Campan 2010-04-01 16:39:52 PDT
Created attachment 52350 [details]
Fixing class name order
Comment 5 David Levin 2010-04-01 17:51:49 PDT
Comment on attachment 52350 [details]
Fixing class name order

Based on Darin's previous r+ and validating that the requested change was done.
Comment 6 Adam Barth 2010-04-01 18:20:30 PDT
I take it we don't have a ScriptController in the WebKit API.  :)
Comment 7 WebKit Commit Bot 2010-04-01 23:09:14 PDT
Comment on attachment 52350 [details]
Fixing class name order

Clearing flags on attachment: 52350

Committed r56972: <http://trac.webkit.org/changeset/56972>
Comment 8 WebKit Commit Bot 2010-04-01 23:09:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Darin Fisher (:fishd, Google) 2010-04-01 23:36:34 PDT
(In reply to comment #6)
> I take it we don't have a ScriptController in the WebKit API.  :)

Well, we do have WebScriptController, but it only has static functions.  It is used for registering V8 extensions and performing some other operations.  It isn't an instantiated class in the WebKit API.  We could change that if it would help make things clearer.