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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } | 487 } |
488 | 488 |
489 void DateTimeEditElement::blurByOwner() | 489 void DateTimeEditElement::blurByOwner() |
490 { | 490 { |
491 if (DateTimeFieldElement* field = focusedField()) | 491 if (DateTimeFieldElement* field = focusedField()) |
492 field->blur(); | 492 field->blur(); |
493 } | 493 } |
494 | 494 |
495 PassRefPtrWillBeRawPtr<DateTimeEditElement> DateTimeEditElement::create(Document
& document, EditControlOwner& editControlOwner) | 495 PassRefPtrWillBeRawPtr<DateTimeEditElement> DateTimeEditElement::create(Document
& document, EditControlOwner& editControlOwner) |
496 { | 496 { |
497 RefPtrWillBeRawPtr<DateTimeEditElement> container = adoptRefWillBeRefCounted
GarbageCollected(new DateTimeEditElement(document, editControlOwner)); | 497 RefPtrWillBeRawPtr<DateTimeEditElement> container = adoptRefWillBeNoop(new D
ateTimeEditElement(document, editControlOwner)); |
498 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit", AtomicStr
ing::ConstructFromLiteral)); | 498 container->setShadowPseudoId(AtomicString("-webkit-datetime-edit", AtomicStr
ing::ConstructFromLiteral)); |
499 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit()); | 499 container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit()); |
500 return container.release(); | 500 return container.release(); |
501 } | 501 } |
502 | 502 |
503 PassRefPtr<RenderStyle> DateTimeEditElement::customStyleForRenderer() | 503 PassRefPtr<RenderStyle> DateTimeEditElement::customStyleForRenderer() |
504 { | 504 { |
505 // FIXME: This is a kind of layout. We might want to introduce new renderer. | 505 // FIXME: This is a kind of layout. We might want to introduce new renderer. |
506 FontCachePurgePreventer fontCachePurgePreventer; | 506 FontCachePurgePreventer fontCachePurgePreventer; |
507 RefPtr<RenderStyle> originalStyle = originalStyleForRenderer(); | 507 RefPtr<RenderStyle> originalStyle = originalStyleForRenderer(); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 WebCore | 814 } // namespace WebCore |
815 | 815 |
816 #endif | 816 #endif |
OLD | NEW |