diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
commit | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch) | |
tree | 8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebCore/rendering/RenderInline.cpp | |
parent | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff) | |
download | qtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz |
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebCore/rendering/RenderInline.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderInline.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/WebCore/rendering/RenderInline.cpp b/Source/WebCore/rendering/RenderInline.cpp index 0182459a1..12a9dfcf8 100644 --- a/Source/WebCore/rendering/RenderInline.cpp +++ b/Source/WebCore/rendering/RenderInline.cpp @@ -47,7 +47,6 @@ namespace WebCore { RenderInline::RenderInline(Node* node) : RenderBoxModelObject(node) - , m_lineHeight(-1) , m_alwaysCreateLineBoxes(false) { setChildrenInline(true); @@ -137,17 +136,16 @@ void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldSt // e.g., <font>foo <h4>goo</h4> moo</font>. The <font> inlines before // and after the block share the same style, but the block doesn't // need to pass its style on to anyone else. + RenderStyle* newStyle = style(); for (RenderInline* currCont = inlineElementContinuation(); currCont; currCont = currCont->inlineElementContinuation()) { RenderBoxModelObject* nextCont = currCont->continuation(); currCont->setContinuation(0); - currCont->setStyle(style()); + currCont->setStyle(newStyle); currCont->setContinuation(nextCont); } - m_lineHeight = -1; - if (!m_alwaysCreateLineBoxes) { - bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations() || style()->hasPadding() || style()->hasMargin() || hasOutline(); + bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations() || newStyle->hasPadding() || newStyle->hasMargin() || hasOutline(); if (oldStyle && alwaysCreateLineBoxes) { dirtyLineBoxes(false); setNeedsLayout(true); @@ -1053,7 +1051,7 @@ void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutPoint topLeft = rect.location(); - if (o->isBlockFlow() && style()->position() != AbsolutePosition && style()->position() != FixedPosition) { + if (o->isBlockFlow() && !style()->isPositioned()) { RenderBlock* cb = toRenderBlock(o); if (cb->hasColumns()) { LayoutRect repaintRect(topLeft, rect.size()); @@ -1268,11 +1266,8 @@ LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*directio if (s != style()) return s->computedLineHeight(); } - - if (m_lineHeight == -1) - m_lineHeight = style()->computedLineHeight(); - - return m_lineHeight; + + return style()->computedLineHeight(); } LayoutUnit RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const |