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

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

Issue 2393133004: reflow comments in core/html/shadow (Closed)
Patch Set: oops Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 Document& document, 551 Document& document,
552 EditControlOwner& editControlOwner) { 552 EditControlOwner& editControlOwner) {
553 DateTimeEditElement* container = 553 DateTimeEditElement* container =
554 new DateTimeEditElement(document, editControlOwner); 554 new DateTimeEditElement(document, editControlOwner);
555 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit")); 555 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit"));
556 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit()); 556 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit());
557 return container; 557 return container;
558 } 558 }
559 559
560 PassRefPtr<ComputedStyle> DateTimeEditElement::customStyleForLayoutObject() { 560 PassRefPtr<ComputedStyle> DateTimeEditElement::customStyleForLayoutObject() {
561 // FIXME: This is a kind of layout. We might want to introduce new layoutObjec t. 561 // FIXME: This is a kind of layout. We might want to introduce new
562 // layoutObject.
562 RefPtr<ComputedStyle> originalStyle = originalStyleForLayoutObject(); 563 RefPtr<ComputedStyle> originalStyle = originalStyleForLayoutObject();
563 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle); 564 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle);
564 float width = 0; 565 float width = 0;
565 for (Node* child = fieldsWrapperElement()->firstChild(); child; 566 for (Node* child = fieldsWrapperElement()->firstChild(); child;
566 child = child->nextSibling()) { 567 child = child->nextSibling()) {
567 if (!child->isElementNode()) 568 if (!child->isElementNode())
568 continue; 569 continue;
569 Element* childElement = toElement(child); 570 Element* childElement = toElement(child);
570 if (childElement->isDateTimeFieldElement()) { 571 if (childElement->isDateTimeFieldElement()) {
571 // We need to pass the ComputedStyle of this element because child 572 // We need to pass the ComputedStyle of this element because child
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 849 }
849 850
850 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const { 851 DateTimeFieldsState DateTimeEditElement::valueAsDateTimeFieldsState() const {
851 DateTimeFieldsState dateTimeFieldsState; 852 DateTimeFieldsState dateTimeFieldsState;
852 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) 853 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex)
853 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); 854 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState);
854 return dateTimeFieldsState; 855 return dateTimeFieldsState;
855 } 856 }
856 857
857 } // namespace blink 858 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698