| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 ->MaximumWidth(*style); | 581 ->MaximumWidth(*style); |
| 582 } else { | 582 } else { |
| 583 // ::-webkit-datetime-edit-text case. It has no | 583 // ::-webkit-datetime-edit-text case. It has no |
| 584 // border/padding/margin in html.css. | 584 // border/padding/margin in html.css. |
| 585 width += DateTimeFieldElement::ComputeTextWidth( | 585 width += DateTimeFieldElement::ComputeTextWidth( |
| 586 *style, child_element->textContent()); | 586 *style, child_element->textContent()); |
| 587 } | 587 } |
| 588 } | 588 } |
| 589 style->SetWidth(Length(ceilf(width), kFixed)); | 589 style->SetWidth(Length(ceilf(width), kFixed)); |
| 590 style->SetUnique(); | 590 style->SetUnique(); |
| 591 return style.Release(); | 591 return style; |
| 592 } | 592 } |
| 593 | 593 |
| 594 void DateTimeEditElement::DidBlurFromField(WebFocusType focus_type) { | 594 void DateTimeEditElement::DidBlurFromField(WebFocusType focus_type) { |
| 595 if (edit_control_owner_) | 595 if (edit_control_owner_) |
| 596 edit_control_owner_->DidBlurFromControl(focus_type); | 596 edit_control_owner_->DidBlurFromControl(focus_type); |
| 597 } | 597 } |
| 598 | 598 |
| 599 void DateTimeEditElement::DidFocusOnField(WebFocusType focus_type) { | 599 void DateTimeEditElement::DidFocusOnField(WebFocusType focus_type) { |
| 600 if (edit_control_owner_) | 600 if (edit_control_owner_) |
| 601 edit_control_owner_->DidFocusOnControl(focus_type); | 601 edit_control_owner_->DidFocusOnControl(focus_type); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 } | 862 } |
| 863 | 863 |
| 864 DateTimeFieldsState DateTimeEditElement::ValueAsDateTimeFieldsState() const { | 864 DateTimeFieldsState DateTimeEditElement::ValueAsDateTimeFieldsState() const { |
| 865 DateTimeFieldsState date_time_fields_state; | 865 DateTimeFieldsState date_time_fields_state; |
| 866 for (const auto& field : fields_) | 866 for (const auto& field : fields_) |
| 867 field->PopulateDateTimeFieldsState(date_time_fields_state); | 867 field->PopulateDateTimeFieldsState(date_time_fields_state); |
| 868 return date_time_fields_state; | 868 return date_time_fields_state; |
| 869 } | 869 } |
| 870 | 870 |
| 871 } // namespace blink | 871 } // namespace blink |
| OLD | NEW |