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

Side by Side Diff: Source/WebCore/html/TextFieldInputType.cpp

Issue 11415195: Merge 135829 - :read-only selector should match to date/time input types (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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/html/TextFieldInputType.h ('k') | no next file » | 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (m_innerSpinButton) 322 if (m_innerSpinButton)
323 m_innerSpinButton->releaseCapture(); 323 m_innerSpinButton->releaseCapture();
324 } 324 }
325 325
326 void TextFieldInputType::readonlyAttributeChanged() 326 void TextFieldInputType::readonlyAttributeChanged()
327 { 327 {
328 if (m_innerSpinButton) 328 if (m_innerSpinButton)
329 m_innerSpinButton->releaseCapture(); 329 m_innerSpinButton->releaseCapture();
330 } 330 }
331 331
332 bool TextFieldInputType::supportsReadOnly() const
333 {
334 return true;
335 }
336
332 bool TextFieldInputType::shouldUseInputMethod() const 337 bool TextFieldInputType::shouldUseInputMethod() const
333 { 338 {
334 return true; 339 return true;
335 } 340 }
336 341
337 static bool isASCIILineBreak(UChar c) 342 static bool isASCIILineBreak(UChar c)
338 { 343 {
339 return c == '\r' || c == '\n'; 344 return c == '\r' || c == '\n';
340 } 345 }
341 346
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 { 479 {
475 return !element()->disabled() && !element()->readOnly(); 480 return !element()->disabled() && !element()->readOnly();
476 } 481 }
477 482
478 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 483 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
479 { 484 {
480 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); 485 return shouldSpinButtonRespondToMouseEvents() && element()->focused();
481 } 486 }
482 487
483 } // namespace WebCore 488 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/TextFieldInputType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698