From 05c44efdceb09e0a5066c1f2ae06a5f19fd7fc6c Mon Sep 17 00:00:00 2001 From: Victoria Lease Date: Thu, 17 May 2012 08:46:36 -0700 Subject: Cherrypick WebKit r94543. http://trac.webkit.org/changeset/94543 isBeforeOrAfterContent() was already pulled in from r94543 as a part of I02da7a9f891a6eec394398529f64b0992cbfce70, but we needed the rest of the patch to address our ruby text alignment issues. Bug: 6105670 Change-Id: Iad4d6308ab053488abd118eee83058cfc81e22e8 --- Source/WebCore/rendering/RenderTableSection.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Source/WebCore/rendering/RenderTableSection.cpp') diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp index 06d326f..daa0a92 100644 --- a/Source/WebCore/rendering/RenderTableSection.cpp +++ b/Source/WebCore/rendering/RenderTableSection.cpp @@ -78,6 +78,12 @@ RenderTableSection::~RenderTableSection() clearGrid(); } +void RenderTableSection::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) +{ + RenderBox::styleDidChange(diff, oldStyle); + propagateStyleToAnonymousChildren(); +} + void RenderTableSection::destroy() { RenderTable* recalcTable = table(); @@ -100,7 +106,7 @@ void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild RenderObject* last = beforeChild; if (!last) last = lastChild(); - if (last && last->isAnonymous()) { + if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) { if (beforeChild == last) beforeChild = last->firstChild(); last->addChild(child, beforeChild); @@ -112,7 +118,7 @@ void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild RenderObject* lastBox = last; while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableRow()) lastBox = lastBox->parent(); - if (lastBox && lastBox->isAnonymous()) { + if (lastBox && lastBox->isAnonymous() && !lastBox->isBeforeOrAfterContent()) { lastBox->addChild(child, beforeChild); return; } -- cgit v1.1