From knt261 at gmail.com Thu Jan 7 01:55:28 2016 From: knt261 at gmail.com (Kevin Truong) Date: Wed, 6 Jan 2016 16:55:28 -0800 Subject: [Qtwebengine] QWebEnginePage.toHtml hangs indefinitely Message-ID: Hi community, I am trying to use QWebEnginePage to render a page, then print the HTML of that page when it finishes rendering. This is the slot I wrote to print out the HTML of the page: void Render::serialize() { m_page->toHtml([this](const QString &html) { std::cout << html.toStdString() << std::endl; }); } However, there are some websites where this slot will hang indefinitely. More specifically, I believe it is the html.toStdString() line that hangs, because when I change the code to this: void Render::serialize() { std::cout << "test1\n"; m_page->toHtml([this](const QString &html) { std::cout << "test2\n"; std::cout << html.toStdString() << std::endl; std::cout << "test3\n"; }); } Then "test1" and "test2" is printed, but "test3" was never printed (nor the html). The test URL that I used is a very slow to load website, where loadFinished() never seems to be signaled. Is it because I called html.toStdString() before loadFinished() signaled that this code hangs indefinitely? If not, what other causes could it be? I tried to find the answer myself by digging through the web engine code and chromium code, and it seems like m_page->toHtml() sends an IPC message to a render view observer host to fetch the document markup. I was thinking, perhaps the render view observer host is busy with some other job (e.g. its still trying to render the page until loadFinished()), and so never handles the IPC message sent by m_page->toHtml(). I don't know much about chromium, so I may be way off, but if this is true, is there a way I can stop all current jobs by the render view observer host, so that it handles the m_page.toHtml() document markup fetch message? I tried running m_page->triggerAction(QWebEnginePage::WebAction::stop) right before m_page.toHtml(), but to no success. If you guys have any other ideas, I would be much appreciated to hear them! Thanks, Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: From anand.nekkunti at atherenergy.com Thu Jan 7 08:07:14 2016 From: anand.nekkunti at atherenergy.com (Anand Nekkunti) Date: Thu, 7 Jan 2016 12:37:14 +0530 Subject: [Qtwebengine] geo location In-Reply-To: <201512291013.16809.allan.jensen@theqtcompany.com> References: <201512291013.16809.allan.jensen@theqtcompany.com> Message-ID: Thanks Allan ... I have cross compiles fancy browser to my ARM(i.MX6) device .. but whenever i run this browser i getting blank screen in webview(same thing happening my browser also) . could help me regarding this ? Regards Anand.N On Tue, Dec 29, 2015 at 2:43 PM, Allan Sandfeld Jensen < allan.jensen at theqtcompany.com> wrote: > On Tuesday 29 December 2015, Anand Nekkunti wrote: > > Hi All > > > > we are developing application in html5 which is in running chromium web > > browser in Linux .. we planning use qtwebengine to develop browser ... we > > have installed qtwebengine (webengine_5.4.1) and implemented web browser > by > > referring examples. Everything is working fine except html5 geo location. > > > > 1.why qtwebengine is not getting gps co-ordinates from gpsd (we have gps > > modem and gpsd running). > > > > 2. is there any way to configure qtwebengine to tell use gpsd for geo > > location. > > > QtWebEngine should get the coordinates from QtPositioning which uses > geoclue > or gypsy, so you might need to install geoclue and its gpsd backend. > I assume you have already connected the permission request, since you also > need to grant permission before geolocations are read. > > Regards > `Allan > > -- > > The Qt Company > Rudower Chausse 13, 12489 D-Berlin > > The Qt Company is a group company of Digia Plc, > Valimotie 21, FI-00380 Helsinki Finland > -- ​ map | website | facebook | twitter | linkedin ​ -------------- next part -------------- An HTML attachment was scrubbed... URL: From knt261 at gmail.com Fri Jan 8 01:49:23 2016 From: knt261 at gmail.com (Kevin Truong) Date: Thu, 7 Jan 2016 16:49:23 -0800 Subject: [Qtwebengine] QWebEnginePage.toHtml hangs indefinitely In-Reply-To: References: Message-ID: Nevermind, found the bug. In case anyone else has the same problem in the future: there was data being posted to stdin, but my program never read from it, so I guess the text stream was hanging indefinitely waiting for a program to read the data from stdin. On Wed, Jan 6, 2016 at 4:55 PM, Kevin Truong wrote: > Hi community, > > I am trying to use QWebEnginePage to render a page, then print the HTML of > that page when it finishes rendering. This is the slot I wrote to print out > the HTML of the page: > > void Render::serialize() { > m_page->toHtml([this](const QString &html) { > std::cout << html.toStdString() << std::endl; > }); > } > > However, there are some websites where this slot will hang indefinitely. > More specifically, I believe it is the html.toStdString() line that hangs, > because when I change the code to this: > > void Render::serialize() { > std::cout << "test1\n"; > m_page->toHtml([this](const QString &html) { > std::cout << "test2\n"; > std::cout << html.toStdString() << std::endl; > std::cout << "test3\n"; > }); > } > > Then "test1" and "test2" is printed, but "test3" was never printed (nor > the html). > > The test URL that I used is a very slow to load website, where > loadFinished() never seems to be signaled. Is it because I called > html.toStdString() before loadFinished() signaled that this code hangs > indefinitely? If not, what other causes could it be? > > I tried to find the answer myself by digging through the web engine code > and chromium code, and it seems like m_page->toHtml() sends an IPC message > to a render view observer host to fetch the document markup. I was > thinking, perhaps the render view observer host is busy with some other job > (e.g. its still trying to render the page until loadFinished()), and so > never handles the IPC message sent by m_page->toHtml(). I don't know much > about chromium, so I may be way off, but if this is true, is there a way I > can stop all current jobs by the render view observer host, so that it > handles the m_page.toHtml() document markup fetch message? I tried running > m_page->triggerAction(QWebEnginePage::WebAction::stop) right before > m_page.toHtml(), but to no success. > > If you guys have any other ideas, I would be much appreciated to hear them! > > Thanks, > Kevin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knt261 at gmail.com Sat Jan 9 03:26:29 2016 From: knt261 at gmail.com (Kevin Truong) Date: Fri, 8 Jan 2016 18:26:29 -0800 Subject: [Qtwebengine] Change render viewport? Message-ID: Hi community, Is there a way to change the viewport when rendering a page? For example, I believe the default view port is 800x600. I want to increase the viewport height so that there is less vertical scrolling required, perhaps 800x1800. I can't seem to find any documentations on this from QWebEnginePage, QWebEngineSettings, QWebEngineProfile, and QWebEngineView. Any help would be appreciated, thanks! Best, Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan.chan at pacbell.net Mon Jan 18 06:34:37 2016 From: bryan.chan at pacbell.net (Bryan Chan) Date: Mon, 18 Jan 2016 05:34:37 +0000 (UTC) Subject: [Qtwebengine] Debugging into QtWebengineCore References: <22382382.5215103.1453095278006.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <22382382.5215103.1453095278006.JavaMail.yahoo@mail.yahoo.com> Hi, I compiled the Qt 5.6 Beta and trying to step into the Qt5WebEngineCored.dll, but having trouble. I have the pdb files and it says its loaded in msvc2013, but when I try to step into it from void QWebEnginePage::load(const QUrl& url) it just goes over the function. I was able to do this back in a pre alpha build in August. Has the debug information been removed even though a PDB is generated and loaded? Whats the best way to be able to debug into QTWebEngineCore? ThanksBryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From knt261 at gmail.com Wed Jan 27 01:19:54 2016 From: knt261 at gmail.com (Kevin Truong) Date: Tue, 26 Jan 2016 16:19:54 -0800 Subject: [Qtwebengine] QtWebEngine slower than WebKit? Message-ID: Hi all, Just wanted to see if there is anything I can do to speed up web engine. For a single page, web engine renders a page faster than web kit. For hundreds of pages rendering in parallel, web engine seems to finish the batch slower than web kit. I imagine this is because web engine is more cpu intensive than web kit, and my machine is being bottle necked by cpu. Also my machine has no gpu to enable any graphic acceleration. I wanted to confirm, 1. Has anyone else been experiencing this too, or is it just me and a bug in my implementation somewhere that slows it down? 2. Is there anything I can do to speed up the web engine processes? E.g. more aggressive caching, or disabling any CPU-intensive features that are nice-to-have but not necessary to render a page? Or disable security checks or malware link checks that happen in the background? Many thanks, Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulovap.os at gmail.com Fri Jan 29 19:41:04 2016 From: paulovap.os at gmail.com (Paulo Pinheiro) Date: Fri, 29 Jan 2016 15:41:04 -0300 Subject: [Qtwebengine] Enable chromium log messages Message-ID: Hello All, I'm trying to enable chromium logging, but I'm having a hard time. I tried to add the following switches in web_engine_context.cpp: base::CommandLine* parsedCommandLine = base::CommandLine::ForCurrentProcess(); ... parsedCommandLine->AppendSwitch(switches::kEnableLogging); parsedCommandLine->AppendSwitchASCII(switches::kLoggingLevel, "0"); Also tried to force logging::SetMinLogLevel(0) in oid ContentMainDelegateQt::PreSandboxStartup. But it had no effect. Suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarred.nicholls at gmail.com Wed Jan 27 13:25:52 2016 From: jarred.nicholls at gmail.com (Jarred Nicholls) Date: Wed, 27 Jan 2016 12:25:52 -0000 Subject: [Qtwebengine] QtWebEngine slower than WebKit? In-Reply-To: References: Message-ID: On Tuesday, January 26, 2016, Kevin Truong wrote: > Hi all, > > Just wanted to see if there is anything I can do to speed up web engine. > > For a single page, web engine renders a page faster than web kit. > > For hundreds of pages rendering in parallel, web engine seems to finish > the batch slower than web kit. I imagine this is because web engine is more > cpu intensive than web kit, and my machine is being bottle necked by cpu. > Also my machine has no gpu to enable any graphic acceleration. > Chromium's multi-process architecture comes with inherent overhead in order to communicate between all processes (one per page). WebKit1 runs in-process completely and therefore would not suffer from IPC and context switching as deeply as Chromium in the many-pages-in-parallel test. Does this make sense? In short, I'm afraid there isn't much you can do about it. May I ask what is your use case for loading hundreds of pages in parallel, out of curiosity? Cheers, Jarred > > I wanted to confirm, > > 1. Has anyone else been experiencing this too, or is it just me and a bug > in my implementation somewhere that slows it down? > > 2. Is there anything I can do to speed up the web engine processes? E.g. > more aggressive caching, or disabling any CPU-intensive features that are > nice-to-have but not necessary to render a page? Or disable security checks > or malware link checks that happen in the background? > > Many thanks, > Kevin > -- Sent from Gmail Mobile -------------- next part -------------- An HTML attachment was scrubbed... URL: