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

Side by Side Diff: Source/core/html/HTMLInputElement.h

Issue 557613002: Remove a part of type checking predicates of HTMLInputElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2012 Samsung Electronics. 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 StepRange createStepRange(AnyStepHandling) const; 78 StepRange createStepRange(AnyStepHandling) const;
79 79
80 Decimal findClosestTickMarkValue(const Decimal&); 80 Decimal findClosestTickMarkValue(const Decimal&);
81 81
82 // Implementations of HTMLInputElement::stepUp() and stepDown(). 82 // Implementations of HTMLInputElement::stepUp() and stepDown().
83 void stepUp(int, ExceptionState&); 83 void stepUp(int, ExceptionState&);
84 void stepDown(int, ExceptionState&); 84 void stepDown(int, ExceptionState&);
85 // stepUp()/stepDown() for user-interaction. 85 // stepUp()/stepDown() for user-interaction.
86 bool isSteppable() const; 86 bool isSteppable() const;
87 87
88 // Returns true if the type is button, reset, or submit.
88 bool isTextButton() const; 89 bool isTextButton() const;
89 90 // Returns true if the type is email, number, password, search, tel, text,
90 bool isRadioButton() const; 91 // or url.
91 bool isTextField() const; 92 bool isTextField() const;
92 bool isSearchField() const; 93 // Returns true if the type is email, password, search, tel, text, or url.
93 bool isInputTypeHidden() const;
94 bool isPasswordField() const;
95 bool isCheckbox() const;
96 bool isRangeControl() const;
97
98 // FIXME: It's highly likely that any call site calling this function should instead 94 // FIXME: It's highly likely that any call site calling this function should instead
99 // be using a different one. Many input elements behave like text fields, an d in addition 95 // be using a different one. Many input elements behave like text fields, an d in addition
100 // any unknown input type is treated as text. Consider, for example, isTextF ield or 96 // any unknown input type is treated as text. Consider, for example, isTextF ield or
101 // isTextField && !isPasswordField. 97 // isTextField && !isPasswordField.
102 bool isText() const; 98 bool isText() const;
103 99
104 bool isEmailField() const;
105 bool isFileUpload() const;
106 bool isImageButton() const;
107 bool isNumberField() const;
108 bool isTelephoneField() const;
109 bool isURLField() const;
110 bool isDateField() const;
111 bool isDateTimeLocalField() const;
112 bool isMonthField() const;
113 bool isTimeField() const;
114 bool isWeekField() const;
115
116 bool checked() const { return m_isChecked; } 100 bool checked() const { return m_isChecked; }
117 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent); 101 void setChecked(bool, TextFieldEventBehavior = DispatchNoEvent);
118 102
119 // 'indeterminate' is a state independent of the checked state that causes t he control to draw in a way that hides the actual state. 103 // 'indeterminate' is a state independent of the checked state that causes t he control to draw in a way that hides the actual state.
120 bool indeterminate() const { return m_isIndeterminate; } 104 bool indeterminate() const { return m_isIndeterminate; }
121 void setIndeterminate(bool); 105 void setIndeterminate(bool);
122 // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state 106 // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
123 bool shouldAppearChecked() const; 107 bool shouldAppearChecked() const;
124 virtual bool shouldAppearIndeterminate() const OVERRIDE; 108 virtual bool shouldAppearIndeterminate() const OVERRIDE;
125 109
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // The ImageLoader must be owned by this element because the loader code ass umes 379 // The ImageLoader must be owned by this element because the loader code ass umes
396 // that it lives as long as its owning element lives. If we move the loader into 380 // that it lives as long as its owning element lives. If we move the loader into
397 // the ImageInput object we may delete the loader while this element lives o n. 381 // the ImageInput object we may delete the loader while this element lives o n.
398 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; 382 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader;
399 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r; 383 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r;
400 }; 384 };
401 385
402 } // namespace blink 386 } // namespace blink
403 387
404 #endif // HTMLInputElement_h 388 #endif // HTMLInputElement_h
OLDNEW
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698