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

Side by Side Diff: Source/WebCore/html/shadow/DateTimeEditElement.cpp

Issue 11150011: Merge 130848 - Sub-fields in input[type=time] should not be focusable if the input is disabled or r… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 } 329 }
330 return false; 330 return false;
331 } 331 }
332 332
333 bool DateTimeEditElement::isDisabled() const 333 bool DateTimeEditElement::isDisabled() const
334 { 334 {
335 return m_editControlOwner && m_editControlOwner->isEditControlOwnerDisabled( ); 335 return m_editControlOwner && m_editControlOwner->isEditControlOwnerDisabled( );
336 } 336 }
337 337
338 bool DateTimeEditElement::isFieldOwnerDisabledOrReadOnly() const
339 {
340 return isDisabled() || isReadOnly();
341 }
342
338 bool DateTimeEditElement::isReadOnly() const 343 bool DateTimeEditElement::isReadOnly() const
339 { 344 {
340 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly( ); 345 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly( );
341 } 346 }
342 347
343 void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent s& dateValue, Localizer& localizer) 348 void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent s& dateValue, Localizer& localizer)
344 { 349 {
345 size_t focusedFieldIndex = this->focusedFieldIndex(); 350 size_t focusedFieldIndex = this->focusedFieldIndex();
346 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex); 351 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex);
347 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud oId() : nullAtom; 352 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud oId() : nullAtom;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 return std::numeric_limits<double>::quiet_NaN(); 484 return std::numeric_limits<double>::quiet_NaN();
480 value += field->valueAsDouble(); 485 value += field->valueAsDouble();
481 } 486 }
482 487
483 return value; 488 return value;
484 } 489 }
485 490
486 } // namespace WebCore 491 } // namespace WebCore
487 492
488 #endif 493 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/shadow/DateTimeEditElement.h ('k') | Source/WebCore/html/shadow/DateTimeFieldElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698