[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/rendering
From: Germain Garand <germain () ebooksfrance ! com>
Date: 2007-10-22 16:34:47
Message-ID: 1193070887.546887.26197.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 728182 by ggarand:
adapt parts of wc/14847/#9314/
patch by Antti Koivisto <koivisto@iki.fi>
"Relative positioned block size doesnt update root layer size"
M +24 -2 render_box.cpp
M +3 -3 render_flow.cpp
--- trunk/KDE/kdelibs/khtml/rendering/render_box.cpp #728181:728182
@@ -2217,16 +2217,38 @@
int RenderBox::lowestPosition(bool /*includeOverflowInterior*/, bool includeSelf) const
{
return includeSelf ? m_height : 0;
+ if (!includeSelf || !m_width)
+ return 0;
+ int bottom = m_height;
+ if (isRelPositioned()) {
+ int x;
+ relativePositionOffset(x, bottom);
+ }
+ return bottom;
}
int RenderBox::rightmostPosition(bool /*includeOverflowInterior*/, bool includeSelf) const
{
- return includeSelf ? m_width : 0;
+ if (!includeSelf || !m_height)
+ return 0;
+ int right = m_width;
+ if (isRelPositioned()) {
+ int y;
+ relativePositionOffset(right, y);
+ }
+ return right;
}
int RenderBox::leftmostPosition(bool /*includeOverflowInterior*/, bool includeSelf) const
{
- return includeSelf ? 0 : m_width;
+ if (!includeSelf || !m_height)
+ return m_width;
+ int left = 0;
+ if (isRelPositioned()) {
+ int y;
+ relativePositionOffset(left, y);
+ }
+ return left;
}
int RenderBox::pageTopAfter(int y) const
--- trunk/KDE/kdelibs/khtml/rendering/render_flow.cpp #728181:728182
@@ -479,7 +479,7 @@
int
RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int bottom = RenderBox::lowestPosition(includeOverflowInterior, includeSelf);
+ int bottom = includeSelf && m_width > 0 ? m_height : 0;;
if (!includeOverflowInterior && hasOverflowClip())
return bottom;
@@ -504,7 +504,7 @@
int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int right = RenderBox::rightmostPosition(includeOverflowInterior, includeSelf);
+ int right = includeSelf && m_height > 0 ? m_width : 0;
if (!includeOverflowInterior && hasOverflowClip())
return right;
@@ -529,7 +529,7 @@
int RenderFlow::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
{
- int left = RenderBox::leftmostPosition(includeOverflowInterior, includeSelf);
+ int left = includeSelf && m_height > 0 ? 0 : m_width;
if (!includeOverflowInterior && hasOverflowClip())
return left;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic