OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 // Element must not have a renderer here, because if it did | 327 // Element must not have a renderer here, because if it did |
328 // DateTimeEditElement::customStyleForRenderer() is called in appendChild() | 328 // DateTimeEditElement::customStyleForRenderer() is called in appendChild() |
329 // before the field wrapper element is created. | 329 // before the field wrapper element is created. |
330 // FIXME: This code should not depend on such craziness. | 330 // FIXME: This code should not depend on such craziness. |
331 ASSERT(!element()->renderer()); | 331 ASSERT(!element()->renderer()); |
332 | 332 |
333 Document& document = element()->document(); | 333 Document& document = element()->document(); |
334 ContainerNode* container = element()->userAgentShadowRoot(); | 334 ContainerNode* container = element()->userAgentShadowRoot(); |
335 | 335 |
336 container->appendChild(DateTimeEditElement::create(&document, *this)); | 336 container->appendChild(DateTimeEditElement::create(document, *this)); |
337 updateInnerTextValue(); | 337 updateInnerTextValue(); |
338 container->appendChild(ClearButtonElement::create(&document, *this)); | 338 container->appendChild(ClearButtonElement::create(document, *this)); |
339 container->appendChild(SpinButtonElement::create(&document, *this)); | 339 container->appendChild(SpinButtonElement::create(document, *this)); |
340 | 340 |
341 bool shouldAddPickerIndicator = false; | 341 bool shouldAddPickerIndicator = false; |
342 if (InputType::themeSupportsDataListUI(this)) | 342 if (InputType::themeSupportsDataListUI(this)) |
343 shouldAddPickerIndicator = true; | 343 shouldAddPickerIndicator = true; |
344 if (RenderTheme::theme().supportsCalendarPicker(formControlType())) { | 344 if (RenderTheme::theme().supportsCalendarPicker(formControlType())) { |
345 shouldAddPickerIndicator = true; | 345 shouldAddPickerIndicator = true; |
346 m_pickerIndicatorIsAlwaysVisible = true; | 346 m_pickerIndicatorIsAlwaysVisible = true; |
347 } | 347 } |
348 if (shouldAddPickerIndicator) { | 348 if (shouldAddPickerIndicator) { |
349 container->appendChild(PickerIndicatorElement::create(&document, *this))
; | 349 container->appendChild(PickerIndicatorElement::create(document, *this)); |
350 m_pickerIndicatorIsVisible = true; | 350 m_pickerIndicatorIsVisible = true; |
351 updatePickerIndicatorVisibility(); | 351 updatePickerIndicatorVisibility(); |
352 } | 352 } |
353 m_didCreateShadowElements = true; | 353 m_didCreateShadowElements = true; |
354 } | 354 } |
355 | 355 |
356 void BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree() | 356 void BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree() |
357 { | 357 { |
358 ASSERT(!m_isDestroyingShadowSubtree); | 358 ASSERT(!m_isDestroyingShadowSubtree); |
359 m_isDestroyingShadowSubtree = true; | 359 m_isDestroyingShadowSubtree = true; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 if (element()->isRequired() || !dateTimeEditElement()->anyEditableFieldsHave
Values()) | 600 if (element()->isRequired() || !dateTimeEditElement()->anyEditableFieldsHave
Values()) |
601 clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidde
n); | 601 clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidde
n); |
602 else | 602 else |
603 clearButton->removeInlineStyleProperty(CSSPropertyVisibility); | 603 clearButton->removeInlineStyleProperty(CSSPropertyVisibility); |
604 } | 604 } |
605 | 605 |
606 } // namespace WebCore | 606 } // namespace WebCore |
607 | 607 |
608 #endif | 608 #endif |
OLD | NEW |