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

Unified Diff: sky/engine/core/rendering/RenderBlockFlow.cpp

Issue 689733003: Remove most of FloatingObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/rendering/RenderBlockFlow.h ('k') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlockFlow.cpp
diff --git a/sky/engine/core/rendering/RenderBlockFlow.cpp b/sky/engine/core/rendering/RenderBlockFlow.cpp
index decebfb4499a86193772bccf3b9faa96abb20040..b175a5ef4a4187fda59b2bca8f743d71ae5bab63 100644
--- a/sky/engine/core/rendering/RenderBlockFlow.cpp
+++ b/sky/engine/core/rendering/RenderBlockFlow.cpp
@@ -514,11 +514,6 @@ void RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, SubtreeLayoutSc
adjustPositionedBlock(child, marginInfo);
continue;
}
- if (child->isFloating()) {
- insertFloatingObject(child);
- adjustFloatingBlock(marginInfo);
- continue;
- }
// Lay out the child.
layoutBlockChild(child, marginInfo, previousFloatLogicalBottom);
@@ -1155,9 +1150,6 @@ RootInlineBox* RenderBlockFlow::createAndAppendRootInlineBox()
void RenderBlockFlow::deleteLineBoxTree()
{
- if (containsFloats())
- m_floatingObjects->clearLineBoxTreePointers();
-
m_lineBoxes.deleteLineBoxTree();
}
@@ -1177,11 +1169,6 @@ LayoutUnit RenderBlockFlow::getClearDelta(RenderBox* child, LayoutUnit logicalTo
return 0;
}
-void RenderBlockFlow::createFloatingObjects()
-{
- // FIXME(sky): Remove this.
-}
-
void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
{
RenderStyle* oldStyle = style();
@@ -1195,37 +1182,8 @@ void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle& n
void RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
+ // FIXME(sky): Remove this.
RenderBlock::styleDidChange(diff, oldStyle);
-
- // After our style changed, if we lose our ability to propagate floats into next sibling
- // blocks, then we need to find the top most parent containing that overhanging float and
- // then mark its descendants with floats for layout and clear all floats from its next
- // sibling blocks that exist in our floating objects list. See bug 56299 and 62875.
- bool canPropagateFloatIntoSibling = !isFloatingOrOutOfFlowPositioned() && !avoidsFloats();
- if (diff.needsFullLayout() && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) {
- RenderBlockFlow* parentBlockFlow = this;
- const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
- FloatingObjectSetIterator end = floatingObjectSet.end();
-
- for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr = curr->parent()) {
- if (curr->isRenderBlockFlow()) {
- RenderBlockFlow* currBlock = toRenderBlockFlow(curr);
-
- if (currBlock->hasOverhangingFloats()) {
- for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
- RenderBox* renderer = (*it)->renderer();
- if (currBlock->hasOverhangingFloat(renderer)) {
- parentBlockFlow = currBlock;
- break;
- }
- }
- }
- }
- }
-
- parentBlockFlow->markAllDescendantsWithFloatsForLayout();
- parentBlockFlow->markSiblingsWithFloatsForLayout();
- }
}
void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox* child, LayoutUnit logicalTop)
@@ -1303,27 +1261,11 @@ void RenderBlockFlow::paintFloats(PaintInfo& paintInfo, const LayoutPoint& paint
// FIXME(sky): Remove this.
}
-void RenderBlockFlow::clipOutFloatingObjects(RenderBlock* rootBlock, const PaintInfo* paintInfo, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock)
-{
- // FIXME(sky): Remove this.
-}
-
void RenderBlockFlow::clearFloats(EClear clear)
{
// FIXME(sky): Remove this.
}
-bool RenderBlockFlow::containsFloat(RenderBox* renderer) const
-{
- // FIXME(sky): Remove this.
- return false;
-}
-
-void RenderBlockFlow::removeFloatingObjects()
-{
- // FIXME(sky): Remove this.
-}
-
LayoutPoint RenderBlockFlow::flipFloatForWritingModeForChild(const FloatingObject* child, const LayoutPoint& point) const
{
// FIXME(sky): Remove this.
@@ -1370,21 +1312,6 @@ LayoutPoint RenderBlockFlow::computeLogicalLocationForFloat(const FloatingObject
return LayoutPoint();
}
-FloatingObject* RenderBlockFlow::insertFloatingObject(RenderBox* floatBox)
-{
- return 0;
-}
-
-void RenderBlockFlow::removeFloatingObject(RenderBox* floatBox)
-{
- // FIXME(sky): Remove this.
-}
-
-void RenderBlockFlow::removeFloatingObjectsBelow(FloatingObject* lastFloat, int logicalOffset)
-{
- // FIXME(sky): Remove this.
-}
-
bool RenderBlockFlow::positionNewFloats()
{
// FIXME(sky): Remove this.
@@ -1407,18 +1334,6 @@ void RenderBlockFlow::addOverhangingFloats(RenderBlockFlow* child, bool makeChil
// FIXME(sky): Remove this.
}
-LayoutUnit RenderBlockFlow::lowestFloatLogicalBottom(FloatingObject::Type floatType) const
-{
- // FIXME(sky): Remove this.
- return 0;
-}
-
-LayoutUnit RenderBlockFlow::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode) const
-{
- // FIXME(sky): Remove this.
- return logicalHeight;
-}
-
bool RenderBlockFlow::hitTestFloats(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset)
{
// FIXME(sky): Remove this.
@@ -1479,17 +1394,13 @@ void RenderBlockFlow::fitBorderToLinesIfNeeded()
LayoutUnit RenderBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const
{
- if (m_floatingObjects && m_floatingObjects->hasLeftObjects())
- return m_floatingObjects->logicalLeftOffset(fixedOffset, logicalTop, logicalHeight);
-
+ // FIXME(sky): remove this.
return fixedOffset;
}
LayoutUnit RenderBlockFlow::logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const
{
- if (m_floatingObjects && m_floatingObjects->hasRightObjects())
- return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, logicalHeight);
-
+ // FIXME(sky): remove this.
return fixedOffset;
}
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.h ('k') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698