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

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

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 6 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698