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

Side by Side Diff: Source/WebCore/testing/Internals.cpp

Issue 7796022: Merge 94586 - REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on c... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 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
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if (textField->hasTagName(HTMLNames::inputTag)) 296 if (textField->hasTagName(HTMLNames::inputTag))
297 return static_cast<HTMLInputElement*>(textField)->lastChangeWasUserEdit( ); 297 return static_cast<HTMLInputElement*>(textField)->lastChangeWasUserEdit( );
298 298
299 if (textField->hasTagName(HTMLNames::textareaTag)) 299 if (textField->hasTagName(HTMLNames::textareaTag))
300 return static_cast<HTMLTextAreaElement*>(textField)->lastChangeWasUserEd it(); 300 return static_cast<HTMLTextAreaElement*>(textField)->lastChangeWasUserEd it();
301 301
302 ec = INVALID_NODE_TYPE_ERR; 302 ec = INVALID_NODE_TYPE_ERR;
303 return false; 303 return false;
304 } 304 }
305 305
306 String Internals::suggestedValue(Element* inputElement, ExceptionCode& ec)
307 {
308 if (!inputElement) {
309 ec = INVALID_ACCESS_ERR;
310 return String();
311 }
312
313 if (!inputElement->hasTagName(HTMLNames::inputTag)) {
314 ec = INVALID_NODE_TYPE_ERR;
315 return String();
316 }
317
318 return static_cast<HTMLInputElement*>(inputElement)->suggestedValue();
306 } 319 }
320
321 void Internals::setSuggestedValue(Element* inputElement, const String& value, Ex ceptionCode& ec)
322 {
323 if (!inputElement) {
324 ec = INVALID_ACCESS_ERR;
325 return;
326 }
327
328 if (!inputElement->hasTagName(HTMLNames::inputTag)) {
329 ec = INVALID_NODE_TYPE_ERR;
330 return;
331 }
332
333 static_cast<HTMLInputElement*>(inputElement)->setSuggestedValue(value);
334 }
335
336 }
OLDNEW
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698