| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 * | 18 * |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef RootInlineBox_h | 21 #ifndef RootInlineBox_h |
| 22 #define RootInlineBox_h | 22 #define RootInlineBox_h |
| 23 | 23 |
| 24 #include "core/layout/api/LineLayoutItem.h" | 24 #include "core/layout/api/LineLayoutItem.h" |
| 25 #include "core/layout/api/SelectionState.h" | 25 #include "core/layout/api/SelectionState.h" |
| 26 #include "core/layout/line/InlineFlowBox.h" | 26 #include "core/layout/line/InlineFlowBox.h" |
| 27 #include "platform/text/BidiContext.h" | 27 #include "platform/text/BidiContext.h" |
| 28 #include "wtf/PtrUtil.h" | |
| 29 #include <memory> | |
| 30 | 28 |
| 31 namespace blink { | 29 namespace blink { |
| 32 | 30 |
| 33 class EllipsisBox; | 31 class EllipsisBox; |
| 34 class HitTestResult; | 32 class HitTestResult; |
| 35 class LineLayoutBlockFlow; | 33 class LineLayoutBlockFlow; |
| 36 | 34 |
| 37 struct BidiStatus; | 35 struct BidiStatus; |
| 38 struct GapRects; | 36 struct GapRects; |
| 39 | 37 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 117 |
| 120 InlineBox* closestLeafChildForPoint(const LayoutPoint&, bool onlyEditableLea
ves); | 118 InlineBox* closestLeafChildForPoint(const LayoutPoint&, bool onlyEditableLea
ves); |
| 121 InlineBox* closestLeafChildForLogicalLeftPosition(LayoutUnit, bool onlyEdita
bleLeaves = false); | 119 InlineBox* closestLeafChildForLogicalLeftPosition(LayoutUnit, bool onlyEdita
bleLeaves = false); |
| 122 | 120 |
| 123 void appendFloat(LayoutBox* floatingBox) | 121 void appendFloat(LayoutBox* floatingBox) |
| 124 { | 122 { |
| 125 ASSERT(!isDirty()); | 123 ASSERT(!isDirty()); |
| 126 if (m_floats) | 124 if (m_floats) |
| 127 m_floats->append(floatingBox); | 125 m_floats->append(floatingBox); |
| 128 else | 126 else |
| 129 m_floats= wrapUnique(new Vector<LayoutBox*>(1, floatingBox)); | 127 m_floats= adoptPtr(new Vector<LayoutBox*>(1, floatingBox)); |
| 130 } | 128 } |
| 131 | 129 |
| 132 Vector<LayoutBox*>* floatsPtr() { ASSERT(!isDirty()); return m_floats.get();
} | 130 Vector<LayoutBox*>* floatsPtr() { ASSERT(!isDirty()); return m_floats.get();
} |
| 133 | 131 |
| 134 void extractLineBoxFromLayoutObject() final; | 132 void extractLineBoxFromLayoutObject() final; |
| 135 void attachLineBoxToLayoutObject() final; | 133 void attachLineBoxToLayoutObject() final; |
| 136 void removeLineBoxFromLayoutObject() final; | 134 void removeLineBoxFromLayoutObject() final; |
| 137 | 135 |
| 138 FontBaseline baselineType() const { return static_cast<FontBaseline>(m_basel
ineType); } | 136 FontBaseline baselineType() const { return static_cast<FontBaseline>(m_basel
ineType); } |
| 139 | 137 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // This folds into the padding at the end of InlineFlowBox on 64-bit. | 175 // This folds into the padding at the end of InlineFlowBox on 64-bit. |
| 178 unsigned m_lineBreakPos; | 176 unsigned m_lineBreakPos; |
| 179 | 177 |
| 180 // Where this line ended. The exact object and the position within that obj
ect are stored so that | 178 // Where this line ended. The exact object and the position within that obj
ect are stored so that |
| 181 // we can create an InlineIterator beginning just after the end of this line
. | 179 // we can create an InlineIterator beginning just after the end of this line
. |
| 182 LineLayoutItem m_lineBreakObj; | 180 LineLayoutItem m_lineBreakObj; |
| 183 RefPtr<BidiContext> m_lineBreakContext; | 181 RefPtr<BidiContext> m_lineBreakContext; |
| 184 | 182 |
| 185 // Floats hanging off the line are pushed into this vector during layout. It
is only | 183 // Floats hanging off the line are pushed into this vector during layout. It
is only |
| 186 // good for as long as the line has not been marked dirty. | 184 // good for as long as the line has not been marked dirty. |
| 187 std::unique_ptr<Vector<LayoutBox*>> m_floats; | 185 OwnPtr<Vector<LayoutBox*>> m_floats; |
| 188 | 186 |
| 189 LayoutUnit m_lineTop; | 187 LayoutUnit m_lineTop; |
| 190 LayoutUnit m_lineBottom; | 188 LayoutUnit m_lineBottom; |
| 191 LayoutUnit m_lineTopWithLeading; | 189 LayoutUnit m_lineTopWithLeading; |
| 192 LayoutUnit m_lineBottomWithLeading; | 190 LayoutUnit m_lineBottomWithLeading; |
| 193 LayoutUnit m_selectionBottom; | 191 LayoutUnit m_selectionBottom; |
| 194 LayoutUnit m_paginationStrut; | 192 LayoutUnit m_paginationStrut; |
| 195 }; | 193 }; |
| 196 | 194 |
| 197 } // namespace blink | 195 } // namespace blink |
| 198 | 196 |
| 199 #endif // RootInlineBox_h | 197 #endif // RootInlineBox_h |
| OLD | NEW |