| OLD | NEW |
| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // border/padding/margin in html.css. | 585 // border/padding/margin in html.css. |
| 586 width += DateTimeFieldElement::ComputeTextWidth( | 586 width += DateTimeFieldElement::ComputeTextWidth( |
| 587 *style, child_element->textContent()); | 587 *style, child_element->textContent()); |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 style->SetWidth(Length(ceilf(width), kFixed)); | 590 style->SetWidth(Length(ceilf(width), kFixed)); |
| 591 style->SetUnique(); | 591 style->SetUnique(); |
| 592 return style.Release(); | 592 return style.Release(); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void DateTimeEditElement::DidBlurFromField() { | 595 void DateTimeEditElement::DidBlurFromField(WebFocusType focus_type) { |
| 596 if (edit_control_owner_) | 596 if (edit_control_owner_) |
| 597 edit_control_owner_->DidBlurFromControl(); | 597 edit_control_owner_->DidBlurFromControl(focus_type); |
| 598 } | 598 } |
| 599 | 599 |
| 600 void DateTimeEditElement::DidFocusOnField() { | 600 void DateTimeEditElement::DidFocusOnField(WebFocusType focus_type) { |
| 601 if (edit_control_owner_) | 601 if (edit_control_owner_) |
| 602 edit_control_owner_->DidFocusOnControl(); | 602 edit_control_owner_->DidFocusOnControl(focus_type); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void DateTimeEditElement::DisabledStateChanged() { | 605 void DateTimeEditElement::DisabledStateChanged() { |
| 606 UpdateUIState(); | 606 UpdateUIState(); |
| 607 } | 607 } |
| 608 | 608 |
| 609 DateTimeFieldElement* DateTimeEditElement::FieldAt(size_t field_index) const { | 609 DateTimeFieldElement* DateTimeEditElement::FieldAt(size_t field_index) const { |
| 610 return field_index < fields_.size() ? fields_[field_index].Get() : 0; | 610 return field_index < fields_.size() ? fields_[field_index].Get() : 0; |
| 611 } | 611 } |
| 612 | 612 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 } | 863 } |
| 864 | 864 |
| 865 DateTimeFieldsState DateTimeEditElement::ValueAsDateTimeFieldsState() const { | 865 DateTimeFieldsState DateTimeEditElement::ValueAsDateTimeFieldsState() const { |
| 866 DateTimeFieldsState date_time_fields_state; | 866 DateTimeFieldsState date_time_fields_state; |
| 867 for (const auto& field : fields_) | 867 for (const auto& field : fields_) |
| 868 field->PopulateDateTimeFieldsState(date_time_fields_state); | 868 field->PopulateDateTimeFieldsState(date_time_fields_state); |
| 869 return date_time_fields_state; | 869 return date_time_fields_state; |
| 870 } | 870 } |
| 871 | 871 |
| 872 } // namespace blink | 872 } // namespace blink |
| OLD | NEW |