| 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 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 ASSERT(!isBR() || (textLength() == 1 && m_text[0] == newlineCharacter)); | 1674 ASSERT(!isBR() || (textLength() == 1 && m_text[0] == newlineCharacter)); |
| 1675 } | 1675 } |
| 1676 | 1676 |
| 1677 void LayoutText::secureText(UChar mask) { | 1677 void LayoutText::secureText(UChar mask) { |
| 1678 if (!m_text.length()) | 1678 if (!m_text.length()) |
| 1679 return; | 1679 return; |
| 1680 | 1680 |
| 1681 int lastTypedCharacterOffsetToReveal = -1; | 1681 int lastTypedCharacterOffsetToReveal = -1; |
| 1682 UChar revealedText; | 1682 UChar revealedText; |
| 1683 SecureTextTimer* secureTextTimer = | 1683 SecureTextTimer* secureTextTimer = |
| 1684 gSecureTextTimers ? gSecureTextTimers->get(this) : 0; | 1684 gSecureTextTimers ? gSecureTextTimers->at(this) : 0; |
| 1685 if (secureTextTimer && secureTextTimer->isActive()) { | 1685 if (secureTextTimer && secureTextTimer->isActive()) { |
| 1686 lastTypedCharacterOffsetToReveal = | 1686 lastTypedCharacterOffsetToReveal = |
| 1687 secureTextTimer->lastTypedCharacterOffset(); | 1687 secureTextTimer->lastTypedCharacterOffset(); |
| 1688 if (lastTypedCharacterOffsetToReveal >= 0) | 1688 if (lastTypedCharacterOffsetToReveal >= 0) |
| 1689 revealedText = m_text[lastTypedCharacterOffsetToReveal]; | 1689 revealedText = m_text[lastTypedCharacterOffsetToReveal]; |
| 1690 } | 1690 } |
| 1691 | 1691 |
| 1692 m_text.fill(mask); | 1692 m_text.fill(mask); |
| 1693 if (lastTypedCharacterOffsetToReveal >= 0) { | 1693 if (lastTypedCharacterOffsetToReveal >= 0) { |
| 1694 m_text.replace(lastTypedCharacterOffsetToReveal, 1, | 1694 m_text.replace(lastTypedCharacterOffsetToReveal, 1, |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 #endif | 1986 #endif |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 #endif | 1989 #endif |
| 1990 | 1990 |
| 1991 void LayoutText::momentarilyRevealLastTypedCharacter( | 1991 void LayoutText::momentarilyRevealLastTypedCharacter( |
| 1992 unsigned lastTypedCharacterOffset) { | 1992 unsigned lastTypedCharacterOffset) { |
| 1993 if (!gSecureTextTimers) | 1993 if (!gSecureTextTimers) |
| 1994 gSecureTextTimers = new SecureTextTimerMap; | 1994 gSecureTextTimers = new SecureTextTimerMap; |
| 1995 | 1995 |
| 1996 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); | 1996 SecureTextTimer* secureTextTimer = gSecureTextTimers->at(this); |
| 1997 if (!secureTextTimer) { | 1997 if (!secureTextTimer) { |
| 1998 secureTextTimer = new SecureTextTimer(this); | 1998 secureTextTimer = new SecureTextTimer(this); |
| 1999 gSecureTextTimers->insert(this, secureTextTimer); | 1999 gSecureTextTimers->insert(this, secureTextTimer); |
| 2000 } | 2000 } |
| 2001 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 2001 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 PassRefPtr<AbstractInlineTextBox> LayoutText::firstAbstractInlineTextBox() { | 2004 PassRefPtr<AbstractInlineTextBox> LayoutText::firstAbstractInlineTextBox() { |
| 2005 return AbstractInlineTextBox::getOrCreate(LineLayoutText(this), | 2005 return AbstractInlineTextBox::getOrCreate(LineLayoutText(this), |
| 2006 m_firstTextBox); | 2006 m_firstTextBox); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2028 LayoutRect rect = LayoutRect( | 2028 LayoutRect rect = LayoutRect( |
| 2029 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 2029 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
| 2030 LayoutBlock* block = containingBlock(); | 2030 LayoutBlock* block = containingBlock(); |
| 2031 if (block && hasTextBoxes()) | 2031 if (block && hasTextBoxes()) |
| 2032 block->adjustChildDebugRect(rect); | 2032 block->adjustChildDebugRect(rect); |
| 2033 | 2033 |
| 2034 return rect; | 2034 return rect; |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 } // namespace blink | 2037 } // namespace blink |
| OLD | NEW |