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

Unified Diff: Source/core/rendering/RenderBox.h

Issue 789433006: [New Multicolumn] Let a spanner's containing block be the multicol container. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Compiling release: paint invalidation state is cleared in the super class anyway. Created 6 years 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/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.h
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index ff5d6876b98df8e9ae4e4ae68eee0837fa82e92f..2c6ea197954bcfaffdc3bb494d97cc8477a80e76 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -30,6 +30,8 @@
namespace blink {
+class RenderMultiColumnSpannerPlaceholder;
+
struct PaintInfo;
enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
@@ -49,6 +51,7 @@ struct RenderBoxRareData {
public:
RenderBoxRareData()
: m_inlineBoxWrapper(0)
+ , m_spannerPlaceholder(0)
, m_overrideLogicalContentHeight(-1)
, m_overrideLogicalContentWidth(-1)
, m_previousBorderBoxSize(-1, -1)
@@ -58,6 +61,9 @@ public:
// For inline replaced elements, the inline box that owns us.
InlineBox* m_inlineBoxWrapper;
+ // For spanners, the spanner placeholder that lays us out within the multicol container.
+ RenderMultiColumnSpannerPlaceholder* m_spannerPlaceholder;
+
LayoutUnit m_overrideLogicalContentHeight;
LayoutUnit m_overrideLogicalContentWidth;
@@ -187,6 +193,11 @@ public:
RenderBox* nextSiblingBox() const;
RenderBox* parentBox() const;
+ // Return the previous sibling column set or spanner placeholder. Only to be used on multicol container children.
+ RenderBox* previousSiblingMultiColumnBox() const;
+ // Return the next sibling column set or spanner placeholder. Only to be used on multicol container children.
+ RenderBox* nextSiblingMultiColumnBox() const;
+
bool canResize() const;
// Visual and layout overflow are in the coordinate space of the box. This means that they aren't purely physical directions.
@@ -396,6 +407,10 @@ public:
void setInlineBoxWrapper(InlineBox*);
void deleteLineBoxWrapper();
+ void setSpannerPlaceholder(RenderMultiColumnSpannerPlaceholder&);
+ void clearSpannerPlaceholder();
+ virtual RenderMultiColumnSpannerPlaceholder* spannerPlaceholder() const final { return m_rareData ? m_rareData->m_spannerPlaceholder : 0; }
+
virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const override;
virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const override;
virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants);
@@ -653,9 +668,9 @@ public:
void setIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalHeight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight; }
protected:
+ virtual void willBeRemovedFromTree() override;
virtual void willBeDestroyed() override;
-
virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) override;
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
virtual void updateFromStyle() override;
@@ -802,6 +817,21 @@ inline RenderBox* RenderBox::lastChildBox() const
return toRenderBox(slowLastChild());
}
+inline RenderBox* RenderBox::previousSiblingMultiColumnBox() const
+{
+ ASSERT(isRenderMultiColumnSpannerPlaceholder() || isRenderMultiColumnSet());
+ RenderBox* previousBox = previousSiblingBox();
+ if (previousBox->isRenderFlowThread())
+ return 0;
+ return previousBox;
+}
+
+inline RenderBox* RenderBox::nextSiblingMultiColumnBox() const
+{
+ ASSERT(isRenderMultiColumnSpannerPlaceholder() || isRenderMultiColumnSet());
+ return nextSiblingBox();
+}
+
inline void RenderBox::setInlineBoxWrapper(InlineBox* boxWrapper)
{
if (boxWrapper) {
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698