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

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

Issue 792803002: [New Multicolumn] Layout support for column-span:all. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@347325-placeholder
Patch Set: Code review. If there are no sets, return early. Created 5 years, 11 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/RenderMultiColumnSpannerPlaceholder.cpp
diff --git a/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp b/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp
index eee694b7b97de236f75554d66c0e4133aeb10933..b0555a5b2af6c9766a4a282382d2e39e16ee7c6e 100644
--- a/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp
+++ b/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp
@@ -48,17 +48,22 @@ void RenderMultiColumnSpannerPlaceholder::layout()
{
ASSERT(needsLayout());
- // FIXME: actual spanner positioning isn't implemented yet. Just set it to 0,0 for consistency
- // (in case the spanner used to be something else that was laid out properly).
- m_rendererInFlowThread->setLogicalTop(LayoutUnit());
- m_rendererInFlowThread->setLogicalLeft(LayoutUnit());
-
// Lay out the actual column-span:all element.
m_rendererInFlowThread->layoutIfNeeded();
+ // The spanner has now been laid out, so its height is known. Time to update the placeholder's
+ // height as well, so that we take up the correct amount of space in the multicol container.
+ updateLogicalHeight();
+
clearNeedsLayout();
}
+void RenderMultiColumnSpannerPlaceholder::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
+{
+ computedValues.m_extent = m_rendererInFlowThread->logicalHeight();
+ computedValues.m_position = logicalTop;
+}
+
void RenderMultiColumnSpannerPlaceholder::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this, paintInvalidationState.paintInvalidationContainer());
@@ -66,6 +71,17 @@ void RenderMultiColumnSpannerPlaceholder::invalidateTreeIfNeeded(const PaintInva
RenderBox::invalidateTreeIfNeeded(paintInvalidationState);
}
+void RenderMultiColumnSpannerPlaceholder::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+{
+ if (!m_rendererInFlowThread->hasSelfPaintingLayer())
+ m_rendererInFlowThread->paint(paintInfo, paintOffset);
+}
+
+bool RenderMultiColumnSpannerPlaceholder::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action)
+{
+ return !m_rendererInFlowThread->hasSelfPaintingLayer() && m_rendererInFlowThread->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, action);
+}
+
const char* RenderMultiColumnSpannerPlaceholder::renderName() const
{
return "RenderMultiColumnSpannerPlaceholder";
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h ('k') | Source/core/rendering/RenderPagedFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698