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

Unified Diff: Source/core/editing/AppendNodeCommand.cpp

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add forgotten file back Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/AppendNodeCommand.cpp
diff --git a/Source/core/editing/AppendNodeCommand.cpp b/Source/core/editing/AppendNodeCommand.cpp
index 6e5d65d4160e10ececfac57848314b8c4f70eec0..f72b893ae449ab56bda468815f2af227466b3e16 100644
--- a/Source/core/editing/AppendNodeCommand.cpp
+++ b/Source/core/editing/AppendNodeCommand.cpp
@@ -27,7 +27,6 @@
#include "core/editing/AppendNodeCommand.h"
#include "bindings/v8/ExceptionState.h"
-#include "core/accessibility/AXObjectCache.h"
#include "core/dom/Document.h"
namespace WebCore {
@@ -44,26 +43,12 @@ AppendNodeCommand::AppendNodeCommand(PassRefPtr<ContainerNode> parent, PassRefPt
ASSERT(m_parent->rendererIsEditable() || !m_parent->attached());
}
-static void sendAXTextChangedIgnoringLineBreaks(Node* node, AXObjectCache::AXTextChange textChange)
-{
- String nodeValue = node->nodeValue();
- // Don't consider linebreaks in this command
- if (nodeValue == "\n")
- return;
-
- if (AXObjectCache* cache = node->document()->existingAXObjectCache())
- cache->nodeTextChangeNotification(node, textChange, 0, nodeValue);
-}
-
void AppendNodeCommand::doApply()
{
if (!m_parent->rendererIsEditable() && m_parent->attached())
return;
m_parent->appendChild(m_node.get(), IGNORE_EXCEPTION);
-
- if (AXObjectCache::accessibilityEnabled())
- sendAXTextChangedIgnoringLineBreaks(m_node.get(), AXObjectCache::AXTextInserted);
}
void AppendNodeCommand::doUnapply()
@@ -71,10 +56,6 @@ void AppendNodeCommand::doUnapply()
if (!m_parent->rendererIsEditable())
return;
- // Need to notify this before actually deleting the text
- if (AXObjectCache::accessibilityEnabled())
- sendAXTextChangedIgnoringLineBreaks(m_node.get(), AXObjectCache::AXTextDeleted);
-
m_node->remove(IGNORE_EXCEPTION);
}
« no previous file with comments | « Source/core/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698