KHTML-Patch - show frame around not-yet-loaded images

Helge Deller deller at gmx.de
Wed Dec 1 09:21:50 GMT 2004


Some weeks ago I filed a wish against KHTML (http://bugs.kde.org/show_bug.cgi?id=93213) that it should behave like Mozilla and IE and show frames around not-yet-loaded images in Konqueror.
This visual feedback is IMHO pretty important, since without it users (like me) might wonder why the Konqi-wheel still spins although the webpage seems completely loaded.
This is even more important when you are running on a slow internet connection or if the servicing webserver is pretty loaded.

Attached is a minimal patch to fix this wish. Ok to commit ?

Helge 

PS: IE and Mozilla even shows a small Pixmap in the upper left corner of the frame. What does people think if we would add this as well ?
-------------- next part --------------
Index: render_image.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_image.cpp,v
retrieving revision 1.138
diff -u -p -r1.138 render_image.cpp
--- render_image.cpp	10 Nov 2004 13:03:38 -0000	1.138
+++ render_image.cpp	1 Dec 2004 09:12:02 -0000
@@ -231,6 +231,9 @@ void RenderImage::paint(PaintInfo& paint
     CachedImage* i = oimage && oimage->valid_rect().size() == oimage->pixmap_size()
                      ? oimage : image;
 
+    if (paintInfo.phase == PaintActionForeground && cWidth > 2 && cHeight > 2 && !complete())
+	outlineBox(paintInfo.p, _tx, _ty, "gray");
+
     //kdDebug( 6040 ) << "    contents (" << contentWidth << "/" << contentHeight << ") border=" << borderLeft() << " padding=" << paddingLeft() << endl;
     if ( !i || berrorPic)
     {


More information about the kde-core-devel mailing list