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

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

Issue 166033009: *** FOR PROTOTYPE PURPOSES ONLY! NOT INTENDED FOR COMMIT! *** (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 6eec95fcc9a3d75a9217179e9ec19b42302478a8..06cb03d2abb7145a12991c8ee5d2b2cfda76fc9a 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -1305,6 +1305,34 @@ void RenderBlock::layout()
invalidateBackgroundObscurationStatus();
}
+void RenderBlock::preLayout()
+{
+ OverflowEventDispatcher dispatcher(this);
+ LayoutRectRecorder recorder(*this);
eseidel 2014/02/15 00:37:18 This won't work, it will expect that layout is don
atreat 2014/02/18 16:03:57 Yes, this one I missed and we'll need a stack. Mo
dsinclair 2014/02/18 16:07:06 LayoutRectRecorder should be fine, you just have t
+
+ // Update our first letter info now.
+ updateFirstLetter();
+
+ // Table cells call layoutBlock directly, so don't add any logic here. Put code into
+ // layoutBlock().
+ preLayoutBlock(false, false);
+}
+
+void RenderBlock::postLayout()
+{
+ postLayoutBlock();
+
+ if (frameView()->partialLayout().isStopping())
+ return;
+
+ // It's safe to check for control clip here, since controls can never be table cells.
+ // If we have a lightweight clip, there can never be any overflow from children.
+ if (hasControlClip() && m_overflow)
+ clearLayoutOverflow();
+
+ invalidateBackgroundObscurationStatus();
+}
+
bool RenderBlock::updateImageLoadingPriorities()
{
Vector<ImageResource*> images;
@@ -1515,6 +1543,18 @@ void RenderBlock::layoutBlock(bool)
clearNeedsLayout();
}
+void RenderBlock::preLayoutBlock(bool, bool)
+{
+ ASSERT_NOT_REACHED();
+ clearNeedsLayout();
+}
+
+bool RenderBlock::postLayoutBlock()
+{
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
void RenderBlock::addOverflowFromChildren()
{
if (!hasColumns()) {

Powered by Google App Engine
This is Rietveld 408576698