OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace WebCore { | 25 namespace WebCore { |
26 | 26 |
27 class HitTestRequest; | 27 class HitTestRequest; |
28 class HitTestResult; | 28 class HitTestResult; |
29 | 29 |
30 class EllipsisBox : public InlineBox { | 30 class EllipsisBox : public InlineBox { |
31 public: | 31 public: |
32 EllipsisBox(RenderObject* obj, const AtomicString& ellipsisStr, InlineFlowBo
x* parent, | 32 EllipsisBox(RenderObject* obj, const AtomicString& ellipsisStr, InlineFlowBo
x* parent, |
33 int width, int height, int y, bool firstLine, bool isVertical, I
nlineBox* markupBox) | 33 int width, int height, int y, bool firstLine, bool isVertical, I
nlineBox* markupBox) |
34 : InlineBox(obj, FloatPoint(0, y), width, firstLine, true, false, false,
isVertical, 0, 0, parent) | 34 : InlineBox(obj, FloatPoint(0, y), width, firstLine, true, false, false,
isVertical, 0, 0, parent) |
| 35 , m_shouldPaintMarkupBox(markupBox) |
35 , m_height(height) | 36 , m_height(height) |
36 , m_str(ellipsisStr) | 37 , m_str(ellipsisStr) |
37 , m_markupBox(markupBox) | |
38 , m_selectionState(RenderObject::SelectionNone) | 38 , m_selectionState(RenderObject::SelectionNone) |
39 { | 39 { |
40 } | 40 } |
41 | 41 |
42 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); | 42 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); |
43 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineT
op, LayoutUnit lineBottom) OVERRIDE; | 43 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineT
op, LayoutUnit lineBottom) OVERRIDE; |
44 void setSelectionState(RenderObject::SelectionState s) { m_selectionState =
s; } | 44 void setSelectionState(RenderObject::SelectionState s) { m_selectionState =
s; } |
45 IntRect selectionRect(); | 45 IntRect selectionRect(); |
46 | 46 |
47 private: | 47 private: |
| 48 void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit l
ineTop, LayoutUnit lineBottom, RenderStyle*); |
48 virtual int height() const { return m_height; } | 49 virtual int height() const { return m_height; } |
49 virtual RenderObject::SelectionState selectionState() { return m_selectionSt
ate; } | 50 virtual RenderObject::SelectionState selectionState() { return m_selectionSt
ate; } |
50 void paintSelection(GraphicsContext*, const LayoutPoint&, RenderStyle*, cons
t Font&); | 51 void paintSelection(GraphicsContext*, const LayoutPoint&, RenderStyle*, cons
t Font&); |
51 | 52 |
| 53 bool m_shouldPaintMarkupBox; |
52 int m_height; | 54 int m_height; |
53 AtomicString m_str; | 55 AtomicString m_str; |
54 InlineBox* m_markupBox; | |
55 RenderObject::SelectionState m_selectionState; | 56 RenderObject::SelectionState m_selectionState; |
56 }; | 57 }; |
57 | 58 |
58 } // namespace WebCore | 59 } // namespace WebCore |
59 | 60 |
60 #endif // EllipsisBox_h | 61 #endif // EllipsisBox_h |
OLD | NEW |