Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: Source/WebCore/editing/AppendNodeCommand.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | Source/WebCore/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | Source/WebCore/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698