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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 return m_lastChangeWasUserEdit; | 527 return m_lastChangeWasUserEdit; |
528 } | 528 } |
529 | 529 |
530 void HTMLTextFormControlElement::setInnerTextValue(const String& value) | 530 void HTMLTextFormControlElement::setInnerTextValue(const String& value) |
531 { | 531 { |
532 if (!isTextFormControl()) | 532 if (!isTextFormControl()) |
533 return; | 533 return; |
534 | 534 |
535 bool textIsChanged = value != innerTextValue(); | 535 bool textIsChanged = value != innerTextValue(); |
536 if (textIsChanged || !innerTextElement()->hasChildNodes()) { | 536 if (textIsChanged || !innerTextElement()->hasChildNodes()) { |
537 if (textIsChanged && document() && renderer()) { | 537 if (textIsChanged && document() && renderer() && AXObjectCache::accessib
ilityEnabled()) |
538 if (AXObjectCache* cache = document()->existingAXObjectCache()) | 538 document()->axObjectCache()->postNotification(this, AXObjectCache::A
XValueChanged, false); |
539 cache->postNotification(this, AXObjectCache::AXValueChanged, fal
se); | 539 |
540 } | |
541 innerTextElement()->setInnerText(value, ASSERT_NO_EXCEPTION); | 540 innerTextElement()->setInnerText(value, ASSERT_NO_EXCEPTION); |
542 | 541 |
543 if (value.endsWith('\n') || value.endsWith('\r')) | 542 if (value.endsWith('\n') || value.endsWith('\r')) |
544 innerTextElement()->appendChild(HTMLBRElement::create(document()), A
SSERT_NO_EXCEPTION); | 543 innerTextElement()->appendChild(HTMLBRElement::create(document()), A
SSERT_NO_EXCEPTION); |
545 } | 544 } |
546 | 545 |
547 setFormControlValueMatchesRenderer(true); | 546 setFormControlValueMatchesRenderer(true); |
548 } | 547 } |
549 | 548 |
550 static String finishText(StringBuilder& result) | 549 static String finishText(StringBuilder& result) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } | 676 } |
678 | 677 |
679 void HTMLTextFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjec
tInfo) const | 678 void HTMLTextFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjec
tInfo) const |
680 { | 679 { |
681 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 680 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
682 HTMLFormControlElementWithState::reportMemoryUsage(memoryObjectInfo); | 681 HTMLFormControlElementWithState::reportMemoryUsage(memoryObjectInfo); |
683 info.addMember(m_textAsOfLastFormControlChangeEvent, "textAsOfLastFormContro
lChangeEvent"); | 682 info.addMember(m_textAsOfLastFormControlChangeEvent, "textAsOfLastFormContro
lChangeEvent"); |
684 } | 683 } |
685 | 684 |
686 } // namespace Webcore | 685 } // namespace Webcore |
OLD | NEW |