[webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li

Hi, All,

The current webkit database/storage is implemented with creating new 
threads. But not all platform/products support mulple-threading. Also, 
threading can be expensive on some platforms. Except this database/storage 
implementation, WEBKIT platform-crossing code can build and run in a single 
thread. WEBKIT generally uses WebCore::Timer To avoid blocking UI. Another 
way to avoid blocking UI is to create a separate thread for UI, and WEBKIT 
code can still run in a single-thread. Now it's broken by database/storage 
code, which forces to use multiple threads for WEBKIT. In our WINCE port, we 
have implemented a single-threaded solution with WebCore::Timer. The patch 
has been post to https://bugs.webkit.org/show_bug.cgi?id=28019 . The patch 
is a bit out-of-date, due to changes in upstream. New patch will come soon. 
Please give some comments if you're interested.


There's a macro ENABLE_JSC_MULTIPLE_THREADS used in JSC. Probably there 
should also be a macro ENABLE_WEBCORE_MULTIPLE_THREADS. Or just use 
ENABLE_MULTIPLE_THREADS for all multi-threading code.


Best regards to everyone,

Yong Li 


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


[webkit-dev] JSC Suggestion: Class property locking

2009-08-18 Thread Brian Barnes
Another quick suggestion, and this is obviously just another convenience 
method (I'm sure I could handle this by overriding):  It'd be nice to be 
able to lock a class (it could be a flag on the definition) to make 
adding properties (outside the static variable and function list) illegal.


For instance, I have a problem with my users misspelling a property, 
then not understanding why nothing happens.  In this case, they'd get an 
error.


Basically, if you can't find a setter in my static lists, then toss an 
error.


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


Re: [webkit-dev] JSC Suggestion: Class property locking

2009-08-18 Thread Oliver Hunt
EcmaScript 5 defines a number of functions (freeze, seal,  
preventExtensions) that basically do this -- we just haven't yet  
implemented these.


But you can provide custom get and put functions which you could just  
make throw on unrecognised property names.


--Oliver

On Aug 18, 2009, at 12:21 PM, Brian Barnes wrote:

Another quick suggestion, and this is obviously just another  
convenience method (I'm sure I could handle this by overriding):   
It'd be nice to be able to lock a class (it could be a flag on the  
definition) to make adding properties (outside the static variable  
and function list) illegal.


For instance, I have a problem with my users misspelling a property,  
then not understanding why nothing happens.  In this case, they'd  
get an error.


Basically, if you can't find a setter in my static lists, then toss  
an error.


[] Brian
___
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] JSC Suggestion: Class property locking

2009-08-18 Thread Brian Barnes
Thanks, I'll just wait until you guys implement this, because right now 
I have the shortest path (i.e., all static properties and functions on 
the class) and adding a getter/setter would be more time in my code.


[] Brian

Oliver Hunt wrote:
EcmaScript 5 defines a number of functions (freeze, seal, 
preventExtensions) that basically do this -- we just haven't yet 
implemented these.


But you can provide custom get and put functions which you could just 
make throw on unrecognised property names.


--Oliver

On Aug 18, 2009, at 12:21 PM, Brian Barnes wrote:

Another quick suggestion, and this is obviously just another 
convenience method (I'm sure I could handle this by overriding):  
It'd be nice to be able to lock a class (it could be a flag on the 
definition) to make adding properties (outside the static variable 
and function list) illegal.


For instance, I have a problem with my users misspelling a property, 
then not understanding why nothing happens.  In this case, they'd get 
an error.


Basically, if you can't find a setter in my static lists, then toss 
an error.


[] Brian
___
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] Single-threaded database/storage solution

2009-08-18 Thread George Staikos


On 18-Aug-09, at 1:44 PM, Yong Li wrote:


Hi, All,

The current webkit database/storage is implemented with creating  
new threads. But not all platform/products support mulple- 
threading. Also, threading can be expensive on some platforms.  
Except this database/storage implementation, WEBKIT platform- 
crossing code can build and run in a single thread. WEBKIT  
generally uses WebCore::Timer To avoid blocking UI. Another way to  
avoid blocking UI is to create a separate thread for UI, and WEBKIT  
code can still run in a single-thread. Now it's broken by database/ 
storage code, which forces to use multiple threads for WEBKIT. In  
our WINCE port, we have implemented a single-threaded solution with  
WebCore::Timer. The patch has been post to https://bugs.webkit.org/ 
show_bug.cgi?id=28019 . The patch is a bit out-of-date, due to  
changes in upstream. New patch will come soon. Please give some  
comments if you're interested.


There's a macro ENABLE_JSC_MULTIPLE_THREADS used in JSC. Probably  
there should also be a macro ENABLE_WEBCORE_MULTIPLE_THREADS. Or  
just use ENABLE_MULTIPLE_THREADS for all multi-threading code.


  I agree with that and I think a cleanup of the patch would make it  
a good addition.  Forcing the use of threads here is not ideal.


--
George Staikos
Torch Mobile Inc.
http://www.torchmobile.com/

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


Re: [webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread laszlo.1.gombos
Hi All,

QtWebKit has a build time flag called ENABLE_SINGLE_THREADED to turn off 
ENABLE_JSC_MULTIPLE_THREADS and WebCore features that create additional 
threads. I'm interested to make this feature available for QtWebKit (and maybe 
other ports) as well, not just to the WINCE port. See 
http://trac.webkit.org/changeset/44411.

Regards,
  Laszlo


-Original Message-
From: webkit-dev-boun...@lists.webkit.org 
[mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of ext 
George Staikos
Sent: Tuesday, August 18, 2009 10:36 PM
To: WebKit Development
Subject: Re: [webkit-dev] Single-threaded database/storage solution


On 18-Aug-09, at 1:44 PM, Yong Li wrote:

 Hi, All,

 The current webkit database/storage is implemented with creating new 
 threads. But not all platform/products support mulple- threading. 
 Also, threading can be expensive on some platforms.
 Except this database/storage implementation, WEBKIT platform- 
crossing 
 code can build and run in a single thread. WEBKIT generally uses 
 WebCore::Timer To avoid blocking UI. Another way to avoid blocking UI 
 is to create a separate thread for UI, and WEBKIT code can still run 
 in a single-thread. Now it's broken by database/ storage code, which 
 forces to use multiple threads for WEBKIT. In our WINCE port, we have 
 implemented a single-threaded solution with WebCore::Timer. The patch 
 has been post to https://bugs.webkit.org/
 show_bug.cgi?id=28019 . The patch is a bit out-of-date, due 
to changes 
 in upstream. New patch will come soon. Please give some comments if 
 you're interested.

 There's a macro ENABLE_JSC_MULTIPLE_THREADS used in JSC. Probably 
 there should also be a macro ENABLE_WEBCORE_MULTIPLE_THREADS. Or just 
 use ENABLE_MULTIPLE_THREADS for all multi-threading code.

   I agree with that and I think a cleanup of the patch would 
make it a good addition.  Forcing the use of threads here is not ideal.

--
George Staikos
Torch Mobile Inc.
http://www.torchmobile.com/

___
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] Single-threaded database/storage solution

2009-08-18 Thread Yong Li

Hi, Laszlo,

Do you think our single-threaded storage(database) solution can be helpful 
to you? If so, I'm going to change the switch from PLATFORM(WINCE) to 
ENABLE(SINGLE_THREADED) or something like that.


-Yong

- Original Message - 
From: laszlo.1.gom...@nokia.com

To: stai...@kde.org; webkit-dev@lists.webkit.org
Sent: Tuesday, August 18, 2009 3:57 PM
Subject: Re: [webkit-dev] Single-threaded database/storage solution



Hi All,

QtWebKit has a build time flag called ENABLE_SINGLE_THREADED to turn off 
ENABLE_JSC_MULTIPLE_THREADS and WebCore features that create additional 
threads. I'm interested to make this feature available for QtWebKit (and 
maybe other ports) as well, not just to the WINCE port. See 
http://trac.webkit.org/changeset/44411.


Regards,
 Laszlo


-Original Message-
From: webkit-dev-boun...@lists.webkit.org
[mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of ext
George Staikos
Sent: Tuesday, August 18, 2009 10:36 PM
To: WebKit Development
Subject: Re: [webkit-dev] Single-threaded database/storage solution


On 18-Aug-09, at 1:44 PM, Yong Li wrote:


Hi, All,

The current webkit database/storage is implemented with creating new
threads. But not all platform/products support mulple- threading.
Also, threading can be expensive on some platforms.
Except this database/storage implementation, WEBKIT platform-

crossing

code can build and run in a single thread. WEBKIT generally uses
WebCore::Timer To avoid blocking UI. Another way to avoid blocking UI
is to create a separate thread for UI, and WEBKIT code can still run
in a single-thread. Now it's broken by database/ storage code, which
forces to use multiple threads for WEBKIT. In our WINCE port, we have
implemented a single-threaded solution with WebCore::Timer. The patch
has been post to https://bugs.webkit.org/
show_bug.cgi?id=28019 . The patch is a bit out-of-date, due

to changes

in upstream. New patch will come soon. Please give some comments if
you're interested.

There's a macro ENABLE_JSC_MULTIPLE_THREADS used in JSC. Probably
there should also be a macro ENABLE_WEBCORE_MULTIPLE_THREADS. Or just
use ENABLE_MULTIPLE_THREADS for all multi-threading code.


  I agree with that and I think a cleanup of the patch would
make it a good addition.  Forcing the use of threads here is not ideal.

--
George Staikos
Torch Mobile Inc.
http://www.torchmobile.com/

___
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



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


Re: [webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li
It has been broken for many times :) 

If you guys change it very much or very often, probably it's good to create 
another StorageAreaSync.cpp in storage\single-threaded as you suggested.

-Yong
  - Original Message - 
  From: Jeremy Orlow 
  To: Yong Li 
  Cc: laszlo.1.gom...@nokia.com ; stai...@kde.org ; webkit-dev@lists.webkit.org 
  Sent: Tuesday, August 18, 2009 4:39 PM
  Subject: Re: [webkit-dev] Single-threaded database/storage solution


  On Tue, Aug 18, 2009 at 1:02 PM, Yong Li yong...@torchmobile.com wrote:

Hi, Laszlo,

Do you think our single-threaded storage(database) solution can be helpful 
to you? If so, I'm going to change the switch from PLATFORM(WINCE) to 
ENABLE(SINGLE_THREADED) or something like that.


  I think this would be good.


  Btw, is there any intention to set up a WINCE or single threaded QT build bot 
any time soon?  Otherwise I'm concerned that some of us working in storage are 
going to inadvertently break this stuff and have no idea that it happened.


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


Re: [webkit-dev] [webkit-changes] [47447] trunk

2009-08-18 Thread Adam Roben

On Aug 18, 2009, at 3:53 PM, bweinst...@apple.com wrote:

Modified: trunk/WebKitTools/DumpRenderTree/win/UIDelegate.cpp (47446  
= 47447)


--- trunk/WebKitTools/DumpRenderTree/win/UIDelegate.cpp	2009-08-18  
19:53:27 UTC (rev 47446)
+++ trunk/WebKitTools/DumpRenderTree/win/UIDelegate.cpp	2009-08-18  
19:53:31 UTC (rev 47447)

@@ -43,6 +43,8 @@
 #include WebKit/WebKit.h
 #include stdio.h

+#include atlbase.h
+
 using std::wstring;

 class DRTUndoObject {
@@ -563,6 +565,17 @@
 /* [in] */ IWebSecurityOrigin *origin,
 /* [in] */ BSTR databaseIdentifier)
 {
+CComBSTR protocol;
+CComBSTR host;
+unsigned short port;
+
+origin-protocol(protocol);
+origin-host(host);
+origin-port(port);
+
+if (!done  gLayoutTestController-dumpDatabaseCallbacks())
+printf(UI DELEGATE DATABASE CALLBACK:  
exceededDatabaseQuotaForSecurityOrigin:{%S, %S, %i} database:%S\n,  
protocol, host, port, databaseIdentifier);

+




We avoid ATL in WebKit/DRT code because ATL is not included with VC++  
Express. Presumably this patch has broken the VC++ Express build.


-Adam

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


Re: [webkit-dev] [webkit-changes] [47447] trunk

2009-08-18 Thread Brian Weinstein


On Aug 18, 2009, at 3:12 PM, Adam Roben wrote:


We avoid ATL in WebKit/DRT code because ATL is not included with VC+ 
+ Express. Presumably this patch has broken the VC++ Express build.


-Adam



Should I just use standard BSTR's there? rs=you to make the change if  
that's what is needed?


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


[webkit-dev] About events in WebCore

2009-08-18 Thread Michelangelo De Simone
Hi,

I've been working to add support for the checkValidity() method on
(#27452); in order to complete that check I need to understand whether
or not a specific event (invalid), previously fired from an element,
has been canceled.

Now, is there any generic/trivial way to accompish such checks? I
don't like the idea to reinvent the wheel if there already is
something.:)

Thank you.
-- 
Bye,
Michelangelo
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] About events in WebCore

2009-08-18 Thread Maciej Stachowiak


On Aug 18, 2009, at 5:46 PM, Michelangelo De Simone wrote:


Hi,

I've been working to add support for the checkValidity() method on
(#27452); in order to complete that check I need to understand whether
or not a specific event (invalid), previously fired from an element,
has been canceled.

Now, is there any generic/trivial way to accompish such checks? I
don't like the idea to reinvent the wheel if there already is
something.:)


If by canceled you mean preventDefault has been called on the event,  
then you can tell by the return value from dispatchEvent().  
dispatchEvent will return false if any of the event listeners called  
preventDefault() on the event in the course of dispatch.


Regards,
Maciej

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


Re: [webkit-dev] About events in WebCore

2009-08-18 Thread Michelangelo De Simone
 If by canceled you mean preventDefault has been called on the event, then
 you can tell by the return value from dispatchEvent(). dispatchEvent will
 return false if any of the event listeners called preventDefault() on the
 event in the course of dispatch.

That's exactly what I was looking for. Thank you.

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