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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp

Issue 2568443002: INPUT element: Do not use identical ID name for SearchFieldCancelButtonElement and ClearButtonEleme… (Closed)
Patch Set: step_func_done Created 4 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
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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 bool DateTimeEditElement::isFieldOwnerReadOnly() const { 701 bool DateTimeEditElement::isFieldOwnerReadOnly() const {
702 return isReadOnly(); 702 return isReadOnly();
703 } 703 }
704 704
705 bool DateTimeEditElement::isReadOnly() const { 705 bool DateTimeEditElement::isReadOnly() const {
706 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly(); 706 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly();
707 } 707 }
708 708
709 void DateTimeEditElement::layout(const LayoutParameters& layoutParameters, 709 void DateTimeEditElement::layout(const LayoutParameters& layoutParameters,
710 const DateComponents& dateValue) { 710 const DateComponents& dateValue) {
711 // TODO(tkent): We assume this function never dispatches events. However this
712 // can dispatch 'blur' event in Node::removeChild().
713
711 DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId, 714 DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId,
712 ("-webkit-datetime-edit-fields-wrapper")); 715 ("-webkit-datetime-edit-fields-wrapper"));
713 if (!hasChildren()) { 716 if (!hasChildren()) {
714 HTMLDivElement* element = HTMLDivElement::create(document()); 717 HTMLDivElement* element = HTMLDivElement::create(document());
715 element->setShadowPseudoId(fieldsWrapperPseudoId); 718 element->setShadowPseudoId(fieldsWrapperPseudoId);
716 appendChild(element); 719 appendChild(element);
717 } 720 }
718 Element* fieldsWrapper = fieldsWrapperElement(); 721 Element* fieldsWrapper = fieldsWrapperElement();
719 722
720 size_t focusedFieldIndex = this->focusedFieldIndex(); 723 size_t focusedFieldIndex = this->focusedFieldIndex();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 } 852 }
850 853
851 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const { 854 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const {
852 DateTimeFieldsState dateTimeFieldsState; 855 DateTimeFieldsState dateTimeFieldsState;
853 for (const auto& field : m_fields) 856 for (const auto& field : m_fields)
854 field->populateDateTimeFieldsState(dateTimeFieldsState); 857 field->populateDateTimeFieldsState(dateTimeFieldsState);
855 return dateTimeFieldsState; 858 return dateTimeFieldsState;
856 } 859 }
857 860
858 } // namespace blink 861 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698