Re: [webkit-dev] Adding new JS bindings, having slight problems

2010-10-28 Thread Anton Muhin
Good day, Nebojša.

Overall I am with Adam, that if it's ECMAScript feature it should go
in VM itself (JavaScriptCore or v8).  However, as a prototype hacking
bindings might be easier.

On Thu, Oct 28, 2010 at 4:35 AM, Nebojša Ćirić c...@chromium.org wrote:

 2. What is a proper way to specify a constructor? I've browsed the code and
 it seems nobody uses constructors, or they specify custom ones. I would like
 to be able to do:
 var loc = new Locale();
 or
 var loc = new Locale(en);
 Specifying interface [Constructor, Constructor(in DOMString locale)]
 JSLocale doesn't work (script errors). This should work according to the
 WebIDL spec.

What exactly you're trying to achieve here?  Speaking of v8 you might
either describe all the properties and methods your instances would
have (v8 supports class-like inheritance model) or set your own custom
constructor which would do whatever you want with your instance.

 3. I would like some of my functions to be static and some prototypes.
 WebIDL says that prototype is default for methods. I've heard we added
 support for static methods recently.

How do you want your static function look in JS?

 4. How would one decide what parameter goes into static PassRefJSLocale
 create() method? Some put Frame* some put ScriptContent and other random
 parameters - and this doesn't seem to be idl related.

Are you talking of JSC or v8 bindings here?

yours,
anton.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Platform specific editing behaviors

2010-10-28 Thread Andreas Kling

On 10/27/2010 11:17 PM, ext Antonio Gomes wrote:

Before anything I would like to point it our here, and hear  from the
port maintainers any possible objection about it, specially from the
cross-platform ones, including Chromium and Qt.


This sounds like what we want for Qt, so no objections here either. :)

-Kling
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] OSX build break after system update

2010-10-28 Thread Tony Gentilcore
On Wed, Oct 27, 2010 at 10:11 PM, Eric Seidel e...@webkit.org wrote:

 Can we just include the headers in WebKit?

 Or find some way to auto-download them?


+1



 This seems silly.  Or certainly requiring an update to
 http://webkit.org/building/tools.html.


In the meantime, there is:
https://bugs.webkit.org/show_bug.cgi?id=48423


 -eric

 On Thu, Oct 21, 2010 at 3:56 PM, Tony Gentilcore to...@chromium.org
 wrote:
  Quick PSA: if you install the Java for Mac OS X 10.6 Update 3 system
  update you may start getting build errors like:
  error: JavaVM/jni.h: No such file or directory
 
  The solution is to install Java for Mac OS X 10.6 Update 3 Developer
  Package from http://connect.apple.com  Downloads  Java [1]. Thanks
  andersca for the solution!
  -Tony
  [1] This link might
  work:
 http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.8.3.3.1
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Adding new JS bindings, having slight problems

2010-10-28 Thread Nebojša Ćirić
This API is going to be a separate standard related to EcmaScript, say
something like a library - so implementers of EcmaScript core standard
wouldn't be obligated to implement it. Dual track also enables both groups
to move at their pace and not block each other.
We are also trying to reuse much of ICU functionality for Chromium/Safari
implementation, and I am not sure V8/JSC has dependency on ICU at all, while
WebKit/Chromium do.
Also Darin Fisher hinted we should probably do it in bindings/v8, but maybe
he didn't have enough info at the time.

On Wed, Oct 27, 2010 at 6:20 PM, Adam Barth aba...@webkit.org wrote:

 If this is part of ECMAScript, it should be in the JavaScript engine
 proper, not in WebCore.   With respect to missing features of the IDL
 compiler, we add features to the IDL compiler as we need them.
 There's lots of stuff in WebIDL that we haven't needed to implement
 yet.

 Adam


 On Wed, Oct 27, 2010 at 5:35 PM, Nebojša Ćirić c...@chromium.org wrote:
  Hi,
   I am working on JavaScript API that implements basic i18n operations,
 like
  formatting numbers, dates, sorting... We are actually working with
  EcmaScript committee on standardizing the API.
   My goal is to have a prototype to showcase for the next meeting (mid
  November) and I am making local changes in my chromium checkout (but
 working
  on WebKit part of the code).
   I started with the simplest part, Locale definition and came up with
 simple
  (not complete) idl for it. What I did:
  1. Added new top level WebCore/i18n directory (we can debate that later)
  2. Added JSLocale.idl, JSLocale.h and JSLocale.cpp files to it
  3. Updated WebCore.gypi and WebCore.gyp files so proper project is
 generated
  for XCode.
 
  module core {
 
  // Construct with browser locale or with user specified one.
 
  interface [Constructor] JSLocale {
 
  readonly attribute DOMString language;
 
  readonly attribute DOMString script;
 
  readonly attribute DOMString region;
 
  readonly attribute DOMString variants;
 
  void availableLocales(out ObjectArray locales);
 
  void maximizedLocale(out JSLocale locale);
 
  void minimizedLocale(out JSLocale locale);
 
  };
 
  }
 
  Everything (chromium) compiles properly.
   I hit couple problems with this:
  1. I can't name my new files/interface Locale.{idl, cpp, h} since Mac and
  Windows have case insensitive file names, and compiler trips on system
  header locale.h. I am using JSLocale for that reason, but I would like to
  hear if somebody has a solution for this.
  2. What is a proper way to specify a constructor? I've browsed the code
 and
  it seems nobody uses constructors, or they specify custom ones. I would
 like
  to be able to do:
  var loc = new Locale();
  or
  var loc = new Locale(en);
  Specifying interface [Constructor, Constructor(in DOMString locale)]
  JSLocale doesn't work (script errors). This should work according to the
  WebIDL spec.
  3. I would like some of my functions to be static and some prototypes.
  WebIDL says that prototype is default for methods. I've heard we added
  support for static methods recently.
  4. How would one decide what parameter goes into static PassRefJSLocale
  create() method? Some put Frame* some put ScriptContent and other random
  parameters - and this doesn't seem to be idl related.
 
  I would like to contribute on improving documentation related to the
  bindings, once I actually succeed using them :).
 
  Regards,
Nebojša Ćirić
 
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 




-- 
Nebojša Ćirić
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Adding new JS bindings, having slight problems

2010-10-28 Thread Nebojša Ćirić
Hi Anton,
 Current API (and examples) are here
http://wiki.ecmascript.org/doku.php?id=strawman:i18n_api, but in short I
would like to be able to:

var availableLocales = Locale.availableLocales(); // Static method, returns
an array of available Locale-s.

var loc = new Locale(sr); // Create Locale object with sr locale info
var maxLocale = loc.maximizedLocale(); // Try to guess script and region -
prototype method
var language = maxLocale.language; // returns sr
var script = maxLocale.script; // returns Cyrl
var region = maxLocale.region; // returns RS
...
or
var loc = new Locale(); // gets default browser locale
...

One would pass Locale object around to properly format dates, numbers, or to
sort.

Thanks for looking into this.

On Thu, Oct 28, 2010 at 4:22 AM, Anton Muhin ant...@chromium.org wrote:

 Good day, Nebojša.

 Overall I am with Adam, that if it's ECMAScript feature it should go
 in VM itself (JavaScriptCore or v8).  However, as a prototype hacking
 bindings might be easier.

 On Thu, Oct 28, 2010 at 4:35 AM, Nebojša Ćirić c...@chromium.org wrote:

  2. What is a proper way to specify a constructor? I've browsed the code
 and
  it seems nobody uses constructors, or they specify custom ones. I would
 like
  to be able to do:
  var loc = new Locale();
  or
  var loc = new Locale(en);
  Specifying interface [Constructor, Constructor(in DOMString locale)]
  JSLocale doesn't work (script errors). This should work according to the
  WebIDL spec.

 What exactly you're trying to achieve here?  Speaking of v8 you might
 either describe all the properties and methods your instances would
 have (v8 supports class-like inheritance model) or set your own custom
 constructor which would do whatever you want with your instance.

  3. I would like some of my functions to be static and some prototypes.
  WebIDL says that prototype is default for methods. I've heard we added
  support for static methods recently.

 How do you want your static function look in JS?

  4. How would one decide what parameter goes into static PassRefJSLocale
  create() method? Some put Frame* some put ScriptContent and other random
  parameters - and this doesn't seem to be idl related.

 Are you talking of JSC or v8 bindings here?

 yours,
 anton.




-- 
Nebojša Ćirić
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Adding new JS bindings, having slight problems

2010-10-28 Thread Anton Muhin
Nebojša,

Why not put those function right on Local object?

yours,
anton.

On Thu, Oct 28, 2010 at 9:03 PM, Nebojša Ćirić c...@chromium.org wrote:
 Hi Anton,
  Current API (and examples) are
 here http://wiki.ecmascript.org/doku.php?id=strawman:i18n_api, but in short
 I would like to be able to:
 var availableLocales = Locale.availableLocales(); // Static method, returns
 an array of available Locale-s.
 var loc = new Locale(sr); // Create Locale object with sr locale info
 var maxLocale = loc.maximizedLocale(); // Try to guess script and region -
 prototype method
 var language = maxLocale.language; // returns sr
 var script = maxLocale.script; // returns Cyrl
 var region = maxLocale.region; // returns RS
 ...
 or
 var loc = new Locale(); // gets default browser locale
 ...
 One would pass Locale object around to properly format dates, numbers, or to
 sort.
 Thanks for looking into this.
 On Thu, Oct 28, 2010 at 4:22 AM, Anton Muhin ant...@chromium.org wrote:

 Good day, Nebojša.

 Overall I am with Adam, that if it's ECMAScript feature it should go
 in VM itself (JavaScriptCore or v8).  However, as a prototype hacking
 bindings might be easier.

 On Thu, Oct 28, 2010 at 4:35 AM, Nebojša Ćirić c...@chromium.org wrote:

  2. What is a proper way to specify a constructor? I've browsed the code
  and
  it seems nobody uses constructors, or they specify custom ones. I would
  like
  to be able to do:
  var loc = new Locale();
  or
  var loc = new Locale(en);
  Specifying interface [Constructor, Constructor(in DOMString locale)]
  JSLocale doesn't work (script errors). This should work according to the
  WebIDL spec.

 What exactly you're trying to achieve here?  Speaking of v8 you might
 either describe all the properties and methods your instances would
 have (v8 supports class-like inheritance model) or set your own custom
 constructor which would do whatever you want with your instance.

  3. I would like some of my functions to be static and some prototypes.
  WebIDL says that prototype is default for methods. I've heard we added
  support for static methods recently.

 How do you want your static function look in JS?

  4. How would one decide what parameter goes into static
  PassRefJSLocale
  create() method? Some put Frame* some put ScriptContent and other random
  parameters - and this doesn't seem to be idl related.

 Are you talking of JSC or v8 bindings here?

 yours,
 anton.



 --
 Nebojša Ćirić

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Mac OS X build break after system update

2010-10-28 Thread Darin Adler
On Oct 27, 2010, at 10:11 PM, Eric Seidel wrote:

 Can we just include the headers in WebKit?

I don’t think so.

 Or find some way to auto-download them?

Seems unlikely, since downloading them from Apple requires logging in to the 
developer website.

 Or certainly requiring an update to http://webkit.org/building/tools.html.

Yes, this is definitely required. Any volunteers do to it?

I ran into this same problem and it was annoying!

-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Mac OS X build break after system update

2010-10-28 Thread Alexey Proskuryakov

28.10.2010, в 12:29, Darin Adler написал(а):

 Or certainly requiring an update to http://webkit.org/building/tools.html.
 
 Yes, this is definitely required. Any volunteers do to it?

There is a potentially abandoned patch in 
https://bugs.webkit.org/show_bug.cgi?id=48423.

- WBR, Alexey Proskuryakov

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] trouble installing tools

2010-10-28 Thread software visualization
Hi,
I am trying to go through the process of installing the tools needed to look
at webkit, as detailed here:

http://webkit.org/building/tools.html

I am building on XP64. I don't own Visual Studio 2005 so I am going to use
Express 2005.

In part 2 of the instructions the following appears:

In addition to the paths specified in step 3 of the Platform SDK
installation instructions, you must also add the following include path.
Update the Visual C++ directories in the Projects and Solutions section in
the Options dialog box:

C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\Include\mfc



My issue is, no such path 9or similar) exists on my machine, that is

*C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\Include\mfc *

does not exist and

*C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
*

does not exist and

*C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\*

does not exist and

*C:\Program Files\ *any similarly named  or likely path involving Microsoft
anything*  \ Include*


When I actually use the* tools- options - VC++ directories -- new
entry *file
system navigation widget to inspect my file system, it's pretty clear that
beyond *C:\Program Files  *, I have no way to credibly complete the
specified path except to create the entire thing.

Am I wrong to assume that the path ought to already exist on my machine and
I'm just including it in the include directories?


TIA
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] trouble installing tools

2010-10-28 Thread Adam Roben
On Oct 28, 2010, at 4:16 PM, software visualization wrote:

 My issue is, no such path 9or similar) exists on my machine, that is 
 
 C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc
 
 does not exist and 
 
 C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include 
 
 does not exist and   
 
 C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\
 
 does not exist and 
 
 C:\Program Files\ *any similarly named  or likely path involving Microsoft 
 anything*  \ Include
 
 
 

Have you tried looking in C:\Program Files (x86) instead?

If that works we should consider updating the website.

-Adam

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Mac OS X build break after system update

2010-10-28 Thread Eric Seidel
I'll just write a clean-room implementation of the headers.  I've
never seen them, nor do I ever wish to.  But if my compile breaks when
I update, I'll cobble together the necessary declarations in a new .h
file and stick it somewhere in WebKit.  It will be just like the old
KWQ days! :)

-eric

On Thu, Oct 28, 2010 at 12:43 PM, Alexey Proskuryakov a...@webkit.org wrote:

 28.10.2010, в 12:29, Darin Adler написал(а):

 Or certainly requiring an update to http://webkit.org/building/tools.html.

 Yes, this is definitely required. Any volunteers do to it?

 There is a potentially abandoned patch in 
 https://bugs.webkit.org/show_bug.cgi?id=48423.

 - WBR, Alexey Proskuryakov


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev