summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/InlineBox.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/InlineBox.h')
-rw-r--r--WebCore/rendering/InlineBox.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/WebCore/rendering/InlineBox.h b/WebCore/rendering/InlineBox.h
index 1e4b8bf..72e5534 100644
--- a/WebCore/rendering/InlineBox.h
+++ b/WebCore/rendering/InlineBox.h
@@ -51,7 +51,7 @@ public:
#if ENABLE(SVG)
, m_hasVirtualLogicalHeight(false)
#endif
- , m_isVertical(false)
+ , m_isHorizontal(true)
, m_endsWithBreak(false)
, m_hasSelectedChildren(false)
, m_hasEllipsisBoxOrHyphen(false)
@@ -69,7 +69,7 @@ public:
}
InlineBox(RenderObject* obj, int x, int y, int logicalWidth, bool firstLine, bool constructed,
- bool dirty, bool extracted, bool isVertical, InlineBox* next, InlineBox* prev, InlineFlowBox* parent)
+ bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBox* prev, InlineFlowBox* parent)
: m_next(next)
, m_prev(prev)
, m_parent(parent)
@@ -85,7 +85,7 @@ public:
#if ENABLE(SVG)
, m_hasVirtualLogicalHeight(false)
#endif
- , m_isVertical(isVertical)
+ , m_isHorizontal(isHorizontal)
, m_endsWithBreak(false)
, m_hasSelectedChildren(false)
, m_hasEllipsisBoxOrHyphen(false)
@@ -152,8 +152,8 @@ public:
return 0;
}
- bool isVertical() const { return m_isVertical; }
- void setIsVertical(bool v) { m_isVertical = v; }
+ bool isHorizontal() const { return m_isHorizontal; }
+ void setIsHorizontal(bool horizontal) { m_isHorizontal = horizontal; }
virtual IntRect calculateBoundaries() const
{
@@ -216,26 +216,26 @@ public:
void setY(int y) { m_y = y; }
int y() const { return m_y; }
- int width() const { return m_isVertical ? logicalHeight() : logicalWidth(); }
- int height() const { return m_isVertical ? logicalWidth() : logicalHeight(); }
+ int width() const { return isHorizontal() ? logicalWidth() : logicalHeight(); }
+ int height() const { return isHorizontal() ? logicalHeight() : logicalWidth(); }
// The logicalLeft position is the left edge of the line box in a horizontal line and the top edge in a vertical line.
- int logicalLeft() const { return !m_isVertical ? m_x : m_y; }
+ int logicalLeft() const { return isHorizontal() ? m_x : m_y; }
int logicalRight() const { return logicalLeft() + logicalWidth(); }
void setLogicalLeft(int left)
{
- if (!m_isVertical)
+ if (isHorizontal())
m_x = left;
else
m_y = left;
}
// The logicalTop[ position is the top edge of the line box in a horizontal line and the left edge in a vertical line.
- int logicalTop() const { return !m_isVertical ? m_y : m_x; }
+ int logicalTop() const { return isHorizontal() ? m_y : m_x; }
int logicalBottom() const { return logicalTop() + logicalHeight(); }
void setLogicalTop(int top)
{
- if (!m_isVertical)
+ if (isHorizontal())
m_y = top;
else
m_x = top;
@@ -248,8 +248,8 @@ public:
// The logical height is our extent in the block flow direction, i.e., height for horizontal text and width for vertical text.
int logicalHeight() const;
- virtual int baselinePosition() const { return boxModelObject()->baselinePosition(m_firstLine, m_isVertical ? VerticalLine : HorizontalLine, PositionOnContainingLine); }
- virtual int lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, m_isVertical ? VerticalLine : HorizontalLine, PositionOnContainingLine); }
+ virtual int baselinePosition() const { return boxModelObject()->baselinePosition(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
+ virtual int lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
virtual int caretMinOffset() const;
@@ -290,8 +290,9 @@ public:
return 0;
}
- void adjustForFlippedBlocksWritingMode(IntPoint&);
- void adjustForFlippedBlocksWritingMode(IntRect&);
+ IntPoint locationIncludingFlipping();
+ void flipForWritingMode(IntRect&);
+ IntPoint flipForWritingMode(const IntPoint&);
private:
InlineBox* m_next; // The next element on the same line as us.
@@ -319,7 +320,7 @@ protected:
bool m_extracted : 1;
bool m_hasVirtualLogicalHeight : 1;
- bool m_isVertical : 1;
+ bool m_isHorizontal : 1;
// for RootInlineBox
bool m_endsWithBreak : 1; // Whether the line ends with a <br>.