OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 if (prev) | 1280 if (prev) |
1281 firstRootBox = prev; | 1281 firstRootBox = prev; |
1282 } else if (lastTextBox()) { | 1282 } else if (lastTextBox()) { |
1283 ASSERT(!lastRootBox); | 1283 ASSERT(!lastRootBox); |
1284 firstRootBox = &lastTextBox()->root(); | 1284 firstRootBox = &lastTextBox()->root(); |
1285 firstRootBox->markDirty(); | 1285 firstRootBox->markDirty(); |
1286 dirtiedLines = true; | 1286 dirtiedLines = true; |
1287 } | 1287 } |
1288 for (RootInlineBox* curr = firstRootBox; curr && curr != lastRootBox; curr =
curr->nextRootBox()) { | 1288 for (RootInlineBox* curr = firstRootBox; curr && curr != lastRootBox; curr =
curr->nextRootBox()) { |
1289 if (curr->lineBreakObj() == this && curr->lineBreakPos() > end) | 1289 if (curr->lineBreakObj() == this && curr->lineBreakPos() > end) |
1290 curr->setLineBreakPos(clampToInteger(curr->lineBreakPos() + delta)); | 1290 curr->setLineBreakPos(clampTo<int>(curr->lineBreakPos() + delta)); |
1291 } | 1291 } |
1292 | 1292 |
1293 // If the text node is empty, dirty the line where new text will be inserted
. | 1293 // If the text node is empty, dirty the line where new text will be inserted
. |
1294 if (!firstTextBox() && parent()) { | 1294 if (!firstTextBox() && parent()) { |
1295 parent()->dirtyLinesFromChangedChild(this); | 1295 parent()->dirtyLinesFromChangedChild(this); |
1296 dirtiedLines = true; | 1296 dirtiedLines = true; |
1297 } | 1297 } |
1298 | 1298 |
1299 m_linesDirty = dirtiedLines; | 1299 m_linesDirty = dirtiedLines; |
1300 setText(text, force || dirtiedLines); | 1300 setText(text, force || dirtiedLines); |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 } | 1863 } |
1864 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1864 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1865 } | 1865 } |
1866 | 1866 |
1867 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1867 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
1868 { | 1868 { |
1869 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1869 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
1870 } | 1870 } |
1871 | 1871 |
1872 } // namespace blink | 1872 } // namespace blink |
OLD | NEW |