Bug 134051 - [test case] Displaying not needed scrollbar when html is styled with width.
Summary: [test case] Displaying not needed scrollbar when html is styled with width.
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 08:59 UTC by Rafał Miłecki
Modified: 2006-09-25 16:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Minimal test-case for bug 134051 (340 bytes, application/xhtml+xml)
2006-09-14 09:51 UTC, Rafał Miłecki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Miłecki 2006-09-14 08:59:42 UTC
Version:           3.5.4 (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs
OS:                Linux

If page defines width for html like this:

html { width: 80%; }

Konqueror displays horizontal scrollbar that is not needed.

Minimal test-case: http://zajec.net/bug/konq.scrollbar
Comment 1 Allan Sandfeld 2006-09-14 09:41:42 UTC
Please upload the test-case as an attachment to this bug. This way it doesn't get lost if it takes a long time before the bug is fixed.
Comment 2 Rafał Miłecki 2006-09-14 09:51:37 UTC
Created attachment 17764 [details]
Minimal test-case for bug 134051
Comment 3 Allan Sandfeld 2006-09-25 16:05:30 UTC
SVN commit 588278 by carewolf:

Don't mix canvas width and root margins. 
BUG: 134304
BUG: 134051


 M  +1 -1      render_box.cpp  
 M  +2 -4      render_canvas.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_box.cpp #588277:588278
@@ -696,7 +696,7 @@
 
 short RenderBox::containingBlockWidth() const
 {
-    if ((isCanvas()||isRoot()) && canvas()->view())
+    if (isCanvas() && canvas()->view())
     {
         if (canvas()->pagedMode())
             return canvas()->width();
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_canvas.cpp #588277:588278
@@ -109,9 +109,7 @@
         return;
     }
 
-    m_width = m_view ?
-                m_view->frameWidth() + paddingLeft() + paddingRight() + borderLeft() + borderRight()
-                : m_minWidth;
+    m_width = m_view ? m_view->frameWidth() : m_minWidth;
 
     if (style()->marginLeft().isFixed())
         m_marginLeft = style()->marginLeft().value();
@@ -720,7 +718,7 @@
     RenderObject *fc = firstChild();
     if(fc) {
         // ow: like effectiveWidth() but without the negative
-        const int ow = hasOverflowClip() ? width() : overflowWidth();
+        const int ow = fc->hasOverflowClip() ? fc->width() : fc->overflowWidth();
         int dw = ow + fc->marginLeft() + fc->marginRight();
         int rightmostPos = fc->rightmostPosition(false);
 // kdDebug(6040) << "w " << w << " rightmostPos " << rightmostPos << " dw " << dw << " fc->rw " << fc->effectiveWidth() << " fc->width() " << fc->width() << endl;