diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp --- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 2010-06-02 04:03:11.000000000 +0200 +++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp 2010-06-15 13:55:36.853463455 +0200 @@ -1611,7 +1611,7 @@ void RenderObject::styleWillChange(Style } } -void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*) +void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { if (s_affectsParentBlock) handleDynamicFloatPositionChange(); @@ -1619,9 +1619,17 @@ void RenderObject::styleDidChange(StyleD if (!m_parent) return; - if (diff == StyleDifferenceLayout) + if (diff == StyleDifferenceLayout) { + // If the object already needs layout, then setNeedsLayout won't do + // any work. But if the containing block has changed, then we may need + // to make the new containing blocks for layout. The change that can + // directly affect the containing block of this object is a change to + // the position style. + if (m_needsLayout && oldStyle->position() != m_style->position()) + markContainingBlocksForLayout(); + setNeedsLayoutAndPrefWidthsRecalc(); - else if (diff == StyleDifferenceLayoutPositionedMovementOnly) + } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) setNeedsPositionedMovementLayout(); // Don't check for repaint here; we need to wait until the layer has been