Title: [93883] branches/chromium/835/Source/WebCore/rendering
- Revision
- 93883
- Author
- [email protected]
- Date
- 2011-08-26 10:17:41 -0700 (Fri, 26 Aug 2011)
Log Message
Merge 93794
BUG=93587
Review URL: http://codereview.chromium.org/7753041
Modified Paths
Diff
Modified: branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp (93882 => 93883)
--- branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp 2011-08-26 16:57:31 UTC (rev 93882)
+++ branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp 2011-08-26 17:17:41 UTC (rev 93883)
@@ -667,10 +667,10 @@
// Make sure we don't append things after :after-generated content if we have it.
if (!beforeChild) {
RenderObject* lastRenderer = lastChild();
- if (isAfterContent(lastRenderer))
+ while (lastRenderer && lastRenderer->isAnonymous() && !isAfterContent(lastRenderer))
+ lastRenderer = lastRenderer->lastChild();
+ if (lastRenderer && isAfterContent(lastRenderer))
beforeChild = lastRenderer;
- else if (lastRenderer && lastRenderer->isAnonymousBlock() && isAfterContent(lastRenderer->lastChild()))
- beforeChild = lastRenderer->lastChild();
}
// If the requested beforeChild is not one of our children, then this is because
Modified: branches/chromium/835/Source/WebCore/rendering/RenderTableRow.cpp (93882 => 93883)
--- branches/chromium/835/Source/WebCore/rendering/RenderTableRow.cpp 2011-08-26 16:57:31 UTC (rev 93882)
+++ branches/chromium/835/Source/WebCore/rendering/RenderTableRow.cpp 2011-08-26 17:17:41 UTC (rev 93883)
@@ -90,7 +90,7 @@
RenderObject* last = beforeChild;
if (!last)
last = lastChild();
- if (last && last->isAnonymous() && last->isTableCell()) {
+ if (last && last->isAnonymous() && last->isTableCell() && !isAfterContent(last) && !isBeforeContent(last)) {
if (beforeChild == last)
beforeChild = last->firstChild();
last->addChild(child, beforeChild);
@@ -98,7 +98,7 @@
}
// If beforeChild is inside an anonymous cell, insert into the cell.
- if (last && !last->isTableCell() && last->parent() && last->parent()->isAnonymous()) {
+ if (last && !last->isTableCell() && last->parent() && last->parent()->isAnonymous() && !isAfterContent(last->parent()) && !isBeforeContent(last->parent())) {
last->parent()->addChild(child, beforeChild);
return;
}
Modified: branches/chromium/835/Source/WebCore/rendering/RenderTableSection.cpp (93882 => 93883)
--- branches/chromium/835/Source/WebCore/rendering/RenderTableSection.cpp 2011-08-26 16:57:31 UTC (rev 93882)
+++ branches/chromium/835/Source/WebCore/rendering/RenderTableSection.cpp 2011-08-26 17:17:41 UTC (rev 93883)
@@ -96,7 +96,7 @@
RenderObject* last = beforeChild;
if (!last)
last = lastChild();
- if (last && last->isAnonymous()) {
+ if (last && last->isAnonymous() && !isAfterContent(last) && !isBeforeContent(last)) {
if (beforeChild == last)
beforeChild = last->firstChild();
last->addChild(child, beforeChild);
@@ -108,7 +108,7 @@
RenderObject* lastBox = last;
while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableRow())
lastBox = lastBox->parent();
- if (lastBox && lastBox->isAnonymous()) {
+ if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox) && !isBeforeContent(lastBox)) {
lastBox->addChild(child, beforeChild);
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes