OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ASSERT(m_parent->rendererIsEditable() || !m_parent->attached()); | 45 ASSERT(m_parent->rendererIsEditable() || !m_parent->attached()); |
46 } | 46 } |
47 | 47 |
48 static void sendAXTextChangedIgnoringLineBreaks(Node* node, AXObjectCache::AXTex
tChange textChange) | 48 static void sendAXTextChangedIgnoringLineBreaks(Node* node, AXObjectCache::AXTex
tChange textChange) |
49 { | 49 { |
50 String nodeValue = node->nodeValue(); | 50 String nodeValue = node->nodeValue(); |
51 // Don't consider linebreaks in this command | 51 // Don't consider linebreaks in this command |
52 if (nodeValue == "\n") | 52 if (nodeValue == "\n") |
53 return; | 53 return; |
54 | 54 |
55 if (AXObjectCache* cache = node->document()->existingAXObjectCache()) | 55 node->document()->axObjectCache()->nodeTextChangeNotification(node, textChan
ge, 0, nodeValue); |
56 cache->nodeTextChangeNotification(node, textChange, 0, nodeValue); | |
57 } | 56 } |
58 | 57 |
59 void AppendNodeCommand::doApply() | 58 void AppendNodeCommand::doApply() |
60 { | 59 { |
61 if (!m_parent->rendererIsEditable() && m_parent->attached()) | 60 if (!m_parent->rendererIsEditable() && m_parent->attached()) |
62 return; | 61 return; |
63 | 62 |
64 m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION, AttachLazily); | 63 m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION, AttachLazily); |
65 | 64 |
66 if (AXObjectCache::accessibilityEnabled()) | 65 if (AXObjectCache::accessibilityEnabled()) |
(...skipping 14 matching lines...) Expand all Loading... |
81 | 80 |
82 #ifndef NDEBUG | 81 #ifndef NDEBUG |
83 void AppendNodeCommand::getNodesInCommand(HashSet<Node*>& nodes) | 82 void AppendNodeCommand::getNodesInCommand(HashSet<Node*>& nodes) |
84 { | 83 { |
85 addNodeAndDescendants(m_parent.get(), nodes); | 84 addNodeAndDescendants(m_parent.get(), nodes); |
86 addNodeAndDescendants(m_node.get(), nodes); | 85 addNodeAndDescendants(m_node.get(), nodes); |
87 } | 86 } |
88 #endif | 87 #endif |
89 | 88 |
90 } // namespace WebCore | 89 } // namespace WebCore |
OLD | NEW |