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.
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.
Safari gets this right so perhaps we haven't merged something yet that fixes it.
*** Bug 65487 has been marked as a duplicate of this bug. ***
*** Bug 60721 has been marked as a duplicate of this bug. ***
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.