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

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

Issue 706953003: Delete unused methods/arguments from RenderBlockFlow. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlockFlow.h
diff --git a/sky/engine/core/rendering/RenderBlockFlow.h b/sky/engine/core/rendering/RenderBlockFlow.h
index 06b40e3da7ff5138ad3f1d50980b0b20d515fdfd..b5567568399d4d8c3bb7fc1170932e164699b9bd 100644
--- a/sky/engine/core/rendering/RenderBlockFlow.h
+++ b/sky/engine/core/rendering/RenderBlockFlow.h
@@ -59,27 +59,27 @@ public:
virtual void deleteLineBoxTree() override final;
- LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
+ LayoutUnit availableLogicalWidthForLine(bool shouldIndentText) const
{
- return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldIndentText, logicalHeight) - logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight));
+ return max<LayoutUnit>(0, logicalRightOffsetForLine(shouldIndentText) - logicalLeftOffsetForLine(shouldIndentText));
}
- LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
+ LayoutUnit logicalRightOffsetForLine(bool shouldIndentText) const
{
- return logicalRightOffsetForLine(position, logicalRightOffsetForContent(), shouldIndentText, logicalHeight);
+ return logicalRightOffsetForLine(logicalRightOffsetForContent(), shouldIndentText);
}
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
+ LayoutUnit logicalLeftOffsetForLine(bool shouldIndentText) const
{
- return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), shouldIndentText, logicalHeight);
+ return logicalLeftOffsetForLine(logicalLeftOffsetForContent(), shouldIndentText);
}
- LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
+ LayoutUnit startOffsetForLine(bool shouldIndentText) const
{
- return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight)
- : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentText, logicalHeight);
+ return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(shouldIndentText)
+ : logicalWidth() - logicalRightOffsetForLine(shouldIndentText);
}
- LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const
+ LayoutUnit endOffsetForLine(bool shouldIndentText) const
{
- return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight)
- : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentText, logicalHeight);
+ return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(shouldIndentText)
+ : logicalWidth() - logicalRightOffsetForLine(shouldIndentText);
}
// FIXME-BLOCKFLOW: Move this into RenderBlockFlow once there are no calls
@@ -97,14 +97,12 @@ public:
virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
- void moveAllChildrenIncludingFloatsTo(RenderBlock* toBlock, bool fullRemoveInsert);
-
bool generatesLineBoxesForInlineChild(RenderObject*);
- LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
+ LayoutUnit startAlignedOffsetForLine(bool shouldIndentText);
void setStaticInlinePositionForChild(RenderBox*, LayoutUnit inlinePosition);
- void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop);
+ void updateStaticInlinePositionForChild(RenderBox*);
static bool shouldSkipCreatingRunsForObject(RenderObject* obj)
{
@@ -122,41 +120,35 @@ public:
protected:
void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidationLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge);
- LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
- {
- return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent);
- }
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
- {
- return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent);
- }
-
virtual bool updateLogicalWidthAndColumnWidth() override;
void determineLogicalLeftPositionForChild(RenderBox* child);
private:
+ LayoutUnit logicalRightOffsetForLine(LayoutUnit fixedOffset, bool applyTextIndent) const
+ {
+ LayoutUnit right = fixedOffset;
+ if (applyTextIndent && !style()->isLeftToRightDirection())
+ right -= textIndentOffset();
+ return right;
+ }
+ LayoutUnit logicalLeftOffsetForLine(LayoutUnit fixedOffset, bool applyTextIndent) const
+ {
+ LayoutUnit left = fixedOffset;
+ if (applyTextIndent && style()->isLeftToRightDirection())
+ left += textIndentOffset();
+ return left;
+ }
+
void layoutBlockFlow(bool relayoutChildren, SubtreeLayoutScope&);
void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge);
void layoutBlockChild(RenderBox* child);
void adjustPositionedBlock(RenderBox* child);
- virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override final;
-
virtual void invalidatePaintForOverflow() override final;
- virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) override final;
-
- LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const;
- LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const;
-
- LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
- LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
-
- LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
- LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
- virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG
+ RootInlineBox* createRootInlineBox();
void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, unsigned expansionOpportunityCount);
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698