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

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

Issue 1115353002: Update renderer to layoutObject in core/html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 PassRefPtrWillBeRawPtr<DateTimeEditElement> DateTimeEditElement::create(Document & document, EditControlOwner& editControlOwner) 496 PassRefPtrWillBeRawPtr<DateTimeEditElement> DateTimeEditElement::create(Document & document, EditControlOwner& editControlOwner)
497 { 497 {
498 RefPtrWillBeRawPtr<DateTimeEditElement> container = adoptRefWillBeNoop(new D ateTimeEditElement(document, editControlOwner)); 498 RefPtrWillBeRawPtr<DateTimeEditElement> container = adoptRefWillBeNoop(new D ateTimeEditElement(document, editControlOwner));
499 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit", AtomicStr ing::ConstructFromLiteral)); 499 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit", AtomicStr ing::ConstructFromLiteral));
500 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit()); 500 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit());
501 return container.release(); 501 return container.release();
502 } 502 }
503 503
504 PassRefPtr<ComputedStyle> DateTimeEditElement::customStyleForLayoutObject() 504 PassRefPtr<ComputedStyle> DateTimeEditElement::customStyleForLayoutObject()
505 { 505 {
506 // FIXME: This is a kind of layout. We might want to introduce new renderer. 506 // FIXME: This is a kind of layout. We might want to introduce new layoutObj ect.
507 RefPtr<ComputedStyle> originalStyle = originalStyleForLayoutObject(); 507 RefPtr<ComputedStyle> originalStyle = originalStyleForLayoutObject();
508 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle); 508 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle);
509 float width = 0; 509 float width = 0;
510 for (Node* child = fieldsWrapperElement()->firstChild(); child; child = chil d->nextSibling()) { 510 for (Node* child = fieldsWrapperElement()->firstChild(); child; child = chil d->nextSibling()) {
511 if (!child->isElementNode()) 511 if (!child->isElementNode())
512 continue; 512 continue;
513 Element* childElement = toElement(child); 513 Element* childElement = toElement(child);
514 if (childElement->isDateTimeFieldElement()) { 514 if (childElement->isDateTimeFieldElement()) {
515 // We need to pass the Font of this element because child elements 515 // We need to pass the Font of this element because child elements
516 // can't resolve inherited style at this timing. 516 // can't resolve inherited style at this timing.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 { 807 {
808 DateTimeFieldsState dateTimeFieldsState; 808 DateTimeFieldsState dateTimeFieldsState;
809 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) 809 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex)
810 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); 810 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState);
811 return dateTimeFieldsState; 811 return dateTimeFieldsState;
812 } 812 }
813 813
814 } // namespace blink 814 } // namespace blink
815 815
816 #endif 816 #endif
OLDNEW
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.cpp ('k') | Source/core/html/shadow/MediaControlElementTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698