#include "platform/text/TextRun.h"
#include "wtf/Forward.h"
-namespace WebCore {
+namespace blink {
struct CompositionUnderline;
class DocumentMarker;
const unsigned short cNoTruncation = USHRT_MAX;
const unsigned short cFullTruncation = USHRT_MAX - 1;
-// Helper functions shared by InlineTextBox / SVGRootInlineBox
-void updateGraphicsContext(GraphicsContext*, const Color& fillColor, const Color& strokeColor, float strokeThickness, ColorSpace);
-Color correctedTextColor(Color textColor, Color backgroundColor);
-
class InlineTextBox : public InlineBox {
public:
InlineTextBox(RenderObject& obj)
{
}
+ RenderText& renderer() const { return toRenderText(InlineBox::renderer()); }
+
virtual void destroy() OVERRIDE FINAL;
InlineTextBox* prevTextBox() const { return m_prevTextBox; }
void setLogicalOverflowRect(const LayoutRect&);
LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y(); }
LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect().maxY(); }
- LayoutUnit logicalLeftVisualOverflow() const { return logicalOverflowRect().x(); }
- LayoutUnit logicalRightVisualOverflow() const { return logicalOverflowRect().maxX(); }
#ifndef NDEBUG
virtual void showBox(int = 0) const OVERRIDE;
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE;
-public:
- RenderText& textRenderer() const;
-
private:
virtual void deleteLine() OVERRIDE FINAL;
virtual void extractLine() OVERRIDE FINAL;
DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
-inline RenderText& InlineTextBox::textRenderer() const
-{
- return toRenderText(renderer());
-}
-
void alignSelectionRectToDevicePixels(FloatRect&);
inline AffineTransform InlineTextBox::rotation(const FloatRect& boxRect, RotationDirection rotationDirection)
: AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY());
}
-} // namespace WebCore
+} // namespace blink
#endif // InlineTextBox_h