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

Unified Diff: sky/engine/core/rendering/shapes/ShapeOutsideInfo.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/line/LineWidth.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp
diff --git a/sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp b/sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp
index ec9ab840f3c7e7284cd28c0486b53e449e436496..09ce2d485de67a36c7973db9b11ababcf5ce95fe 100644
--- a/sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp
+++ b/sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp
@@ -31,7 +31,6 @@
#include "core/rendering/shapes/ShapeOutsideInfo.h"
#include "core/inspector/ConsoleMessage.h"
-#include "core/rendering/FloatingObjects.h"
#include "core/rendering/RenderBlockFlow.h"
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderImage.h"
@@ -240,40 +239,11 @@ bool ShapeOutsideInfo::isEnabledFor(const RenderBox& box)
return false;
}
+
ShapeOutsideDeltas ShapeOutsideInfo::computeDeltasForContainingBlockLine(const RenderBlockFlow& containingBlock, const FloatingObject& floatingObject, LayoutUnit lineTop, LayoutUnit lineHeight)
{
- ASSERT(lineHeight >= 0);
-
- LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(&floatingObject) + containingBlock.marginBeforeForChild(&m_renderer);
- LayoutUnit borderBoxLineTop = lineTop - borderBoxTop;
-
- if (isShapeDirty() || !m_shapeOutsideDeltas.isForLine(borderBoxLineTop, lineHeight)) {
- LayoutUnit referenceBoxLineTop = borderBoxLineTop - logicalTopOffset();
- LayoutUnit floatMarginBoxWidth = containingBlock.logicalWidthForFloat(&floatingObject);
-
- if (computedShape().lineOverlapsShapeMarginBounds(referenceBoxLineTop, lineHeight)) {
- LineSegment segment = computedShape().getExcludedInterval((borderBoxLineTop - logicalTopOffset()), std::min(lineHeight, shapeLogicalBottom() - borderBoxLineTop));
- if (segment.isValid) {
- LayoutUnit logicalLeftMargin = containingBlock.style()->isLeftToRightDirection() ? containingBlock.marginStartForChild(&m_renderer) : containingBlock.marginEndForChild(&m_renderer);
- LayoutUnit rawLeftMarginBoxDelta = segment.logicalLeft + logicalLeftOffset() + logicalLeftMargin;
- LayoutUnit leftMarginBoxDelta = clampTo<LayoutUnit>(rawLeftMarginBoxDelta, LayoutUnit(), floatMarginBoxWidth);
-
- LayoutUnit logicalRightMargin = containingBlock.style()->isLeftToRightDirection() ? containingBlock.marginEndForChild(&m_renderer) : containingBlock.marginStartForChild(&m_renderer);
- LayoutUnit rawRightMarginBoxDelta = segment.logicalRight + logicalLeftOffset() - containingBlock.logicalWidthForChild(&m_renderer) - logicalRightMargin;
- LayoutUnit rightMarginBoxDelta = clampTo<LayoutUnit>(rawRightMarginBoxDelta, -floatMarginBoxWidth, LayoutUnit());
-
- m_shapeOutsideDeltas = ShapeOutsideDeltas(leftMarginBoxDelta, rightMarginBoxDelta, true, borderBoxLineTop, lineHeight);
- return m_shapeOutsideDeltas;
- }
- }
-
- // Lines that do not overlap the shape should act as if the float
- // wasn't there for layout purposes. So we set the deltas to remove the
- // entire width of the float.
- m_shapeOutsideDeltas = ShapeOutsideDeltas(floatMarginBoxWidth, -floatMarginBoxWidth, false, borderBoxLineTop, lineHeight);
- }
-
- return m_shapeOutsideDeltas;
+ // FIXME(sky): Remove this.
+ return ShapeOutsideDeltas();
}
LayoutRect ShapeOutsideInfo::computedShapePhysicalBoundingBox() const
« no previous file with comments | « sky/engine/core/rendering/line/LineWidth.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698