Backout changeset 269ee0275709 (bug 688438) because of bug 688423
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 25 Oct 2011 22:32:11 -0400
changeset 79861 3e8312683e7b99b637a7fef24c8a98b08e488552
parent 79860 40f6b86f9edfc05938551372d0d582068d6c95e6
child 79862 2cfcb3a27d4437d191ee219ecf60dc5bddd3ac23
push id506
push userclegnitto@mozilla.com
push dateWed, 09 Nov 2011 02:03:18 +0000
treeherdermozilla-aurora@63587fc7bb93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs688438, 688423
milestone10.0a1
backs out269ee0275709eb007bc3cc8f82fe649efe07791a
Backout changeset 269ee0275709 (bug 688438) because of bug 688423
content/base/src/nsGenericElement.cpp
content/events/src/nsIMEStateManager.cpp
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -1343,22 +1343,17 @@ nsIContent::GetFlattenedTreeParent() con
   }
   return parent;
 }
 
 PRUint32
 nsIContent::GetDesiredIMEState()
 {
   if (!IsEditableInternal()) {
-    // Check for the special case where we're dealing with elements which don't
-    // have the editable flag set, but are readwrite (such as text controls).
-    if (!IsElement() ||
-        !AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
-      return IME_STATUS_DISABLE;
-    }
+    return IME_STATUS_DISABLE;
   }
   // NOTE: The content for independent editors (e.g., input[type=text],
   // textarea) must override this method, so, we don't need to worry about
   // that here.
   nsIContent *editableAncestor = GetEditingHost();
 
   // This is in another editable content, use the result of it.
   if (editableAncestor && editableAncestor != this) {
--- a/content/events/src/nsIMEStateManager.cpp
+++ b/content/events/src/nsIMEStateManager.cpp
@@ -641,34 +641,23 @@ nsTextStateManager::ContentRemoved(nsIDo
     return;
 
   // fire notification
   if (childOffset)
     nsContentUtils::AddScriptRunner(
         new TextChangeEvent(mWidget, offset, offset + childOffset, offset));
 }
 
-static bool IsEditable(nsINode* node) {
-  if (node->IsEditable()) {
-    return true;
-  }
-  // |node| might be readwrite (for example, a text control)
-  if (node->IsElement() && node->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
-    return true;
-  }
-  return false;
-}
-
 static nsINode* GetRootEditableNode(nsPresContext* aPresContext,
                                     nsIContent* aContent)
 {
   if (aContent) {
     nsINode* root = nsnull;
     nsINode* node = aContent;
-    while (node && IsEditable(node)) {
+    while (node && node->IsEditable()) {
       root = node;
       node = node->GetNodeParent();
     }
     return root;
   }
   if (aPresContext) {
     nsIDocument* document = aPresContext->Document();
     if (document && document->IsEditable())