Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 10912102: Merge 125220 - Reimplement RenderQuote placement algorithm (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebCore/rendering/RenderQuote.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObjectChildList.cpp
===================================================================
--- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 127610)
+++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy)
@@ -117,6 +117,9 @@
if (oldChild->isRenderRegion())
toRenderRegion(oldChild)->detachRegion();
+ if (oldChild->isQuote())
+ toRenderQuote(oldChild)->detachQuote();
+
if (oldChild->inRenderFlowThread()) {
if (oldChild->isBox())
oldChild->enclosingRenderFlowThread()->removeRenderBoxRegionInfo(toRenderBox(oldChild));
@@ -158,7 +161,6 @@
// by skipping this step when destroying the entire tree.
if (!owner->documentBeingDestroyed()) {
RenderCounter::rendererRemovedFromTree(oldChild);
- RenderQuote::rendererRemovedFromTree(oldChild);
}
if (AXObjectCache::accessibilityEnabled())
@@ -210,13 +212,16 @@
if (newChild->isRenderRegion())
toRenderRegion(newChild)->attachRegion();
+ // You can't attachQuote() otherwise the quote would be attached too early
+ // and get the wrong depth since generated content is inserted into anonymous
+ // renderers before going into the main render tree.
+
if (RenderNamedFlowThread* containerFlowThread = renderNamedFlowThreadContainer(owner))
containerFlowThread->addFlowChild(newChild);
}
if (!owner->documentBeingDestroyed()) {
RenderCounter::rendererSubtreeAttached(newChild);
- RenderQuote::rendererSubtreeAttached(newChild);
}
newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing block hierarchy.
if (!owner->normalChildNeedsLayout())
@@ -279,13 +284,15 @@
if (child->isRenderRegion())
toRenderRegion(child)->attachRegion();
+ // Calling attachQuote() here would be too early (before anonymous renderers are inserted)
+ // see appendChild() for more explanation.
+
if (RenderNamedFlowThread* containerFlowThread = renderNamedFlowThreadContainer(owner))
containerFlowThread->addFlowChild(child, beforeChild);
}
if (!owner->documentBeingDestroyed()) {
RenderCounter::rendererSubtreeAttached(child);
- RenderQuote::rendererSubtreeAttached(child);
}
child->setNeedsLayoutAndPrefWidthsRecalc();
if (!owner->normalChildNeedsLayout())
« no previous file with comments | « no previous file | Source/WebCore/rendering/RenderQuote.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698