Commit b4380ed8 authored by robert@webkit.org's avatar robert@webkit.org

REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block

https://bugs.webkit.org/show_bug.cgi?id=115818

Reviewed by David Hyatt.

Source/WebCore:

r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.

Test: fast/inline/anonymous-block-with-empty-inline.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):

LayoutTests:

* fast/inline/anonymous-block-with-empty-inline-expected.txt: Added.
* fast/inline/anonymous-block-with-empty-inline.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9dfaa099
2013-05-10 Robert Hogan <robert@webkit.org>
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818
Reviewed by David Hyatt.
* fast/inline/anonymous-block-with-empty-inline-expected.txt: Added.
* fast/inline/anonymous-block-with-empty-inline.html: Added.
2013-05-10 Dean Jackson <dino@apple.com>
Include tab character as a word end for kerning
......
webkit.org/b/115818: The empty inline should get a linebox
PASS
 
<style>
body {
margin: 0;
}
span {
background: red;
padding-left: 40px;
}
div {
background: green;
line-height: 40px;
width: 60px;
}
p {
line-height: 40px;
margin: 0;
}
</style>
<script src="../../resources/check-layout.js"></script>
<p> webkit.org/b/115818: The empty inline should get a linebox</p>
<span id="inline" data-total-y=40></span><div id="first">&nbsp;</div>
<script>
checkLayout('#inline');
</script>
2013-05-10 Robert Hogan <robert@webkit.org>
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818
Reviewed by David Hyatt.
r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.
Test: fast/inline/anonymous-block-with-empty-inline.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Remove unnecessary includes in WidgetGtk.cpp
......
......@@ -2397,11 +2397,11 @@ static bool hasInlineDirectionBordersPaddingOrMargin(RenderInline* flow)
{
// Where an empty inline is split across anonymous blocks we should only give lineboxes to the 'sides' of the
// inline that have borders, padding or margin.
bool shouldApplyStartBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || flow->inlineElementContinuation();
bool shouldApplyStartBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || !flow->isInlineElementContinuation();
if (shouldApplyStartBorderPaddingOrMargin && (flow->borderStart() || flow->marginStart() || flow->paddingStart()))
return true;
bool shouldApplyEndBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || !flow->inlineElementContinuation();
bool shouldApplyEndBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || flow->isInlineElementContinuation() || !flow->inlineElementContinuation();
return shouldApplyEndBorderPaddingOrMargin && (flow->borderEnd() || flow->marginEnd() || flow->paddingEnd());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment