Re: [webkit-dev] How to let webkit to be able to load local image file in html content?
Then what's correct behavior? On 5/14/09, Jan Alonzo wrote: > Hi james, > > can you please file a bug against the WebKitGtk component at > http://bugs.webkit.org. I don't think that's correct. > > Thanks, > Jan > > On 5/14/09, Zhe Su wrote: >> Just found that the problem is gone when the base_uri parameter is set to >> "file://" instead of NULL. Is it a correct way? >> >> Regards >> James Su >> >> On Thu, May 14, 2009 at 10:40 AM, Zhe Su wrote: >> >>> Attached is a simple test program. When running the program, following >>> error occurred: >>> >>> console message: @0: Not allowed to load local resource: >>> file:///usr/share/pixmaps/elisa.svg >>> >>> But if you save the html content into a file and load it with >>> GtkLauncher, >>> then it's ok. >>> >>> Regards >>> James Su >>> >>> >>> On Thu, May 14, 2009 at 12:26 AM, tonikitoo (Antonio Gomes) < >>> toniki...@gmail.com> wrote: >>> It sounds like we can be misusing the base_url parameter. could you paste how you are calling the method (parameters and so) and a snippet of the local html file. On Wed, May 13, 2009 at 6:58 AM, Zhe Su wrote: > Hi, > When I call webkit_web_view_load_html_string() to load a html > content into > a webkitview, webkit always refuses to load local files (image) > referred in > the html content. Is it possible to work around this behavior and let webkit > load local files? -- --Antonio Gomes >>> >>> >> > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How to let webkit to be able to load local image file in html content?
Hi james, can you please file a bug against the WebKitGtk component at http://bugs.webkit.org. I don't think that's correct. Thanks, Jan On 5/14/09, Zhe Su wrote: > Just found that the problem is gone when the base_uri parameter is set to > "file://" instead of NULL. Is it a correct way? > > Regards > James Su > > On Thu, May 14, 2009 at 10:40 AM, Zhe Su wrote: > >> Attached is a simple test program. When running the program, following >> error occurred: >> >> console message: @0: Not allowed to load local resource: >> file:///usr/share/pixmaps/elisa.svg >> >> But if you save the html content into a file and load it with GtkLauncher, >> then it's ok. >> >> Regards >> James Su >> >> >> On Thu, May 14, 2009 at 12:26 AM, tonikitoo (Antonio Gomes) < >> toniki...@gmail.com> wrote: >> >>> It sounds like we can be misusing the base_url parameter. could you >>> paste how you are calling the method (parameters and so) and a snippet >>> of the local html file. >>> >>> On Wed, May 13, 2009 at 6:58 AM, Zhe Su wrote: >>> > Hi, >>> > When I call webkit_web_view_load_html_string() to load a html content >>> into >>> > a webkitview, webkit always refuses to load local files (image) >>> > referred >>> in >>> > the html content. Is it possible to work around this behavior and let >>> webkit >>> > load local files? >>> >>> -- >>> --Antonio Gomes >>> >> >> > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How to let webkit to be able to load local image file in html content?
Just found that the problem is gone when the base_uri parameter is set to "file://" instead of NULL. Is it a correct way? Regards James Su On Thu, May 14, 2009 at 10:40 AM, Zhe Su wrote: > Attached is a simple test program. When running the program, following > error occurred: > > console message: @0: Not allowed to load local resource: > file:///usr/share/pixmaps/elisa.svg > > But if you save the html content into a file and load it with GtkLauncher, > then it's ok. > > Regards > James Su > > > On Thu, May 14, 2009 at 12:26 AM, tonikitoo (Antonio Gomes) < > toniki...@gmail.com> wrote: > >> It sounds like we can be misusing the base_url parameter. could you >> paste how you are calling the method (parameters and so) and a snippet >> of the local html file. >> >> On Wed, May 13, 2009 at 6:58 AM, Zhe Su wrote: >> > Hi, >> > When I call webkit_web_view_load_html_string() to load a html content >> into >> > a webkitview, webkit always refuses to load local files (image) referred >> in >> > the html content. Is it possible to work around this behavior and let >> webkit >> > load local files? >> >> -- >> --Antonio Gomes >> > > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Proposal for refactoring DOM Storage
I've been researching, prototyping, and generally thinking about https://bugs.webkit.org/show_bug.cgi?id=25376 for a while now. I think I now know what needs to be done and the least painful way to get there. I've written up a design doc which is available here: http://docs.google.com/Doc?id=dhs4g97m_8cwths74m If you'd like write permissions to it so you can add comments inline (via Ctrl-M), shoot me an email. If you'd rather reply inline via email, feel free to do that as well. J === WebCore DOM Storage Refactoring Design DocOverview and The Need:See https://bugs.webkit.org/show_bug.cgi?id=25376 for the related bug. The current design of DOM Storage (i.e. window.LocalStorage and window.SessionStorage) within WebCore is fairly incompatible with multi-process browsers like Chromium. This can be fixed with a clean frontend/backend split within DOM Storage, allowing multi-process browsers to implement a proxy layer between the two, and having all the frontends share one backend. The design should not assume that pages within the same origin are in the same process, that a cloned (see the SessionStorage spec) top level browsing context will remain in the same process, or that all children of a top level browsing context are in the same process. Note that the current DOM Storage implementation is such that memory is rarely ever reclaimed (currently only from SessionStorage and only when tabs are closed). The refactored backend should be designed so it's practical to reclaim resources when tabs close, child processes crash, users navigate away from pages, etc. That said, actually reclaiming resources is considered "future work". High level plan:There are 2 main classes that will be added to WebCore: StorageBackend and StorageEventManager. StorageBackend will be a singleton that can be replaced with a proxy class. The StorageEventManager is instantiated in a way that can easily be overridden by a StorageBackend proxy class. Currently, the LocalStorage and SessionStorage classes keep track of StorageAreas and own the syncing threads/queues. This functionality will be moved into the StorageBackend and the StorageSyncManager (which is owned by the StorageBackend). The StorageArea classes' event dispatching will be moved into the StorageEventManger class since the events may originate from another process via a proxy. Since the Local and SessionStorage code is going to be more and more similar as time goes on, some of the classes (like LocalStorageArea and SessionStorageArea) will probably be combined and the behavior of the class will be determined explicitly rather than via polymorphism. For example, the StorageArea will have a flag that says whether or not the in memory map is backed by a database. The actual work will be split into as many patches as possible so the work is easy to verify as correct. The performance of Local/SessionStorage should not be significantly affected at any point. For example, there are no new lookup tables required except within Proxy classes. Stage 1:Move LocalStorage and SessionStorage logic into Backend and EventManager. Stage 2:Create a StorageSyncManager class that abstracts all the Synchronization work. Combine LocalStorageArea and SessionStorageArea. Rename LocalStorageThread/Task StorageSyncThread/Task. Stage 3:Add hooks for multi-process setups. Traces through the new design:To help make things clear, here's what would happen in a single-process environment for a page that simply does the following: window.localStorage.setItem('key', 'value') *Javascript bindings convert window.localStorage to DOMWindow.localStorage() * DOMWindow.localStorage() *// StorageBackend::backend() is a singleton that returns a proxy for multi-process setups.* storage_area = StorageBackend::backend()->createLocalStorage(page_group, security_origin) storage = Storage::create(frame, stroage_area) *// normal stuff + registers the storage area with the event manager* *// In a multi-process environment, parts of this are on the backend and parts are on the frontend* StorageBackend.createLocalStorage(page_group, security_origin) id = createUniqueIdFromPageGroupAndSecurityOrigin(page_group, security) if storageAreaMap.contains(id): storageArea = storageAreaMap.get(id) else storage_area = StorageArea::createLocalStorageArea(id, eventDispatcher, storageSyncManager) *// constructor just initializes instance variables* storageSyncManager.scheduleImport(storage_area) *// imports are scheduled before writes to disk* storageAreaMap.set(id, storage_area) return storage_area.release() *Javascript bindings call setItem on the returned object* Storage.setItem(key, value, exception_code_out) return m_storageArea.setItem(m_frame, key, value, exception_code_out) *// In a multi-process environment, DONE ON THE BACKEND* StorageArea.setItem(frame, key, value, exception_code_out) *// Abstracting out the manager allows imp
Re: [webkit-dev] How to let webkit to be able to load local image file in html content?
Attached is a simple test program. When running the program, following error occurred: console message: @0: Not allowed to load local resource: file:///usr/share/pixmaps/elisa.svg But if you save the html content into a file and load it with GtkLauncher, then it's ok. Regards James Su On Thu, May 14, 2009 at 12:26 AM, tonikitoo (Antonio Gomes) < toniki...@gmail.com> wrote: > It sounds like we can be misusing the base_url parameter. could you > paste how you are calling the method (parameters and so) and a snippet > of the local html file. > > On Wed, May 13, 2009 at 6:58 AM, Zhe Su wrote: > > Hi, > > When I call webkit_web_view_load_html_string() to load a html content > into > > a webkitview, webkit always refuses to load local files (image) referred > in > > the html content. Is it possible to work around this behavior and let > webkit > > load local files? > > -- > --Antonio Gomes > #include #include static const char kHtml[] = "\n" " \n" "\n" " \n" ""; int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *web_view; gtk_init(&argc, &argv); g_thread_init(NULL); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); web_view = GTK_WIDGET(webkit_web_view_new()); gtk_container_add(GTK_CONTAINER(window), web_view); gtk_widget_show_all(window); webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(web_view), kHtml, NULL); gtk_main(); } ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] squirrelfish-bytecode
Responding to both of you... On May 13, 2009, at 12:13 PM, Rob Kroeger wrote: Hi, On Wednesday, May 13, 2009, Jeremy Orlow wrote: On Wed, May 13, 2009 at 1:11 AM, Maciej Stachowiak wrote: On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote: Hi, Does webkit cache squirrelfish bytecode? For example, multiple can use the same javascript file (e.g. common javascript libraries, like jquery, or same domain uses some common javascript file across different pages for the same domain). When webkit parses the JS file and builds squirrelfish-bytecode, does it cache it ? so that subsequence loading of the same js file will skip the js compile process? We don't currently cache the bytecode (or the native code). It is an option we have considered, however, currently, code generation is a trivial portion of JS execution time (< 2%), so we're not pursuing this at the moment. What does the < 2% number reflect? The percent of time while running a particular benchmark or something? A wide variety of benchmarks, and also looking at profiles of real page loads (where JS processing time is only a fraction of the total load time). I totally believe that the speed of runtime is not really affected by it, but what about page load latency? Compile time is a non- trivial component of load time for most JIT compilers I've heard of. Page load speed is very important to us. Right now, based on profiles, it looks to us like we can improve page load speed more by speeding up JS execution, than by caching bytecode. This is true even for pages loading fairly hefty chunks of JavaScript. We'd be glad to do profiling of specific example pages if you have any in mind. [Speaking from the point of view of my day job working on Mobile Gmail instead of occasional evening webkit hacker] Performance tests on mobile gmail for iPhone show that the time from loading the first few bytes of the page from AppCache to the completion of executing the "static" JavaScript (function and variable definitions) occupies a large portion of the application startup time. Somehow speeding this up (caching the parsed and compiled version of JavaScript stored in AppCache maybe?) would be a huge benefit to complex web applications. From that information, I would guess much of the cost is actually executing the global code, though JS parsing may also be a factor. I would also expect significant improvements in iPhone 3.0 and beyond to JS execution speed. That being said, if we find scenarios where parsing is a bottleneck, we'll look into the possibility of caching bytecode or native code. It was one of our original ideas for bytecode, and the only reason we haven't done it is that we haven't yet found evidence that it would help. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] SVG Element Resizing
Please file a bug if you believe WebKit's behavior to be incorrect. https://bugs.webkit.org/show_bug.cgi?id=25179 https://bugs.webkit.org/show_bug.cgi?id=14004 https://bugs.webkit.org/show_bug.cgi?id=18572 are 3 existing FPZ + SVG bugs. -eric On Thu, May 7, 2009 at 7:45 PM, rod wrote: > Hi, > > (Apologies if this is the wrong place to ask this question, please direct me > elsewhere) > > Is there a way to stop SVG elements being resized when the user resizes the > text in their browser. This example... > > http://spawn.boxuk.com/webkitsvg/ > > If you resize the browser text then "Hello, World!" scales > disproportionately with the div it's enclosed within, but the size remains > unchanged so I can't adjust for this. > > What I'd like is to be able to fix the size of the SVG element, is this > possible? > > Thanks, > rod. > > ___ > 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] Using WebKit renderer to produce PDF output
On May 13, 2009, at 2:41 PM, Ben Harper wrote: Unfortunately the platform is Windows. Regarding the method that you're describing - I assume the PDF generation is handled by CoreGraphics? Yes. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Using WebKit renderer to produce PDF output
Unfortunately the platform is Windows. Regarding the method that you're describing - I assume the PDF generation is handled by CoreGraphics? Ben On Wed, May 13, 2009 at 11:17 PM, Darin Adler wrote: > On May 13, 2009, at 2:11 PM, Ben Harper wrote: > >> I need to produce a tool that can generate PDFs from HTML. The best >> solution I can think of is to use WebKit's layout engine, and plug my own >> PDF generator in as a renderer backend. I don't want to reinvent the wheel >> though - so I'm asking here has this been done already, or are there other >> obvious solution out there that I'm missing? > > It depends what platform you’re talking about. The Mac OS X version of > WebKit already offers this capability, since printing on Mac OS X is based > on PDF. The PDFOperationWithView method of NSPrintOperation can work for > this purpose. > > -- Darin > > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Looking for MIPS asm/JIT consultant
We are looking for people of skill in MIPS asm/jit debug expertise as contractor: 1. Experience in writing or porting assemblers, familar with MIP32 o32 and 32bit X86 instruction/calling convention 2. Experience in WebKit-JIT / OpenJIT or similar project 3. able to start debug at short notice, work out test plan later on. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Using WebKit renderer to produce PDF output
On May 13, 2009, at 2:11 PM, Ben Harper wrote: I need to produce a tool that can generate PDFs from HTML. The best solution I can think of is to use WebKit's layout engine, and plug my own PDF generator in as a renderer backend. I don't want to reinvent the wheel though - so I'm asking here has this been done already, or are there other obvious solution out there that I'm missing? It depends what platform you’re talking about. The Mac OS X version of WebKit already offers this capability, since printing on Mac OS X is based on PDF. The PDFOperationWithView method of NSPrintOperation can work for this purpose. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Using WebKit renderer to produce PDF output
Hi, I need to produce a tool that can generate PDFs from HTML. The best solution I can think of is to use WebKit's layout engine, and plug my own PDF generator in as a renderer backend. I don't want to reinvent the wheel though - so I'm asking here has this been done already, or are there other obvious solution out there that I'm missing? Any thoughts or suggestions appreciated. Thanks, Ben ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Memory leaks
13.05.2009, в 23:32, Husam Senussi написал(а): I ran the test cases in the above directory and in test cases for JSON code and end up with reported leaks in the same ares, I thought it might b something I have introduces but I can't find anything related to my code changes in the stack trace dump. Yes, I'm seeing a number of similar leaks in ToT. I'm going to investigate tomorrow, unless someone beats me to it. Thanks! - WBR, Alexey Proskuryakov ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Memory leaks
Hi, Is the below command the correct one to test for memory leaks. ./WebKitTools/Scripts/run-webkit-tests --debug -l LayoutTests/http/ tests/xmlhttprequest if so would /tmp/layout-test-results/DumpRenderTree-leaks.txt file be the right file to look for reported leaks. I ran the test cases in the above directory and in test cases for JSON code and end up with reported leaks in the same ares, I thought it might b something I have introduces but I can't find anything related to my code changes in the stack trace dump. Was the above command the correct one to use !!! or is it problem with my test case Below fragment of the report in three different directory LayoutTests/http/tests/xmlhttprequest Process 26489: 69079 nodes malloced for 8397 KB Process 26489: 98 leaks for 4320 total leaked bytes. Leak: 0x1c3359c0 size=96 instance of 'NSCFString', type ObjC, implemented in CoreFoundation 0xa036d4a0 0x0100078c 0x74746853 0x2f2f3a70 ..6.Shttp:// 0x2e373231 0x2e302e30 0x30383a31 0x782f3030 127.0.0.1:8000/x 0x74686c6d 0x65727074 0x73657571 0x65722f74 mlhttprequest/re 0x72756f73 0x2f736563 0x69736162 0x75612d63 sources/basic-au 0x622f6874 0x63697361 0x7475612d 0x68702e68 th/basic-auth.ph 0x69753f70 0x6f6c3d64 0x316e6967 0x p?uid=login1 Call stack: [thread 0xa00ec720]: | 0x2 | start | main | dumpRenderTree(int, char const**) | runTestingServerLoop() | runTest(std::basic_string, std::allocator > const&) | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] | CFRunLoopRunInMode | CFRunLoopRunSpecific | MultiplexerSource::perform() | URLConnectionClient::processEvents() | URLConnectionClient ::ClientConnectionEventQueue ::processAllEventsAndConsumePayload(XConnectionEventInfoXClientEventParams>*, long) | URLConnectionClient ::ClientConnectionEventQueue ::processAllEventsAndConsumePayload(XConnectionEventInfoXClientEventParams>*, long) | URLConnectionClient::_clientDidReceiveData(__CFData const*, URLConnectionClient::ClientConnectionEventQueue*) | _NSURLConnectionDidReceiveData | - [NSURLConnection(NSURLConnectionReallyInternal) sendDidReceiveData:originalLength:] | - [WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:] | WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int) | WebCore::MainResourceLoader::didReceiveData(char const*, int, long long, bool) | WebCore::ResourceLoader::didReceiveData(char const*, int, long long, bool) | WebCore::MainResourceLoader::addData(char const*, int, bool) | WebCore::FrameLoader::receivedData(char const*, int) | WebCore::DocumentLoader::receivedData(char const*, int) | WebCore::DocumentLoader::commitLoad(char const*, int) | WebCore::FrameLoader::committedLoad(WebCore::DocumentLoader*, char const*, int) | WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) | -[WebDataSource(WebInternal) _receivedData:] | - [WebHTMLRepresentation receivedData:withDataSource:] | - [WebFrame(WebInternal) _receivedData:textEncodingName:] | - [WebFrame(WebInternal) _addData:] | WebCore::FrameLoader::addData(char const*, int) | WebCore::FrameLoader::write(char const*, int, bool) | WebCore::HTMLTokenizer::write(WebCore::SegmentedString const&, bool) | WebCore::HTMLTokenizer::parseTag(WebCore::SegmentedString&, WebCore::HTMLTokenizer::State) | WebCore::HTMLTokenizer::parseSpecial(WebCore::SegmentedString&, WebCore::HTMLTokenizer::State) | WebCore::HTMLTokenizer::scriptHandler(WebCore::HTMLTokenizer::State) | WebCore::HTMLTokenizer::scriptExecution(WebCore::ScriptSourceCode const&, WebCore::HTMLTokenizer::State) | WebCore::FrameLoader::executeScript(WebCore::ScriptSourceCode const&) | WebCore::ScriptController::evaluate(WebCore::ScriptSourceCode const&) | JSC::evaluate(JSC::ExecState*, JSC::ScopeChain&, JSC::SourceCode const&, JSC::JSValue) | JSC::Interpreter::execute(JSC::ProgramNode*, JSC::ExecState*, JSC::ScopeChainNode*, JSC::JSObject*, JSC::JSValue*) | JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*, JSC::JSValue*) | 0xbfb20f | WebCore::jsXMLHttpRequestPrototypeFunctionSend(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, JSC::ArgList const&) | WebCore::JSXMLHttpRequest::send(JSC::ExecState*, JSC::ArgList const&) | WebCore::XMLHttpRequest::send(int&) | WebCore::XMLHttpRequest::send(WebCore::String const&, int&) | WebCore::XMLHttpRequest::createRequest(int&) | WebCore::XMLHttpRequest::makeSameOriginRequest(int&) | WebCore ::XMLHttpRequest::loadRequestSynchronously(WebCore::ResourceRequest&, int&) | WebCore ::ThreadableLoader ::loadResourceSynchronously(WebCore::ScriptExecutionContext*, WebCore::ResourceRequest const&, WebCore::ThreadableLoaderClient&, WebCore::StoredCredentials) | WebCore ::DocumentThreadableLoader ::loadResourceSynchronously(WebCore::Document*, WebCore::ResourceRequ
Re: [webkit-dev] squirrelfish-bytecode
Hi, On Wednesday, May 13, 2009, Jeremy Orlow wrote: > On Wed, May 13, 2009 at 1:11 AM, Maciej Stachowiak wrote: > > > On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote: > > > Hi, > > Does webkit cache squirrelfish bytecode? For example, multiple can use > the same javascript file (e.g. common javascript libraries, like > jquery, or same domain uses some common javascript file across > different pages for the same domain). > > When webkit parses the JS file and builds squirrelfish-bytecode, does > it cache it ? so that subsequence loading of the same js file will > skip the js compile process? > > > > We don't currently cache the bytecode (or the native code). It is an option > we have considered, however, currently, code generation is a trivial portion > of JS execution time (< 2%), so we're not pursuing this at the moment. > > > What does the < 2% number reflect? The percent of time while running a > particular benchmark or something? > I totally believe that the speed of runtime is not really affected by it, but > what about page load latency? Compile time is a non-trivial component of > load time for most JIT compilers I've heard of. [Speaking from the point of view of my day job working on Mobile Gmail instead of occasional evening webkit hacker] Performance tests on mobile gmail for iPhone show that the time from loading the first few bytes of the page from AppCache to the completion of executing the "static" JavaScript (function and variable definitions) occupies a large portion of the application startup time. Somehow speeding this up (caching the parsed and compiled version of JavaScript stored in AppCache maybe?) would be a huge benefit to complex web applications. Rob. > > > > -- Rob Kroeger rjkro...@liqui.org http://www.liqui.org ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] WebKit memory issues
*Hi everyone, I am working on a custom port of WebKit. When I am done with basic WebKit initialization, I load a web page through the call to frame->loader()->load(...) function. Once the data is delivered to WebKit through appropriate call backs (didReceiveData, didFinishLoading), the page is displayed all right. The real cause of concern for me is that the majority of resources allocated during page loading are not reclaimed. I have mapped my allocation routines with fastMalloc() so as to route majority of allocation calls to my routines. To my observation so far, majority of allocation calls are not matched with the corresponding deallocate calls. As a result, resources are not recalimed. As more and more pages are loaded, the available memory eventually exhausts and there is no more memory to work with. What is the right way to reclaim the resources that are allocated during loading of a page. As I have seen, there are a few thousand allocations that take place to load even a very simple web page. All these resources should be releaseb before the next page is loaded. Any help or guidance in this regard will be greatly appreciated. Thanks. Regards, Javed* ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] squirrelfish-bytecode
On Wed, May 13, 2009 at 1:11 AM, Maciej Stachowiak wrote: > > On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote: > > Hi, >> >> Does webkit cache squirrelfish bytecode? For example, multiple can use >> the same javascript file (e.g. common javascript libraries, like >> jquery, or same domain uses some common javascript file across >> different pages for the same domain). >> >> When webkit parses the JS file and builds squirrelfish-bytecode, does >> it cache it ? so that subsequence loading of the same js file will >> skip the js compile process? >> > > We don't currently cache the bytecode (or the native code). It is an option > we have considered, however, currently, code generation is a trivial portion > of JS execution time (< 2%), so we're not pursuing this at the moment. What does the < 2% number reflect? The percent of time while running a particular benchmark or something? I totally believe that the speed of runtime is not really affected by it, but what about page load latency? Compile time is a non-trivial component of load time for most JIT compilers I've heard of. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How to detect the parameters in object tag?
Another way to go could depending on the port you are using. if it exposes DOM APIs (like qt does in trunk), for example, it is a matter of DOM: get element by its id, traverse its "param" child nodes, and get the "name" parameter value... On Tue, May 12, 2009 at 8:56 PM, naixuan guan wrote: > Hi, everyone > > Recently, I met a HTML page which has a object tag like this: > > codebase= classid=> > > > > > > > > > > > > document.player.URL = urlpath+file; > > > I have two questions > 1.how to detect the parameters in object tag? > 2.specially, how to detect the "URL" param which is changed by Javascript? > > Thank you! > ___ > webkit-dev mailing list > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > -- --Antonio Gomes ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] The origin of JavaScript interpreter in WebKit? is it NJS?
Hi Does someone know the origin of JavaScript interpreter in WebKit? I mean _the_ origin, is it sth like NJS Javascript interpreter used to be used for NetScape and in sourceforge? are they the same? joe ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit SMp support
Hi, Did you tried to run webkit on SMP? if yes which platform? SMP are different, I guess there may not be much space for webkit to be optimized for SMP, but OS shall take care of it. Applications may also be organized with SMP in mind. If CPU usage is low and you feel speed is low, it indicates sth not perfect yet it is still not direct to SMP. If one CPU is busy and others are free, then we need to investigate on OS part first I think. rgds joe --- On Tue, 5/12/09, vinay harugop wrote: > From: vinay harugop > Subject: [webkit-dev] Webkit SMp support > To: webkit-dev@lists.webkit.org > Date: Tuesday, May 12, 2009, 3:26 PM > hi, > Recently I read the Multi-processor support coming for > Firefox. > http://mozillalinks.org/wp/2009/05/multi-processor-support-coming-for-firefox/ > > I would like analyze webkit behaviour on a single core > and multi core system. I hope that this is the right place > for the discussion to put my question. > I could find many threads are being created within > webkit, i used android port of webkit for this. Modifying > the procstat revealed that these threads shows the CPU > affinity and some tasks get bounced across different CPUs. > So on multi processor system defintly webkit should get full > advantage and I see webkit should fly on SMP. > > Could some one tell what are the other aspects to check > in webkit for multi core platfrom? how about > Javascritpcore , sunspider, DOM, input content parsing, > image files handling. > Any hints towards optimization for SMP in webkit ? OR is it > already complient/Done ? > > Are there any tools in general avaialble to > measure/benchmark browser behaviour? > thanks > -Vinay > > -Inline Attachment Follows- > > ___ > 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] How to let webkit to be able to load local image file in html content?
It sounds like we can be misusing the base_url parameter. could you paste how you are calling the method (parameters and so) and a snippet of the local html file. On Wed, May 13, 2009 at 6:58 AM, Zhe Su wrote: > Hi, > When I call webkit_web_view_load_html_string() to load a html content into > a webkitview, webkit always refuses to load local files (image) referred in > the html content. Is it possible to work around this behavior and let webkit > load local files? -- --Antonio Gomes ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] squirrelfish-bytecode
On May 13, 2009, at 9:09 AM, Meryl Silverburgh wrote: You mention native code. Under what situation will squirrelfish generate native code? I thought this is how v8 works, but not squirrelfish. Squirrelfish parse JS files and generate its internal bytecode and its VM will execute the bytecode. Is that correct? or I am missing something. This blog post from last September should answer your question: http://webkit.org/blog/214/introducing-squirrelfish-extreme/ -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] squirrelfish-bytecode
On Wed, May 13, 2009 at 1:11 AM, Maciej Stachowiak wrote: > > On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote: > >> Hi, >> >> Does webkit cache squirrelfish bytecode? For example, multiple can use >> the same javascript file (e.g. common javascript libraries, like >> jquery, or same domain uses some common javascript file across >> different pages for the same domain). >> >> When webkit parses the JS file and builds squirrelfish-bytecode, does >> it cache it ? so that subsequence loading of the same js file will >> skip the js compile process? > > We don't currently cache the bytecode (or the native code). It is an option > we have considered, however, currently, code generation is a trivial portion > of JS execution time (< 2%), so we're not pursuing this at the moment. > > Regards, > Maciej > Thanks. You mention native code. Under what situation will squirrelfish generate native code? I thought this is how v8 works, but not squirrelfish. Squirrelfish parse JS files and generate its internal bytecode and its VM will execute the bytecode. Is that correct? or I am missing something. Thank you. > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit capture web page content API
On May 13, 2009, at 8:59 AM, Lucius Fox wrote: But if Webkit is not involved. That means it can not capture the web content which is not within the visible area (e.g. a page is long and it has scroll bar)? To capture more than what’s currently visible you can use these NSView methods with the [[[webView mainFrame] frameView] documentView] view rather than the web view itself. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit capture web page content API
On Wed, May 13, 2009 at 6:39 AM, Darin Adler wrote: > On May 13, 2009, at 12:26 AM, Lucius Fox wrote: > >> Does Webkit have an api which captures web page content? for example in >> Safari 4.0 beta, the history/bookmark shows an image of the web content of >> each history/bookmark entry. Can you please tell me which api in webkit >> that Safari 4.0 is using? > > There’s nothing WebKit-specific involved. This is done with standard Cocoa > NSView APIs such as -[NSView displayRectIgnoringOpacity:inContext:] and > -[NSView cacheDisplayInRect:toBitmapImageRep:]. > Thanks. But if Webkit is not involved. That means it can not capture the web content which is not within the visible area (e.g. a page is long and it has scroll bar)? > -- Darin > > ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit capture web page content API
> There’s nothing WebKit-specific involved. This is done with standard > Cocoa NSView APIs such as -[NSView > displayRectIgnoringOpacity:inContext:] and -[NSView > cacheDisplayInRect:toBitmapImageRep:]. And for doing with Qt port, we use something like explained in: http://labs.trolltech.com/blogs/2008/11/03/thumbnail-preview-of-web-page/ http://labs.trolltech.com/blogs/2009/01/15/capturing-web-pages/ -- Ariya Hidayat, Software Engineer Qt Software, Nokia Devices R&D ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Webkit capture web page content API
On May 13, 2009, at 12:26 AM, Lucius Fox wrote: Does Webkit have an api which captures web page content? for example in Safari 4.0 beta, the history/bookmark shows an image of the web content of each history/bookmark entry. Can you please tell me which api in webkit that Safari 4.0 is using? There’s nothing WebKit-specific involved. This is done with standard Cocoa NSView APIs such as -[NSView displayRectIgnoringOpacity:inContext:] and -[NSView cacheDisplayInRect:toBitmapImageRep:]. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] WebKit custom memory allocation control
Hello everyone, I am facing issues regarding custom memory allocation control in WebKit. I noticed that on April 8, 2009, WebKit/JavaScriptCore/WTF has a new file addition. The newly added file is “fastAllocBase.h” as a result of changes proposed by Paul Pedriana. However, it seems that the proposed changes have not been fully incorporated in WebKit due to required level of effort. I have been facing similar problems with memory allocations with WebKit where there are number of overloaded new operators provided by different classes. I just wanted to know whether it is possible that all the memory allocation calls inside WebKit be routed to user-defined allocation routines. Same should be the case with memory deallocations. I am concerned about control over memory allocations as I am trying to use WebKit on an embedded platform where memory resources are limited and hence the consumption has to be very closely monitored. The WTF STL container classes like Vector, HashSet etc. misbehave as they attempt to allocate memory at runtime through "new" and that new maps to compiler heap memory allocation functions which becomes a problem on embedded platforms. Thanks. Regards, Javed ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] How to let webkit to be able to load local image file in html content?
Hi, When I call webkit_web_view_load_html_string() to load a html content into a webkitview, webkit always refuses to load local files (image) referred in the html content. Is it possible to work around this behavior and let webkit load local files? Regards James Su ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] squirrelfish-bytecode
On May 13, 2009, at 12:18 AM, Meryl Silverburgh wrote: Hi, Does webkit cache squirrelfish bytecode? For example, multiple can use the same javascript file (e.g. common javascript libraries, like jquery, or same domain uses some common javascript file across different pages for the same domain). When webkit parses the JS file and builds squirrelfish-bytecode, does it cache it ? so that subsequence loading of the same js file will skip the js compile process? We don't currently cache the bytecode (or the native code). It is an option we have considered, however, currently, code generation is a trivial portion of JS execution time (< 2%), so we're not pursuing this at the moment. Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Webkit capture web page content API
Hi, Does Webkit have an api which captures web page content? for example in Safari 4.0 beta, the history/bookmark shows an image of the web content of each history/bookmark entry. Can you please tell me which api in webkit that Safari 4.0 is using? Thank you. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] squirrelfish-bytecode
Hi, Does webkit cache squirrelfish bytecode? For example, multiple can use the same javascript file (e.g. common javascript libraries, like jquery, or same domain uses some common javascript file across different pages for the same domain). When webkit parses the JS file and builds squirrelfish-bytecode, does it cache it ? so that subsequence loading of the same js file will skip the js compile process? Thank you. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev