OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 using InlineBox::hasHyphen; | 73 using InlineBox::hasHyphen; |
74 using InlineBox::setHasHyphen; | 74 using InlineBox::setHasHyphen; |
75 using InlineBox::canHaveLeadingExpansion; | 75 using InlineBox::canHaveLeadingExpansion; |
76 using InlineBox::setCanHaveLeadingExpansion; | 76 using InlineBox::setCanHaveLeadingExpansion; |
77 | 77 |
78 static inline bool compareByStart(const InlineTextBox* first, const InlineTe
xtBox* second) { return first->start() < second->start(); } | 78 static inline bool compareByStart(const InlineTextBox* first, const InlineTe
xtBox* second) { return first->start() < second->start(); } |
79 | 79 |
80 virtual int baselinePosition(FontBaseline) const override final; | 80 virtual int baselinePosition(FontBaseline) const override final; |
81 virtual LayoutUnit lineHeight() const override final; | 81 virtual LayoutUnit lineHeight() const override final; |
82 | 82 |
83 bool getEmphasisMarkPosition(RenderStyle*, TextEmphasisPosition&) const; | 83 bool getEmphasisMarkPosition(const RenderStyle*, TextEmphasisPosition&) cons
t; |
84 | 84 |
85 LayoutRect logicalOverflowRect() const; | 85 LayoutRect logicalOverflowRect() const; |
86 void setLogicalOverflowRect(const LayoutRect&); | 86 void setLogicalOverflowRect(const LayoutRect&); |
87 LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y
(); } | 87 LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y
(); } |
88 LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect(
).maxY(); } | 88 LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect(
).maxY(); } |
89 | 89 |
90 // charactersWithHyphen, if provided, must not be destroyed before the TextR
un. | 90 // charactersWithHyphen, if provided, must not be destroyed before the TextR
un. |
91 TextRun constructTextRun(RenderStyle*, const Font&, StringBuilder* character
sWithHyphen = 0) const; | 91 TextRun constructTextRun(const RenderStyle*, const Font&, StringBuilder* cha
ractersWithHyphen = 0) const; |
92 TextRun constructTextRun(RenderStyle*, const Font&, StringView, int maximumL
ength, StringBuilder* charactersWithHyphen = 0) const; | 92 TextRun constructTextRun(const RenderStyle*, const Font&, StringView, int ma
ximumLength, StringBuilder* charactersWithHyphen = 0) const; |
93 | 93 |
94 #ifndef NDEBUG | 94 #ifndef NDEBUG |
95 virtual void showBox(int = 0) const override; | 95 virtual void showBox(int = 0) const override; |
96 virtual const char* boxName() const override; | 96 virtual const char* boxName() const override; |
97 #endif | 97 #endif |
98 | 98 |
99 public: | 99 public: |
100 TextRun constructTextRunForInspector(RenderStyle*, const Font&) const; | 100 TextRun constructTextRunForInspector(const RenderStyle*, const Font&) const; |
101 virtual FloatRectWillBeLayoutRect calculateBoundaries() const override { ret
urn FloatRectWillBeLayoutRect(x(), y(), width(), height()); } | 101 virtual FloatRectWillBeLayoutRect calculateBoundaries() const override { ret
urn FloatRectWillBeLayoutRect(x(), y(), width(), height()); } |
102 | 102 |
103 virtual LayoutRect localSelectionRect(int startPos, int endPos); | 103 virtual LayoutRect localSelectionRect(int startPos, int endPos); |
104 bool isSelected(int startPos, int endPos) const; | 104 bool isSelected(int startPos, int endPos) const; |
105 void selectionStartEnd(int& sPos, int& ePos) const; | 105 void selectionStartEnd(int& sPos, int& ePos) const; |
106 | 106 |
107 // These functions both paint markers and update the DocumentMarker's render
edRect. | 107 // These functions both paint markers and update the DocumentMarker's render
edRect. |
108 virtual void paintDocumentMarker(GraphicsContext*, const FloatPointWillBeLay
outPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&, bool grammar); | 108 virtual void paintDocumentMarker(GraphicsContext*, const FloatPointWillBeLay
outPoint& boxOrigin, DocumentMarker*, const RenderStyle*, const Font&, bool gram
mar); |
109 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPointWillBeLa
youtPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&); | 109 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPointWillBeLa
youtPoint& boxOrigin, DocumentMarker*, const RenderStyle*, const Font&); |
110 | 110 |
111 protected: | 111 protected: |
112 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom) override; | 112 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom) override; |
113 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) override; | 113 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) override; |
114 | 114 |
115 private: | 115 private: |
116 virtual void deleteLine() override final; | 116 virtual void deleteLine() override final; |
117 virtual void extractLine() override final; | 117 virtual void extractLine() override final; |
118 virtual void attachLine() override final; | 118 virtual void attachLine() override final; |
119 | 119 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 }; | 171 }; |
172 | 172 |
173 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); | 173 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
174 | 174 |
175 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&); | 175 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&); |
176 | 176 |
177 } // namespace blink | 177 } // namespace blink |
178 | 178 |
179 #endif // InlineTextBox_h | 179 #endif // InlineTextBox_h |
OLD | NEW |