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

List:       kde-commits
Subject:    kdelibs/khtml/rendering
From:       David Hyatt <hyatt () apple ! com>
Date:       2003-03-07 0:39:32
[Download RAW message or body]

CVS commit by hyatt: 

Fix the top of hiptop.com.  Nowrap needs to set minwidth to the fixed width of a cell.


  M +14 -1     render_table.cpp   1.234


--- kdelibs/khtml/rendering/render_table.cpp  #1.233:1.234
@@ -33,4 +33,5 @@
 #include "html/html_tableimpl.h"
 #include "misc/htmltags.h"
+#include "misc/htmlattrs.h"
 
 #include <kglobal.h>
@@ -43,4 +44,5 @@
 
 using namespace khtml;
+using namespace DOM;
 
 RenderTable::RenderTable(DOM::NodeImpl* node)
@@ -1396,4 +1398,15 @@ void RenderTableCell::calcMinMaxWidth()
 
     RenderFlow::calcMinMaxWidth();
+    if (element() && style()->whiteSpace() == NORMAL) {
+        // See if nowrap was set.
+        DOMString nowrap = static_cast<ElementImpl*>(element())->getAttribute(ATTR_NOWRAP);
+        if (!nowrap.isNull() && style()->width().isFixed())
+            // Nowrap is set, but we didn't actually use it because of the
+            // fixed width set on the cell.  Even so, it is a WinIE/Moz trait
+            // to make the minwidth of the cell into the fixed width.  They do this
+            // even in strict mode, so do not make this a quirk.  Affected the top
+            // of hiptop.com.
+            m_minWidth = style()->width().value;
+    }
 
     setMinMaxKnown();


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

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