OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 444 } |
445 | 445 |
446 // Adding a pair of midpoints before a character will split it out into a new li
ne box. | 446 // Adding a pair of midpoints before a character will split it out into a new li
ne box. |
447 static inline void ensureCharacterGetsLineBox(LineMidpointState& lineMidpointSta
te, InlineIterator& textParagraphSeparator) | 447 static inline void ensureCharacterGetsLineBox(LineMidpointState& lineMidpointSta
te, InlineIterator& textParagraphSeparator) |
448 { | 448 { |
449 InlineIterator midpoint(0, textParagraphSeparator.m_obj, textParagraphSepara
tor.m_pos); | 449 InlineIterator midpoint(0, textParagraphSeparator.m_obj, textParagraphSepara
tor.m_pos); |
450 startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSepara
tor.m_obj, textParagraphSeparator.m_pos - 1)); | 450 startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSepara
tor.m_obj, textParagraphSeparator.m_pos - 1)); |
451 stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparat
or.m_obj, textParagraphSeparator.m_pos)); | 451 stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparat
or.m_obj, textParagraphSeparator.m_pos)); |
452 } | 452 } |
453 | 453 |
454 void RenderBlockFlow::appendRunsForObject(BidiRunList<BidiRun>& runs, int start,
int end, RenderObject* obj, InlineBidiResolver& resolver) | 454 void RenderBlockFlow::appendRunsForObject(int start, int end, RenderObject* obj,
InlineBidiResolver& resolver) |
455 { | 455 { |
456 adjustMidpointsAndAppendRunsForObjectIfNeeded(obj, start, end, resolver, App
endingRunsForObject, &runs); | 456 resolver.runs().addRun(createRun(start, end, obj, resolver)); |
457 } | 457 } |
458 | 458 |
459 static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo
otLineBox, bool isOnlyRun = false) | 459 static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo
otLineBox, bool isOnlyRun = false) |
460 { | 460 { |
461 if (isRootLineBox) | 461 if (isRootLineBox) |
462 return toRenderBlock(obj)->createAndAppendRootInlineBox(); | 462 return toRenderBlock(obj)->createAndAppendRootInlineBox(); |
463 | 463 |
464 if (obj->isText()) { | 464 if (obj->isText()) { |
465 InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox(); | 465 InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox(); |
466 // We only treat a box as text for a <br> if we are on a line by ourself
or in strict mode | 466 // We only treat a box as text for a <br> if we are on a line by ourself
or in strict mode |
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3518 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 3518 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
3519 | 3519 |
3520 setLineGridBox(lineGridBox); | 3520 setLineGridBox(lineGridBox); |
3521 | 3521 |
3522 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 3522 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
3523 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 3523 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
3524 // to this grid. | 3524 // to this grid. |
3525 } | 3525 } |
3526 | 3526 |
3527 } | 3527 } |
OLD | NEW |