|
Lines 58-81
bool BoxIterator::atEnd() const
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec1
|
| 58 |
}); |
58 |
}); |
| 59 |
} |
59 |
} |
| 60 |
|
60 |
|
| 61 |
BoxIterator Box::nextOnLine() const |
61 |
LeafBoxIterator Box::nextOnLine() const |
| 62 |
{ |
62 |
{ |
| 63 |
return BoxIterator(*this).traverseNextOnLine(); |
63 |
return LeafBoxIterator(*this).traverseNextOnLine(); |
| 64 |
} |
64 |
} |
| 65 |
|
65 |
|
| 66 |
BoxIterator Box::previousOnLine() const |
66 |
LeafBoxIterator Box::previousOnLine() const |
| 67 |
{ |
67 |
{ |
| 68 |
return BoxIterator(*this).traversePreviousOnLine(); |
68 |
return LeafBoxIterator(*this).traversePreviousOnLine(); |
| 69 |
} |
69 |
} |
| 70 |
|
70 |
|
| 71 |
BoxIterator Box::nextOnLineIgnoringLineBreak() const |
71 |
LeafBoxIterator Box::nextOnLineIgnoringLineBreak() const |
| 72 |
{ |
72 |
{ |
| 73 |
return BoxIterator(*this).traverseNextOnLineIgnoringLineBreak(); |
73 |
return LeafBoxIterator(*this).traverseNextOnLineIgnoringLineBreak(); |
| 74 |
} |
74 |
} |
| 75 |
|
75 |
|
| 76 |
BoxIterator Box::previousOnLineIgnoringLineBreak() const |
76 |
LeafBoxIterator Box::previousOnLineIgnoringLineBreak() const |
| 77 |
{ |
77 |
{ |
| 78 |
return BoxIterator(*this).traversePreviousOnLineIgnoringLineBreak(); |
78 |
return LeafBoxIterator(*this).traversePreviousOnLineIgnoringLineBreak(); |
| 79 |
} |
79 |
} |
| 80 |
|
80 |
|
| 81 |
LineIterator Box::line() const |
81 |
LineIterator Box::line() const |
|
Lines 106-112
RenderObject::HighlightState Box::selectionState() const
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec2
|
| 106 |
return renderer().selectionState(); |
106 |
return renderer().selectionState(); |
| 107 |
} |
107 |
} |
| 108 |
|
108 |
|
| 109 |
BoxIterator& BoxIterator::traverseNextOnLine() |
109 |
LeafBoxIterator::LeafBoxIterator(Box::PathVariant&& pathVariant) |
|
|
110 |
: BoxIterator(WTFMove(pathVariant)) |
| 111 |
{ |
| 112 |
} |
| 113 |
|
| 114 |
LeafBoxIterator::LeafBoxIterator(const Box& run) |
| 115 |
: BoxIterator(run) |
| 116 |
{ |
| 117 |
} |
| 118 |
|
| 119 |
LeafBoxIterator& LeafBoxIterator::traverseNextOnLine() |
| 110 |
{ |
120 |
{ |
| 111 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
121 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
| 112 |
path.traverseNextOnLine(); |
122 |
path.traverseNextOnLine(); |
|
Lines 114-120
BoxIterator& BoxIterator::traverseNextOnLine()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec3
|
| 114 |
return *this; |
124 |
return *this; |
| 115 |
} |
125 |
} |
| 116 |
|
126 |
|
| 117 |
BoxIterator& BoxIterator::traversePreviousOnLine() |
127 |
LeafBoxIterator& LeafBoxIterator::traversePreviousOnLine() |
| 118 |
{ |
128 |
{ |
| 119 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
129 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
| 120 |
path.traversePreviousOnLine(); |
130 |
path.traversePreviousOnLine(); |
|
Lines 122-128
BoxIterator& BoxIterator::traversePreviousOnLine()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec4
|
| 122 |
return *this; |
132 |
return *this; |
| 123 |
} |
133 |
} |
| 124 |
|
134 |
|
| 125 |
BoxIterator& BoxIterator::traverseNextOnLineIgnoringLineBreak() |
135 |
LeafBoxIterator& LeafBoxIterator::traverseNextOnLineIgnoringLineBreak() |
| 126 |
{ |
136 |
{ |
| 127 |
do { |
137 |
do { |
| 128 |
traverseNextOnLine(); |
138 |
traverseNextOnLine(); |
|
Lines 130-136
BoxIterator& BoxIterator::traverseNextOnLineIgnoringLineBreak()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec5
|
| 130 |
return *this; |
140 |
return *this; |
| 131 |
} |
141 |
} |
| 132 |
|
142 |
|
| 133 |
BoxIterator& BoxIterator::traversePreviousOnLineIgnoringLineBreak() |
143 |
LeafBoxIterator& LeafBoxIterator::traversePreviousOnLineIgnoringLineBreak() |
| 134 |
{ |
144 |
{ |
| 135 |
do { |
145 |
do { |
| 136 |
traversePreviousOnLine(); |
146 |
traversePreviousOnLine(); |
|
Lines 138-144
BoxIterator& BoxIterator::traversePreviousOnLineIgnoringLineBreak()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec6
|
| 138 |
return *this; |
148 |
return *this; |
| 139 |
} |
149 |
} |
| 140 |
|
150 |
|
| 141 |
BoxIterator& BoxIterator::traverseNextOnLineInLogicalOrder() |
151 |
LeafBoxIterator& LeafBoxIterator::traverseNextOnLineInLogicalOrder() |
| 142 |
{ |
152 |
{ |
| 143 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
153 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
| 144 |
path.traverseNextOnLineInLogicalOrder(); |
154 |
path.traverseNextOnLineInLogicalOrder(); |
|
Lines 146-152
BoxIterator& BoxIterator::traverseNextOnLineInLogicalOrder()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec7
|
| 146 |
return *this; |
156 |
return *this; |
| 147 |
} |
157 |
} |
| 148 |
|
158 |
|
| 149 |
BoxIterator& BoxIterator::traversePreviousOnLineInLogicalOrder() |
159 |
LeafBoxIterator& LeafBoxIterator::traversePreviousOnLineInLogicalOrder() |
| 150 |
{ |
160 |
{ |
| 151 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
161 |
WTF::switchOn(m_box.m_pathVariant, [](auto& path) { |
| 152 |
path.traversePreviousOnLineInLogicalOrder(); |
162 |
path.traversePreviousOnLineInLogicalOrder(); |
|
Lines 154-160
BoxIterator& BoxIterator::traversePreviousOnLineInLogicalOrder()
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec8
|
| 154 |
return *this; |
164 |
return *this; |
| 155 |
} |
165 |
} |
| 156 |
|
166 |
|
| 157 |
BoxIterator boxFor(const RenderLineBreak& renderer) |
167 |
LeafBoxIterator boxFor(const RenderLineBreak& renderer) |
| 158 |
{ |
168 |
{ |
| 159 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
169 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
| 160 |
if (auto* lineLayout = LayoutIntegration::LineLayout::containing(renderer)) |
170 |
if (auto* lineLayout = LayoutIntegration::LineLayout::containing(renderer)) |
|
Lines 163-169
BoxIterator boxFor(const RenderLineBreak& renderer)
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec9
|
| 163 |
return { BoxLegacyPath(renderer.inlineBoxWrapper()) }; |
173 |
return { BoxLegacyPath(renderer.inlineBoxWrapper()) }; |
| 164 |
} |
174 |
} |
| 165 |
|
175 |
|
| 166 |
BoxIterator boxFor(const RenderBox& renderer) |
176 |
LeafBoxIterator boxFor(const RenderBox& renderer) |
| 167 |
{ |
177 |
{ |
| 168 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
178 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
| 169 |
if (auto* lineLayout = LayoutIntegration::LineLayout::containing(renderer)) |
179 |
if (auto* lineLayout = LayoutIntegration::LineLayout::containing(renderer)) |
|
Lines 173-179
BoxIterator boxFor(const RenderBox& renderer)
a/Source/WebCore/layout/integration/InlineIteratorBox.cpp_sec10
|
| 173 |
} |
183 |
} |
| 174 |
|
184 |
|
| 175 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
185 |
#if ENABLE(LAYOUT_FORMATTING_CONTEXT) |
| 176 |
BoxIterator boxFor(const LayoutIntegration::InlineContent& content, size_t boxIndex) |
186 |
LeafBoxIterator boxFor(const LayoutIntegration::InlineContent& content, size_t boxIndex) |
| 177 |
{ |
187 |
{ |
| 178 |
return { BoxModernPath { content, boxIndex } }; |
188 |
return { BoxModernPath { content, boxIndex } }; |
| 179 |
} |
189 |
} |