Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 852083002: Propagate focus type to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698