| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 Copyright (C) 2004, 2005, 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 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ASSERT(!m_closed); | 60 ASSERT(!m_closed); |
| 61 if (!s.length()) | 61 if (!s.length()) |
| 62 return; | 62 return; |
| 63 | 63 |
| 64 if (!m_currentString.length()) { | 64 if (!m_currentString.length()) { |
| 65 m_numberOfCharactersConsumedPriorToCurrentString += | 65 m_numberOfCharactersConsumedPriorToCurrentString += |
| 66 m_currentString.numberOfCharactersConsumed(); | 66 m_currentString.numberOfCharactersConsumed(); |
| 67 m_currentString = s; | 67 m_currentString = s; |
| 68 updateAdvanceFunctionPointers(); | 68 updateAdvanceFunctionPointers(); |
| 69 } else { | 69 } else { |
| 70 m_substrings.append(s); | 70 m_substrings.push_back(s); |
| 71 } | 71 } |
| 72 m_empty = false; | 72 m_empty = false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void SegmentedString::push(UChar c) { | 75 void SegmentedString::push(UChar c) { |
| 76 ASSERT(c); | 76 ASSERT(c); |
| 77 | 77 |
| 78 // pushIfPossible attempts to rewind the pointer in the SegmentedSubstring, | 78 // pushIfPossible attempts to rewind the pointer in the SegmentedSubstring, |
| 79 // however it will fail if the SegmentedSubstring is empty, or | 79 // however it will fail if the SegmentedSubstring is empty, or |
| 80 // when we prepended some text while consuming a SegmentedSubstring by | 80 // when we prepended some text while consuming a SegmentedSubstring by |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 void SegmentedString::setCurrentPosition(OrdinalNumber line, | 284 void SegmentedString::setCurrentPosition(OrdinalNumber line, |
| 285 OrdinalNumber columnAftreProlog, | 285 OrdinalNumber columnAftreProlog, |
| 286 int prologLength) { | 286 int prologLength) { |
| 287 m_currentLine = line.zeroBasedInt(); | 287 m_currentLine = line.zeroBasedInt(); |
| 288 m_numberOfCharactersConsumedPriorToCurrentLine = | 288 m_numberOfCharactersConsumedPriorToCurrentLine = |
| 289 numberOfCharactersConsumed() + prologLength - | 289 numberOfCharactersConsumed() + prologLength - |
| 290 columnAftreProlog.zeroBasedInt(); | 290 columnAftreProlog.zeroBasedInt(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace blink | 293 } // namespace blink |
| OLD | NEW |