[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/khtml
From: Germain Garand <germain () ebooksfrance ! com>
Date: 2006-07-21 14:48:39
Message-ID: 1153493319.487138.26664.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 564852 by ggarand:
honour relative positioning on table cells.
CSS 2.1-9.3.1 says the effect of position:relative on such a display is undefined,
but the offset is applied in MSIE, so lets fallback to being compatible.
BUG: 130955
M +13 -6 css/cssstyleselector.cpp
M +1 -1 rendering/render_object.cpp
M +1 -1 rendering/render_table.cpp
--- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #564851:564852
@@ -662,12 +662,19 @@
style->setDisplay(BLOCK);
}
- // After performing the display mutation, check table rows. We do not honor \
position:relative on
- // table rows. This has been established in CSS2.1 (and caused a crash in \
containingBlock() on
- // some sites).
- // Likewise, disallow relative positioning on table sections.
- if ( style->position() == RELATIVE && (style->display() > INLINE_TABLE && \
style->display() < TABLE_COLUMN_GROUP) )
- style->setPosition(STATIC);
+ // After performing the display mutation, check our position. We do not \
honor position:relative on + // table rows and some other table displays. This \
is undefined behaviour in CSS2.1 (cf. 9.3.1) + if (style->position() == \
RELATIVE) { + switch (style->display()) {
+ case TABLE_ROW_GROUP:
+ case TABLE_HEADER_GROUP:
+ case TABLE_FOOTER_GROUP:
+ case TABLE_ROW:
+ style->setPosition(STATIC);
+ default:
+ break;
+ }
+ }
}
// Frames and framesets never honor position:relative or position:absolute. \
This is necessary to
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_object.cpp #564851:564852
@@ -587,7 +587,7 @@
RenderBlock *RenderObject::containingBlock() const
{
- if(isTableCell() && !(m_style->position() == ABSOLUTE || m_style->position() == \
FIXED)) + if(isTableCell())
return static_cast<RenderBlock*>( parent()->parent()->parent() );
if (isCanvas())
return const_cast<RenderBlock*>( static_cast<const RenderBlock*>(this) );
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.cpp #564851:564852
@@ -2283,7 +2283,7 @@
bool RenderTableCell::requiresLayer() const {
// table-cell display is never positioned (css 2.1-9.7), so the only time a \
layer is needed
// is when overflow != visible (or when there is opacity when we support it)
- return /* style()->opacity() < 1.0f || */ hasOverflowClip();
+ return /* style()->opacity() < 1.0f || */ hasOverflowClip() || \
isRelPositioned(); }
void RenderTableCell::repaintRectangle(int x, int y, int w, int h, bool immediate, \
bool f)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic