Summary: | [test case] margin: auto and display: table on root element incorrectly generate horizontal scrollbar | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | khtmltest <annavoy> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testcase |
Description
khtmltest
2006-09-19 03:40:47 UTC
Created attachment 17884 [details]
testcase
Confirmed, svn r587111 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; |