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

Side by Side Diff: third_party/WebKit/Source/core/html/TextControlElement.h

Issue 2810593002: Set plugin focus by implementing HTMLPlugInElement::SetFocused. (Closed)
Patch Set: fix comments Created 3 years, 8 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef TextControlElement_h 26 #ifndef TextControlElement_h
27 #define TextControlElement_h 27 #define TextControlElement_h
28 28
29 #include "base/gtest_prod_util.h" 29 #include "base/gtest_prod_util.h"
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "core/editing/SelectionTemplate.h" 31 #include "core/editing/SelectionTemplate.h"
32 #include "core/editing/VisiblePosition.h" 32 #include "core/editing/VisiblePosition.h"
33 #include "core/html/HTMLFormControlElementWithState.h" 33 #include "core/html/HTMLFormControlElementWithState.h"
34 #include "public/platform/WebFocusType.h"
34 35
35 namespace blink { 36 namespace blink {
36 37
37 class ExceptionState; 38 class ExceptionState;
38 39
39 enum TextFieldSelectionDirection { 40 enum TextFieldSelectionDirection {
40 kSelectionHasNoDirection, 41 kSelectionHasNoDirection,
41 kSelectionHasForwardDirection, 42 kSelectionHasForwardDirection,
42 kSelectionHasBackwardDirection 43 kSelectionHasBackwardDirection
43 }; 44 };
(...skipping 12 matching lines...) Expand all
56 public: 57 public:
57 // Common flag for HTMLInputElement::tooLong(), 58 // Common flag for HTMLInputElement::tooLong(),
58 // HTMLTextAreaElement::tooLong(), 59 // HTMLTextAreaElement::tooLong(),
59 // HTMLInputElement::tooShort() and HTMLTextAreaElement::tooShort(). 60 // HTMLInputElement::tooShort() and HTMLTextAreaElement::tooShort().
60 enum NeedsToCheckDirtyFlag { kCheckDirtyFlag, kIgnoreDirtyFlag }; 61 enum NeedsToCheckDirtyFlag { kCheckDirtyFlag, kIgnoreDirtyFlag };
61 62
62 ~TextControlElement() override; 63 ~TextControlElement() override;
63 64
64 void ForwardEvent(Event*); 65 void ForwardEvent(Event*);
65 66
66 void SetFocused(bool flag) override; 67 void SetFocused(bool, WebFocusType) override;
67 68
68 // The derived class should return true if placeholder processing is needed. 69 // The derived class should return true if placeholder processing is needed.
69 virtual bool IsPlaceholderVisible() const = 0; 70 virtual bool IsPlaceholderVisible() const = 0;
70 virtual void SetPlaceholderVisibility(bool) = 0; 71 virtual void SetPlaceholderVisibility(bool) = 0;
71 virtual bool SupportsPlaceholder() const = 0; 72 virtual bool SupportsPlaceholder() const = 0;
72 String StrippedPlaceholder() const; 73 String StrippedPlaceholder() const;
73 HTMLElement* PlaceholderElement() const; 74 HTMLElement* PlaceholderElement() const;
74 void UpdatePlaceholderVisibility(); 75 void UpdatePlaceholderVisibility();
75 76
76 VisiblePosition VisiblePositionForIndex(int) const; 77 VisiblePosition VisiblePositionForIndex(int) const;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 211 }
211 212
212 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); 213 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement);
213 214
214 TextControlElement* EnclosingTextControl(const Position&); 215 TextControlElement* EnclosingTextControl(const Position&);
215 TextControlElement* EnclosingTextControl(const Node*); 216 TextControlElement* EnclosingTextControl(const Node*);
216 217
217 } // namespace blink 218 } // namespace blink
218 219
219 #endif 220 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ('k') | third_party/WebKit/Source/core/html/TextControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698