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

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

Issue 13792002: Fix <dialog> centering (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: get working for relpos Created 7 years, 8 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 | « Source/WebCore/dom/NodeRenderingContext.cpp ('k') | Source/WebCore/rendering/RenderDialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlock.cpp
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp
index 77e028a4049b6c3f158cb1b14b4720987ab13762..bda91e41f6bb09e0e459e12ebcae1ae30d0e2bb0 100644
--- a/Source/WebCore/rendering/RenderBlock.cpp
+++ b/Source/WebCore/rendering/RenderBlock.cpp
@@ -2595,6 +2595,12 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay
child->layoutIfNeeded();
}
+ // Dialog requires special positioning and must lay itself out.
+ if (child->isDialog()) {
+ child->setNeedsLayout(true);
+ child->layout();
+ }
+
// We are no longer at the top of the block if we encounter a non-empty child.
// This has to be done after checking for clear, so that margins can be reset if a clear occurred.
if (marginInfo.atBeforeSideOfBlock() && !child->isSelfCollapsingBlock())
@@ -2637,7 +2643,9 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay
setLogicalHeight(newHeight);
}
- ASSERT(view()->layoutDeltaMatches(oldLayoutDelta));
falken 2013/04/09 10:35:51 Unfortunately this ASSERT gets tripped even with t
+ if (!view()->layoutDeltaMatches(oldLayoutDelta)) {
+ fprintf(stderr, "layout delta doesn't match\n");
+ }
}
void RenderBlock::simplifiedNormalFlowLayout()
« no previous file with comments | « Source/WebCore/dom/NodeRenderingContext.cpp ('k') | Source/WebCore/rendering/RenderDialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698