Permalink
Browse files

[CSS] (Block::render) : Fix a bug; cf. css-004.html

  • Loading branch information...
ShikiOkasaka committed May 31, 2013
1 parent b860795 commit 2fae4b22938a6a92d2894e360826d7495688bf70
Showing with 34 additions and 1 deletion.
  1. +8 −1 src/css/BoxGL.cpp
  2. +26 −0 testdata/css-004.html
View
@@ -694,8 +694,15 @@ void Block::renderInline(ViewCSSImp* view, StackingContext* stackingContext)
void Block::render(ViewCSSImp* view, StackingContext* stackingContext)
{
unsigned overflow = renderBegin(view);
Box* last = 0;
if (overflow != CSSOverflowValueImp::Visible)
last = stackingContext->getLastFloat();
renderNonInline(view, stackingContext);
renderInline(view, stackingContext);
renderInline(view, stackingContext); // TODO: Check which should be drawn first; floats or inline-blocks?
if (overflow != CSSOverflowValueImp::Visible && last != stackingContext->getLastFloat())
stackingContext->renderFloats(view, last, this);
if (!isAnonymous() && 0.0f < getOutlineWidth())
renderOutline(view, x, y + getTopBorderEdge());
renderEnd(view, overflow);
View
@@ -0,0 +1,26 @@
<html>
<head>
<style>
#test {
display: inline-block;
overflow: hidden;
position: relative;
}
.float {
float: left;
}
.inline-block{
display: inline-block;
}
</style>
</head>
<body>
<div class="float">
<div id="test">
<div class="inline-block">
<div class="float">PASS</div>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 2fae4b2

Please sign in to comment.