| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_pr
evLineBox); } | 47 RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_pr
evLineBox); } |
| 48 | 48 |
| 49 virtual void adjustPosition(float dx, float dy) override final; | 49 virtual void adjustPosition(float dx, float dy) override final; |
| 50 | 50 |
| 51 LayoutUnit lineTop() const { return m_lineTop; } | 51 LayoutUnit lineTop() const { return m_lineTop; } |
| 52 LayoutUnit lineBottom() const { return m_lineBottom; } | 52 LayoutUnit lineBottom() const { return m_lineBottom; } |
| 53 | 53 |
| 54 LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; } | 54 LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; } |
| 55 LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; } | 55 LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; } |
| 56 | 56 |
| 57 LayoutUnit paginatedLineWidth() const { return m_fragmentationData ? m_fragm
entationData->m_paginatedLineWidth : LayoutUnit(0); } | |
| 58 void setPaginatedLineWidth(LayoutUnit width) { ensureLineFragmentationData()
->m_paginatedLineWidth = width; } | |
| 59 | |
| 60 LayoutUnit selectionTop() const; | 57 LayoutUnit selectionTop() const; |
| 61 LayoutUnit selectionBottom() const; | 58 LayoutUnit selectionBottom() const; |
| 62 LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBott
om() - selectionTop()); } | 59 LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBott
om() - selectionTop()); } |
| 63 | 60 |
| 64 LayoutUnit selectionTopAdjustedForPrecedingBlock() const; | 61 LayoutUnit selectionTopAdjustedForPrecedingBlock() const; |
| 65 LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<Lay
outUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); } | 62 LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<Lay
outUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); } |
| 66 | 63 |
| 67 int blockDirectionPointInLine() const; | 64 int blockDirectionPointInLine() const; |
| 68 | 65 |
| 69 LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
wAndFallbackFontsMap&, VerticalPositionCache&); | 66 LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
wAndFallbackFontsMap&, VerticalPositionCache&); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 162 |
| 166 Node* getLogicalStartBoxWithNode(InlineBox*&) const; | 163 Node* getLogicalStartBoxWithNode(InlineBox*&) const; |
| 167 Node* getLogicalEndBoxWithNode(InlineBox*&) const; | 164 Node* getLogicalEndBoxWithNode(InlineBox*&) const; |
| 168 | 165 |
| 169 #ifndef NDEBUG | 166 #ifndef NDEBUG |
| 170 virtual const char* boxName() const override; | 167 virtual const char* boxName() const override; |
| 171 #endif | 168 #endif |
| 172 private: | 169 private: |
| 173 LayoutUnit beforeAnnotationsAdjustment() const; | 170 LayoutUnit beforeAnnotationsAdjustment() const; |
| 174 | 171 |
| 175 struct LineFragmentationData; | |
| 176 LineFragmentationData* ensureLineFragmentationData() | |
| 177 { | |
| 178 if (!m_fragmentationData) | |
| 179 m_fragmentationData = adoptPtr(new LineFragmentationData()); | |
| 180 | |
| 181 return m_fragmentationData.get(); | |
| 182 } | |
| 183 | |
| 184 // This folds into the padding at the end of InlineFlowBox on 64-bit. | 172 // This folds into the padding at the end of InlineFlowBox on 64-bit. |
| 185 unsigned m_lineBreakPos; | 173 unsigned m_lineBreakPos; |
| 186 | 174 |
| 187 // Where this line ended. The exact object and the position within that obj
ect are stored so that | 175 // Where this line ended. The exact object and the position within that obj
ect are stored so that |
| 188 // we can create an InlineIterator beginning just after the end of this line
. | 176 // we can create an InlineIterator beginning just after the end of this line
. |
| 189 RenderObject* m_lineBreakObj; | 177 RenderObject* m_lineBreakObj; |
| 190 RefPtr<BidiContext> m_lineBreakContext; | 178 RefPtr<BidiContext> m_lineBreakContext; |
| 191 | 179 |
| 192 struct LineFragmentationData { | |
| 193 WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED; | |
| 194 public: | |
| 195 LineFragmentationData() | |
| 196 : m_paginatedLineWidth(0) | |
| 197 { | |
| 198 | |
| 199 } | |
| 200 | |
| 201 LayoutUnit m_paginatedLineWidth; | |
| 202 }; | |
| 203 | |
| 204 OwnPtr<LineFragmentationData> m_fragmentationData; | |
| 205 | |
| 206 LayoutUnit m_lineTop; | 180 LayoutUnit m_lineTop; |
| 207 LayoutUnit m_lineBottom; | 181 LayoutUnit m_lineBottom; |
| 208 LayoutUnit m_lineTopWithLeading; | 182 LayoutUnit m_lineTopWithLeading; |
| 209 LayoutUnit m_lineBottomWithLeading; | 183 LayoutUnit m_lineBottomWithLeading; |
| 210 LayoutUnit m_selectionBottom; | 184 LayoutUnit m_selectionBottom; |
| 211 }; | 185 }; |
| 212 | 186 |
| 213 } // namespace blink | 187 } // namespace blink |
| 214 | 188 |
| 215 #endif // SKY_ENGINE_CORE_RENDERING_ROOTINLINEBOX_H_ | 189 #endif // SKY_ENGINE_CORE_RENDERING_ROOTINLINEBOX_H_ |
| OLD | NEW |