Bug 68855 - www.sport1.de element positioning wrong
Summary: www.sport1.de element positioning wrong
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 71897 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-23 13:27 UTC by Christoph Bartoschek
Modified: 2004-02-18 22:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Bartoschek 2003-11-23 13:27:32 UTC
Version:           3.1.93 (using KDE 3.1.93 (CVS >= 20031111), compiled sources)
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:          Linux (i686) release 2.4.20-20.9

Compare the rendering of www.sport1.de between konqueror and mozilla. There are several issues. I don't know wheather this is a problem of this specific site, but the result is annoying.

I've made two screenshots
http://www.pontohonk.de/bugs/sport1-mozilla.png
http://www.pontohonk.de/bugs/sport1-konqueror.png

You can see:

1. The ad-banner for "Bayrisches Münzkontor" covers the first newsitem
2. The contents of the LIVE box (containig "Doppelpass...") are shown between the first newsitem and the ad-banner from 1.
3. The first newsitem covers lower parts of the banner above ("Das Online-Angebot des DSF")
4. In the "betandwin.de Wetten des Tages" Box the labels "2,20" "3,20" and "2,85" cover the corresponding checkbox.
Comment 1 Stephan Kulow 2003-11-23 16:36:22 UTC
they changed their layout recently - sadly not to the easier ;(

But we need test cases for these problems - fortunatly for you
I'm a big sport1.de fan - but everyone tells me the site isn't
worth it :)
Comment 2 Christoph Bartoschek 2003-11-24 22:44:11 UTC
I've just read, that you want small testcases instead of a link to a full page. Here are two:

For Bug 1 and 2:
http://www.pontohonk.de/bugs/sport1-1.html
It took hours to strip that horrible Page down to this example. You should compare the mozilla rendering to konqueror's rendering. It seems to be a JavaScript issue. The error also occurs if you replace css.top = css.top + 0; with css.top += 0;

For Bug 4:
http://www.pontohonk.de/bugs/sport1-4.html
deleting nowrap or width="10pt" causes the bug to disapear.

Bug 3: This bug appears because the space between the "SUCHEN" label and the grey vertical bar is to high, such that it is pushed to far down.

Should I fill two separate bug reports?
Comment 3 Stephan Kulow 2003-11-27 11:41:31 UTC
Subject: Re:  www.sport1.de element positioning wrong

> For Bug 1 and 2:
> http://www.pontohonk.de/bugs/sport1-1.html
> It took hours to strip that horrible Page down to this example. 
Wow, I tried for hours to strip it down and even wrote the (wrong) webmaster.

> You should compare the mozilla rendering to konqueror's rendering. 
> It seems to be a JavaScript issue. The error also occurs if you replace 
> css.top = css.top + 0; with css.top += 0;   

> 
> For Bug 4:
> http://www.pontohonk.de/bugs/sport1-4.html
> deleting nowrap or width="10pt" causes the bug to disapear.
> 
> Bug 3: This bug appears because the space between the "SUCHEN" label and the 
> grey vertical bar is to high, such that it is pushed to far down. 
> 
> Should I fill two separate bug reports?
Yes, please file a bug report for the test cases and I'll close this one as duplicate of
one of those. That would be perfect.

Thanks for your work.

Greetings, Stephan

Comment 4 Tommi Tervo 2004-01-05 12:42:53 UTC
*** Bug 71897 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Mueller 2004-01-21 07:38:30 UTC
Subject: kdelibs/khtml/rendering

CVS commit by mueller: 

fix for testcase 4 in bugreport #68855
CCMAIL: 68855@bugs.kde.org


  M +2 -1      render_table.cpp   1.252


--- kdelibs/khtml/rendering/render_table.cpp  #1.251:1.252
@@ -1591,5 +1591,6 @@ void RenderTableCell::calcMinMaxWidth()
         // See if nowrap was set.
         DOMString nowrap = static_cast<ElementImpl*>(element())->getAttribute(ATTR_NOWRAP);
-        if (!nowrap.isNull() && style()->width().isFixed())
+        if (!nowrap.isNull() && style()->width().isFixed() &&
+            m_minWidth < style()->width().value() )
             // 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


Comment 6 Stephan Kulow 2004-01-21 10:30:39 UTC
the other bug got an entry on it's own. This one was just for the nowrap and that's fixed now
Comment 7 Stephan Kulow 2004-02-18 22:31:23 UTC
CVS commit by coolo: 

merged the DOMNode::getValueProperty code with WebCore and now the updateLayout()
works - and with it sport1.de
CCMAIL: 68855@bugs.kde.org


  M +24 -48    kjs_dom.cpp   1.173


--- kdelibs/khtml/ecma/kjs_dom.cpp  #1.172:1.173
@@ -166,6 +166,4 @@ Value DOMNode::tryGet(ExecState *exec, c
 Value DOMNode::getValueProperty(ExecState *exec, int token) const
 {
-  khtml::RenderObject *rend = node.handle() ? node.handle()->renderer() : 0L;
-
   switch (token) {
   case NodeName:
@@ -245,34 +243,29 @@ Value DOMNode::getValueProperty(ExecStat
   case OnUnload:
     return getListener(DOM::EventImpl::UNLOAD_EVENT);
-  case OffsetLeft:
-  case OffsetTop:
-  case OffsetWidth:
-  case OffsetHeight:
-  case OffsetParent:
-  case ClientWidth:
-  case ClientHeight:
-  case ScrollWidth:
-  case ScrollHeight:
-  case ScrollLeft:
-  case ScrollTop:
-  {
+  case SourceIndex: {
+    // Retrieves the ordinal position of the object, in source order, as the object
+    // appears in the document's all collection
+    // i.e. document.all[n.sourceIndex] == n
+    DOM::Document doc = node.ownerDocument();
+    if (doc.isHTMLDocument()) {
+      DOM::HTMLCollection all = static_cast<DOM::HTMLDocument>(doc).all();
+      unsigned long i = 0;
+      DOM::Node n = all.firstItem();
+      for ( ; !n.isNull() && n != node; n = all.nextItem() )
+        ++i;
+      Q_ASSERT( !n.isNull() ); // node not in document.all !?
+      return Number(i);
+    }
+  }
+  default:
     // no DOM standard, found in IE only
 
-    // make sure our rendering is up to date before
-    // we allow a query on these attributes.
+    // Make sure our layout is up to date before we allow a query on these attributes.
     DOM::DocumentImpl* docimpl = node.handle()->getDocument();
-    KHTMLView* v = 0;
-    if ( docimpl ) {
-      v = docimpl->view();
-      // Only do a layout if changes have occurred that make it necessary.
-      if ( v && docimpl->renderer() && !docimpl->renderer()->layouted() )
-      {
-        docimpl->updateRendering();
-        docimpl->view()->layout();
+    if (docimpl) {
+      docimpl->updateLayout();
       }
 
-      // refetch in case the renderer changed
-      rend = node.handle() ? node.handle()->renderer() : 0L;
-    }
+    khtml::RenderObject *rend = node.handle()->renderer();
 
     switch (token) {
@@ -302,26 +295,9 @@ Value DOMNode::getValueProperty(ExecStat
     case ScrollTop:
       return Number( rend && rend->layer() ? rend->layer()->scrollYOffset() : 0 );
-    }
-  }
-  case SourceIndex: {
-    // Retrieves the ordinal position of the object, in source order, as the object
-    // appears in the document's all collection
-    // i.e. document.all[n.sourceIndex] == n
-    DOM::Document doc = node.ownerDocument();
-    if (doc.isHTMLDocument()) {
-      DOM::HTMLCollection all = static_cast<DOM::HTMLDocument>(doc).all();
-      unsigned long i = 0;
-      DOM::Node n = all.firstItem();
-      for ( ; !n.isNull() && n != node; n = all.nextItem() )
-        ++i;
-      Q_ASSERT( !n.isNull() ); // node not in document.all !?
-      return Number(i);
-    }
-  }
   default:
     kdDebug(6070) << "WARNING: Unhandled token in DOMNode::getValueProperty : " << token << endl;
     break;
   }
-
+  }
   return Undefined();
 }