Re: [webkit-dev] Regarding cache memory leaks
On Wed, Oct 13, 2010 at 9:00 PM, sumanrap...@aim.com wrote: Hi Holger, When we use the default cache model i.e 8MB cache size in this case it is storing the images beyond the 8MB that is untill complete RAM memory. How much memory do you have on your system. AFAICT, webkit would need ~80M to work with most of the large web pages. So we disabled the cache by using WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER even though the images and JS are storing in the Cache. We observed this by printing dumpStats output. Everything loaded in the current page gets to the cache first. The cache limit applies to pages other than the current page. Try loading a large page followed by a blank page and see if the cache limit is exceeded. Can you please suggest us how to disable the cache properly ? you can disable it (Cache.cpp - m_disabled = true), but it will not solve the above problem. If you have a limited RAM, you could devise other techniques like disabling bigger image loads and other page content (flash), handling near OOM/estimating memory usage of a page and stopping loads. check how other mobile browsers (opera mini, n95) behave with limited RAM for large pages. BTW are you using a mobile user agent? that would solve some of the problems with large pages, though not all. we are using webkit-1.2.3 and cross compiled for MIPS platform with gtk-directfb backend. Thanks In Advance. Thanks, Suman -Original Message- From: webkit-dev-request webkit-dev-requ...@lists.webkit.org To: webkit-dev webkit-dev@lists.webkit.org Sent: Mon, 11 Oct 2010 7:30 pm Subject: webkit-dev Digest, Vol 65, Issue 12 Send webkit-dev mailing list submissions to webkit-dev@lists.webkit.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev or, via email, send a message with subject or body 'help' to webkit-dev-requ...@lists.webkit.org You can reach the person managing the list at webkit-dev-ow...@lists.webkit.org When replying, please edit your Subject line so it is more specific than Re: Contents of webkit-dev digest... Today's Topics: 1. Regarding cache memory leaks (sumanrap...@aim.com) 2. Re: Regarding cache memory leaks (Holger Freyther) 3. Tiger? (Adam Barth) -- Message: 1 Date: Sun, 10 Oct 2010 12:37:46 -0400 (EDT) From: sumanrap...@aim.com To: webkit-dev@lists.webkit.org Subject: [webkit-dev] Regarding cache memory leaks Message-ID: 8cd36b09a73f4e9-1380-26...@webmail-d112.sysops.aol.com Content-Type: text/plain; charset=us-ascii Dear All, We are working on webkitGtk ( with gtk-directfb backend ) and ported for MIPS platform. We observed there are memory leaks with PNG/JPG image rendering. I am using webkit-1.2.3 version and I set cache model to WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. When I am printing the dumpStats I could able to see the Image count and live decoded image sizes. Even I disabled the cache it is storing on to cache. could you please suggest me is there any patch to avoid image related memory leaks with webkitGtk. Please help me on this. Thanks In Advance. -- next part -- An HTML attachment was scrubbed... URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20101010/f451c9f4/attachment-0001.html -- Message: 2 Date: Sun, 10 Oct 2010 19:07:25 +0200 From: Holger Freyther ze...@selfish.org To: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] Regarding cache memory leaks Message-ID: 4cb1f2cd.4050...@selfish.org Content-Type: text/plain; charset=ISO-8859-1 On 10/10/2010 06:37 PM, sumanrap...@aim.com wrote: Dear All, When I am printing the dumpStats I could able to see the Image count and live decoded image sizes. Even I disabled the cache it is storing on to cache. could you please suggest me is there any patch to avoid image related memory leaks with webkitGtk. Please help me on this. How do you know it is leaked? If you are currently viewing these images you will most likely have the encoded and decoded version around. Do you have a test case to show the memory leak? -- Message: 3 Date: Mon, 11 Oct 2010 01:26:34 -0700 From: Adam Barth aba...@webkit.org To: webkit-dev@lists.webkit.org Subject: [webkit-dev] Tiger? Message-ID: aanlkti=_ttwa60s5oamotjuu8qd3m4njq00ej2krk...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 I don't see a Tiger buildbot anymore. Does that mean I'm allowed to break the Tiger build? If so, can we rip out all the Tiger-specific code? Adam -- ___ webkit-dev mailing list webkit-dev@lists.webkit.org
Re: [webkit-dev] Announcing WebKit2
hi , why only multi-process and not multi-thread like android. It is useful for mobile environments. thanks, Zaheer On Fri, Apr 9, 2010 at 5:15 PM, Maciej Stachowiak m...@apple.com wrote: On Apr 9, 2010, at 3:40 AM, Maciej Stachowiak wrote: On Apr 9, 2010, at 3:36 AM, Jeremy Orlow wrote: I hope this post clarifies why the Chromium WebKit port is not really a viable solution for our needs as it stands today. It was _very_ helpful. Thanks for taking the time to explain it so well. (It might be worth moving some of that description and diagrams into the Wiki as well.) Yeah, I'm trying to put some of this info in the wiki as we speak. :-) I made a bunch of updates to the wiki page: http://trac.webkit.org/wiki/WebKit2 Regards, Maciej ___ 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] [chromium-dev] Learning Webkit: High Level Webkit overview?
hi, My comments below. Pls correct me if my understanding is inaccurate. On Wed, Oct 7, 2009 at 2:37 AM, Buakaw San buakaw@gmail.com wrote: Thanks for your input. I have attached the flow chart for the Mozilla's Layout engine, how would you say the WebKit data flow differs from this diagram? I'm a little confused about when the CSS gets parsed. The default style rules (User/UA style sheet) gets parsed in Document::attach() which happens when documents gets transitioned to commit state (i.e. the moment you receive some data). The page style (inline style, link, import etc) get parsed as and when they are loaded and the styles are updated (updateStyleSelector()) From the documentation that I've read, my understanding is that the CSS must be read and parsed before the DOM tree can be constructed since the RenderObject is attached with its RenderStyle as the DOM nodes are added. I dont think this is true. The style for an element is computed on the fly using the CSSStyleSelector with the current css rules and these can change whenever new styles are loaded. i think the process of updateStyleSelector + recalcStyle(Force) does this two steps - i.e update style selector on the document, and ask the dom nodes to update their styles I can't seem to pinpoint where this attaching occurs. because the style loading is progressive, the first layout is postponed till all styles have been loaded. Document::shouldScheduleLayout() - haveStyleSheetsLoaded Thanks. On Tue, Oct 6, 2009 at 1:20 PM, James Robinson jam...@google.com wrote: On Sun, Oct 4, 2009 at 8:19 AM, Buakaw San buakaw@gmail.com wrote: There is a document called How Chromium Displays Web Pages (http:// dev.chromium.org/developers/design-documents/displaying-a-web-page-in- chrome), however I haven't found an equivalent page for Webkit. E.g. How Webkit Renders Web Pages. The Chromium document doesn't go into the Webkit part. There is an old blog http://webkit.org/blog/114/webcore-rendering-i-the-basics/. Which talks about some of the render process but it seems to focus on CSS handling. I'm trying to diagram this process. E.g. We're load a simple web page with some body text, a couple divs; one with an image tag, one with a plugin like flash. What is happening from start to finish? I imagine the process like such: Content = HTML Parsing = DOM Construction = Layout (Render Tree Construction) = Rendering That's pretty much spot on. Note that it's not always happening exactly in this order, especially if the document is large and arrives from the server in multiple chunks. Then it could look something like: Some content received HTML parsing (which builds up the DOM as it goes) Some more content received More HTML parsing, DOM construction Layout Rendering (aka painting) What is the first thing that is done? Which class is initially hit when a new web page request arrives? Which classes are responsible for parsing HTML/DOM/CSS? How is the plugin loaded? How is the image loaded? The picture is a bit complex, but I can try to give some pointers for starting. Resources are pulled in through a variety of Loader classes - start with FrameLoader (although it's too complicated at the moment). HTML Content is fed into an HTMLTokenizer which builds up the DOM tree. For images, see ImageLoader. I'm not sure exactly how plugins work. Layout and painting are covered in the Surfin' Safari blog post - if you want to step through them in a debugger start in FrameView. While these are questions that could be answered by studying the code in depth, it would be nice if there was such a basic introduction to Webkit rendering. Ideally one with nice pictures (like the Chromium docs), interaction diagrams and such. Is that volunteering? :) - James Perhaps this thread could become a source of knowledge for new comers. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-...@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-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
[webkit-dev] italics and blink support on GTK port
hi,There are couple of issues in latest nightlies on gtk port (issues were there in earlier builds too), 1- italics do not work for many font families (e.g monospace, serif etc). the issue seems to be in the fast render path (freetype), if we disable fast rendering we do not see the issue. http://www.fonttester.com/ 2- blink css tag (text-decoration: blink;} is not working My understanding is that 1 is a bug in webkit and 2 is not supported. appreciate if someone can corroborate on this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Serialize DOM to file
hi you can get the root node of DOM and use XMLSerializer::serializeToString regards zaheer On Thu, Jun 4, 2009 at 11:11 AM, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Hi, Is there any debug code/example code snippet to serialize the DOM to a fie? Thank you for any tip. ___ 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] caching /memory leak... browsing images
Webkit has a default cache of 8 Mb (WebCore/Loader/Cache.cpp) and your data suggests it is using with in that limit. And it is a fraction of 150Mb you have mentioned, please check where the other memory is going. thanks, Zaheer On Mon, Mar 16, 2009 at 11:49 AM, Purushottam Sholapur purushottam.shola...@gmail.com wrote: Hi All, I am using webkit on davinci platform, with QT. We have 150MB of RAM, If I use browser for 15-20 minutes. Entire memory is exhausted. There is no other application running. This is happening more with webpages having bigger images. I am browsing http://www.images.google.com I tried with QtLauncher and Qt demo/browser, behavior is same. I tried with latest nightly webkit build also. (on 9th Mar '09), same result. Not sure where it is caching or leaking. Tried dumping Cache statistics periodically using. Cache * cp = cache(); cp-dumpStats(); It initially prints like this Count SizeLiveSizeDecodedSize PurgeableSize PurgedSize --- --- --- --- --- --- --- Images3 210215 210215 186976 0 0 CSS 0 0 0 0 0 0 JavaScript122852285 0 0 0 Fonts 0 0 0 0 0 0 --- --- --- --- --- --- --- Later Count SizeLiveSizeDecodedSize PurgeableSize PurgedSize --- --- --- --- --- --- --- Images 40 3968623 3891850 3729336 0 0 CSS 2 17409 17409 0 0 0 JavaScript4 651566 649281 432854 0 0 Fonts 0 0 0 0 0 0 --- --- --- --- --- --- --- Images, CSS, JavaScript count never reduces. Are they cached..? Is it same as that of this ... http://www.nabble.com/JavaScript-memory-management-question-to20842278.html#a20842278 Please suggest to solve this, regards Purush ___ 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 handle error response on the browser when the HTTP request fails
I think you need to set CURLOPT_FAILONERROR on the curl handle for the curl to report http errors. Also in general you would want to diffferentiate how you handle errors on mainresource vs subresources regards, Zaheer On Thu, Feb 12, 2009 at 9:04 PM, Nitin Walke nitwa...@gmail.com wrote: Hi, Thanks for your suggestion. I added delegate method in FrameloaderClient::dispatchDidFailLoading for GTK, however, noticed that the control flow never reached there - either in case of successful response or for http error like server not found etc. Then I added some debug code in FrameloaderClient::dispatchDidFailLoading for GTK; and found that the control flow does not reach there. Am I missing something here? Your inputs will be appreciated. Regards, Nitin On Thu, Feb 12, 2009 at 11:55 AM, zaheer ahmad zaheer@gmail.comwrote: If you are using curl backend, network errors are already reported back but ignored. you need to implement FrameloaderClient::dispatchDidFailLoading delegate to pass it back to the application. regards, Zaheer On Wed, Feb 11, 2009 at 7:03 PM, Nitin Walke nitwa...@gmail.com wrote: Hi, I am new to Webkit and have developed a basic browser using Webkit GTK port on linux. I want to show error response on the browser when the HTTP request fails for some reason like bad gateway or Server error etc. Currently the browser does not show any response in case of any error. Please advise how to go about implementing the same. Thanks ___ 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] PNG decoding takes too much memory on amazon.com
hi, I have cache disabled and on loading amazon.com, the memory consumption on the linux gtk port is ~32Meg(private dirty RSS). Approx 14Meg of this is taken by the png decoder for the following image of size 1296000 bytes which is allocated 9 times. The behavior is same on the desktop with recent build (r40777) http://g-ecx.images-amazon.com/images/G/01/gno/images/orangeBlue/navPackedSprites_v3._V260607109_.png I dont know if this is a cache or image decoder issue. i would think a resource already loaded would be reused in the same page even if the cache is disabled, but doesnt look so. Any pointers would help. thanks, Zaheer PS: heres the backtrace 13882320 |-WTF::fastMalloc(unsigned int)+16 |--WTF::Vectorunsigned int, 0u::reserveCapacity(unsigned int)+64 |---WTF::Vectorunsigned int, 0u::expandCapacity(unsigned int)+76 |WTF::Vectorunsigned int, 0u::resize(unsigned int)+56 |-WebCore::PNGImageDecoder::rowAvailable(unsigned char*, unsigned int, int)+488 |--png_push_have_row+28 |---WebCore::PNGImageDecoder::decode(bool) const+48 |WebCore::PNGImageDecoder::frameBufferAtIndex(unsigned int)+56 |-WebCore::ImageSource::createFrameAtIndex(unsigned int)+80 |--WebCore::BitmapImage::cacheFrame(unsigned int)+80 ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How to handle error response on the browser when the HTTP request fails
If you are using curl backend, network errors are already reported back but ignored. you need to implement FrameloaderClient::dispatchDidFailLoading delegate to pass it back to the application. regards, Zaheer On Wed, Feb 11, 2009 at 7:03 PM, Nitin Walke nitwa...@gmail.com wrote: Hi, I am new to Webkit and have developed a basic browser using Webkit GTK port on linux. I want to show error response on the browser when the HTTP request fails for some reason like bad gateway or Server error etc. Currently the browser does not show any response in case of any error. Please advise how to go about implementing the same. Thanks ___ 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] WAP browsing
hi George, Thank you for your reply. we would love to contribute any way we can. currently we do not have any plans to implement these standards, although it is certainly possible in near future. thanks, Zaheer On Fri, Jan 2, 2009 at 10:30 PM, George Staikos stai...@kde.org wrote: Hi Zaheer, We don't have any plans to add all of those technologies, but we do plan to add some of them. Does Azingo have plans to contribute some of these things? On 2-Jan-09, at 12:55 AM, zaheer ahmad wrote: hi, Thanks for your response. extending my question, r there plans for wap 2.0 specifications (xhtml mp, css mp, ecmascript mp) too? thanks in advance. thanks Zaheer On Wed, Dec 31, 2008 at 5:43 AM, Nikolas Zimmermann zimmerm...@physik.rwth-aachen.de wrote: Am 30.12.2008 um 19:46 schrieb zaheer ahmad: hi, Given that webkit has recently added support for WML, I think it requires WMLScript and WCSS to fully support WAP (1.3) browsing. would like to know if there is any ongoing effort on this. thanks, Zaheer Hi Zaheer, WML is still in the works. I'm still merging in the original WML support patch from TorchMobile. WCSS is in the queue, and there are plans to also add that. WMLScript won't be implemented, it's virtually dead. Have a nice day, Niko -- George Staikos Torch Mobile Inc. http://www.torchmobile.com/ ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] WAP browsing
hi, Given that webkit has recently added support for WML, I think it requires WMLScript and WCSS to fully support WAP (1.3) browsing. would like to know if there is any ongoing effort on this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] background transparency of webkitwebview on gtk port
hi all, iam trying to make the webview container transparent to show through its parent's background. i set the webview to transparent and also do not have background color property set. i find that the background still gets drawn. i suspect this is the containers background? is there a way to prevent the drawing of the containers background (i tried gtk_widget_set_app_paintable + gdk_window_set_back_pixmap on the webview widget but does not work). i tried changing the parent of webview to event box which has transparency setting, but does not help either. Appreciate any pointers. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] retreiving favicon on gtk port
hi all,Iam trying to retrieve the favicon when loading a website. i find that IconLoader::didfinishLoading gets called with valid data followed by a IconLoader::didFail which clears the icon from the database. The comment in didFinishLoading suggests that this is a valid scenario. it points to rdar://problem/5463392 (this is an apple internal bug id, is there a way to access this?). appreciate any inputs on why two indications are coming for the same resource and how to overcome this problem. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] zoom from a point - design inputs
hi all, Iam implementing a variant of the zoom api in the gtk port to zoom wrt to a click point instead of the default page origin. i see few options - translate the cairo context in the expose and adjust document dirty rectangles in paint. This may break other usecases as layout engine is oblivious to this - use the css transforms and translate and zoom on the root element. - zoom + scroll by the offset of the point - non-optimal This equally applies to the landscape mode view though that can be transparently handled at the platform level (gtk/x) Please let me know any inputs on the right approach to this problem. thanks, Zaher ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] http cache support - rfc2616
hi,Does webkit or any component built with (e.g. chromium) has a full implementation of http caching- rfc2616. a quick search in the code base or the bug list does not suggest one. Looks like some of the pieces from html5 application cache can be reused for such an implementation. kindly suggest. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Save Page - Ideas
hi, iam working on implementing save page functionality. Looks like its not already supported in the core. Following are some high level ideas and iam not sure if some or all of these are the right approaches to this problem - write the page data to the file system as and when is received - but this is not optimal since this incurs constant overhead on page load - apis to retreive the source (html, js, css) and image/object data (original form) from the document. I think the parsers/loaders incrementally handle the data and throw off the parsed text - pls validate my understanding here. - parse and convert all the html absolute/relative URIs to relative URIs on the file system - any other optimized storage methods - e.g. storing the entire page as a single file using multipart content please advise. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] Blocking UI (linux/gtk)
hi, Iam analyzing the UI response issues on the webkit linux/gtk port on arm embedded platform. One observation is that the webcore timer driven callbacks (e.g. layout, network, tokenizer etc) can block for unbounded time. The other is that TimerBase::fireTimers fires all pending timers at once which could mean the UI can be blocked furthur if there are multiple timer events pending. This looks like an issue on platforms that run GUI/webcore logic in same threads like gtk. one of the suggested ways to improve this is to peridodically allow the ui to run in these callbacks (though that may cause some reentrancy issues). e.g. TimerBase::fireTimers(..) {for each iteration{ fireTimer; g_main_context_iteration(..);}} Appreciate any inputs. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] WebKit memory management?
This makes it impossible to correctly shut down WebKit at runtime on this topic, i see that few singleton/global objects (ResourceHandleManager, Cache, allPages(Page.cpp) ) and possibly more are not getting destructed when webview is closed on the linux/gtk port. I dont know if this is an intended behavior or a bug, but this could be an issue in cases where you want to do a shut down only of webkit library. comments? thanks, Zaheer On Wed, Sep 17, 2008 at 12:58 AM, Paul Pedriana [EMAIL PROTECTED] wrote: You are correct, though non-PODs are intended to go through the base-case operator new, whereby this wouldn't apply. The newObject template would have applicability only to PODs or even just built in types like int/char. If somehow it was deemed that this means was needed for non-PODs, the typical solution is to use a macro, as in: #define newObject(Type) new(fastMalloc(sizeof(Type)) Type This has some advantages beyond argument passing over the template solution. We've used this approach fairly successfully on a large scale at my company. Paul Hi, I just wonder how you can pass arguments to your new operator when they are mandatory (no default constructor), in the following case: class Foobar{ public: Foobar(int a,char* b); }; class Barfoo{ public: Barfoo(char* a); } Foobar* myFoobar=newObjectFoobar( ?? ); Barfoo* myBarfoo=newObjectBarfoo( ?? ); Reading your patch, I don't think this testcase will work... will it? Fred Le Tuesday 16 September 2008 à 20:28, Paul Pedriana a écrit : I'm curious to see the patch (just to give an idea how big the changes would be). Do you have it somewhere? The patch is at: https://bugs.webkit.org/show_bug.cgi?id=20422. I don't think this is a terribly difficult thing to implement (though I don't mean to imply that it's trivial either). It might take a couple iterations to make sure all instances are handled, though. I searched the code and found a couple thousand instances of the keyword 'new', though most of those would fall under the case of the base class operator. Ah I see now. So you want to isolate the malloc from WebKit module. Furthermore, you want to be able to kill WebKit *only* when something weird happens, am I correct? I want to be able to shut down WebKit at any time, and possibly restart it. If WebKit is used as a library within an application instead of being the application itself, then you want to initialize it when needed, but when it's no longer needed then you want to shut it down. Think of computer games like Grand Theft Auto whereby you are a character walking around the world investigating something; and your character walks up to a computer in the game and uses it to connect to the real web (using an embedded WebKit) to search for live-generated info for a while. When the character shuts off the virtual computer, the game needs the resources of that computer to go away, as the game needs to recover the RAM for the next thing the user does. It significantly improves heap fragmentation of that WebKit instance ran in a single contiguous block of memory such that when it went away there is a nice big clean space left over. That being said, your original case of killing WebKit when something weird happens is also a practical use case. Such a thing might in fact be memory exhaustion due to fragmentation. Paul The primary benefit of being able to override operator new is to be able to redirect all allocations for a library to a user-specified heap. With global operator new, allocated WebKit memory is mixed in with the rest of the application memory and there is no practical way to tell them apart or sequester them. This makes it impossible to correctly shut down WebKit at runtime, since you don't know where its memory is. A side benefit related to this is that this allows for better memory metrics gathering. Ah I see now. So you want to isolate the malloc from WebKit module. Furthermore, you want to be able to kill WebKit *only* when something weird happens, am I correct? The proposal provides for a base class that overrides global operator new. So any allocated classes use the same syntax as usual. Most of the source code would fall under this. Yes, that is true. For the case of non-class-based memory allocations (e.g. raw char array), the proposal provides a newObject and newArray template function. So instead of 'new int' you would way 'newObjectint' and instead of 'new char[32]' you would say 'newArraychar(32)'. However, there is an alternative approach which is to provide a custom operator new type, like so: struct WTF{}; void* operator new(size_t size, WTF); and so 'new char[32]' becomes 'new(WTF()) char[32]'. This is the conventional solution to namespacing operator new, where the C++ standard doesn't allow for operator new being in a C++ namespace. Perhaps this
[webkit-dev] Tweaking cache size for embedded browser
hi, webkit currently reserves 8Mb of cache space (refer: Cache.cpp). This seems too high for an embedded browser that should work with as less as 10Mb of RAM. Other than the performance/reload of resource impact are there any side effects by reducing this or totally disabling it. one feature that inherently relies on cache is the navigation history, however in our tests we see that there is no impact other than the reload (e.g. form data is preserved in navigation). we think that a small cache ~500k is more appropriate to help for content thats repeated in the same page being refetched. appreciate any inputs on this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Tweaking cache size for embedded browser
i think the below is related to JS engine. i was referring to the cached resources(css, js, images etc) - WebCore/loader/Cache.cpp:44 static const int cDefaultCacheCapacity = 8192 * 1024; regards, Zaheer On Wed, Sep 17, 2008 at 1:23 PM, Paul Pedriana [EMAIL PROTECTED] wrote: That was discussed last month. See the thread at: https://lists.webkit.org/pipermail/webkit-dev/2008-August/004719.html I am currently running my copy like this: enum { DefaultCapacity = 2 * 256 * 1024 / sizeof(Register)}; // Originally (2 * 1024 * 1024 / sizeof(Register)) enum { DefaultMaxGlobals = 4 * 1024 }; // Originally (8 * 1024) hi, webkit currently reserves 8Mb of cache space (refer: Cache.cpp). This seems too high for an embedded browser that should work with as less as 10Mb of RAM. Other than the performance/reload of resource impact are there any side effects by reducing this or totally disabling it. one feature that inherently relies on cache is the navigation history, however in our tests we see that there is no impact other than the reload (e.g. form data is preserved in navigation). we think that a small cache ~500k is more appropriate to help for content thats repeated in the same page being refetched. appreciate any inputs on this. thanks, Zaheer -- ___ webkit-dev mailing [EMAIL PROTECTED]://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] Curl resourcehandle leaks in Linux/Gtk port
hi, In the linux Gtk port, with Webkit revision 33493, i see that the resource handles (curl backend) never get released after completing the data transfer for that request. This results in big leaks in resourcehandles as well as the curl internal data structures. (~800k on opening nytimes.com and closing the connection) The reason is that the ResourceHandle ref count never drops to 0, resouce loaders drop their refcount correctly, but the ref done by the Resource handle onitself (source below) before handing over to the resourcehandle manager is not matched with a deref. ResourceHandleCurl.cpp: bool ResourceHandle::start(Frame* frame) { ASSERT(frame); ref(); ResourceHandleManager::sharedInstance()-add(this); return true; } The fix that works is to deref in the ResourceHandleManager::removeFromCurl however we do not know the impact. Brief look at the latest code doesnt seem to have changed this much, however i can still verify on it. BTW why does handing resourcehnadle to resourcehandlemanager need to be protected, i guess a weak pointer would do. Also i dont see this done in other ports + gtk/soup though the interfaces are different. thanks in advance for any inputs. regards, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Curl resourcehandle leaks in Linux/Gtk port
hi, The fix only helps little as we see the bigger leaks in curl. feedback from curl experts suggests that this design is correct.. let me know if you are aware of this issue == here's the mail snapshot. we are seeing big leaks in curl (Curl_connect - 600-800k and Curl_open - ~200k) when we browse through as little as few websites. This values keep increasing as we browse more sites. heres the high level logic of webkit=curl interaction 1- create a multi handle at the start of program 2- keep creating easy handles for each request 3- when request is done remove it from multi handle and clean up the handle 4- multi handle is never released (stays till the end of program) This design assumes that multi handle has a bounded memory usage as we keep adding and removing easy handles, but that seems to be not true with the leaks. == Now I just started to use valgrind to find other memory leaks, so this and other issues should be hopefully fixed soon. these are not traditional memory leaks, you are holding on to things longer than you should, so they are more functional leaks. Does valgrind help in that too? thanks, Zaheer On Wed, Sep 10, 2008 at 8:02 PM, Marco Barisione [EMAIL PROTECTED] wrote: Il giorno mer, 10/09/2008 alle 07.22 -0700, Mike Emmel ha scritto: This leak is fixed in the ncurl port. Is it possible to backport the fix? -- Marco Barisione ___ 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] Curl resourcehandle leaks in Linux/Gtk port
hi mike, The ncurl port is not yet in the official builds. meanwhile how do you suggest to fix this in the current baseline. one of the changes that does help is to periodically cleanup the multihandle when the running job count drops to 0 and recreate on the next request (this is just a temporary fix till we find the real issue in curl) i have few comments on the ncurl patch: https://bugs.webkit.org/show_bug.cgi?id=17972 - is it better than the current timer driven behavior, since the glib main loop polls the fds faster if its free- but thats seems to be a small gain since the timeout is very small - in the current implementation curl_multi_perform may block if theres lots of data queued up on multiple handles, but that can be easily mitigated by returning frequently from curl_multi_perform - what about doing select in separate thread as glibcurl does. i think this is safe as perform happens in the main thread. thanks, Zaheer On Wed, Sep 10, 2008 at 8:40 PM, Mike Emmel [EMAIL PROTECTED] wrote: Look I had to change to one multi handle per handle basically just and asynchronous handle to get everything to clean up. Its a significant refactoring and better design. What it points to on the curl side is the need for and asynchronous simple handle. Also polling was removed as much as possible curl does not send decent time outs if it has real work to perform so this is still a issue. However open file handles are handled in the event loop select. Curl needs to be extended to have the concept of a work request and a longer term watch timeout. So in my opinion the issues are fixed at least to the extent possible without help from the curl team. On Wed, Sep 10, 2008 at 7:53 AM, zaheer ahmad [EMAIL PROTECTED] wrote: hi, The fix only helps little as we see the bigger leaks in curl. feedback from curl experts suggests that this design is correct.. let me know if you are aware of this issue == here's the mail snapshot. we are seeing big leaks in curl (Curl_connect - 600-800k and Curl_open - ~200k) when we browse through as little as few websites. This values keep increasing as we browse more sites. heres the high level logic of webkit=curl interaction 1- create a multi handle at the start of program 2- keep creating easy handles for each request 3- when request is done remove it from multi handle and clean up the handle 4- multi handle is never released (stays till the end of program) This design assumes that multi handle has a bounded memory usage as we keep adding and removing easy handles, but that seems to be not true with the leaks. == Now I just started to use valgrind to find other memory leaks, so this and other issues should be hopefully fixed soon. these are not traditional memory leaks, you are holding on to things longer than you should, so they are more functional leaks. Does valgrind help in that too? thanks, Zaheer On Wed, Sep 10, 2008 at 8:02 PM, Marco Barisione [EMAIL PROTECTED] wrote: Il giorno mer, 10/09/2008 alle 07.22 -0700, Mike Emmel ha scritto: This leak is fixed in the ncurl port. Is it possible to backport the fix? -- Marco Barisione ___ 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
[webkit-dev] GTK threading
hi, Webkit linux GTK version does not employ any threading. This is unlike MAC/Windows port or firefox that use threading for n/w io, js exec, UI and probably for others like rendering/parsing. Threading may be more appropriate on embedded systems where ui response is probably more important than throughput. It may complicate webkit design, but is that a compromise. would like to understand the design decisions, which parts of webkit are threadsafe, how difficult or easy is to do some of these on the gtk port. Appreciate any inputs so that we have the right info to take it furthur. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Get SquirrelFish for Webkit in linux
Are you using a proxy to connect to nw? we have seen that gmail does not open with a proxy. thanks On Mon, Jun 9, 2008 at 10:04 AM, ying lcs [EMAIL PROTECTED] wrote: On Sun, Jun 8, 2008 at 9:18 PM, Ryan Leavengood [EMAIL PROTECTED] wrote: On Sun, Jun 8, 2008 at 9:44 PM, ying lcs [EMAIL PROTECTED] wrote:. But when I try './Programs/GtkLauncher' and load 'http://mail.gmail.com', nothing get loaded. But when I do 'http://www.cnn.com', it works. As far as I can tell there is no such site as mail.gmail.com. Try just plain old gmail.com or mail.google.com. Ryan Thanks for all the help. I did try 'mail.google.com', I have a typo in my mail. But I still get a blank page when l load 'mail.google.com'. I have attached screen shots. I am able to load www.cnn.com. I am running Webkit on linux (ubuntu). ___ 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] Gtk scroll improvement
hi, iam looking at improving scroll perf on webkit gtk port and came across this patch https://bugs.webkit.org/show_bug.cgi?id=15070 that uses double buffer. Taking the patch only vertical scroll down seems to work. i was suspecting -ve values in gdk_draw_drawable scrollStore when dx/dy is 0, but that did not help.. Also is there a way to capture the backing store data to an image (similar to cairo write to png). could not find one. Appreciate any inputs on this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] webkit gtk paint
hi all, The current paint algorithm in webkit (gtk port) requests all the objects in the clip region to repaint itself to the cairo surface. This seems terribly slow on a embedded arm platform (400Mhz, 64M Ram, takes 200ms) for a scroll. we are expecting a 20FPS response speed to enable a smooth scroll on a touch h/w without graphics gpu support. i remember reading a post where cairo double buffering was a option to improve the same. Appreciate any inputs on the same. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] crash when loading certain pages
hi, thanks for the response. unfortunately i dont have a x86 environment to run the valgrind. here is the sequence of events that lead to this failure.. - open nytimes.com - when it is partiially loaded open weather.com - 4 pending jobs in nytimes get cancelled, however the 5th is not and results in crash loading url www.weather.com cancel job bae8f0 url: http://graphics8.nytimes.com/ads/cla/defaultads/RMI/1.30.08/rmi_120x60_btn3.gif cancel job c78388 url: http://graphics8.nytimes.com/images/2008/05/08/sports/09moth_canopy.jpg cancel job cfa2c8 url: http://graphics8.nytimes.com/adx/images/ADS/14/68/ad.146808/dealbookjobs_housead.gif cancel job 3c1920 url: http://graphics8.nytimes.com/images/2008/04/26/jobs/mgmt.75.jpg ++ didReceiveResponse job bc3690 url: http://graphics8.nytimes.com/feedroom/nytc3/creative/bg_notenabled.gif -- incorrect response should have been cancelled And i checked the documentLoader (cancelAll) and it seems to only have 4 entries. investigating on why the fifth job is missing from the document load list.. thanks, Zaheer On Thu, May 8, 2008 at 6:00 AM, Holger Freyther [EMAIL PROTECTED] wrote: On Wednesday 07 May 2008 09:19:51 zaheer ahmad wrote: hi, we are using webkit gtk version r31307. we are facing a random crash when opening certain sites like weather.com, the backtrace is as below You could test if that is happening on a x86/Linux system as well and then use valgrind (and compile with debug symbols) and have profit. kind regards z. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] landscape mode in gtk port
hi, iam interested in a landscape implementation for the webkit/gtk port. i see few approaches - use the webkit-transform rotate. however as i understand the transform does not affect the layout and hence this may not be useful (e.g. the height/width would remain same for the page) - control the orientation at the gtk window level for the page - did not find such api exists in gtk - change all the relevant components (rendering engine, views, event handlers etc) to understand the new mode of drawing similar to current zoom implementation. Appreciate any advise on how to go about this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Text color inside Textfield in GTKport
hi, Text color inside text field in GTK port does not seem to honor the theme settings. This seems to be an issue. Please comment. Also can you point on the relevant piece of code that controls this. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] get the bits of the complete page
hi, The patch does not reposition the changed document to the top of the frame view and also does not alter the documents width/height. The same behavior is seen with transforms from html pages(e..g scaled content goes out of the window) Are these known issues? Setting the transform origin (style-setTransformOriginX(Length(0,Fixed));) should fix the first problem. A force layout with changed width/height for the renderview should solve the second problem. not sure if this is the right thing to do. let us know your comments. thanks, Zaheer On Nov 30, 2007 4:47 PM, Alp Toker [EMAIL PROTECTED] wrote: Zaheer, If you really need full page zooming so much and can't wait for the bug to get fixed, try something like this (untested): void webkit_frame_set_scale(WebKitFrame* frame, double scale) { g_return_if_fail(WEBKIT_IS_FRAME(frame)); WebKitFramePrivate* frameData = WEBKIT_FRAME_GET_PRIVATE(frame); Frame* wframe = frameData-frame; Document* document = wframe-document(); HTMLElement* root = reinterpret_castHTMLElement*(document-documentElement()); RenderObject* renderer = root-renderer(); RenderStyle* style = renderer-style(); TransformOperations ops; ScaleTransformOperation* scaleOp = new ScaleTransformOperation(scale, scale); ops.append(scaleOp); style-setTransform(ops); renderer-setStyle(style); } ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] releasing cached resources
hi, iam working with gtk port of webkit. iam trying to optimize the ram usage. one of the optimization is to disallow caching images and not supporting the forward/backward navigation. however i observe that not all the cached resources are being released as part of the closing of page. this is because for these the reference count (CachedResource::referenced() is still 0) event after the html image element has released it. Appreciate any inputs or redirection to related issues. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Flatten frames/iframes
hi, iam working a gtk webkit port on mobile. the default impl for frames/iframes creates a new subframe inside the current frame. is there a way to flatten the frames in the current frame without creating a subframe (preferred option for limited display devices) Appreciate any inputs on the same. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] performance on ARM
hi, we are working on gtk port of webkit on ARM board(400MHZ CPU, 128MB RAM, 64MB Nand flash) over fast ethernet connection. we are facing issues when loading pages where the webkit is not responsive to key presses and other events. The same works fine on a x86 build. Any pointers for this behavior or inputs to control the network access slice over other events would be greatly helpful. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] native entry widget in webkit-gtk
hi, iam working on gtk port of webkit and i have a need to use the native gtk input widget (GtkEntry) for text entry instead of the webkits own text entry control. Any high level design inputs of implementing it (or) a pointer to an existing related solution would be very helpful. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Re: native entry widget in webkit-gtk
Hi Alp. Thank you for the response. native entry widgets in our platform has integrated support for entry methods like T9, ITAP etc. If we need to get this in to the entry controls used by the webkit gtk port, would it mean we need to rewrite all the logic similar to what GtkEntry does ? Is there a alternate solution. thanks, Zaheer On Dec 20, 2007 10:19 AM, Alp Toker [EMAIL PROTECTED] wrote: zaheer ahmad wrote: hi, iam working on gtk port of webkit and i have a need to use the native gtk input widget (GtkEntry) for text entry instead of the webkits own text entry control. Hi Zaheer, Most WebKit ports including the GTK+ port now render input controls using drawing primitives provided by the style engine rather than instantiating real widgets. This is done to reduce overhead and make CSS styling easier. Other browser engines have also moved away from real widget instances, so this isn't specific to WebKit. Why do you want a GtkEntry? If you're looking for better text internationalisation or input method support there are bug reports for both of these, complete with partial patches. You can help get the features finished sooner by testing and submitting improved versions of the patches. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] problem with multi perform
hi all, Iam using gtk version of webkit which uses curl. iam facing a crash in curl when opening certain pages. the reason seems to be that curl is using the handle (i.e. write callbacks are invoked) even after its removed from the multihandle (code below). curl_multi_remove_handle(m_curlMultiHandle, d-m_handle); curl_easy_cleanup(d-m_handle); backtrace for the crash #0 0xb60480a2 in multi_runsingle () from /usr/local/lib/libcurl.so.4 #1 0xb604859e in curl_multi_perform () from /usr/local/lib/libcurl.so.4 Any inputs would be very helpful. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] divide by zero in cairo_fill
hi, iam working gtk port of webkit and when opening certain pages (www.ndtv.com, www.cricinfo.com) i see a random crash due to a divide by zero in cairo. The backtrace looks like following Iam using 26699 and this issue could be fixed in later version. search in webkit bug list does not give any matching bug. Any inputs would be very helpful. thanks, Zaheer #0 0xb5dc26a1 in kill () from /lib/libc.so.6 #1 0xb772c917 in pthread_kill () from /lib/libpthread.so.0 #2 0xb772cc82 in raise () from /lib/libpthread.so.0 #3 0xb777bdb5 in signal_handler () from /usr/local/lib/libdirect-1.0.so.0 #4 0xb772f5be in __pthread_sighandler_rt () from /lib/libpthread.so.0 #5 signal handler called #6 0xb7a34154 in fbFetchTransformed (pict=0x874c738, x=37879808, y=0, width=150, buffer=0xbfafa0e0, mask=0x0, maskBits=4278190080) at fbcompose.c:3445 #7 0xb7a3596d in pixman_compositeGeneral (op=3215958208, pSrc=0x874c738, pMask=0x0, pDst=0x88829b8, xSrc=578, ySrc=175, xMask=0, yMask=0, xDst=578, yDst=175, width=0, height=249) at fbcompose.c:4196 #8 0xb7a22910 in _cairo_pixman_composite (op=PIXMAN_OPERATOR_SRC, pSrc=0x874c738, pMask=0x0, pDst=0x88829b8, xSrc=578, ySrc=175, xMask=0, yMask=0, xDst=578, yDst=175, width=150, height=249) at fbpict.c:1928 #9 0xb79ea7ba in _cairo_image_surface_composite (op=CAIRO_OPERATOR_SOURCE, src_pattern=0xbfb00630, mask_pattern=0x0, abstract_dst=0x83f6e18, src_x=578, src_y=175, mask_x=578, mask_y=175, dst_x=578, dst_y=175, width=150, height=249) at cairo-image-surface.c:857 #10 0xb79f45f8 in _cairo_surface_composite (op=CAIRO_OPERATOR_SOURCE, src=0xbfb00630, mask=0x0, dst=0x83f6e18, src_x=578, src_y=175, mask_x=578, mask_y=175, dst_x=578, dst_y=175, width=150, height=249) at cairo-surface.c:1155 #11 0xb79f6864 in _clip_and_composite_trapezoids (src=0xbfb00630, op=CAIRO_OPERATOR_SOURCE, dst=0x83f6e18, traps=0xbfb00590, clip=0x0, antialias=CAIRO_ANTIALIAS_DEFAULT) at cairo-surface-fallback.c:448 #12 0xb79f71f5 in _cairo_surface_fallback_fill (surface=0x83f6e18, op=CAIRO_OPERATOR_SOURCE, source=0xbfb00630, path=0x0, fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0, antialias=CAIRO_ANTIALIAS_DEFAULT) at cairo-surface-fallback.c:907 #13 0xb79f5895 in _cairo_surface_fill (surface=0x83f6e18, op=CAIRO_OPERATOR_SOURCE, source=0x0, path=0x84e1cf0, fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0.10001, antialias=CAIRO_ANTIALIAS_DEFAULT) at cairo-surface.c:1454 #14 0xb79e80df in _cairo_gstate_fill (gstate=0x8238250, path=0x0) at cairo-gstate.c:1044 #15 0xb79e111c in *INT_cairo_fill_preserve (cr=0x84e1b80) at cairo.c:2096 #16 0xb79e1142 in cairo_fill (cr=0x84e1b80) at cairo.c:2072 #17 0xb71eab00 in WebCore::BitmapImage::draw () at /usr/local/include/glib- 2.0/glib/gthread.h:334 #18 0xb70d9917 in WebCore::GraphicsContext::drawImage () at /usr/local/include/glib-2.0/glib/gthread.h:334 #1 ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] curl in webkit
hi, i would like to know if CURLINFO_CONTENT_LENGTH_DOWNLOAD option works in the httpheader callback (the url is a downloadable content ( http://www.cluetrain.com/cluetrain.pdf). It seems to work only in the write callback. Any inputs on why it does not work in header callback would be very helpful. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Re: get the bits of the complete page
hi alp, thanks a lot for the inputs.. i will try it. regards, Zaheer On Nov 30, 2007 4:47 PM, Alp Toker [EMAIL PROTECTED] wrote: Zaheer, If you really need full page zooming so much and can't wait for the bug to get fixed, try something like this (untested): void webkit_frame_set_scale(WebKitFrame* frame, double scale) { g_return_if_fail(WEBKIT_IS_FRAME(frame)); WebKitFramePrivate* frameData = WEBKIT_FRAME_GET_PRIVATE(frame); Frame* wframe = frameData-frame; Document* document = wframe-document(); HTMLElement* root = reinterpret_castHTMLElement*(document-documentElement()); RenderObject* renderer = root-renderer(); RenderStyle* style = renderer-style(); TransformOperations ops; ScaleTransformOperation* scaleOp = new ScaleTransformOperation(scale, scale); ops.append(scaleOp); style-setTransform(ops); renderer-setStyle(style); } ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Re: get the bits of the complete page
hi alp, i need it to show a resized layout of the complete page that can fit the screen. iam able to do it right now by giving an alternative surface and render it in that. cairo_surface_t *sur =cairo_image_surface_create(CAIRO_FORMAT_RGB24,frame-view()-contentsWidth(),frame-view( )-contentsHeight()); cairo_t* cr_sur = cairo_create(sur); GraphicsContext ctx_sur(cr_sur); IntRect rect(clip.x, clip.y, frame-view()-contentsWidth(), frame-view()-contentsHeight()); frame-paint(ctx_sur, rect); this seems to be performance intensive, though. thanks, Zaheer On Nov 23, 2007 1:42 PM, Alp Toker [EMAIL PROTECTED] wrote: zaheer ahmad wrote: hi, iam working on the gtk port of webkit and have a need to get the bitmap of the entire page without actually rendering it. Is there an easy way to get in the current implementation. one of the ways i thought was to create a cairo surface over a memory buffer (instead of the drawing window in webkit_page_expose_event) and pass it to the scrollview::paint with a complete rectangle. Not sure if this is the right track to solve this issue (also this could be performance/memory intensive) There's no public API to render content to an arbitrary graphics context yet. There are a few examples showing how to do it in places like webkitgtkpage.cpp or the experimental printing patch (bug #15576) though, if you're willing to use internal API. Can you give an idea of what you need this for? It might help provide direction for how to expose this in the API, or it might turn out there's a simpler way of doing what you want. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] get the bits of the complete page
hi, iam working on the gtk port of webkit and have a need to get the bitmap of the entire page without actually rendering it. Is there an easy way to get in the current implementation. one of the ways i thought was to create a cairo surface over a memory buffer (instead of the drawing window in webkit_page_expose_event) and pass it to the scrollview::paint with a complete rectangle. Not sure if this is the right track to solve this issue (also this could be performance/memory intensive) Any inputs would be greatly helpful. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Re: gtk port
hi, i used the patch below and had success in rendering arabic webpages. however this seems to have broken the text search, Font::selectionRectForText - selectionRectForComplexText(run, style, point, h, from, to); seems to be returning incorrect values. thanks, Zaheer On 11/15/07, Alp Toker [EMAIL PROTECTED] wrote: zaheer ahmad wrote: i have few questions on webkit gtk port 1- how to run the autotests - seem to be specific to mac and where to get those as they do not come with the nightly build tarball None of the ports use autotools right now actually. the GTK+ port uses qmake. Here are the build instructions: http://trac.webkit.org/projects/webkit/wiki/BuildingGtk 2- gtk port uses pango, but internationalization (e.g. opening arabic pages) does not seem to work. I've implemented initial Pango text rendering support. The patch is at http://bugs.webkit.org/show_bug.cgi?id=15610 Screenshot: http://www.ndesk.org/tmp/WebKitArabic.png It's a little buggy but anyone who needs this is welcome to complete it. If the feature is important to people, I can prioritise it a little I guess. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] Re: crash in gtk port
hi Alp, thanks for the inputs.. it works now.. actually i needed http://bugs.webkit.org/show_bug.cgi?id=15584 in addition to below since iam working on an older version. regards zaheer On Nov 20, 2007 8:18 AM, Alp Toker [EMAIL PROTECTED] wrote: zaheer ahmad wrote: hi, i observe random crashes in the gtk port when rendering certain pages (rediff.com, cnn.com etc) and the backtrace points to the following The platform is a x86-scratchbox. could someone point me out possible rootcause The cause of the issue was identified by Doug Turner this morning: http://bugs.webkit.org/show_bug.cgi?id=16054 Crash when GlyphPage::fill is called with more than 256 bytes of data The fix was landed in r27914, should be working now. In future you should probably report issues like this in the bug tracker. Regards ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] page zoom support in gtk port
hi, we are looking for zoom support in gtk port and found couple of bugs that address this using cairo transforms and css transforms resp. http://bugs.webkit.org/show_bug.cgi?id=14998 http://bugs.webkit.org/show_bug.cgi?id=15670 appreciate any inputs on when this will be available in a release, or a stable patch of the solution. thanks, Zaheer ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] search in gtk port
hi, iam looking for a search api for gtk port but could not find one. i tried the following piece of code to search for a sample string the search results return fine, however the focus does not move to the selection content and there is no highlight. The impl. seems to support it (selectionController()-setSelection and revealSelection) Any inputs would be helpful. thanks, Zaheer Frame* frame = core(getFrameFromPage(WEBKIT_PAGE(widget))); String str1(str); return frame-findString(str1, true, false, false, true); ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev