Bug 179815 - webbrowser does not resize
Summary: webbrowser does not resize
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 187371 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-06 17:13 UTC by christian
Modified: 2009-04-26 02:52 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christian 2009-01-06 17:13:41 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

the webbrowser plasmoid has the following 2 bugs:

- it does not resize the browser when the plasmoid is resized.
- the plasmoid resizes x AND y linked !
- option wish : hide all control's (for webservice display on the background)
Comment 1 FiNeX 2009-01-06 17:42:09 UTC
About the wish, please open a new bug report. Don't mix up bugs and requests together.
Comment 2 Aaron J. Seigo 2009-01-06 17:46:22 UTC
i'm not sure i agree with the wish. 

there's a web content widget so writing a "show a web page with no chrome" is probably all of a dozen lines of code, and adding ways to hide/show the chrome in the browser is just asking for more UI complexity.

anyways, both problems reported have been fixed in trunk for a while now.
Comment 3 christian 2009-01-06 17:54:20 UTC
bug still exist in trunk from yesterday, please verify with your trunk build
Comment 4 FiNeX 2009-01-06 18:27:01 UTC
I can reproduce both resizing issues using r906701 compiled right now from trunk.
Comment 5 Aaron J. Seigo 2009-01-06 19:10:48 UTC
of course i tested before closing with my build from this morning.

btw:

"- the plasmoid resizes x AND y linked ! "

http://websvn.kde.org/?view=rev&revision=902257 <-- fixed on december 27th.

unless someone can give me a way to reproduce this bug, i'm going to close it again with WORKSFORME and assume it's a Qt issue.
Comment 6 Anne-Marie Mahfouf 2009-01-06 20:54:45 UTC
For me, the first webbrowser on desktop does not resize correctly, all further instances resize well though. 
Removing all of them and readding one makes it not resize properly. 
If there is one in panel, the one on desktop resizes OK.
Popup resizes OK when applet in panel, even for 1st instance.

In short: the applet on desktop resizes correctly only if there is already another instance of it.
Comment 7 FiNeX 2009-01-06 21:42:34 UTC
I confirm what Anne said: adding a second webbrowser plasmoid, allows to resize it freely.


P.s: I'm using Qt 4.4.3
Comment 8 Olli Salonen 2009-01-09 16:26:45 UTC
I've been trying to make sense of this bug for the past day or so. I've been able to narrow down the problem a bit, but can't pinpoint it exactly because I'm a QT novice.

In the first browser instance, resizing works until the first page is loaded. This can be tested by commenting out the m_browser->setUrl() in the function WebBrowser::graphicsWidget() in webbrowser.cpp, or simply severing the internet connection before starting the applet.

After the page is loaded, none of the children of the applet receive setGeometry() signals and do not resize accordingly. It seems as if the main layout of the widget gets disconnected from resize events.

The problem appears somewhere between the call to WebView::setUrl() in webview.cpp (kdelibs/plasma/widgets/), which only contains a call to QWebFrame::load(), and before the page is loaded (before WebViewPrivate::loadingFinished() is called).

I tried a workaround by creating a WebBrowser::constraintsEvent() handler which calls m_layout->setGeometry(contentsRect()). This results in resize working, but margins are not preserved and it doesn't fix the underlying problem.
Comment 9 Dario Andres 2009-03-17 15:51:11 UTC
*** Bug 187371 has been marked as a duplicate of this bug. ***
Comment 10 Dario Andres 2009-04-26 02:49:00 UTC
SVN commit 959320 by darioandres:

Validate the image the favicon engine provides to the web-browser applet.
In some case it could return an invalid image, which when being setted as the PopupIcon
broke the layouting of the plasmoid

BUG: 179815


 M  +5 -2      webbrowser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=959320
Comment 11 Dario Andres 2009-04-26 02:52:51 UTC
SVN commit 959322 by darioandres:

Backport to 4.2branch of:
SVN commit 959320 by darioandres:

Validate the image the favicon engine provides to the web-browser applet.
In some case it could return an invalid image, which when being setted as the
PopupIcon
broke the layouting of the plasmoid

CCBUG: 179815


 M  +5 -2      webbrowser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=959322