In this case it is not just the border but also the padding on body. Removing those would probably avoid the endless loop but that is exactly the point, we should be able to handle content that "will try" to be larger than the "window" so the user will have to use the scroll bar. A good example is gmail (on the mobile version) that will resize the list of messages to be as large as the screen and "hide" the top bar by automatically starting the scroll position after it - the user gets the full screen for the content but when he wants to go somewhere he can just drag the content a little and access the topbar.<br>
<br>I think the issue here is that the (html) "window" size has to be independent of the "graphics view" size. I don't know the details on how it is handled on symbian and was on Harmattan before but it seems that the "window" size is set based on the size of the graphics view when the page is loaded (or initially rendered, or when we set the preferredcontent size - not sure) and after that changing the size graphics view does not reset it. It seems like a reasonable compromise.<br>
<br>Felipe<br><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 9:06 AM, Zalan Bujtas <span dir="ltr"><<a href="mailto:zbujtas@gmail.com">zbujtas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, it looks like a valid issue to me. When the view enters this<br>
infinite loop, what's the size diff you see on each resize? Wondering<br>
if removing the border:2px makes any difference.<br>
<span class="HOEnZb"><font color="#888888"><br>
Zalan.<br>
</font></span><div class="im HOEnZb"><br>
On Mon, Apr 9, 2012 at 7:46 PM, Felipe Crochik <<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>> wrote:<br>
</div><div class="HOEnZb"><div class="h5">> UPDATE:<br>
> I tested the application  ( <a href="http://www.crochik.com/webview/resize.zip" target="_blank">http://www.crochik.com/webview/resize.zip</a> ) on<br>
> the harmattan emulator and confirmed my assumption - it is actually a<br>
> regression.<br>
><br>
> The behavior has changed from PR1.1 to PR1.2. This application on the PR1.2<br>
> emulator will enter an endless loop. On PR1.1 it seems that the "window<br>
> size" does not change when the QGraphicsWebView size change. In fact it<br>
> seems that it is "stored" when the page is loaded (would have to debug<br>
> further but it seems to use the QGraphicsWebView size on the time of the<br>
> loading of the page).<br>
><br>
> Felipe<br>
><br>
><br>
> ---------- Forwarded message ----------<br>
> From: Felipe Crochik <<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>><br>
> Date: Mon, Apr 9, 2012 at 11:17 AM<br>
> Subject: Re: [webkit-qt] Build Qt WebKit for Harmattan<br>
> To: Kenneth Rohde Christiansen <<a href="mailto:kenneth.christiansen@gmail.com">kenneth.christiansen@gmail.com</a>><br>
> Cc: <a href="mailto:webkit-qt@lists.webkit.org">webkit-qt@lists.webkit.org</a><br>
><br>
><br>
> Kenneth,<br>
> It would be great if I could use Qt5 libraries but if I do, I won't be able<br>
> to distribute my applications through Ovi until they become officially<br>
> supported by Nokia (what probably will never happen).<br>
> Isn't the code for this specialized version available anywhere? I assume it<br>
> depends on the devices' existing Qt 4.7.4 libraries so it proves it is<br>
> possible, right?<br>
><br>
> I am actually trying to figure out a workaround/fix for an issue with<br>
> adjusting the size of the QGraphicsView based on the mainframe size when the<br>
> mainframe size changes based on the window size. I just tried a simple html<br>
> page I created (<a href="http://www.crochik.com/webkit" target="_blank">http://www.crochik.com/webkit</a>) on the grob browser and it<br>
> seems that it also has issues handling it. It sure does much better than the<br>
> WebView but still is not "accurate" or "defined". The interesting fact is<br>
> that I think it does work on symbian WebKit and used to work on Harmattan<br>
> before PR1.2 (I think based on other tests but haven't double tested yet)<br>
><br>
> On my "half baked tests" on harmattan/grob browser it seems that the<br>
> behavior is completely inconsistent. In some cases it will actually work<br>
> just fine (a few times I loaded it on landscape mode). In others will<br>
> "almost" work where the div will end up with the right size but the "view"<br>
> will be much taller than the DIV (what it should not happen because the<br>
> div's height is based on the window). In some it seems that will enter the<br>
> "grow loop" but eventually will figure out to stop and will end up with a<br>
> view/DIV size that has not relation to the original window size.<br>
><br>
> I also created a very simple project using the WebView that will demonstrate<br>
> how it enters an endless loop when accessing the URL above. You can download<br>
> it from <a href="http://www.crochik.com/webview/resize.zip" target="_blank">http://www.crochik.com/webview/resize.zip</a><br>
> I haven't tested this code on a Harmattan device before PR1.2 but I believe<br>
> based on other tests I ran that it would work. I also believe it will work<br>
> on Symbian (will try to test later today to be sure).<br>
><br>
> p.s. Firefox on Harmattan also has issues dealing with this page. It seems<br>
> to detect the "chicken/egg loop" and eventually settles down to a height<br>
> that it seems to be based on the actual screen height ( the final height is<br>
> different whether you are in portrait or landscape).<br>
><br>
> Felipe<br>
><br>
> Thanks,<br>
> Felipe<br>
><br>
><br>
><br>
> On Mon, Apr 9, 2012 at 10:16 AM, Kenneth Rohde Christiansen<br>
> <<a href="mailto:kenneth.christiansen@gmail.com">kenneth.christiansen@gmail.com</a>> wrote:<br>
>><br>
>> Hi there,<br>
>><br>
>> Harmattan comes with two webkit libraries. The Qt4.x / WebKit1 version<br>
>> which is part of the framework and a specialized version (based on WebKit2)<br>
>> only available for the browser. It is possible to run WebKit2 on Harmattan<br>
>> but it requires Qt 5.x. The team behind the snowshoe.cc browser are<br>
>> packaging Qt 5 packages for Harmattan and hang around in #qtwebkit and<br>
>> #showshoe on <a href="http://freenode.net" target="_blank">freenode.net</a>.<br>
>><br>
>> Cheers,<br>
>> Kenneth<br>
>><br>
>> On Sun, Apr 8, 2012 at 3:35 AM, Felipe Crochik <<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>> wrote:<br>
>>><br>
>>> I have noticed that Harmattan PR1.2 shows version 2.2 for libqtqwebkit4.<br>
>>> I remember reading the discussion about the WebKit x qt Webkit versions but<br>
>>> can't remember the details. Does 2.2.0 version means it includes WebKit2?<br>
>>> If so, since the SDK repository was not updated (the SDK version is still<br>
>>> 2.1) how can I get the development version of the package so I can build<br>
>>> against it?<br>
>>><br>
>>> Or.... I would like to build my own version of WebKit2 to distribute with<br>
>>> my application but can't find instructions. Is it possible (Harmattan has Qt<br>
>>> 4.7.4)? I believe Grob (the webkit based browser on Harmattan) uses WebKit2<br>
>>> so I would assume it is...<br>
>>><br>
>>> p.s. Before PR1.2 I could use QGraphicsWebView::setResizesToContents<br>
>>> without issues. The same application after PR1.2 will enter a endless loop<br>
>>> when the page resizes its content based on the size of the window. I had<br>
>>> noticed the same behavior on Windows but it doesn't happen on Symbian and<br>
>>> didn't happen before PR1.2.<br>
>>><br>
>>> Thanks,<br>
>>> Felipe<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> webkit-qt mailing list<br>
>>> <a href="mailto:webkit-qt@lists.webkit.org">webkit-qt@lists.webkit.org</a><br>
>>> <a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt</a><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Kenneth Rohde Christiansen<br>
>> Senior Engineer<br>
>> Nokia Mobile Phones, Browser / WebKit team<br>
>> Phone  <a href="tel:%2B45%204093%200598" value="+4540930598">+45 4093 0598</a> / E-mail kenneth at <a href="http://webkit.org" target="_blank">webkit.org</a><br>
>><br>
>> <a href="http://codeposts.blogspot.com" target="_blank">http://codeposts.blogspot.com</a> ﹆﹆﹆<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> webkit-qt mailing list<br>
> <a href="mailto:webkit-qt@lists.webkit.org">webkit-qt@lists.webkit.org</a><br>
> <a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt</a><br>
><br>
</div></div></blockquote></div><br>