Bug 310875 - Webslice applet doesn't resize correctly on page refresh
Summary: Webslice applet doesn't resize correctly on page refresh
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-webslice (show other bugs)
Version: 4.9.3
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 14:01 UTC by Mariusz Mazur
Modified: 2014-06-28 10:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.3


Attachments
Fix for the problem (491 bytes, patch)
2012-12-01 17:08 UTC, Mariusz Mazur
Details
Fix; also handles resizes (990 bytes, patch)
2012-12-01 18:48 UTC, Mariusz Mazur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mariusz Mazur 2012-11-29 14:01:19 UTC
(This might be mislabeled, I have no idea where's the proper site to file plasma-addons bugs.)

I'm using webslice to view a html file which is set to autorefresh. webslice is preferred to the normal webbrowser applet since it does autoresize and is smaller, plus I just need it for viewing the info, not clicking anywhere. Thing is, the autoresizing doesn't work reliably.

Reproducible: Always

Steps to Reproduce:
1. Have a large (rendered-screen-estate-wise) html file with a http-equiv=refresh set to a few seconds.
2. Load it in webslice.
Actual Results:  
Some times the page is resized, other times it's not (default size), I can't see the pattern here.

Expected Results:  
After each auto refresh I would expect webslice to apply the fit-to-applet-window-size function and resize the whole page to fit before displaying.
Comment 1 Mariusz Mazur 2012-11-29 18:33:17 UTC
Figured out the pattern. It's one zoom level after another, every other reload, so (say), 45%, 100%, 45%, 100%, 45% ad infinitum.
Comment 2 Mariusz Mazur 2012-12-01 17:08:11 UTC
Created attachment 75568 [details]
Fix for the problem

Attached patch fixes the problem I've described, however the whole 'display new page' logic in webslice is seriously borked and would require a general rewrite to make sure all bugs like this are fixed.
Comment 3 Mariusz Mazur 2012-12-01 18:48:55 UTC
Created attachment 75569 [details]
Fix; also handles resizes

Last patch didn't handle resizing properly; this one does, although in an ugly way
Comment 4 Christoph Feck 2012-12-06 14:08:14 UTC
Could you put the patch on https://git.reviewboard.kde.org/ so that developers can check it
Comment 5 Mariusz Mazur 2013-01-17 22:50:29 UTC
Figuring out all the magic required to make a proper review request is fscking irritating. Argh.
Comment 6 Mariusz Mazur 2013-01-17 22:53:58 UTC
Done: https://git.reviewboard.kde.org/r/108458/
Comment 7 Albert Astals Cid 2013-04-05 18:39:00 UTC
Git commit 919370eba3978f641b8e8be1f3c2e299dc9c090d by Albert Astals Cid, on behalf of Mariusz Mazur.
Committed on 05/04/2013 at 20:38.
Pushed by aacid into branch 'KDE/4.10'.

Fix webslice's handling of page resizes

Acked by sebas
REVIEW: 108458
FIXED-IN: 4.10.3

M  +6    -1    applets/webslice/kgraphicswebslice.cpp

http://commits.kde.org/kdeplasma-addons/919370eba3978f641b8e8be1f3c2e299dc9c090d
Comment 8 Mark Fraser 2014-06-28 10:34:12 UTC
I'm still having problems with this in 4.13.2. Every other refresh is too big for the window.