Lines Matching refs:box

132         InlineBox* box;
134 p.getInlineBoxAndOffset(m_affinity, primaryDirection, box, offset);
135 if (!box)
138 RenderObject* renderer = &box->renderer();
141 if ((renderer->isReplaced() || renderer->isBR()) && offset == box->caretRightmostOffset())
142 return box->isLeftToRightDirection() ? previousVisuallyDistinctCandidate(m_deepPosition) : nextVisuallyDistinctCandidate(m_deepPosition);
145 box = box->prevLeafChild();
146 if (!box)
148 renderer = &box->renderer();
149 offset = box->caretRightmostOffset();
153 offset = box->isLeftToRightDirection() ? renderer->previousOffset(offset) : renderer->nextOffset(offset);
155 int caretMinOffset = box->caretMinOffset();
156 int caretMaxOffset = box->caretMaxOffset();
161 if (box->isLeftToRightDirection() ? offset < caretMinOffset : offset > caretMaxOffset) {
163 InlineBox* prevBox = box->prevLeafChildIgnoringLineBreak();
172 if (boxOnLeft && boxOnLeft->root() == box->root())
178 box = prevBox;
179 renderer = &box->renderer();
184 ASSERT(offset == box->caretLeftmostOffset());
186 unsigned char level = box->bidiLevel();
187 InlineBox* prevBox = box->prevLeafChild();
189 if (box->direction() == primaryDirection) {
192 if (primaryDirection == LTR ? box->root().getLogicalStartBoxWithNode(logicalStart) : box->root().getLogicalEndBoxWithNode(logicalStart)) {
193 box = logicalStart;
194 renderer = &box->renderer();
195 offset = primaryDirection == LTR ? box->caretMinOffset() : box->caretMaxOffset();
204 InlineBox* nextBox = box;
212 box = prevBox;
213 renderer = &box->renderer();
214 offset = box->caretRightmostOffset();
215 if (box->direction() == primaryDirection)
224 box = prevBox;
225 renderer = &box->renderer();
226 offset = box->caretRightmostOffset();
227 if (box->bidiLevel() > level) {
238 while (InlineBox* nextBox = box->nextLeafChild()) {
241 box = nextBox;
243 if (box->bidiLevel() == level)
245 level = box->bidiLevel();
246 while (InlineBox* prevBox = box->prevLeafChild()) {
249 box = prevBox;
251 if (box->bidiLevel() == level)
253 level = box->bidiLevel();
255 renderer = &box->renderer();
256 offset = primaryDirection == LTR ? box->caretMinOffset() : box->caretMaxOffset();
297 InlineBox* box;
299 p.getInlineBoxAndOffset(m_affinity, primaryDirection, box, offset);
300 if (!box)
303 RenderObject* renderer = &box->renderer();
306 if ((renderer->isReplaced() || renderer->isBR()) && offset == box->caretLeftmostOffset())
307 return box->isLeftToRightDirection() ? nextVisuallyDistinctCandidate(m_deepPosition) : previousVisuallyDistinctCandidate(m_deepPosition);
310 box = box->nextLeafChild();
311 if (!box)
313 renderer = &box->renderer();
314 offset = box->caretLeftmostOffset();
318 offset = box->isLeftToRightDirection() ? renderer->nextOffset(offset) : renderer->previousOffset(offset);
320 int caretMinOffset = box->caretMinOffset();
321 int caretMaxOffset = box->caretMaxOffset();
326 if (box->isLeftToRightDirection() ? offset > caretMaxOffset : offset < caretMinOffset) {
328 InlineBox* nextBox = box->nextLeafChildIgnoringLineBreak();
337 if (boxOnRight && boxOnRight->root() == box->root())
343 box = nextBox;
344 renderer = &box->renderer();
349 ASSERT(offset == box->caretRightmostOffset());
351 unsigned char level = box->bidiLevel();
352 InlineBox* nextBox = box->nextLeafChild();
354 if (box->direction() == primaryDirection) {
357 if (primaryDirection == LTR ? box->root().getLogicalEndBoxWithNode(logicalEnd) : box->root().getLogicalStartBoxWithNode(logicalEnd)) {
358 box = logicalEnd;
359 renderer = &box->renderer();
360 offset = primaryDirection == LTR ? box->caretMaxOffset() : box->caretMinOffset();
370 InlineBox* prevBox = box;
379 box = nextBox;
380 renderer = &box->renderer();
381 offset = box->caretLeftmostOffset();
382 if (box->direction() == primaryDirection)
391 box = nextBox;
392 renderer = &box->renderer();
393 offset = box->caretLeftmostOffset();
395 if (box->bidiLevel() > level) {
406 while (InlineBox* prevBox = box->prevLeafChild()) {
409 box = prevBox;
411 if (box->bidiLevel() == level)
413 level = box->bidiLevel();
414 while (InlineBox* nextBox = box->nextLeafChild()) {
417 box = nextBox;
419 if (box->bidiLevel() == level)
421 level = box->bidiLevel();
423 renderer = &box->renderer();
424 offset = primaryDirection == LTR ? box->caretMaxOffset() : box->caretMinOffset();