Re: [webkit-dev] New approach for DOM attributes that reflect content attributes
On Jun 21, 2009, at 11:08 PM, Eric Seidel wrote: I think this is great! I'm a bit confused by this though: This indicates that the src DOM attribute reflects a content attribute named src, but that the result is a completed URL, not the raw attribute value: attribute [ReflectURL] DOMString src; Why a special case for absolute URL conversions? Should we have a more generic [ReflectFitler=completeURL] syntax? Do we have enough url-values where this special attribute makes sense or should src() just be a small wrapper around getAttribute(src) which knows how to make it absolute? URL attributes resolving against the document base is a fairly common case of modified reflected attributes, yes. Many elements have href or src attributes that behave this way. I am not sure if there are other common cases that fix up the value on reading relative to the actual content attribute value. - Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Should we put the webkit.org mailing lists on Gmane?
Adam Roben wrote: Given the single vote in favor and no one opposed, I'm going to work on this today. -Adam On Jun 15, 2009, at 4:52 PM, Gustavo Noronha wrote: On Sat, 2009-06-13 at 09:00 -0400, Adam Roben wrote: Gmane (http://gmane.org) provides a few features that could be useful for thewebkit.org mailing lists, including: * a nicer web interface than Mailman's * indexed search (maybe better than Mailman's, certainly at least as good, and with a better interface) Belated +1. I'm already following one list on gmane.os.opendarwin.webkit.devel . Not sure which list that maps to. I guess you want to get that one renamed to the new standardized names. I imagine you will have to make some kind of special request for that. My experience has been that it can take a while for gmane to pick up new requests, so, be patient. -- Patrick Mueller ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] JavaScriptCore in Windows Applications
Brent, Thank you very much for your reply. It was very helpful. Unfortunately, I cannot compile your CallJS sample. It appears that the 'afxwin.h' file is not present on my system. Is it not possible to compile your sample with Visual C++ 2005 Express Edition with the Windows Server 2003 R2 SDK? Thank you, Eric -- Build started: Project: CallJS, Configuration: Release Win32 -- Compiling... stdafx.cpp c:\documents and settings\eric brunstad\desktop\calljs\calljs\calljs\stdafx.h(38) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory Build log was saved at file://c:\Documents and Settings\Eric Brunstad\Desktop\CallJS\CallJS\CallJS\Release\BuildLog.htm CallJS - 1 error(s), 0 warning(s) == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == Hi Eric, On Jun 21, 2009, at 7:30 PM, Eric Brunstad webkit- l...@ericbrunstad.com wrote: I have developed a Mac application that I am porting to Windows. How can I use JavaScriptCore in my Windows application? You can try my port of the Apple example program CallJS; it's an attempt to illustrate a Windows program using WebKit, interacting between C++ and JavaScript. http://idisk.mac.com/bfulgham-Public/CallJS.zip Are there precompiled JavaScriptCore.dll files that can be linked right in to applications and freely distributed? Not really. I try to keep a build on my iDisk (same spot as that example), but it's a bit out of date. To be freely distributed, you can't use the CoreGraphics, CoreFoundation, or CFNetwork dll's. I've managed to ressurect Apple's original Windows Cairo port (you can see some further info on http:// lest.blogspot.com.) It's currently built using CFLite ( http://sourceforge.net/projects/opencflite/ , Apple's Open Source portions of the full CoreFoundation), cURL for the network stack, and Cairo for graphics. For a full example of what it's capable of, check out the Appcelerator Titanium project's Windows port, which uses this build of WebKit. Pretty much all of the Cairo logic is in the tree, with the exception of a small patch to conditionalize printing in WebFrame.cpp. I've tried to provide dll's for the build requirements on my iDisk, and have had a few independant reports of successful builds. Let me know if I can provide any further info. Thanks, -Brent ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] NPAPI plugin does not load under Safari (Cocoa related?)
Hello everyone, I am new on this list, so I hope this is the appropriate place for this kind of questions. If not, please let me know where I should go, and I'll post any future questions there. I've already sent the same question to one of the Mozilla mailinglists, so please just take a look at the forward below (I hope posting forwards is considered a problem): -- Forwarded message -- From: Eddy Bruël ejpbr...@gmail.com Date: Mon, Jun 22, 2009 at 4:40 PM Subject: Question about NSPrincipalClass To: dev-tech-plug...@lists.mozilla.org Hi guys, I've been trying to build a plugin that will work under OS X for both Firefox and Safari. To that end I've taken the BasicPlugin sample from the Mozilla source tree (which works for both browsers) and have incrementally replaced the source files in that project with our own. The resulting plugin works just fine under Firefox, but refuses to load in Safari. I have tried to debug the plugin, but it looks like the entry points are not even being called. After some searching I found a lead about having to include NPPrincipalClass in my info.plist file, but this raises some questions with me. First of all, even though a large part of our source tree is written in C++, the plugin code is mainly just C. I only use Objective C in some very specific cases, for instance when I need to create a NSWindow. It looks like the NSPrincipalClass should be set to the name of the 'main' class in my plugin. I assume that I have to set NSPrincipalClass to an Objective C class. However, there is no Objective C class in my plugin which could qualify as the main class. There is such a class, but it is written in C++. I've tried setting the NSPrincipalClass to 'NSApplication', but this doesn't work. Do I need to create an Objective C class which serves as the main application class in order to get the plugin to work under Safari? If so, how exactly? Some documentation would be greatly appreciated! However, it would be even better if there were some other way to get the plugin to load in Safari, which does not involve me having to make substantial changes in our current plugin code. Any bright ideas? I'm kind of stuck on this! Cheers, Eddy As an aside, am I correct to assume that adding Objective C / Cocoa based code to my plugin causes the NSPrincipalClass setting to become necessary? The reason I ask is that the original plugin, which uses only C code, *does* seem to work under Safari. So what am I overlooking/doing wrong here? Any help would be greatly appreciated! Eddy ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] NPAPI plugin does not load under Safari (Cocoa related?)
On Jun 22, 2009, at 7:55 AM, Eddy Bruël wrote: It looks like the NSPrincipalClass should be set to the name of the 'main' class in my plugin. That’s not needed for Netscape plug-ins. There’s a separate kind of plug-in called a WebKit plug-in that requires NSPrincipalClass. To figure out why your plug-in not working, you should reduce to the simplest test case that doesn’t work. I can’t tell from your message what’s going wrong. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] New approach for DOM attributes that reflect content attributes
I'll take care of the V8 bindings. :DG On Sun, Jun 21, 2009 at 10:26 PM, Darin Adlerda...@apple.com wrote: There are many attributes in the DOM that are simply covers for getting and setting HTML or SVG attributes. The HTML 5 draft calls this reflection of content attributes. Currently we do this by writing getter and setter functions. For example, see the placeholder and useMap attributes of HTMLInputElement. A better way to do this is to declare that the attribute reflects a content attribute in the .idl file, and have the bindings call setAttribute and getAttribute directly. I plan to do this, with the following syntax. This indicates that the title attribute reflects a content attribute named title: attribute [Reflect] DOMString title; This indicates that the className DOM attribute reflects a content attribute named class: attribute [Reflect=class] DOMString className; This indicates that the src DOM attribute reflects a content attribute named src, but that the result is a completed URL, not the raw attribute value: attribute [ReflectURL] DOMString src; I’m going to begin this work with this bug https://bugs.webkit.org/show_bug.cgi?id=25425. That bug talks about a need to change the details of various getters and setters, and I decided it was better not to do this, but rather to have the getters and setters be auto-generated. I will implement this for the JavaScript bindings and Objective-C bindings, but someone else will have to take care of the V8 bindings. Once the bindings are working, I plan to remove the functions in the DOM implementation classes. So I would delete the HTMLInputElement::placeholder and HTMLInputElement::setPlaceholder functions once the [Reflect] attribute has been used for them. For now I will begin by implementing [Reflect] and using it in a few places, but I won’t delete any functions from the DOM implementation classes yet. -- Darin ___ 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] InlineBox::m_isSVG
On Jun 21, 2009, at 11:18 PM, Roland Steiner wrote: Hi Dave, as I will probably need to special-case height() for ruby InlineBox objects in the same way as is done for SVG boxes (still ironing out the details, though), making height() virtual was exactly my intent. I would have thought that the performance cost of a virtual call to height() would be offset by being able to remove the isSVG() condition inside (and later a potential isRuby() condition as well). Now if there are actual performance reasons for that bit and/or for having height() be non-virtual, then I may need to find another solution. Thanks, Roland You could probably just rename the m_isSVG bit to be something like m_calculatesHeight, and then the virtual method that height() calls when that is true could be renamed to be more general. dave (hy...@apple.com) ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] JavaScriptCore in Windows Applications
On Mon, Jun 22, 2009 at 7:12 AM, webkit-l...@ericbrunstad.com wrote: Thank you very much for your reply. It was very helpful. Unfortunately, I cannot compile your CallJS sample. It appears that the 'afxwin.h' file is not present on my system. Is it not possible to compile your sample with Visual C++ 2005 Express Edition with the Windows Server 2003 R2 SDK? VC2005 Express has several intentionally-crippled bits, such as this, to avoid cannibalizing sales of the non-free version. I don't remember if this particular issue was corrected in VS2008. You may want to spring for a copy of VS2005 Pro if it wasn't. PK ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Should we restrict Web Fonts to same-origin by default?
Mozilla restricts downloaded fonts to same-origin by default, with the ability for the hosting site to open up access via Access-Control (aka CORS). Apparently this step has the potential to make font foundries more comfortable about using straight up OpenType fonts on the Web, without introducing DRM. Should we follow Mozilla's lead on this? Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Should we restrict Web Fonts to same-origin by default?
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 to open up access via Access- Control (aka CORS). Apparently this step has the potential to make font foundries more comfortable about using straight up OpenType fonts on the Web, without introducing DRM. Should we follow Mozilla's lead on this? I see no reason to do this. dave (hy...@apple.com) ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] indentation of nested-list
Hi, I'm currently working on the patch for 21712 (Bug 21712: Indent on li creates new ol instead of merging with existing ol, numbering incorrect.) But because Firefox gave me unexpected result for https://bugs.webkit.org/show_bug.cgi?id=21712, I'm wondering whether I should copy the behavior of Firefox or not. Also, since I don't have access to Windows machine/MSIE today, I'll appreciate if you could browse https://bugs.webkit.org/attachment.cgi?id=31668action=view in various browsers and tell me what happens. Best, Ryosuke ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] indentation of nested-list
Hi Justin, thanks for the screenshot. Could you edit HTML document so that it'll indent three? What I want to see is whether it gives me 1 1 1 2 Or 1 1 2 3 Ryosuke On Mon, Jun 22, 2009 at 1:04 PM, Justin Haygoodjhayg...@reaktix.com wrote: MSIE 8.0 gets a JavaScript error on window.getSelection(), but the visual display is here: -Original Message- From: webkit-dev-boun...@lists.webkit.org [mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of Ryosuke Niwa Sent: Monday, June 22, 2009 4:00 PM To: WebKit Development Subject: [webkit-dev] indentation of nested-list Hi, I'm currently working on the patch for 21712 (Bug 21712: Indent on li creates new ol instead of merging with existing ol, numbering incorrect.) But because Firefox gave me unexpected result for https://bugs.webkit.org/show_bug.cgi?id=21712, I'm wondering whether I should copy the behavior of Firefox or not. Also, since I don't have access to Windows machine/MSIE today, I'll appreciate if you could browse https://bugs.webkit.org/attachment.cgi?id=31668action=view in various browsers and tell me what happens. Best, Ryosuke ___ 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] indentation of nested-list
I get the following: 1 1 1 1 -Original Message- From: Ryosuke Niwa [mailto:rn...@google.com] Sent: Monday, June 22, 2009 4:10 PM To: Justin Haygood Cc: WebKit Development Subject: Re: [webkit-dev] indentation of nested-list Hi Justin, thanks for the screenshot. Could you edit HTML document so that it'll indent three? What I want to see is whether it gives me 1 1 1 2 Or 1 1 2 3 Ryosuke On Mon, Jun 22, 2009 at 1:04 PM, Justin Haygoodjhayg...@reaktix.com wrote: MSIE 8.0 gets a JavaScript error on window.getSelection(), but the visual display is here: -Original Message- From: webkit-dev-boun...@lists.webkit.org [mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of Ryosuke Niwa Sent: Monday, June 22, 2009 4:00 PM To: WebKit Development Subject: [webkit-dev] indentation of nested-list Hi, I'm currently working on the patch for 21712 (Bug 21712: Indent on li creates new ol instead of merging with existing ol, numbering incorrect.) But because Firefox gave me unexpected result for https://bugs.webkit.org/show_bug.cgi?id=21712, I'm wondering whether I should copy the behavior of Firefox or not. Also, since I don't have access to Windows machine/MSIE today, I'll appreciate if you could browse https://bugs.webkit.org/attachment.cgi?id=31668action=view in various browsers and tell me what happens. Best, Ryosuke ___ 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] Should we restrict Web Fonts to same-origin by default?
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 to open up access via Access-Control (aka CORS). Apparently this step has the potential to make font foundries more comfortable about using straight up OpenType fonts on the Web, without introducing DRM. Should we follow Mozilla's lead on this? I see no reason to do this. I also see harm from doing this. There are many sites (e.g. Google Docs) that serve static content of a different, cookie-less domain for performance reasons. They would be unable to do this for Web Fonts with this restriction. This is an increasingly common practice as tools like http://code.google.com/speed/page-speed/ become more ubiquitous. Ojan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] indentation of nested-list
I commented on the bug. The correct behavior is clearly the second one. Try any word processor (e.g. MS Word). Firefox just happens to also have a bug there. Ojan On Mon, Jun 22, 2009 at 1:10 PM, Ryosuke Niwa rn...@google.com wrote: Hi Justin, thanks for the screenshot. Could you edit HTML document so that it'll indent three? What I want to see is whether it gives me 1 1 1 2 Or 1 1 2 3 Ryosuke On Mon, Jun 22, 2009 at 1:04 PM, Justin Haygoodjhayg...@reaktix.com wrote: MSIE 8.0 gets a JavaScript error on window.getSelection(), but the visual display is here: -Original Message- From: webkit-dev-boun...@lists.webkit.org [mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of Ryosuke Niwa Sent: Monday, June 22, 2009 4:00 PM To: WebKit Development Subject: [webkit-dev] indentation of nested-list Hi, I'm currently working on the patch for 21712 (Bug 21712: Indent on li creates new ol instead of merging with existing ol, numbering incorrect.) But because Firefox gave me unexpected result for https://bugs.webkit.org/show_bug.cgi?id=21712, I'm wondering whether I should copy the behavior of Firefox or not. Also, since I don't have access to Windows machine/MSIE today, I'll appreciate if you could browse https://bugs.webkit.org/attachment.cgi?id=31668action=view in various browsers and tell me what happens. Best, Ryosuke ___ 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] JavaScriptCore in Windows Applications
Hi Brent, Is it possible to replace a DLL used by the compiled WebKit with a newer version of the same DLL without recompiling WebKit? I need to link my application with CFLite but your compiled version of WebKit in CallJS does not include a CFLite library file (only a DLL). Your requirements package has a DLL and a library file though. Can I just delete the DLL without a library file and copy in the one from CallJS or will that not work? If not, would you be willing to build me a copy of WebKit with the CFLite library file intact? I would be willing to pay if necessary. I have tried extensively to build the source, but I always get errors that I think are related to using Visual Studio 2005 Express. Would buying Visual Studio 2005 Pro make building WebKit work more seamlessly? I'm not sure I would have much use for it other than building WebKit, so I would rather not buy it if I don't have to. Thanks, Eric On Jun 21, 2009, at 11:38 PM, Brent Fulgham wrote: Hi Eric, On Jun 21, 2009, at 7:30 PM, Eric Brunstad webkit-l...@ericbrunstad.com wrote: I have developed a Mac application that I am porting to Windows. How can I use JavaScriptCore in my Windows application? You can try my port of the Apple example program CallJS; it's an attempt to illustrate a Windows program using WebKit, interacting between C++ and JavaScript. http://idisk.mac.com/bfulgham-Public/CallJS.zip Are there precompiled JavaScriptCore.dll files that can be linked right in to applications and freely distributed? Not really. I try to keep a build on my iDisk (same spot as that example), but it's a bit out of date. To be freely distributed, you can't use the CoreGraphics, CoreFoundation, or CFNetwork dll's. I've managed to ressurect Apple's original Windows Cairo port (you can see some further info on http://lest.blogspot.com.) It's currently built using CFLite ( http://sourceforge.net/projects/opencflite/ , Apple's Open Source portions of the full CoreFoundation), cURL for the network stack, and Cairo for graphics. For a full example of what it's capable of, check out the Appcelerator Titanium project's Windows port, which uses this build of WebKit. Pretty much all of the Cairo logic is in the tree, with the exception of a small patch to conditionalize printing in WebFrame.cpp. I've tried to provide dll's for the build requirements on my iDisk, and have had a few independant reports of successful builds. Let me know if I can provide any further info. Thanks, -Brent ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] JavaScriptCore in Windows Applications
Hi Eric, On Jun 22, 2009, at 7:12 AM, webkit-l...@ericbrunstad.com wrote: Thank you very much for your reply. It was very helpful. Unfortunately, I cannot compile your CallJS sample. It appears that the 'afxwin.h' file is not present on my system. Is it not possible to compile your sample with Visual C++ 2005 Express Edition with the Windows Server 2003 R2 SDK? I'm sorry! You are right, it uses MFC to provide the GUI. A completely MFC-free example is the WinLauncher program in the WebKit subversion sources (see WebKitTools/WinLauncher.) This program creates a simple Window and embeds a WebKit instance in it. It doesn't show much C++/Javascript interaction, but between the two examples you should be able to see now things fit together. Sorry (and Good Luck)! -Brent ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Question about Constructors in WebKit JS Bindings
On Mon, Jun 22, 2009 at 7:04 PM, Maciej Stachowiakm...@apple.com wrote: Your proposed alternative will have different behavior. It will use the lexical global object of the calling JavaScript function, instead of the global object originally associated with the Options constructor. Yes. Almost everywhere you see this pattern it's incorrect. We have this bug a lot. Adam ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Question about Constructors in WebKit JS Bindings
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 will have different behavior. It will use the lexical global object of the calling JavaScript function, instead of the global object originally associated with the Options constructor. Yes. Almost everywhere you see this pattern it's incorrect. We have this bug a lot. To be clear, are you saying the original pattern, or the simpler one Drew proposes is typically the incorrect one? (I assume the latter.) PK ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Question about Constructors in WebKit JS Bindings
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 will have different behavior. It will use the lexical global object of the calling JavaScript function, instead of the global object originally associated with the Options constructor. Yes. Almost everywhere you see this pattern it's incorrect. We have this bug a lot. To be clear, are you saying the original pattern, or the simpler one Drew proposes is typically the incorrect one? (I assume the latter.) The latter one. The V8 binding are better about this because we have v8::Context::GetCurrent(), which often gives you the context the JSC bindings have to manually manage. Here's how the two bindings relate (if you look at both bindings and wonder): v8::Context::GetEntered() ~~ exec-dynamicGlobalObject() v8::Context::GetCalling() ~~ exec-lexicalGlobalObject() v8::Context::GetCurrent() ~~ It might be good to add a similar GetCurrent concept to JSC (although, hopefully with a better name) so we can remove all this manual, error-prone caching / mark()ing. Adam ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev