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

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

Issue 2677843002: Change ComputedStyle::setUnique to take bool parameter. (Closed)
Patch Set: Created 3 years, 10 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 width += static_cast<DateTimeFieldElement*>(childElement) 574 width += static_cast<DateTimeFieldElement*>(childElement)
575 ->maximumWidth(*style); 575 ->maximumWidth(*style);
576 } else { 576 } else {
577 // ::-webkit-datetime-edit-text case. It has no 577 // ::-webkit-datetime-edit-text case. It has no
578 // border/padding/margin in html.css. 578 // border/padding/margin in html.css.
579 width += DateTimeFieldElement::computeTextWidth( 579 width += DateTimeFieldElement::computeTextWidth(
580 *style, childElement->textContent()); 580 *style, childElement->textContent());
581 } 581 }
582 } 582 }
583 style->setWidth(Length(ceilf(width), Fixed)); 583 style->setWidth(Length(ceilf(width), Fixed));
584 style->setUnique(); 584 style->setUnique(true);
585 return style.release(); 585 return style.release();
586 } 586 }
587 587
588 void DateTimeEditElement::didBlurFromField() { 588 void DateTimeEditElement::didBlurFromField() {
589 if (m_editControlOwner) 589 if (m_editControlOwner)
590 m_editControlOwner->didBlurFromControl(); 590 m_editControlOwner->didBlurFromControl();
591 } 591 }
592 592
593 void DateTimeEditElement::didFocusOnField() { 593 void DateTimeEditElement::didFocusOnField() {
594 if (m_editControlOwner) 594 if (m_editControlOwner)
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } 852 }
853 853
854 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const { 854 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const {
855 DateTimeFieldsState dateTimeFieldsState; 855 DateTimeFieldsState dateTimeFieldsState;
856 for (const auto& field : m_fields) 856 for (const auto& field : m_fields)
857 field->populateDateTimeFieldsState(dateTimeFieldsState); 857 field->populateDateTimeFieldsState(dateTimeFieldsState);
858 return dateTimeFieldsState; 858 return dateTimeFieldsState;
859 } 859 }
860 860
861 } // namespace blink 861 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698