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

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

Issue 2268893008: Remove NeedToDispatchSelectEvent argument of HTMLTextFormControlElement::setSelectedRange(). (Closed)
Patch Set: Remove NeedToDispatchSelectEvent argument of HTMLTextFormControlElement::setSelectedRange(). Created 4 years, 3 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 reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
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 18 matching lines...) Expand all
29 #include "core/editing/VisiblePosition.h" 29 #include "core/editing/VisiblePosition.h"
30 #include "core/html/HTMLFormControlElementWithState.h" 30 #include "core/html/HTMLFormControlElementWithState.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class ExceptionState; 34 class ExceptionState;
35 class Range; 35 class Range;
36 36
37 enum TextFieldSelectionDirection { SelectionHasNoDirection, SelectionHasForwardD irection, SelectionHasBackwardDirection }; 37 enum TextFieldSelectionDirection { SelectionHasNoDirection, SelectionHasForwardD irection, SelectionHasBackwardDirection };
38 enum TextFieldEventBehavior { DispatchNoEvent, DispatchChangeEvent, DispatchInpu tAndChangeEvent }; 38 enum TextFieldEventBehavior { DispatchNoEvent, DispatchChangeEvent, DispatchInpu tAndChangeEvent };
39 enum NeedToDispatchSelectEvent { DispatchSelectEvent, NotDispatchSelectEvent };
40 39
41 class CORE_EXPORT HTMLTextFormControlElement : public HTMLFormControlElementWith State { 40 class CORE_EXPORT HTMLTextFormControlElement : public HTMLFormControlElementWith State {
42 public: 41 public:
43 // Common flag for HTMLInputElement::tooLong(), HTMLTextAreaElement::tooLong (), 42 // Common flag for HTMLInputElement::tooLong(), HTMLTextAreaElement::tooLong (),
44 // HTMLInputElement::tooShort() and HTMLTextAreaElement::tooShort(). 43 // HTMLInputElement::tooShort() and HTMLTextAreaElement::tooShort().
45 enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag}; 44 enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag};
46 45
47 ~HTMLTextFormControlElement() override; 46 ~HTMLTextFormControlElement() override;
48 47
49 void forwardEvent(Event*); 48 void forwardEvent(Event*);
(...skipping 18 matching lines...) Expand all
68 void setSelectionEnd(int); 67 void setSelectionEnd(int);
69 void setSelectionDirection(const String&); 68 void setSelectionDirection(const String&);
70 void select(); 69 void select();
71 virtual void setRangeText(const String& replacement, ExceptionState&); 70 virtual void setRangeText(const String& replacement, ExceptionState&);
72 virtual void setRangeText(const String& replacement, unsigned start, unsigne d end, const String& selectionMode, ExceptionState&); 71 virtual void setRangeText(const String& replacement, unsigned start, unsigne d end, const String& selectionMode, ExceptionState&);
73 // Web-exposed setSelectionRange() function. This schedule to dispatch 72 // Web-exposed setSelectionRange() function. This schedule to dispatch
74 // 'select' event. 73 // 'select' event.
75 void setSelectionRangeForBinding(int start, int end, const String& direction = "none"); 74 void setSelectionRangeForBinding(int start, int end, const String& direction = "none");
76 // Blink-internal version of setSelectionRange(). This translates "none" 75 // Blink-internal version of setSelectionRange(). This translates "none"
77 // direction to "forward" on platforms without "none" direction. 76 // direction to "forward" on platforms without "none" direction.
78 void setSelectionRange(int start, int end, TextFieldSelectionDirection = Sel ectionHasNoDirection, NeedToDispatchSelectEvent = DispatchSelectEvent); 77 // This returns true if it updated cached selection and/or FrameSelection.
78 bool setSelectionRange(int start, int end, TextFieldSelectionDirection = Sel ectionHasNoDirection);
79 Range* selection() const; 79 Range* selection() const;
80 80
81 virtual bool supportsAutocapitalize() const = 0; 81 virtual bool supportsAutocapitalize() const = 0;
82 virtual const AtomicString& defaultAutocapitalize() const = 0; 82 virtual const AtomicString& defaultAutocapitalize() const = 0;
83 const AtomicString& autocapitalize() const; 83 const AtomicString& autocapitalize() const;
84 void setAutocapitalize(const AtomicString&); 84 void setAutocapitalize(const AtomicString&);
85 85
86 void dispatchFormControlChangeEvent() final; 86 void dispatchFormControlChangeEvent() final;
87 87
88 virtual String value() const = 0; 88 virtual String value() const = 0;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement); 172 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement);
173 173
174 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); 174 HTMLTextFormControlElement* enclosingTextFormControl(const Position&);
175 HTMLTextFormControlElement* enclosingTextFormControl(Node*); 175 HTMLTextFormControlElement* enclosingTextFormControl(Node*);
176 176
177 } // namespace blink 177 } // namespace blink
178 178
179 #endif 179 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698