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

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

Issue 688233002: Remove writing mode code from the linebox tree. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT 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/InlineBox.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/InlineFlowBox.h
diff --git a/sky/engine/core/rendering/InlineFlowBox.h b/sky/engine/core/rendering/InlineFlowBox.h
index e27b0499350ab9a355717eac2ee60273818be8c0..fd2e60754ac30894f39967f606e5d325042efe56 100644
--- a/sky/engine/core/rendering/InlineFlowBox.h
+++ b/sky/engine/core/rendering/InlineFlowBox.h
@@ -129,37 +129,37 @@ public:
{
if (!includeLogicalLeftEdge())
return 0;
- return isHorizontal() ? boxModelObject()->marginLeft() : boxModelObject()->marginTop();
+ return boxModelObject()->marginLeft();
}
LayoutUnit marginLogicalRight() const
{
if (!includeLogicalRightEdge())
return 0;
- return isHorizontal() ? boxModelObject()->marginRight() : boxModelObject()->marginBottom();
+ return boxModelObject()->marginRight();
}
int borderLogicalLeft() const
{
if (!includeLogicalLeftEdge())
return 0;
- return isHorizontal() ? renderer().style(isFirstLineStyle())->borderLeftWidth() : renderer().style(isFirstLineStyle())->borderTopWidth();
+ return renderer().style(isFirstLineStyle())->borderLeftWidth();
}
int borderLogicalRight() const
{
if (!includeLogicalRightEdge())
return 0;
- return isHorizontal() ? renderer().style(isFirstLineStyle())->borderRightWidth() : renderer().style(isFirstLineStyle())->borderBottomWidth();
+ return renderer().style(isFirstLineStyle())->borderRightWidth();
}
int paddingLogicalLeft() const
{
if (!includeLogicalLeftEdge())
return 0;
- return isHorizontal() ? boxModelObject()->paddingLeft() : boxModelObject()->paddingTop();
+ return boxModelObject()->paddingLeft();
}
int paddingLogicalRight() const
{
if (!includeLogicalRightEdge())
return 0;
- return isHorizontal() ? boxModelObject()->paddingRight() : boxModelObject()->paddingBottom();
+ return boxModelObject()->paddingRight();
}
bool includeLogicalLeftEdge() const { return m_includeLogicalLeftEdge; }
@@ -192,7 +192,6 @@ public:
void placeBoxesInBlockDirection(LayoutUnit logicalTop, LayoutUnit maxHeight, int maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, LayoutUnit& selectionBottom, bool& setLineTop,
LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline);
void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom);
- bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) const;
LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const;
LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const;
@@ -251,18 +250,18 @@ public:
{
return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
}
- LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect().y()) : static_cast<LayoutUnit>(logicalLeft()); }
- LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRect().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }
+ LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? m_overflow->visualOverflowRect().x() : static_cast<LayoutUnit>(logicalLeft()); }
+ LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? m_overflow->visualOverflowRect().maxX() : static_cast<LayoutUnit>(ceilf(logicalRight())); }
LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const
{
if (m_overflow)
- return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_overflow->visualOverflowRect().x();
+ return m_overflow->visualOverflowRect().y();
return lineTop;
}
LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const
{
if (m_overflow)
- return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_overflow->visualOverflowRect().maxX();
+ return m_overflow->visualOverflowRect().maxY();
return lineBottom;
}
LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
« no previous file with comments | « sky/engine/core/rendering/InlineBox.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698