Re: [webkit-dev] SharedWorkers alternate design
On Tue, May 26, 2009 at 9:40 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 6:11 PM, Jeremy Orlow wrote: Did you say partly because it's more complicated than just splitting one class (and only having 1-way sync communication)? If so, then we're still on the same page, because that's what I'll be doing as well. I was just using the StorageBackend as an example, but events will require signals from the backend to the frontend, and some abstractions (like StorageArea) make a lot of sense whether or not things are split into two pieces, which sounds a lot like what you described with ResourceHandle. As a side note - I think it would be cool if we used more specific names than Backend and Frontened in the actual code, since which end is front and back is not always obvious nor always agreed upon by all observers. I like Proxy and Impl ok as name pairs, not sure if that's the same relationship you have in mind. I somewhat disagree regarding the terms frontend and backend being confusing. It seems to me that the backend is always further away from the user than the frontend. Same thing with client and server. That said, I've definitely heard complaints about terms like this before (on other projects), so I'm not married to the terms. The names I was planning to use were outlined in a design doc I sent to this list (http://docs.google.com/View?id=dhs4g97m_8cwths74m). Basically, I was planning to the term Backend, but the rest of the names are more descriptive. If you have another suggestion for Backend, I'd be happy to change it. I would have already, but the only other idea I had was server, and I think people find that term even more confusing. StorageRepository might be an ok name. As for Impl and Proxy, they are actually somewhat orthogonal to the frontend and backend. For example, if a script calls window.localStorage.setItem(foo, bar), the frontend in the render process will access the backend proxy which will send the message to the browser process where the backend implementation lives. The backend implementation will then access the EventManagerProxy which will distribute the events to the EventManagerImpl in all the render processes. In other words, Proxies are necessary anywhere messages originate. Jeremy ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] SharedWorkers alternate design
On Tue, May 26, 2009 at 9:42 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 7:00 PM, John Abd-El-Malek wrote: This will work fine for appcache and localstorage, but isn't sufficient for workers since the same caller gets different objects depending on which process this is running in. This doesn't happen for appcache and localstorage. It's fine to use virtual methods when you actually need runtime polymorphism at the same call site. The point is not to tie yourself in a knot if there really is true polymorphism, just to avoid paying runtime penalties for anything that can actually be a compile-time decision. If it can't be, then so be it. Sounds good. I was a bit worried that we were needlessly adding a lot of complexity to the code, but you're definitely right that slow performance can be a death by a thousand cuts type thing. I'll give it a shot for DOM Storage, but it sounds like workers will need to still use polymorphism. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] SharedWorkers alternate design
On May 27, 2009, at 12:00 AM, Jeremy Orlow wrote: On Tue, May 26, 2009 at 9:40 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 6:11 PM, Jeremy Orlow wrote: Did you say partly because it's more complicated than just splitting one class (and only having 1-way sync communication)? If so, then we're still on the same page, because that's what I'll be doing as well. I was just using the StorageBackend as an example, but events will require signals from the backend to the frontend, and some abstractions (like StorageArea) make a lot of sense whether or not things are split into two pieces, which sounds a lot like what you described with ResourceHandle. As a side note - I think it would be cool if we used more specific names than Backend and Frontened in the actual code, since which end is front and back is not always obvious nor always agreed upon by all observers. I like Proxy and Impl ok as name pairs, not sure if that's the same relationship you have in mind. I somewhat disagree regarding the terms frontend and backend being confusing. It seems to me that the backend is always further away from the user than the frontend. An example of why I think these terms can be confusing: Which part of the style system would you guess is traditionally described as the back end? Hint: it's not the part further from the user. I'm glad we call it RenderStyle instead of StyleBackEnd in the code. Same thing with client and server. That said, I've definitely heard complaints about terms like this before (on other projects), so I'm not married to the terms. The names I was planning to use were outlined in a design doc I sent to this list (http://docs.google.com/View?id=dhs4g97m_8cwths74m). Basically, I was planning to the term Backend, but the rest of the names are more descriptive. If you have another suggestion for Backend, I'd be happy to change it. I would have already, but the only other idea I had was server, and I think people find that term even more confusing. StorageRepository might be an ok name. Something like StorageRepository or StorageDataStore (despite the repetition) might be good. I haven't thought deeply about specific uses of back end, but it's definitely something I am allergic to in general, as stated above. As for Impl and Proxy, they are actually somewhat orthogonal to the frontend and backend. For example, if a script calls window.localStorage.setItem(foo, bar), the frontend in the render process will access the backend proxy which will send the message to the browser process where the backend implementation lives. The backend implementation will then access the EventManagerProxy which will distribute the events to the EventManagerImpl in all the render processes. In other words, Proxies are necessary anywhere messages originate. Thanks for clarifying. Regards, Maciej P.S. I hope all this design input isn't being too fussy. Working on a big project like WebKit is a constant battle against entropy, and we try hard to find good patterns and spread them as a counter. But I don't mean to make a huge deal out of this naming detail. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Local Storage naming (WAS Re: SharedWorkers alternate design)
On Wed, May 27, 2009 at 12:13 AM, Maciej Stachowiak m...@apple.com wrote: On May 27, 2009, at 12:00 AM, Jeremy Orlow wrote: On Tue, May 26, 2009 at 9:40 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 6:11 PM, Jeremy Orlow wrote: Did you say partly because it's more complicated than just splitting one class (and only having 1-way sync communication)? If so, then we're still on the same page, because that's what I'll be doing as well. I was just using the StorageBackend as an example, but events will require signals from the backend to the frontend, and some abstractions (like StorageArea) make a lot of sense whether or not things are split into two pieces, which sounds a lot like what you described with ResourceHandle. As a side note - I think it would be cool if we used more specific names than Backend and Frontened in the actual code, since which end is front and back is not always obvious nor always agreed upon by all observers. I like Proxy and Impl ok as name pairs, not sure if that's the same relationship you have in mind. I somewhat disagree regarding the terms frontend and backend being confusing. It seems to me that the backend is always further away from the user than the frontend. An example of why I think these terms can be confusing: Which part of the style system would you guess is traditionally described as the back end? Hint: it's not the part further from the user. I'm glad we call it RenderStyle instead of StyleBackEnd in the code. :-) Point taken. Same thing with client and server. That said, I've definitely heard complaints about terms like this before (on other projects), so I'm not married to the terms. The names I was planning to use were outlined in a design doc I sent to this list (http://docs.google.com/View?id=dhs4g97m_8cwths74m). Basically, I was planning to the term Backend, but the rest of the names are more descriptive. If you have another suggestion for Backend, I'd be happy to change it. I would have already, but the only other idea I had was server, and I think people find that term even more confusing. StorageRepository might be an ok name. Something like StorageRepository or StorageDataStore (despite the repetition) might be good. I haven't thought deeply about specific uses of back end, but it's definitely something I am allergic to in general, as stated above. I'll try to come up with something better, but one of these should work if nothing else. As for Impl and Proxy, they are actually somewhat orthogonal to the frontend and backend. For example, if a script calls window.localStorage.setItem(foo, bar), the frontend in the render process will access the backend proxy which will send the message to the browser process where the backend implementation lives. The backend implementation will then access the EventManagerProxy which will distribute the events to the EventManagerImpl in all the render processes. In other words, Proxies are necessary anywhere messages originate. Thanks for clarifying. Regards, Maciej P.S. I hope all this design input isn't being too fussy. Working on a big project like WebKit is a constant battle against entropy, and we try hard to find good patterns and spread them as a counter. But I don't mean to make a huge deal out of this naming detail. Don't worry. I actually think naming is a pretty big deal since it makes a big difference in the readability of code and it's really hard to change a name in the future. J ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit Rendered Image
Hi, Can somebody please give me some pointers here. If you can point me to the part of source where the image/text get rendered that would help me work backwards atleast. Regards, webkitUser wrote: Hi, I have modified the WinLauncher application to dump what it has rendered. Basically I have plugged in the createBitmapContextFromWebView method from DumpRenderTree Sample, which is supposed to dump a png out of a WebView. However, I see that the resulting png just has a blank image and not the rendered contents. Is this expected? If yes, how can I get an image out of the Webkit rendered contents? Thanks in Advance, -- View this message in context: http://www.nabble.com/Webkit-Rendered-Image-tp23671148p23740216.html Sent from the Webkit mailing list archive at Nabble.com. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Hi, how can I know the whole architecture of webkit?
Hi, Am interested in understanding the painting part of it, which specific portion of the code should I look at? Thanks in advance, Holger Freyther-6 wrote: On Thursday 14 May 2009 12:05:29 JIN Wei wrote: Hi, guys: As a newbie to open source software , I wonder where can I find the docs of the architecture of webkit. And how can I get start? As hard it might sound. There is no architecture documentation available at this moment, the code is all we have. Regarding starting, the question is what do you want to learn? There are blog posts by Dave Hyatt on the surfin safari blog how the render tree is working, there is a video by Lars Knoll and George Staikos on Yahoo explaining the history and ideas of KHTML/WebKit. Do you have any specific interest? CSS? Layout? Painting? DOM? Networking? Editing? z. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev -- View this message in context: http://www.nabble.com/Hi%2C-how-can-I-know-the-whole-architecture-of-webkit--tp23537660p23740316.html Sent from the Webkit mailing list archive at Nabble.com. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Multithread issue
Hi everybody, I'm new to WebKit and I'm developing a C++ application that uses the WebKit browser. It runs on Fedora10, kernel 2.6.27.5-117.fc10.i686. The WebKit version I'm using is the r44111. Here is my problem : I'm creating a new web view in the main thread, say, thread A. The webview is then attached to a gtk_window as it's made in the GtkLauncher exemple. Then webkit_web_view_load_uri() is called, always in thread A. Finally, the gtk_main() function is called in another thread, say thread B. And it crashes with the following trace : ASSERTION FAILED: m_thread == currentThread() (WebCore/platform/Timer.cpp:206 bool WebCore::TimerBase::isActive() const) I experience this problem with the webkit r44111 and r43808, but not with r38297. I noticed that there must have been a modification in the thread management between the builds r38297 and r43808 since g_threads must be initialized. But I can't figure out why it doesn't work. Any suggestions or specific rules to follow about multi-threading, gtk and webkit ? Thank you for your help. -- matt ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] JSClassCreate JSObjectSetProperty question
Hi all, For ease here is the link to the API documentation http://developer.apple.com/documentation/Carbon/Reference/WebKit_JavaScriptCore_Ref/JSObjectRef/index.html I'm using JSObjectSetProperty. Here is the function signature: void JSObjectSetProperty( JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef *exception); I successfully have the execution context to use, the window JSObjectRef, property name, attributes and use NULL for exception (all these parameters make sense to me). However I'm unsure about the purpose of the parameter 'JSValueRef value'. Starting from the beginning I created a JSClassDefinition (note I was unable to use kJSClassDefinitionEmpty because of compile errors about a missing symbol '_kJSClassDefinitionEmpty') JSClassDefinition globalObjectClassDefinition = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; globalObjectClassDefinition.version = 1; char myword[] = {'f', 'o', 'o', '\0' }; globalObjectClassDefinition.className = myword; Question 1. What is the class name? The documentation describes it as A null-terminated UTF8 string containing the class's name.. However it does not mention what it's for, or what it represents within the program. Is anyone able to elaborate please? Does it represent a C class I've al;ready created, that I must describe by using the JSClassDefinition? Question 2. I am unclear as to the purpose of the JSClassDefinition. Does it represent a C class or a JavaScript class? Are the callbacks to C / C++ functions? Many thanks, Jack attempting to use JSClassCreate, the definition of which is here: -- Regards Jack ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Notifications API
Sam, I think you are right here. I'm convinced that applications should be specific about what permissions they are asking for. I also believe that from a UX standpoint, we will probably want to provide the user with a single dialog that enumerates the permissions being granted, although a given user-agent may want to do this differently. We certainly want to enable both models. So I'd like to propose an API like the following (cribbed from the Android permissions manifest): int getTrusted(permissionName) - returns 0 if the application is blocked/unsupported (user said no or user-agent does not support it), 1 if it is untrusted (no permissions grant yet), 2 if it is trusted void requestTrust(permissionArray, callback) This provides a couple of important things: 1) granularity, so an application can specify exactly what permissions it wants 2) flexibility for the user agent - the application asks for a block of permissions at once (for example, a given feature like background notifications may require two permissions: persistent workers and notifications). The user agent has the flexibility to decide whether to display this as one dialog enumerating permissions, two separate dialogs, a dialog which allows the user to pick and choose which permissions it wants to grant, etc. What do you think? -atw On Tue, May 26, 2009 at 9:49 PM, Sam Weinig sam.wei...@gmail.com wrote: On Tue, May 26, 2009 at 9:18 PM, David Levin le...@chromium.org wrote: On Tue, May 26, 2009 at 8:57 PM, Sam Weinig sam.wei...@gmail.com wrote: On Tue, May 26, 2009 at 5:04 PM, Drew Wilson atwil...@google.comwrote: On Tue, May 26, 2009 at 4:43 PM, Sam Weinig sam.wei...@gmail.comwrote: On Tue, May 26, 2009 at 4:20 PM, Drew Wilson atwil...@google.comwrote: To give the list some insight into the discussions we've had with the Chrome UX folks: 1) We want to associate some set of enhanced permissions with a given origin (e.g. https://mail.yahoo.com), and we want the user to be presented with a single do you want to grant permissions to https://mail.yahoo.com; dialog, rather peppering the user with a bunch of individual permission dialogs for each feature (Yes, please allow mail.yahoo.com to use 100MB of local storage, Yes, allow mail.yahoo.com to display notifications, Yes, allow mail.yahoo.comto run in the background). It seems like a bad idea to give all or nothing trust, and not along the lines of how APIs have managed choices in the past (quotas are increased when the limit is hit). I am not even sure how a UA would present such a choice to a user in a meaningful manner. I think a workflow such as the one quoted above by Maciej is a good direction, that gives a user a better chance of understanding the choice they are making. I thought that maciej suggested the same thing we suggested - an explicit javascript API to request permissions. In our case, we want to ask for permissions in bulk up front, rather than peppering the user with permissions on an ad-hoc basis - in your example (prompting for more quota when the quota is hit) will break things like background sync in persistent workers, as the user may not be around when that background sync occurs. It is similar, but I am concerned with how to present a dialog to a user that states that by clicking grant they are completely trusting you. 2) We want the timing of the permission grant UI to be under application control (as part of some kind of application user flow). So just visiting mail.yahoo.com would not suddenly popup an unexpected dialog - instead the application would have some UI along the lines of Turn on desktop notifications which would drive some app-specific UI flow, a part of which would involve the permission grant. Can you please elaborate on this, perhaps with a concrete example. One example of a similar flow is Gmail Offline feature, where the user clicks on a Offline link, which drives the user through some app-controlled UI, culminating in a Gears permission-grant dialog. Here's another example: Remember The Milk rolls out a new feature: desktop reminder notifications. This is implemented by having a persistent worker which tracks changes on the server, determines when it's appropriate to display a reminder for a task, and displays a desktop notification. When a user logs into Remember The Milk, he sees a link: New feature: desktop reminders!. He clicks on this link, and is taken to an HTML page in Remember The Milk which describes what the feature is and asks the user if he wants to turn on these reminders. The application invokes getTrusted() to see if the domain is already trusted - if it isn't, then the UI may include some language to prepare the user for the upcoming permission grant dialog by telling him what to expect. When the user clicks yes, turn on this feature, the application calls requestTrust() - this brings up the UserAgent-specific permission
[webkit-dev] How to dump SquirrelFish opcode and machine code
Hi, How to dump SquirrelFish opcode and machine code? Here is what I would like to do, for each JS file that WebCore passes to SquirrelFish, configure SquirrelFish to dump opcode and machine code. Thank you for any tips. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Duplicate page: Implementing Print Preview
Hi all, I'm working on Google Chrome and trying to come up with a way to implement print preview. To be able to display it in a separate tab we need to be able to duplicate the current page in memory so the user can continue to interact with the original page. Javacript, animations etc should continue on the original page but be frozen in the print preview version. What I've tried so far is to select everything on the page (Frame::selection()-SelectAll()) and Frame::GetSelection(true) but the HTML does not fully describe the page and this has the downside of modifying the users selection on the page. I've poked around in WebKit a bit and as far as I can tell the document, rendertree and the views are fairly integrated and not easy to take a snapshot of the full state of the document. I would appreciate any insights on this though since I might have missed something obvious. If nothing existing can be reused then adding this functionality should benefit all ports. But again I need your insights on how this can be done (if at all). Sverrir ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit Rendered Image
Try looking at source in WebCore/rendering/. Dave From: webkitUser psai...@yahoo.com To: webkit-dev@lists.webkit.org Sent: Wednesday, May 27, 2009 3:59:28 AM Subject: Re: [webkit-dev] Webkit Rendered Image Hi, Can somebody please give me some pointers here. If you can point me to the part of source where the image/text get rendered that would help me work backwards atleast. Regards, webkitUser wrote: Hi, I have modified the WinLauncher application to dump what it has rendered. Basically I have plugged in the createBitmapContextFromWebView method from DumpRenderTree Sample, which is supposed to dump a png out of a WebView. However, I see that the resulting png just has a blank image and not the rendered contents. Is this expected? If yes, how can I get an image out of the Webkit rendered contents? Thanks in Advance, -- View this message in context: http://www.nabble.com/Webkit-Rendered-Image-tp23671148p23740216.html Sent from the Webkit mailing list archive at Nabble.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] Duplicate page: Implementing Print Preview
Can you render the page to PDF and display the PDF? Maybe you could render the page into bitmaps if you aren't able to support PDF. dave (hy...@apple.com) On May 27, 2009, at 11:53 AM, Sverrir Á. Berg wrote: Hi all, I'm working on Google Chrome and trying to come up with a way to implement print preview. To be able to display it in a separate tab we need to be able to duplicate the current page in memory so the user can continue to interact with the original page. Javacript, animations etc should continue on the original page but be frozen in the print preview version. What I've tried so far is to select everything on the page (Frame::selection()-SelectAll()) and Frame::GetSelection(true) but the HTML does not fully describe the page and this has the downside of modifying the users selection on the page. I've poked around in WebKit a bit and as far as I can tell the document, rendertree and the views are fairly integrated and not easy to take a snapshot of the full state of the document. I would appreciate any insights on this though since I might have missed something obvious. If nothing existing can be reused then adding this functionality should benefit all ports. But again I need your insights on how this can be done (if at all). Sverrir ___ 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] Multithread issue
This assertion is telling you that the code expects to be running on the main thread. You're also probably running a debug build since assertions are disabled in release builds. Dave From: Matt Bockt bocktm...@gmail.com To: webkit-dev@lists.webkit.org Sent: Wednesday, May 27, 2009 5:17:44 AM Subject: [webkit-dev] Multithread issue Hi everybody, I'm new to WebKit and I'm developing a C++ application that uses the WebKit browser. It runs on Fedora10, kernel 2.6.27.5-117.fc10.i686. The WebKit version I'm using is the r44111. Here is my problem : I'm creating a new web view in the main thread, say, thread A. The webview is then attached to a gtk_window as it's made in the GtkLauncher exemple. Then webkit_web_view_load_uri() is called, always in thread A. Finally, the gtk_main() function is called in another thread, say thread B. And it crashes with the following trace : ASSERTION FAILED: m_thread == currentThread() (WebCore/platform/Timer.cpp:206 bool WebCore::TimerBase::isActive() const) I experience this problem with the webkit r44111 and r43808, but not with r38297. I noticed that there must have been a modification in the thread management between the builds r38297 and r43808 since g_threads must be initialized. But I can't figure out why it doesn't work. Any suggestions or specific rules to follow about multi-threading, gtk and webkit ? Thank you for your help. -- matt ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Duplicate page: Implementing Print Preview
Interesting idea. I see two downsides to that though. Firstly I think need some kind of PDF library since only Mac's have native support and when the user needs to change the layout of the page (margins, portrait/landscape) I would need to re-create the PDF again? Sverrir On Wed, May 27, 2009 at 1:03 PM, David Hyatt hy...@apple.com wrote: Can you render the page to PDF and display the PDF? Maybe you could render the page into bitmaps if you aren't able to support PDF. dave (hy...@apple.com) On May 27, 2009, at 11:53 AM, Sverrir Á. Berg wrote: Hi all, I'm working on Google Chrome and trying to come up with a way to implement print preview. To be able to display it in a separate tab we need to be able to duplicate the current page in memory so the user can continue to interact with the original page. Javacript, animations etc should continue on the original page but be frozen in the print preview version. What I've tried so far is to select everything on the page (Frame::selection()-SelectAll()) and Frame::GetSelection(true) but the HTML does not fully describe the page and this has the downside of modifying the users selection on the page. I've poked around in WebKit a bit and as far as I can tell the document, rendertree and the views are fairly integrated and not easy to take a snapshot of the full state of the document. I would appreciate any insights on this though since I might have missed something obvious. If nothing existing can be reused then adding this functionality should benefit all ports. But again I need your insights on how this can be done (if at all). Sverrir ___ 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] SharedWorkers alternate design
P.S. I hope all this design input isn't being too fussy. Working on a big project like WebKit is a constant battle against entropy, and we try hard to find good patterns and spread them as a counter. But I don't mean to make a huge deal out of this naming detail. Thanx for the input, very much appreciate the passing along of design sensibilities prevalent in the project. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How to dump SquirrelFish opcode and machine code
Hi, How to dump SquirrelFish opcode and machine code? Here is what I would like to do, for each JS file that WebCore passes to SquirrelFish, configure SquirrelFish to dump opcode and machine code. Thank you for any tips. I am not sure you can do SF byte code dump out of the box since SF opcode dump is only availible if you build your standalone JavaScriptCore in debug mode. In that case you just have to pass -d option to jsc. Fortunately, all neccessary helper functions can be found here: JavaScriptCore/bytecode/CodeBlock.cpp : CodeBlock::dump You only need to do some hand coding to make it available under WebCore, and perhaps dump the output into a file instead of the console. Machine code dump is not supported by JavaScriptCore. However, all machine code goes through this function: JavaScriptCore/assembler/AssemblerBuffer.h : AssemblerBuffer::executableCopy You can dump the raw x86 code here, and a disassembler can do the rest of the work. Zoltan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Notifications API
I would prefer we limit the scope to notifications, since this is an experimental feature at the moment. Perhaps something along the lines of window.notifications.requestTrust(), or window.notifications.requestUse() (I am not a huge fan of either of those function names, but you get the general idea). We can always revisit this if this type of explicit privilege escalation becomes something other apis need as well. -Sam On Wed, May 27, 2009 at 9:22 AM, Drew Wilson atwil...@google.com wrote: Sam, I think you are right here. I'm convinced that applications should be specific about what permissions they are asking for. I also believe that from a UX standpoint, we will probably want to provide the user with a single dialog that enumerates the permissions being granted, although a given user-agent may want to do this differently. We certainly want to enable both models. So I'd like to propose an API like the following (cribbed from the Android permissions manifest): int getTrusted(permissionName) - returns 0 if the application is blocked/unsupported (user said no or user-agent does not support it), 1 if it is untrusted (no permissions grant yet), 2 if it is trusted void requestTrust(permissionArray, callback) This provides a couple of important things: 1) granularity, so an application can specify exactly what permissions it wants 2) flexibility for the user agent - the application asks for a block of permissions at once (for example, a given feature like background notifications may require two permissions: persistent workers and notifications). The user agent has the flexibility to decide whether to display this as one dialog enumerating permissions, two separate dialogs, a dialog which allows the user to pick and choose which permissions it wants to grant, etc. What do you think? -atw On Tue, May 26, 2009 at 9:49 PM, Sam Weinig sam.wei...@gmail.com wrote: On Tue, May 26, 2009 at 9:18 PM, David Levin le...@chromium.org wrote: On Tue, May 26, 2009 at 8:57 PM, Sam Weinig sam.wei...@gmail.comwrote: On Tue, May 26, 2009 at 5:04 PM, Drew Wilson atwil...@google.comwrote: On Tue, May 26, 2009 at 4:43 PM, Sam Weinig sam.wei...@gmail.comwrote: On Tue, May 26, 2009 at 4:20 PM, Drew Wilson atwil...@google.comwrote: To give the list some insight into the discussions we've had with the Chrome UX folks: 1) We want to associate some set of enhanced permissions with a given origin (e.g. https://mail.yahoo.com), and we want the user to be presented with a single do you want to grant permissions to https://mail.yahoo.com; dialog, rather peppering the user with a bunch of individual permission dialogs for each feature (Yes, please allow mail.yahoo.com to use 100MB of local storage, Yes, allow mail.yahoo.com to display notifications, Yes, allow mail.yahoo.comto run in the background). It seems like a bad idea to give all or nothing trust, and not along the lines of how APIs have managed choices in the past (quotas are increased when the limit is hit). I am not even sure how a UA would present such a choice to a user in a meaningful manner. I think a workflow such as the one quoted above by Maciej is a good direction, that gives a user a better chance of understanding the choice they are making. I thought that maciej suggested the same thing we suggested - an explicit javascript API to request permissions. In our case, we want to ask for permissions in bulk up front, rather than peppering the user with permissions on an ad-hoc basis - in your example (prompting for more quota when the quota is hit) will break things like background sync in persistent workers, as the user may not be around when that background sync occurs. It is similar, but I am concerned with how to present a dialog to a user that states that by clicking grant they are completely trusting you. 2) We want the timing of the permission grant UI to be under application control (as part of some kind of application user flow). So just visiting mail.yahoo.com would not suddenly popup an unexpected dialog - instead the application would have some UI along the lines of Turn on desktop notifications which would drive some app-specific UI flow, a part of which would involve the permission grant. Can you please elaborate on this, perhaps with a concrete example. One example of a similar flow is Gmail Offline feature, where the user clicks on a Offline link, which drives the user through some app-controlled UI, culminating in a Gears permission-grant dialog. Here's another example: Remember The Milk rolls out a new feature: desktop reminder notifications. This is implemented by having a persistent worker which tracks changes on the server, determines when it's appropriate to display a reminder for a task, and displays a desktop notification. When a user logs into Remember The Milk, he sees a link: New feature: desktop reminders!. He
[webkit-dev] Sharing code between WebCore/bindings/js and WebCore/bindings/v8
I've been doing some work recently in our JavaScript bindings. As part of this work, I've noticed that WebCore/bindings/js and WebCore/bindings/v8 have drifted apart in some details. It's kind of ridiculous that we have so much duplicated code in these two folders. We should try to re-organize our bindings to share as much code as possible. 1) Where should the common code live? One option is to have: WebCore/bindings/js --- common code WebCore/bindings/jsc --- JSC specific WebCore/bindings/v8 --- V8 specific 2) How much should we try to share? For example, we could have an abstracted notion of ArgList that works for both engines, or we could be happy to factor out common routines like createWindow http://trac.webkit.org/browser/trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp#L285. I presume Sam is a good contact for the JSC bindings. Who's a good contact for the V8 bindings? Thanks, Adam ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Sharing code between WebCore/bindings/js and WebCore/bindings/v8
On Wed, May 27, 2009 at 11:47 AM, Adam Barth aba...@webkit.org wrote: I've been doing some work recently in our JavaScript bindings. As part of this work, I've noticed that WebCore/bindings/js and WebCore/bindings/v8 have drifted apart in some details. It's kind of ridiculous that we have so much duplicated code in these two folders. We should try to re-organize our bindings to share as much code as possible. 1) Where should the common code live? One option is to have: WebCore/bindings/js --- common code WebCore/bindings/jsc --- JSC specific WebCore/bindings/v8 --- V8 specific 2) How much should we try to share? For example, we could have an abstracted notion of ArgList that works for both engines, or we could be happy to factor out common routines like createWindow http://trac.webkit.org/browser/trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp#L285 . I presume Sam is a good contact for the JSC bindings. Who's a good contact for the V8 bindings? dglazkov Thanks, Adam ___ 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] Notifications API
I think that makes sense for now as well. I expect we'll get to this sort of generic permissions system in the future, but for the time being I am adding to my current patch some methods: // internal methods implemented by the embedder int NotificationProvider::checkPermission(SecurityOrigin*); void NotificationProvider::requestPermission(SecurityOrigin*, PermissionCallback); // JS API methods int Notifications.checkPermission() -- invokes m_provider-checkPermission(my_origin); void Notifications.requestPermission(PermissionCallback) -- likewise. callback is invoked when the user (or user agent) makes a decision. Additionally, Notifications.createNotification() will throw a SECURITY_ERR exception if permission is not granted. Sound good? I think most of the code will easily migrate to a generic system. -John On Wed, May 27, 2009 at 11:44 AM, Sam Weinig sam.wei...@gmail.com wrote: I would prefer we limit the scope to notifications, since this is an experimental feature at the moment. Perhaps something along the lines of window.notifications.requestTrust(), or window.notifications.requestUse() (I am not a huge fan of either of those function names, but you get the general idea). We can always revisit this if this type of explicit privilege escalation becomes something other apis need as well. -Sam On Wed, May 27, 2009 at 9:22 AM, Drew Wilson atwil...@google.com wrote: Sam, I think you are right here. I'm convinced that applications should be specific about what permissions they are asking for. I also believe that from a UX standpoint, we will probably want to provide the user with a single dialog that enumerates the permissions being granted, although a given user-agent may want to do this differently. We certainly want to enable both models. So I'd like to propose an API like the following (cribbed from the Android permissions manifest): int getTrusted(permissionName) - returns 0 if the application is blocked/unsupported (user said no or user-agent does not support it), 1 if it is untrusted (no permissions grant yet), 2 if it is trusted void requestTrust(permissionArray, callback) This provides a couple of important things: 1) granularity, so an application can specify exactly what permissions it wants 2) flexibility for the user agent - the application asks for a block of permissions at once (for example, a given feature like background notifications may require two permissions: persistent workers and notifications). The user agent has the flexibility to decide whether to display this as one dialog enumerating permissions, two separate dialogs, a dialog which allows the user to pick and choose which permissions it wants to grant, etc. What do you think? -atw On Tue, May 26, 2009 at 9:49 PM, Sam Weinig sam.wei...@gmail.com wrote: On Tue, May 26, 2009 at 9:18 PM, David Levin le...@chromium.org wrote: On Tue, May 26, 2009 at 8:57 PM, Sam Weinig sam.wei...@gmail.comwrote: On Tue, May 26, 2009 at 5:04 PM, Drew Wilson atwil...@google.comwrote: On Tue, May 26, 2009 at 4:43 PM, Sam Weinig sam.wei...@gmail.comwrote: On Tue, May 26, 2009 at 4:20 PM, Drew Wilson atwil...@google.comwrote: To give the list some insight into the discussions we've had with the Chrome UX folks: 1) We want to associate some set of enhanced permissions with a given origin (e.g. https://mail.yahoo.com), and we want the user to be presented with a single do you want to grant permissions to https://mail.yahoo.com; dialog, rather peppering the user with a bunch of individual permission dialogs for each feature (Yes, please allow mail.yahoo.com to use 100MB of local storage, Yes, allow mail.yahoo.com to display notifications, Yes, allow mail.yahoo.com to run in the background). It seems like a bad idea to give all or nothing trust, and not along the lines of how APIs have managed choices in the past (quotas are increased when the limit is hit). I am not even sure how a UA would present such a choice to a user in a meaningful manner. I think a workflow such as the one quoted above by Maciej is a good direction, that gives a user a better chance of understanding the choice they are making. I thought that maciej suggested the same thing we suggested - an explicit javascript API to request permissions. In our case, we want to ask for permissions in bulk up front, rather than peppering the user with permissions on an ad-hoc basis - in your example (prompting for more quota when the quota is hit) will break things like background sync in persistent workers, as the user may not be around when that background sync occurs. It is similar, but I am concerned with how to present a dialog to a user that states that by clicking grant they are completely trusting you. 2) We want the timing of the permission grant UI to be under application control (as part of some kind of application user
Re: [webkit-dev] Multithread issue
WebKit uses thread-specific data in quite a few cases so objects in general expect to be created, used and destroyed on the same thread. One of such examples are timers, frequently used as deferred tasks. Creating a view and loading a url into it likely creates one or more of such timers whihc are stored in thread-specific list. So the code verifies that we are still accessing the thread-specific list on the same thread on which we were creating the timer. Can you create view on the same thread where gtk_main is called? Dmitry On Wed, May 27, 2009 at 5:17 AM, Matt Bockt bocktm...@gmail.com wrote: Hi everybody, I'm new to WebKit and I'm developing a C++ application that uses the WebKit browser. It runs on Fedora10, kernel 2.6.27.5-117.fc10.i686. The WebKit version I'm using is the r44111. Here is my problem : I'm creating a new web view in the main thread, say, thread A. The webview is then attached to a gtk_window as it's made in the GtkLauncher exemple. Then webkit_web_view_load_uri() is called, always in thread A. Finally, the gtk_main() function is called in another thread, say thread B. And it crashes with the following trace : ASSERTION FAILED: m_thread == currentThread() (WebCore/platform/Timer.cpp:206 bool WebCore::TimerBase::isActive() const) I experience this problem with the webkit r44111 and r43808, but not with r38297. I noticed that there must have been a modification in the thread management between the builds r38297 and r43808 since g_threads must be initialized. But I can't figure out why it doesn't work. Any suggestions or specific rules to follow about multi-threading, gtk and webkit ? Thank you for your help. -- matt ___ 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] Need help in understanding Webkit reflow
HI, I would like some help/pointers in how to understand Webkit reflow logic/mechanism. I would like to know given a URL, what elements are re-layout/re-calculate dimension multiple times (e.g. things like table without height/width attribute). Is there any instrumentation in Webkit to collect that information? Or can where can I add debug printfs in Webkit to understand that. Thank you. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] JSClassCreate JSObjectSetProperty question
On May 27, 2009, at 8:34 AM, Jack Wootton wrote: I'm using JSObjectSetProperty. [...] I successfully have the execution context to use, the window JSObjectRef, property name, attributes and use NULL for exception (all these parameters make sense to me). However I'm unsure about the purpose of the parameter 'JSValueRef value'. This function is used to set the property of a particular JavaScript object. To do this in JavaScript the syntax is: object.propertyName = value; The value is the new value to be stored in the JavaScript property. (note I was unable to use kJSClassDefinitionEmpty because of compile errors about a missing symbol '_kJSClassDefinitionEmpty') What platform? Did you file a bug about this? JSClassDefinition globalObjectClassDefinition = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; globalObjectClassDefinition.version = 1; char myword[] = {'f', 'o', 'o', '\0' }; globalObjectClassDefinition.className = myword; Question 1. What is the class name? The documentation describes it as A null-terminated UTF8 string containing the class's name.. However it does not mention what it's for, or what it represents within the program. Is anyone able to elaborate please? Does it represent a C class I've al;ready created, that I must describe by using the JSClassDefinition? The class name is used for debugging purposes and for the default behavior of the toString function. If your name is foo then toString will yield [object foo]. Question 2. I am unclear as to the purpose of the JSClassDefinition. Does it represent a C class or a JavaScript class? Are the callbacks to C / C++ functions? JSClassDefinition can be used to make a JSClassRef. A JSClassRef can be used to construct JavaScript objects with behavior that is implemented with C functions. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Need help in understanding Webkit reflow
Check out the layout() methods on RenderObject and its subclasses. dave On May 27, 2009, at 3:17 PM, Lucius Fox wrote: HI, I would like some help/pointers in how to understand Webkit reflow logic/mechanism. I would like to know given a URL, what elements are re-layout/re-calculate dimension multiple times (e.g. things like table without height/width attribute). Is there any instrumentation in Webkit to collect that information? Or can where can I add debug printfs in Webkit to understand that. Thank you. ___ 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] Sharing code between WebCore/bindings/js and WebCore/bindings/v8
It would really, really awesome (IMHO) to put some extra effort into minimizing bindings divergences. I think there's already some good foundation laid in this regard in the form of Script* classes (look for bindings/(js|v8)/Script* files) . I was once imagining that we could split out code generation into: a) conversion/instantiation helper functions (these will be different for V8 and JSC) b) the actual bindings, written using Script* stuff and common for both engines. Then we could rewrite (wee!) all of our custom bindings to use Script* as well and live happily ever after. :DG On Wed, May 27, 2009 at 11:50 AM, David Levin le...@google.com wrote: On Wed, May 27, 2009 at 11:47 AM, Adam Barth aba...@webkit.org wrote: I've been doing some work recently in our JavaScript bindings. As part of this work, I've noticed that WebCore/bindings/js and WebCore/bindings/v8 have drifted apart in some details. It's kind of ridiculous that we have so much duplicated code in these two folders. We should try to re-organize our bindings to share as much code as possible. 1) Where should the common code live? One option is to have: WebCore/bindings/js --- common code WebCore/bindings/jsc --- JSC specific WebCore/bindings/v8 --- V8 specific 2) How much should we try to share? For example, we could have an abstracted notion of ArgList that works for both engines, or we could be happy to factor out common routines like createWindow http://trac.webkit.org/browser/trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp#L285. I presume Sam is a good contact for the JSC bindings. Who's a good contact for the V8 bindings? dglazkov Thanks, Adam ___ 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] SharedWorkers alternate design
On Wed, May 27, 2009 at 12:00 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, May 26, 2009 at 9:40 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 6:11 PM, Jeremy Orlow wrote: Did you say partly because it's more complicated than just splitting one class (and only having 1-way sync communication)? If so, then we're still on the same page, because that's what I'll be doing as well. I was just using the StorageBackend as an example, but events will require signals from the backend to the frontend, and some abstractions (like StorageArea) make a lot of sense whether or not things are split into two pieces, which sounds a lot like what you described with ResourceHandle. As a side note - I think it would be cool if we used more specific names than Backend and Frontened in the actual code, since which end is front and back is not always obvious nor always agreed upon by all observers. I like Proxy and Impl ok as name pairs, not sure if that's the same relationship you have in mind. I somewhat disagree regarding the terms frontend and backend being confusing. It seems to me that the backend is always further away from the user than the frontend. Same thing with client and server. That said, I've definitely heard complaints about terms like this before (on other projects), so I'm not married to the terms. The names I was planning to use were outlined in a design doc I sent to this list (http://docs.google.com/View?id=dhs4g97m_8cwths74m). Basically, I was planning to the term Backend, but the rest of the names are more descriptive. If you have another suggestion for Backend, I'd be happy to change it. I would have already, but the only other idea I had was server, and I think people find that term even more confusing. StorageRepository might be an ok name. As for Impl and Proxy, they are actually somewhat orthogonal to the frontend and backend. For example, if a script calls window.localStorage.setItem(foo, bar), the frontend in the render process will access the backend proxy which will send the message to the browser process where the backend implementation lives. The backend implementation will then access the EventManagerProxy which will distribute the events to the EventManagerImpl in all the render processes. In other words, Proxies are necessary anywhere messages originate. Just as a data point: Chrome uses Proxy/Impl naming for a variety of classes (i.e. WebWorkerProxy/WebWorkerImpl, WebWorkerClientProxy/WebWorkerClientImpl, WebPluginProxy/WebPluginImpl, WebPluginDelegateProxy/WebPluginDelegateImpl). The code is also moving to X and XClient for the two-way API for feature X. If possible, it would be good to match these names for the sake of consistency. How about: StorageImpl (lives in the process that opens the database) StorageProxy (in multi-process browser, lives in the renderer process and notifies above) StorageClientImpl (receives event that value changed) StorageClientProxy (in multi-process browser, lives in the browser process and notifies above) Jeremy ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] SharedWorkers alternate design
On Wed, May 27, 2009 at 3:37 PM, John Abd-El-Malek j...@google.com wrote: On Wed, May 27, 2009 at 12:00 AM, Jeremy Orlow jor...@chromium.orgwrote: On Tue, May 26, 2009 at 9:40 PM, Maciej Stachowiak m...@apple.com wrote: On May 26, 2009, at 6:11 PM, Jeremy Orlow wrote: Did you say partly because it's more complicated than just splitting one class (and only having 1-way sync communication)? If so, then we're still on the same page, because that's what I'll be doing as well. I was just using the StorageBackend as an example, but events will require signals from the backend to the frontend, and some abstractions (like StorageArea) make a lot of sense whether or not things are split into two pieces, which sounds a lot like what you described with ResourceHandle. As a side note - I think it would be cool if we used more specific names than Backend and Frontened in the actual code, since which end is front and back is not always obvious nor always agreed upon by all observers. I like Proxy and Impl ok as name pairs, not sure if that's the same relationship you have in mind. I somewhat disagree regarding the terms frontend and backend being confusing. It seems to me that the backend is always further away from the user than the frontend. Same thing with client and server. That said, I've definitely heard complaints about terms like this before (on other projects), so I'm not married to the terms. The names I was planning to use were outlined in a design doc I sent to this list (http://docs.google.com/View?id=dhs4g97m_8cwths74m). Basically, I was planning to the term Backend, but the rest of the names are more descriptive. If you have another suggestion for Backend, I'd be happy to change it. I would have already, but the only other idea I had was server, and I think people find that term even more confusing. StorageRepository might be an ok name. As for Impl and Proxy, they are actually somewhat orthogonal to the frontend and backend. For example, if a script calls window.localStorage.setItem(foo, bar), the frontend in the render process will access the backend proxy which will send the message to the browser process where the backend implementation lives. The backend implementation will then access the EventManagerProxy which will distribute the events to the EventManagerImpl in all the render processes. In other words, Proxies are necessary anywhere messages originate. Just as a data point: Chrome uses Proxy/Impl naming for a variety of classes (i.e. WebWorkerProxy/WebWorkerImpl, WebWorkerClientProxy/WebWorkerClientImpl, WebPluginProxy/WebPluginImpl, WebPluginDelegateProxy/WebPluginDelegateImpl). The code is also moving to X and XClient for the two-way API for feature X. If possible, it would be good to match these names for the sake of consistency. How about: StorageImpl (lives in the process that opens the database) StorageProxy (in multi-process browser, lives in the renderer process and notifies above) StorageClientImpl (receives event that value changed) StorageClientProxy (in multi-process browser, lives in the browser process and notifies above) Thanks for the pointers and suggestions. Unfortunately, in my experience, the distinction between client/server is even more confusing to developers than frontend/backend. In addition, the XClient naming scheme doesn't really fit into the design I've currently got in mind (which was documented in the design doc I've sent out a couple times) since there are a couple different classes that compose the frontend. So I'm not sure it'll really fit into my design here. J ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] testing question for code that calls abstract methods (like ChromeClient)
What's a good strategy for testing WebKit code that calls out to the ChromeClient interface or some other abstract interface? I can't find anything obvious in the codebase-- is there any way to mock out those calls for unit tests? Thanks, -John ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit JavaScript question
Hi Zoltan, I don't think so. It is not worth to do it on a desktop pc since interpreter is always slower than JIT. However, the story is different for embedded systems, when they enter low-memory mode. Whilst it is certainly true that this would likely be of most benefit on embedded platforms, we anticipate mixed-mode to be desirable on the desktop too. In addition to having the potential to providing a more memory efficient representation than JIT code (assuming a switch to a more compact intermediate code representation – our current bytecode is more tuned towards performance then size), this could also be beneficial for performance. As JS application size grows, avoiding JIT generation for infrequently executed code (e.g. setup/ initialization code can often be run only once) may become more important (although right now we not seeing code generation as a significant overhead). Additionally, by running the code through the interpreter prior to JIT generation this may give us an opportunity to gather information to improve the quality of generated code. We made some experiments before, and it seems possible to switch between jit and interpreter, but I am not sure that the community is interested in such features. Whilst not something we have prioritized yet, it is definitely an area of interest. If you have an implementation, even in a partially complete state, it might be worth filing an enhancement request on the bug tracker and attaching a patch. cheers, G. Zoltan The last step depends on the architecture (supported or not) and C++ compiler directives. If JIT is enabled (see wtf/Platform.h), it always generates machine code. Otherwise an interpreter executes the byte code. A mixed environment (both jit and interpreter) is not yet supported. Are there plans for that ? Mozilla's TraceMonkey supports triggering JIT execution at runtine already, iirc. -- --Antonio Gomes ___ 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] which files in WebKit codebase would tell the attributes(x, y, width and height) of a Video Window ?
Which files in WebKit deal with the positioning (x,y) and scaling of video window(width and height) ? Suppose I'm rendering a page with a video window in it such as http://webkit.org/blog/140/ then I want to know what files should I look into to know the coordinates and width and height of the Video Window. Thanks, Ajit ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] testing question for code that calls abstract methods (like ChromeClient)
On May 27, 2009, at 4:11 PM, John Gregg wrote: What's a good strategy for testing WebKit code that calls out to the ChromeClient interface or some other abstract interface? I can't find anything obvious in the codebase-- is there any way to mock out those calls for unit tests? Typically we add features to DumpRenderTree that use the public interfaces on the various platforms to test such things. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] which files in WebKit codebase would tell the attributes(x, y, width and height) of a Video Window ?
On May 27, 2009, at 5:19 PM, Ajit Singh wrote: Which files in WebKit deal with the positioning (x,y) and scaling of video window(width and height) ? Suppose I'm rendering a page with a video window in it such as http://webkit.org/blog/140/ then I want to know what files should I look into to know the coordinates and width and height of the Video Window. The position and size of the video element is determined by layout; RenderVideo is the class that handles the video element. For information about layout basics, see http://webkit.org/blog/114/webcore-rendering-i-the-basics/ and subsequent blog posts. Simon ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Q on CSSStyleSelector::adjustRenderStyle(), render tree node ordering
Hi all, As I am currently hacking on implementing ruby for WebKit, I came across 2 questions where I couldn't find a good answer in the code, and thus would like to ask people more knowledgable than me: Question #1: CSSStyleSelector::adjustRenderStyle (css/CSSStyleSelector.cpp) changes the effectiveDisplay value of a node. Amongst other things: // Mutate the display to BLOCK or TABLE for certain cases, e.g., if someone attempts to // position or float an inline, compact, or run-in. Cache the original display, since it // may be needed for positioned elements that have to compute their static normal flow // positions. We also force inline-level roots to be block-level. I.e., basically, for positioned and floating elements it changes INLINE_TABLE - TABLE, INLINE_BOX - BOX, everything else - BLOCK. Now, a ruby is analogous to an inline block, or inline table. However, there is no analogous block-level object for ruby. Therefore I wondered whether it wouldn't be ok (or even better, read: less error prone) to generally just wrap such objects into an anonymous block instead of changing the display value (with an exception for positioned/floated table parts that are handled after that point in the code). Question #2: Is there code that would expect that the relative order of objects in the render tree follows the relative order of the corresponding nodes in the DOM tree (i.e., if DOM-node-B is after DOM-node-A then render-node-B should also be after render-node-A, where after means in the same order encountered when doing a depth-first search). Or am I worrying too much and I can order the nodes in the render tree without regard for the DOM tree? Thanks, Roland ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Q on CSSStyleSelector::adjustRenderStyle(), render tree node ordering
On Wed, May 27, 2009 at 6:37 PM, David Hyatt hy...@apple.com wrote: Thanks a lot for your answers! On May 27, 2009, at 8:21 PM, Roland Steiner wrote: Hi all, As I am currently hacking on implementing ruby for WebKit, I came across 2 questions where I couldn't find a good answer in the code, and thus would like to ask people more knowledgable than me: Question #1: CSSStyleSelector::adjustRenderStyle (css/CSSStyleSelector.cpp) changes the effectiveDisplay value of a node. Amongst other things: // Mutate the display to BLOCK or TABLE for certain cases, e.g., if someone attempts to // position or float an inline, compact, or run-in. Cache the original display, since it // may be needed for positioned elements that have to compute their static normal flow // positions. We also force inline-level roots to be block-level. I.e., basically, for positioned and floating elements it changes INLINE_TABLE - TABLE, INLINE_BOX - BOX, everything else - BLOCK. Now, a ruby is analogous to an inline block, or inline table. However, there is no analogous block-level object for ruby. Therefore I wondered whether it wouldn't be ok (or even better, read: less error prone) to generally just wrap such objects into an anonymous block instead of changing the display value (with an exception for positioned/floated table parts that are handled after that point in the code). My own expectation is that if you float or position a ruby it would just stop being a ruby and turn into a normal block. Maybe others disagree though. Just to clarify in order to avoid misunderstandings: with ruby I meant the whole ruby element, including the base text, not just the ruby text/annotation part. Thus converting ruby to a block is IMHO not satisfying, as positioning the ruby would cause it to no longer render correctly (its content just gets dumped). Also,ruby style=float:left A rt B /rt/rubywould not render as a ruby, butspan style=float:leftruby style=float:left A rt B /rt/ruby/spanwould render correctly. Question #2: Is there code that would expect that the relative order of objects in the render tree follows the relative order of the corresponding nodes in the DOM tree (i.e., if DOM-node-B is after DOM-node-A then render-node-B should also be after render-node-A, where after means in the same order encountered when doing a depth-first search). Or am I worrying too much and I can order the nodes in the render tree without regard for the DOM tree? You cannot order nodes in the render tree without regard for the DOM tree. There is an assumption of document ordering in the RenderObject lists. Check out how newly created renderers from the DOM get inserted passing in previous renderers for example. Thanks. Solution #2 (muck around with layouting) it is, then! ^_- Cheers, Roland ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] About graphics backend changing
Android uses Skia graphic library, you can compare the code base there with the trunk to see how it is ported. 2009/5/8 David ds...@163.com: hi. Now I'm working on testing webkit's portability. For example, I am planning to change webkit's graphics backend to Skia, just like chrome does. But I'm new to webkit, is there any docs about how to do that in detail? 穿越地震带 纪念汶川地震一周年 ___ 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] If you are in china and you have interest in webkit, please join us with qq group 8763622.
This pretty much shuts the door to Chinese speaking webkit developers out side of China. Is IRC blocked by the Great Wall? If not, why not create an IRC channel? On Thu, May 14, 2009 at 4:17 PM, canquan.shencq canquan.she...@alibaba-inc.com wrote: Hi all, Disucss the webkit conveniently for Chinese people who has interest in webkit , I create a QQ group 8763622. If you are in china and you have interest in webkit,please join us with qq group 8763622. Thanks Steven Shen 2009-5-14 ___ 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] Need help/Suggestions to understand the framework of webkit
webkit.org has documentations of setting up build and debug environment using XCode on Mac. chromium.org has documentations of setting up build and debug environment using MSVC on Windows. On Thu, May 21, 2009 at 4:06 PM, gur...@gmail.com wrote: Thanks for the early response. We are implementing web 2.0 framework for mobile phone and we need to know below. 1. Javascript execution in webkit 2. DOM interaction with Javascriptcore. can i install a safari tool kit on windows environment and is it possible for me to debug and get the call flow. Thanks, Guru On May 21, 2009 1:30pm, JIN Wei uptown1...@gmail.com wrote: there is no guide On Thu, May 21, 2009 at 3:55 PM, gur...@gmail.com wrote: Hi All, Please guide me to understand the core framework used in webkit. Suggest me if any book or any URL which gives us documentation of webkit modules. Thanks in Advance, Guru ___ 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] Need help/Suggestions to understand the framework of webkit
On May 27, 2009, at 7:19 PM, Feng Qian wrote: webkit.org has documentations of setting up build and debug environment using XCode on Mac. And using Visual Studio on Windows too. The instructions start here http://webkit.org/building/tools.html . -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev