[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/khtml
From:       Stephan Kulow <coolo () kde ! org>
Date:       2003-12-11 20:26:29
[Download RAW message or body]

CVS commit by coolo: 

make the drawing of alt text not depend on if the image is cached or not
(breaks one test case when you call it seperatly)
Reviewed by Dirk (or better: suggested by Dirk, tested by me :)


  M +6 -0      ChangeLog   1.138
  M +6 -6      rendering/render_image.cpp   1.121


--- kdelibs/khtml/ChangeLog  #1.137:1.138
@@ -1,2 +1,8 @@
+2003-12-11  Stephan Kulow  <coolo@kde.org>
+
+        * rendering/render_image.cpp (updateFromElement): set the alt text before doing anything
+        else, because it might trigger a setting of the error pixmap and then we don't know the
+        alt text to draw and get wrong sizes
+
 2003-12-10  Germain Garand  <germain@ebooksfrance.org>
 

--- kdelibs/khtml/rendering/render_image.cpp  #1.120:1.121
@@ -390,4 +390,9 @@ bool RenderImage::nodeAtPoint(NodeInfo& 
 void RenderImage::updateFromElement()
 {
+    if (element()->id() == ID_INPUT)
+        alt = static_cast<HTMLInputElementImpl*>(element())->altText();
+    else if (element()->id() == ID_IMG)
+        alt = static_cast<HTMLImageElementImpl*>(element())->altText();
+
     DOMString u = element()->id() == ID_OBJECT ?
                   element()->getAttribute(ATTR_DATA) : element()->getAttribute(ATTR_SRC);
@@ -410,9 +415,4 @@ void RenderImage::updateFromElement()
         }
     }
-
-    if (element()->id() == ID_INPUT)
-        alt = static_cast<HTMLInputElementImpl*>(element())->altText();
-    else if (element()->id() == ID_IMG)
-        alt = static_cast<HTMLImageElementImpl*>(element())->altText();
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic