OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 bool HTMLTextAreaElement::shouldUseInputMethod() | 512 bool HTMLTextAreaElement::shouldUseInputMethod() |
513 { | 513 { |
514 return true; | 514 return true; |
515 } | 515 } |
516 | 516 |
517 HTMLElement* HTMLTextAreaElement::placeholderElement() const | 517 HTMLElement* HTMLTextAreaElement::placeholderElement() const |
518 { | 518 { |
519 return m_placeholder; | 519 return m_placeholder; |
520 } | 520 } |
521 | 521 |
522 void HTMLTextAreaElement::attach() | 522 void HTMLTextAreaElement::attach(const AttachContext& context) |
523 { | 523 { |
524 HTMLTextFormControlElement::attach(); | 524 HTMLTextFormControlElement::attach(context); |
525 fixPlaceholderRenderer(m_placeholder, innerTextElement()); | 525 fixPlaceholderRenderer(m_placeholder, innerTextElement()); |
526 } | 526 } |
527 | 527 |
528 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const | 528 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const |
529 { | 529 { |
530 return isReadOnly(); | 530 return isReadOnly(); |
531 } | 531 } |
532 | 532 |
533 bool HTMLTextAreaElement::matchesReadWritePseudoClass() const | 533 bool HTMLTextAreaElement::matchesReadWritePseudoClass() const |
534 { | 534 { |
(...skipping 14 matching lines...) Expand all Loading... |
549 RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document()); | 549 RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document()); |
550 m_placeholder = placeholder.get(); | 550 m_placeholder = placeholder.get(); |
551 m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", Atomi
cString::ConstructFromLiteral)); | 551 m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", Atomi
cString::ConstructFromLiteral)); |
552 userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->n
extSibling(), ASSERT_NO_EXCEPTION); | 552 userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->n
extSibling(), ASSERT_NO_EXCEPTION); |
553 } | 553 } |
554 m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION); | 554 m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION); |
555 fixPlaceholderRenderer(m_placeholder, innerTextElement()); | 555 fixPlaceholderRenderer(m_placeholder, innerTextElement()); |
556 } | 556 } |
557 | 557 |
558 } | 558 } |
OLD | NEW |