Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Maciej Stachowiak
On Jun 22, 2009, at 10:07 PM, Adam Barth wrote: On Mon, Jun 22, 2009 at 9:58 PM, Peter Kastingpkast...@google.com wrote: On Mon, Jun 22, 2009 at 9:53 PM, Adam Barth aba...@webkit.org wrote: On Mon, Jun 22, 2009 at 7:04 PM, Maciej Stachowiakm...@apple.com wrote: Your proposed alternative

[webkit-dev] knowing filesize without downloding ... possible ?

2009-06-23 Thread Purushottam Sholapur
Hi all, Is there any way in QT to know file size before downloading the actual file.(by just URL) ? If I use wget on console, it first prints file size before it starts downloading. I am using all QNetwork* classes for download. regards Purush ___

Re: [webkit-dev] knowing filesize without downloding ... possible ?

2009-06-23 Thread Zoltan Horvath
Purushottam Sholapur wrote at: 2009. 06. 23. 08.32.: Hi all, Is there any way in QT to know file size before downloading the actual file.(by just URL) ? If I use wget on console, it first prints file size before it starts downloading. I am using all QNetwork* classes for download. regards

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
On Mon, Jun 22, 2009 at 11:07 PM, Maciej Stachowiakm...@apple.com wrote: I suspect most JS bindings in WebKit use the original more complicated pattern Drew cited, instead of the more succinct but incorrect one. There are some bugs on file about this. I've been meaning to go through and look

Re: [webkit-dev] Javascript window.open()

2009-06-23 Thread KwangYul Seo
Hi, Look at the allowPopUp() function in bindings/js/JSDOMWindowBase.cpp You can disable window.open() in settings. Check the Settings::setJavaScriptCanOpenWindowsAutomatically. If you are using QT, you can do it with QWebSettings. Regards, Kwang Yul Seo On Thu, Jun 18, 2009 at 1:45 AM,

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Maciej Stachowiak
On Jun 22, 2009, at 11:58 PM, Adam Barth wrote: That's possible. I don't have a good idea of what it costs to provide. The benefit is it makes it easier to write correct bindings code. (Or maybe it makes it harder because you have more contexts to choose from and choosing the right context

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Darin Adler
On Jun 23, 2009, at 10:41 AM, Maciej Stachowiak wrote: On Jun 22, 2009, at 11:58 PM, Adam Barth wrote: I don't really know how to solve this problem except by writing tests. However, tests don't really help when introducing new kinds of objects (e.g., workers, database transactions).

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
On Tue, Jun 23, 2009 at 10:41 AM, Maciej Stachowiakm...@apple.com wrote: On Jun 22, 2009, at 11:58 PM, Adam Barth wrote: It would be great to make it easier to write DOM constructors correctly. Perhaps documenting the pattern and/or introducing a common base class will work. A common base

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
On Tue, Jun 23, 2009 at 10:44 AM, Darin Adlerda...@apple.com wrote: Perhaps it's possible to write a test that both checks which global object is used for every constructor, and checks that the test covers all constructors at the same time. Maybe there is a practical way to iterate the

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Darin Adler
On Jun 23, 2009, at 11:50 AM, Adam Barth wrote: Is there a good way to tell if something is a constructor versus a function? Leading capital letter may be a good rule to start with. I don't think we have plans to add functions that start with a capital letter or constructors that do not.

Re: [webkit-dev] how do i know that i'm clicking on a flash movie?

2009-06-23 Thread Shi Yan
hi guys, i want to make a correction on my previous message. i've just tried another online video site, it turned out that the webview does respond to flash click. but youtube is different. and i guess i should not post the message here, it seems to be a QT question. On Tue, Jun 23, 2009 at 1:24

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Drew Wilson
On Tue, Jun 23, 2009 at 11:49 AM, Adam Barth aba...@webkit.org wrote: I am not even sure all of these should have the same behavior, however. For instance, as I read the Web Workers spec, the lexical global object may be correct thing to use for the Worker constructor. I looked at the

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Drew Wilson
Following up after an IRC chat with Ian - for Workers it is his intention to always grab the context from the currently executing script, not from the window the constructor originated from. So for Workers, using the more succinct implementation is actually correct - in his words all Worker

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
2009/6/23 Drew Wilson atwil...@google.com: On Tue, Jun 23, 2009 at 11:49 AM, Adam Barth aba...@webkit.org wrote: I am not even sure all of these should have the same behavior, however. For instance, as I read the Web Workers spec, the lexical global object may be correct thing to use for

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Drew Wilson
Not sure. There's language in the WebIDL spec around prototype objects of interface objects, but I'm not sure how window.Worker.prototype is intended to relate to new Worker().prototype (if at all), based on my 10 minutes of scanning specs. -atw On Tue, Jun 23, 2009 at 3:26 PM, Adam Barth

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Drew Wilson
BTW, Adam - can you elaborate your specific concerns? On Tue, Jun 23, 2009 at 3:37 PM, Drew Wilson atwil...@google.com wrote: Not sure. There's language in the WebIDL spec around prototype objects of interface objects, but I'm not sure how window.Worker.prototype is intended to relate to new

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Maciej Stachowiak
On Jun 23, 2009, at 3:37 PM, Drew Wilson wrote: Not sure. There's language in the WebIDL spec around prototype objects of interface objects, but I'm not sure how window.Worker.prototype is intended to relate to new Worker().prototype (if at all), based on my 10 minutes of scanning

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
I don't mean to pick on workers specifically. We have lots of bugs in the bindings where we attach the __proto__ property of new objects to the wrong prototype chain. My specific concern is that we should fix these bugs. :) Adam On Tue, Jun 23, 2009 at 3:38 PM, Drew Wilsonatwil...@google.com

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Maciej Stachowiak
On Jun 23, 2009, at 3:44 PM, Adam Barth wrote: I don't mean to pick on workers specifically. We have lots of bugs in the bindings where we attach the __proto__ property of new objects to the wrong prototype chain. My specific concern is that we should fix these bugs. :) Tentatively

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Maciej Stachowiak
On Jun 23, 2009, at 4:08 PM, Drew Wilson wrote: Oh, certainly - I just started looking at the Worker constructor code, so I definitely have no sense of ownership there, so pick away. I was just trying to understand the issues well enough to understand what the Worker code is doing before

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Drew Wilson
On Tue, Jun 23, 2009 at 4:53 PM, Maciej Stachowiak m...@apple.com wrote: The code above means that Worker.prototype is set at the time the Worker constructor itself is created, which is good. In the line you bolded, a fresh prototype object is created, and under the covers it will get

Re: [webkit-dev] Question about Constructors in WebKit JS Bindings

2009-06-23 Thread Adam Barth
[+sam] On Tue, Jun 23, 2009 at 5:11 PM, Drew Wilsonatwil...@google.com wrote: On Tue, Jun 23, 2009 at 4:53 PM, Maciej Stachowiak m...@apple.com wrote: Also, there might be a subtle bug in the above code: what if window.Worker is first accessed from a different frame? Then the prototype of the

[webkit-dev] New WebKit port to Haiku

2009-06-23 Thread Ryan Leavengood
Hello all, As part of the Google Summer of Code I am mentoring a student named Maxime Simon, who is resurrecting and continuing my port of WebKit to the Haiku operating system (http://haiku-os.org). I originally did this port in 2007, but stopped working on it until now. Obviously I never had it

Re: [webkit-dev] Should we restrict Web Fonts to same-origin by default?

2009-06-23 Thread Darin Fisher
On Mon, Jun 22, 2009 at 1:26 PM, Ojan Vafai o...@chromium.org wrote: On Mon, Jun 22, 2009 at 12:45 PM, David Hyatt hy...@apple.com wrote: On Jun 22, 2009, at 2:38 PM, Maciej Stachowiak wrote: Mozilla restricts downloaded fonts to same-origin by default, with the ability for the hosting site

Re: [webkit-dev] Should we restrict Web Fonts to same-origin by default?

2009-06-23 Thread Maciej Stachowiak
On Jun 23, 2009, at 8:47 PM, Darin Fisher wrote: On Mon, Jun 22, 2009 at 1:26 PM, Ojan Vafai o...@chromium.org wrote: On Mon, Jun 22, 2009 at 12:45 PM, David Hyatt hy...@apple.com wrote: On Jun 22, 2009, at 2:38 PM, Maciej Stachowiak wrote: Mozilla restricts downloaded fonts to same-origin by

Re: [webkit-dev] JavaScriptCore in Windows Applications

2009-06-23 Thread Brent Fulgham
Hi Eric, Let me try to answer your last few questions in order. Unfortunately, I'm on vacation this week and don't have my Windows machine available, otherwise I would have tried to get you the DLLs you asked for. 1. You *should* be able to mix/match the CFLite.lib and DLL from the