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

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: Update failing tests, add one missing role 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 75afcbd8ef02a8e1d8506ad53933ab08a1c8d489..cefcad5aacc58a85f68ef7793fe785606e13dd1c 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, AttachLazily);
-
- 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);
}

Powered by Google App Engine
This is Rietveld 408576698