OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 ASSERT(!ec); | 418 ASSERT(!ec); |
419 } | 419 } |
420 m_placeholder->setInnerText(placeholderText, ec); | 420 m_placeholder->setInnerText(placeholderText, ec); |
421 ASSERT(!ec); | 421 ASSERT(!ec); |
422 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta
iner.get() : m_innerText.get()); | 422 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta
iner.get() : m_innerText.get()); |
423 } | 423 } |
424 | 424 |
425 void TextFieldInputType::attach() | 425 void TextFieldInputType::attach() |
426 { | 426 { |
427 InputType::attach(); | 427 InputType::attach(); |
| 428 // If container exists, the container should not have any content data. |
| 429 ASSERT(!m_container || !m_container->renderStyle() || !m_container->renderSt
yle()->hasContent()); |
| 430 |
428 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta
iner.get() : m_innerText.get()); | 431 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta
iner.get() : m_innerText.get()); |
429 } | 432 } |
430 | 433 |
431 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons
t | 434 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons
t |
432 { | 435 { |
433 InputType::appendFormData(list, multipart); | 436 InputType::appendFormData(list, multipart); |
434 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt
tr); | 437 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt
tr); |
435 if (!dirnameAttrValue.isNull()) | 438 if (!dirnameAttrValue.isNull()) |
436 list.appendData(dirnameAttrValue, element()->directionForFormData()); | 439 list.appendData(dirnameAttrValue, element()->directionForFormData()); |
437 return true; | 440 return true; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 { | 474 { |
472 return !element()->disabled() && !element()->readOnly(); | 475 return !element()->disabled() && !element()->readOnly(); |
473 } | 476 } |
474 | 477 |
475 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() | 478 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() |
476 { | 479 { |
477 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); | 480 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); |
478 } | 481 } |
479 | 482 |
480 } // namespace WebCore | 483 } // namespace WebCore |
OLD | NEW |