| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // need to handle the more elaborate cases in the future. | 97 // need to handle the more elaborate cases in the future. |
| 98 m_numberOfCharactersConsumedPriorToCurrentString += | 98 m_numberOfCharactersConsumedPriorToCurrentString += |
| 99 m_currentString.numberOfCharactersConsumed(); | 99 m_currentString.numberOfCharactersConsumed(); |
| 100 if (type == PrependType::Unconsume) | 100 if (type == PrependType::Unconsume) |
| 101 m_numberOfCharactersConsumedPriorToCurrentString -= s.length(); | 101 m_numberOfCharactersConsumedPriorToCurrentString -= s.length(); |
| 102 if (!m_currentString.length()) { | 102 if (!m_currentString.length()) { |
| 103 m_currentString = s; | 103 m_currentString = s; |
| 104 updateAdvanceFunctionPointers(); | 104 updateAdvanceFunctionPointers(); |
| 105 } else { | 105 } else { |
| 106 // Shift our m_currentString into our list. | 106 // Shift our m_currentString into our list. |
| 107 m_substrings.prepend(m_currentString); | 107 m_substrings.push_front(m_currentString); |
| 108 m_currentString = s; | 108 m_currentString = s; |
| 109 updateAdvanceFunctionPointers(); | 109 updateAdvanceFunctionPointers(); |
| 110 } | 110 } |
| 111 m_empty = false; | 111 m_empty = false; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void SegmentedString::close() { | 114 void SegmentedString::close() { |
| 115 // Closing a stream twice is likely a coding mistake. | 115 // Closing a stream twice is likely a coding mistake. |
| 116 ASSERT(!m_closed); | 116 ASSERT(!m_closed); |
| 117 m_closed = true; | 117 m_closed = true; |
| (...skipping 166 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 |