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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 { | 1429 { |
1430 if (fullLayout) | 1430 if (fullLayout) |
1431 deleteTextBoxes(); | 1431 deleteTextBoxes(); |
1432 else if (!m_linesDirty) { | 1432 else if (!m_linesDirty) { |
1433 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) | 1433 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) |
1434 box->dirtyLineBoxes(); | 1434 box->dirtyLineBoxes(); |
1435 } | 1435 } |
1436 m_linesDirty = false; | 1436 m_linesDirty = false; |
1437 } | 1437 } |
1438 | 1438 |
1439 InlineTextBox* RenderText::createTextBox() | 1439 InlineTextBox* RenderText::createTextBox(int start, unsigned short length) |
1440 { | 1440 { |
1441 return new InlineTextBox(*this); | 1441 return new InlineTextBox(*this, start, length); |
1442 } | 1442 } |
1443 | 1443 |
1444 InlineTextBox* RenderText::createInlineTextBox() | 1444 InlineTextBox* RenderText::createInlineTextBox(int start, unsigned short length) |
1445 { | 1445 { |
1446 InlineTextBox* textBox = createTextBox(); | 1446 InlineTextBox* textBox = createTextBox(start, length); |
1447 if (!m_firstTextBox) | 1447 if (!m_firstTextBox) |
1448 m_firstTextBox = m_lastTextBox = textBox; | 1448 m_firstTextBox = m_lastTextBox = textBox; |
1449 else { | 1449 else { |
1450 m_lastTextBox->setNextTextBox(textBox); | 1450 m_lastTextBox->setNextTextBox(textBox); |
1451 textBox->setPreviousTextBox(m_lastTextBox); | 1451 textBox->setPreviousTextBox(m_lastTextBox); |
1452 m_lastTextBox = textBox; | 1452 m_lastTextBox = textBox; |
1453 } | 1453 } |
1454 textBox->setIsText(true); | |
1455 return textBox; | 1454 return textBox; |
1456 } | 1455 } |
1457 | 1456 |
1458 void RenderText::positionLineBox(InlineBox* box) | 1457 void RenderText::positionLineBox(InlineBox* box) |
1459 { | 1458 { |
1460 InlineTextBox* s = toInlineTextBox(box); | 1459 InlineTextBox* s = toInlineTextBox(box); |
1461 | 1460 |
1462 // FIXME: should not be needed!!! | 1461 // FIXME: should not be needed!!! |
1463 if (!s->len()) { | 1462 if (!s->len()) { |
1464 // We want the box to be destroyed. | 1463 // We want the box to be destroyed. |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 } | 1861 } |
1863 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1862 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1864 } | 1863 } |
1865 | 1864 |
1866 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1865 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
1867 { | 1866 { |
1868 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1867 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
1869 } | 1868 } |
1870 | 1869 |
1871 } // namespace blink | 1870 } // namespace blink |
OLD | NEW |