Bug 65788 - table rendering bug - cnn (testcase, Safari OK)
Summary: table rendering bug - cnn (testcase, Safari OK)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 0.0.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 60721 65487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-10 08:31 UTC by George Staikos
Modified: 2004-02-29 18:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (367 bytes, text/html)
2003-10-10 08:33 UTC, George Staikos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Staikos 2003-10-10 08:31:49 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 
OS:          Linux

The table at the top of cnn.com with the google search is broken.  It's CSS and nbsp related (the two together cause this bug somehow).  Small testcase attached.
Comment 1 George Staikos 2003-10-10 08:33:18 UTC
Created attachment 2725 [details]
testcase

This should render with the button and the textedit lined up.  It seems like
KHTML puts the button underneath the nbsp in this case making the table look
distorted.
Comment 2 George Staikos 2003-10-10 08:41:22 UTC
Safari gets this right so perhaps we haven't merged something yet that fixes it.
Comment 3 Stephan Binner 2003-10-18 20:32:29 UTC
*** Bug 65487 has been marked as a duplicate of this bug. ***
Comment 4 Stephan Binner 2003-10-18 20:32:58 UTC
*** Bug 60721 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Mueller 2004-02-29 18:44:45 UTC
CVS commit by mueller: 

CCMAIL: 65788-done@bugs.kde.org


  M +6 -0      ChangeLog   1.226
  M +11 -1     rendering/render_form.h   1.109
  M +6 -8      rendering/render_replaced.cpp   1.165


--- kdelibs/khtml/rendering/render_form.h  #1.108:1.109
@@ -80,4 +80,14 @@ public:
     virtual bool isFormElement() const { return true; }
 
+    // form elements never have border/padding
+    virtual int borderTop() const { return 0; }
+    virtual int borderBottom() const { return 0; }
+    virtual int borderLeft() const { return 0; }
+    virtual int borderRight() const { return 0; }
+    virtual int paddingTop() const { return 0; }
+    virtual int paddingBottom() const { return 0; }
+    virtual int paddingLeft() const { return 0; }
+    virtual int paddingRight() const { return 0; }
+
     virtual void updateFromElement();
 

--- kdelibs/khtml/rendering/render_replaced.cpp  #1.164:1.165
@@ -68,15 +68,13 @@ void RenderReplaced::calcMinMaxWidth()
 #endif
 
-    int width = calcReplacedWidth();
-
-    if (!isWidget())
-        width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
+    m_width = calcReplacedWidth();
+    m_width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
 
     if ( style()->width().isPercent() || style()->height().isPercent() ) {
         m_minWidth = 0;
-        m_maxWidth = width;
+        m_maxWidth = m_width;
     }
     else
-        m_minWidth = m_maxWidth = width;
+        m_minWidth = m_maxWidth = m_width;
 
     setMinMaxKnown();

--- kdelibs/khtml/ChangeLog  #1.225:1.226
@@ -1,4 +1,10 @@
 2004-02-29  Dirk Mueller  <mueller@kde.org>
 
+        * rendering/render_replaced.cpp (calcMinMaxWidth): respect 
+        padding and borders (#65788).
+
+        * rendering/render_form.h (RenderFormElement): make sure we never
+        end up getting a border or padding for form elements.
+
         * rendering/render_frames.cpp (partLoadingErrorNotify): don't trigger
         slotPartLoadingErrorNotify twice.