| 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(const LayoutStyle&, TextEmphasisPosition&) cons
t; | 83 bool getEmphasisMarkPosition(const ComputedStyle&, TextEmphasisPosition&) co
nst; |
| 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(const LayoutStyle&, const Font&, StringBuilder* cha
ractersWithHyphen = 0) const; | 91 TextRun constructTextRun(const ComputedStyle&, const Font&, StringBuilder* c
haractersWithHyphen = 0) const; |
| 92 TextRun constructTextRun(const LayoutStyle&, const Font&, StringView, int ma
ximumLength, StringBuilder* charactersWithHyphen = 0) const; | 92 TextRun constructTextRun(const ComputedStyle&, const Font&, StringView, int
maximumLength, 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 #endif | 96 #endif |
| 97 virtual const char* boxName() const override; | 97 virtual const char* boxName() const override; |
| 98 virtual String debugName() const override; | 98 virtual String debugName() const override; |
| 99 | 99 |
| 100 String text() const; | 100 String text() const; |
| 101 | 101 |
| 102 public: | 102 public: |
| 103 TextRun constructTextRunForInspector(const LayoutStyle&, const Font&) const; | 103 TextRun constructTextRunForInspector(const ComputedStyle&, const Font&) cons
t; |
| 104 virtual FloatRectWillBeLayoutRect calculateBoundaries() const override { ret
urn FloatRectWillBeLayoutRect(x(), y(), width(), height()); } | 104 virtual FloatRectWillBeLayoutRect calculateBoundaries() const override { ret
urn FloatRectWillBeLayoutRect(x(), y(), width(), height()); } |
| 105 | 105 |
| 106 virtual LayoutRect localSelectionRect(int startPos, int endPos); | 106 virtual LayoutRect localSelectionRect(int startPos, int endPos); |
| 107 bool isSelected(int startPos, int endPos) const; | 107 bool isSelected(int startPos, int endPos) const; |
| 108 void selectionStartEnd(int& sPos, int& ePos) const; | 108 void selectionStartEnd(int& sPos, int& ePos) const; |
| 109 | 109 |
| 110 // These functions both paint markers and update the DocumentMarker's render
edRect. | 110 // These functions both paint markers and update the DocumentMarker's render
edRect. |
| 111 virtual void paintDocumentMarker(GraphicsContext*, const FloatPointWillBeLay
outPoint& boxOrigin, DocumentMarker*, const LayoutStyle&, const Font&, bool gram
mar); | 111 virtual void paintDocumentMarker(GraphicsContext*, const FloatPointWillBeLay
outPoint& boxOrigin, DocumentMarker*, const ComputedStyle&, const Font&, bool gr
ammar); |
| 112 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPointWillBeLa
youtPoint& boxOrigin, DocumentMarker*, const LayoutStyle&, const Font&); | 112 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPointWillBeLa
youtPoint& boxOrigin, DocumentMarker*, const ComputedStyle&, const Font&); |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom) override; | 115 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom) override; |
| 116 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) override; | 116 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) override; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 virtual void deleteLine() override final; | 119 virtual void deleteLine() override final; |
| 120 virtual void extractLine() override final; | 120 virtual void extractLine() override final; |
| 121 virtual void attachLine() override final; | 121 virtual void attachLine() override final; |
| 122 | 122 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } | 174 } |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); | 177 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
| 178 | 178 |
| 179 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&); | 179 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&); |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| 182 | 182 |
| 183 #endif // InlineTextBox_h | 183 #endif // InlineTextBox_h |
| OLD | NEW |