| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 String HTMLTextAreaElement::value() const { | 376 String HTMLTextAreaElement::value() const { |
| 377 updateValue(); | 377 updateValue(); |
| 378 return m_value; | 378 return m_value; |
| 379 } | 379 } |
| 380 | 380 |
| 381 void HTMLTextAreaElement::setValue(const String& value, | 381 void HTMLTextAreaElement::setValue(const String& value, |
| 382 TextFieldEventBehavior eventBehavior) { | 382 TextFieldEventBehavior eventBehavior) { |
| 383 setValueCommon(value, eventBehavior); | 383 setValueCommon(value, eventBehavior); |
| 384 m_isDirty = true; | 384 m_isDirty = true; |
| 385 if (document().focusedElement() == this) | |
| 386 document() | |
| 387 .frameHost() | |
| 388 ->chromeClient() | |
| 389 .didUpdateTextOfFocusedElementByNonUserInput(*document().frame()); | |
| 390 } | 385 } |
| 391 | 386 |
| 392 void HTMLTextAreaElement::setNonDirtyValue(const String& value) { | 387 void HTMLTextAreaElement::setNonDirtyValue(const String& value) { |
| 393 setValueCommon(value, DispatchNoEvent, SetSeletion); | 388 setValueCommon(value, DispatchNoEvent, SetSeletion); |
| 394 m_isDirty = false; | 389 m_isDirty = false; |
| 395 } | 390 } |
| 396 | 391 |
| 397 void HTMLTextAreaElement::setValueCommon(const String& newValue, | 392 void HTMLTextAreaElement::setValueCommon(const String& newValue, |
| 398 TextFieldEventBehavior eventBehavior, | 393 TextFieldEventBehavior eventBehavior, |
| 399 SetValueCommonOption setValueOption) { | 394 SetValueCommonOption setValueOption) { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement( | 644 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement( |
| 650 const Element& source) { | 645 const Element& source) { |
| 651 const HTMLTextAreaElement& sourceElement = | 646 const HTMLTextAreaElement& sourceElement = |
| 652 static_cast<const HTMLTextAreaElement&>(source); | 647 static_cast<const HTMLTextAreaElement&>(source); |
| 653 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); | 648 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); |
| 654 m_isDirty = sourceElement.m_isDirty; | 649 m_isDirty = sourceElement.m_isDirty; |
| 655 TextControlElement::copyNonAttributePropertiesFromElement(source); | 650 TextControlElement::copyNonAttributePropertiesFromElement(source); |
| 656 } | 651 } |
| 657 | 652 |
| 658 } // namespace blink | 653 } // namespace blink |
| OLD | NEW |