| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(Cont
ainerNode* insertionPoint) | 72 Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(Cont
ainerNode* insertionPoint) |
| 73 { | 73 { |
| 74 HTMLFormControlElementWithState::insertedInto(insertionPoint); | 74 HTMLFormControlElementWithState::insertedInto(insertionPoint); |
| 75 if (!insertionPoint->inDocument()) | 75 if (!insertionPoint->inDocument()) |
| 76 return InsertionDone; | 76 return InsertionDone; |
| 77 String initialValue = value(); | 77 String initialValue = value(); |
| 78 setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString()
: initialValue); | 78 setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString()
: initialValue); |
| 79 return InsertionDone; | 79 return InsertionDone; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void HTMLTextFormControlElement::dispatchFocusEvent(Element* oldFocusedElement,
FocusType type) | 82 void HTMLTextFormControlElement::dispatchFocusEvent(Element* oldFocusedElement,
WebFocusType type) |
| 83 { | 83 { |
| 84 if (supportsPlaceholder()) | 84 if (supportsPlaceholder()) |
| 85 updatePlaceholderVisibility(false); | 85 updatePlaceholderVisibility(false); |
| 86 handleFocusEvent(oldFocusedElement, type); | 86 handleFocusEvent(oldFocusedElement, type); |
| 87 HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type)
; | 87 HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type)
; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void HTMLTextFormControlElement::dispatchBlurEvent(Element* newFocusedElement) | 90 void HTMLTextFormControlElement::dispatchBlurEvent(Element* newFocusedElement) |
| 91 { | 91 { |
| 92 if (supportsPlaceholder()) | 92 if (supportsPlaceholder()) |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 Text* textNode = toText(node); | 969 Text* textNode = toText(node); |
| 970 size_t firstLineBreak = textNode->data().find('\n', isPivotNode ? pi
votPosition.offsetInContainerNode() : 0); | 970 size_t firstLineBreak = textNode->data().find('\n', isPivotNode ? pi
votPosition.offsetInContainerNode() : 0); |
| 971 if (firstLineBreak != kNotFound) | 971 if (firstLineBreak != kNotFound) |
| 972 return Position(textNode, firstLineBreak + 1); | 972 return Position(textNode, firstLineBreak + 1); |
| 973 } | 973 } |
| 974 } | 974 } |
| 975 return endOfInnerText(textFormControl); | 975 return endOfInnerText(textFormControl); |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace blink | 978 } // namespace blink |
| OLD | NEW |