| 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 Apple Inc. All right reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ASSERT(!(m_numMidpoints % 2)); | 54 ASSERT(!(m_numMidpoints % 2)); |
| 55 addMidpoint(midpoint); | 55 addMidpoint(midpoint); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void stopIgnoringSpaces(const Iterator& midpoint) | 58 void stopIgnoringSpaces(const Iterator& midpoint) |
| 59 { | 59 { |
| 60 ASSERT(m_numMidpoints % 2); | 60 ASSERT(m_numMidpoints % 2); |
| 61 addMidpoint(midpoint); | 61 addMidpoint(midpoint); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // When ignoring spaces, this needs to be called for objects that need line
boxes such as LayoutInlines or | |
| 65 // hard line breaks to ensure that they're not ignored. | |
| 66 void ensureLineBoxInsideIgnoredSpaces(LayoutObject* renderer) | |
| 67 { | |
| 68 Iterator midpoint(0, renderer, 0); | |
| 69 stopIgnoringSpaces(midpoint); | |
| 70 startIgnoringSpaces(midpoint); | |
| 71 } | |
| 72 | |
| 73 // Adding a pair of midpoints before a character will split it out into a ne
w line box. | 64 // Adding a pair of midpoints before a character will split it out into a ne
w line box. |
| 74 void ensureCharacterGetsLineBox(Iterator& textParagraphSeparator) | 65 void ensureCharacterGetsLineBox(Iterator& textParagraphSeparator) |
| 75 { | 66 { |
| 76 startIgnoringSpaces(Iterator(0, textParagraphSeparator.object(), textPar
agraphSeparator.offset() - 1)); | 67 startIgnoringSpaces(Iterator(0, textParagraphSeparator.object(), textPar
agraphSeparator.offset() - 1)); |
| 77 stopIgnoringSpaces(Iterator(0, textParagraphSeparator.object(), textPara
graphSeparator.offset())); | 68 stopIgnoringSpaces(Iterator(0, textParagraphSeparator.object(), textPara
graphSeparator.offset())); |
| 78 } | 69 } |
| 79 | 70 |
| 80 void checkMidpoints(Iterator& lBreak) | 71 void checkMidpoints(Iterator& lBreak) |
| 81 { | 72 { |
| 82 // Check to see if our last midpoint is a start point beyond the line br
eak. If so, | 73 // Check to see if our last midpoint is a start point beyond the line br
eak. If so, |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 template<class Iterator, class Run> | 1101 template<class Iterator, class Run> |
| 1111 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun
(Run* run) | 1102 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun
(Run* run) |
| 1112 { | 1103 { |
| 1113 return m_midpointStateForIsolatedRun.take(run); | 1104 return m_midpointStateForIsolatedRun.take(run); |
| 1114 } | 1105 } |
| 1115 | 1106 |
| 1116 | 1107 |
| 1117 } // namespace blink | 1108 } // namespace blink |
| 1118 | 1109 |
| 1119 #endif // BidiResolver_h | 1110 #endif // BidiResolver_h |
| OLD | NEW |