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

Side by Side Diff: Source/web/WebInputElement.cpp

Issue 26622007: Move isAutofilled and setAutofilled from HTMLInputElement to HTMLFormControlElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update messaging in test. Created 7 years, 2 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/web/WebFormControlElement.cpp ('k') | public/web/WebFormControlElement.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void WebInputElement::setPlaceholder(const WebString& value) 135 void WebInputElement::setPlaceholder(const WebString& value)
136 { 136 {
137 unwrap<HTMLInputElement>()->setAttribute(HTMLNames::placeholderAttr, value); 137 unwrap<HTMLInputElement>()->setAttribute(HTMLNames::placeholderAttr, value);
138 } 138 }
139 139
140 WebString WebInputElement::placeholder() const 140 WebString WebInputElement::placeholder() const
141 { 141 {
142 return constUnwrap<HTMLInputElement>()->fastGetAttribute(HTMLNames::placehol derAttr); 142 return constUnwrap<HTMLInputElement>()->fastGetAttribute(HTMLNames::placehol derAttr);
143 } 143 }
144 144
145 bool WebInputElement::isAutofilled() const
146 {
147 return constUnwrap<HTMLInputElement>()->isAutofilled();
148 }
149
150 void WebInputElement::setAutofilled(bool autofilled)
151 {
152 unwrap<HTMLInputElement>()->setAutofilled(autofilled);
153 }
154
155 void WebInputElement::setSelectionRange(int start, int end) 145 void WebInputElement::setSelectionRange(int start, int end)
156 { 146 {
157 unwrap<HTMLInputElement>()->setSelectionRange(start, end); 147 unwrap<HTMLInputElement>()->setSelectionRange(start, end);
158 } 148 }
159 149
160 int WebInputElement::selectionStart() const 150 int WebInputElement::selectionStart() const
161 { 151 {
162 return constUnwrap<HTMLInputElement>()->selectionStart(); 152 return constUnwrap<HTMLInputElement>()->selectionStart();
163 } 153 }
164 154
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 271 }
282 272
283 WebInputElement* toWebInputElement(WebElement* webElement) 273 WebInputElement* toWebInputElement(WebElement* webElement)
284 { 274 {
285 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag)) 275 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag))
286 return 0; 276 return 0;
287 277
288 return static_cast<WebInputElement*>(webElement); 278 return static_cast<WebInputElement*>(webElement);
289 } 279 }
290 } // namespace WebKit 280 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebFormControlElement.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698