Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Side by Side Diff: Source/core/layout/line/RootInlineBox.h

Issue 1261653002: Move SelectionState out of LayoutObject and into Line Layout API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2 legit 5ever Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | Source/core/layout/line/RootInlineBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/line/InlineFlowBox.h" 26 #include "core/layout/line/InlineFlowBox.h"
26 #include "platform/text/BidiContext.h" 27 #include "platform/text/BidiContext.h"
27 28
28 namespace blink { 29 namespace blink {
29 30
30 class EllipsisBox; 31 class EllipsisBox;
31 class HitTestResult; 32 class HitTestResult;
32 class LayoutBlockFlow; 33 class LayoutBlockFlow;
33 34
34 struct BidiStatus; 35 struct BidiStatus;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 int baselinePosition(FontBaseline baselineType) const final; 106 int baselinePosition(FontBaseline baselineType) const final;
106 LayoutUnit lineHeight() const final; 107 LayoutUnit lineHeight() const final;
107 108
108 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom) override; 109 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom) override;
109 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom ) final; 110 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom ) final;
110 111
111 using InlineBox::hasSelectedChildren; 112 using InlineBox::hasSelectedChildren;
112 using InlineBox::setHasSelectedChildren; 113 using InlineBox::setHasSelectedChildren;
113 114
114 LayoutObject::SelectionState selectionState() const final; 115 SelectionState selectionState() const final;
115 InlineBox* firstSelectedBox() const; 116 InlineBox* firstSelectedBox() const;
116 InlineBox* lastSelectedBox() const; 117 InlineBox* lastSelectedBox() const;
117 118
118 GapRects lineSelectionGap(const LayoutBlock* rootBlock, const LayoutPoint& r ootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, LayoutUnit selT op, LayoutUnit selHeight, const PaintInfo*) const; 119 GapRects lineSelectionGap(const LayoutBlock* rootBlock, const LayoutPoint& r ootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, LayoutUnit selT op, LayoutUnit selHeight, const PaintInfo*) const;
119 120
120 LayoutBlockFlow& block() const; 121 LayoutBlockFlow& block() const;
121 122
122 InlineBox* closestLeafChildForPoint(const LayoutPoint&, bool onlyEditableLea ves); 123 InlineBox* closestLeafChildForPoint(const LayoutPoint&, bool onlyEditableLea ves);
123 InlineBox* closestLeafChildForLogicalLeftPosition(LayoutUnit, bool onlyEdita bleLeaves = false); 124 InlineBox* closestLeafChildForLogicalLeftPosition(LayoutUnit, bool onlyEdita bleLeaves = false);
124 125
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 LayoutUnit m_lineBottom; 198 LayoutUnit m_lineBottom;
198 LayoutUnit m_lineTopWithLeading; 199 LayoutUnit m_lineTopWithLeading;
199 LayoutUnit m_lineBottomWithLeading; 200 LayoutUnit m_lineBottomWithLeading;
200 LayoutUnit m_selectionBottom; 201 LayoutUnit m_selectionBottom;
201 LayoutUnit m_paginationStrut; 202 LayoutUnit m_paginationStrut;
202 }; 203 };
203 204
204 } // namespace blink 205 } // namespace blink
205 206
206 #endif // RootInlineBox_h 207 #endif // RootInlineBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | Source/core/layout/line/RootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698