Backout changeset 269ee0275709 (bug 688438) because of bug 688423
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 25 Oct 2011 22:32:11 -0400
changeset 79217 3e8312683e7b99b637a7fef24c8a98b08e488552
parent 79216 40f6b86f9edfc05938551372d0d582068d6c95e6
child 79218 2cfcb3a27d4437d191ee219ecf60dc5bddd3ac23
push id2918
push usereakhgari@mozilla.com
push dateWed, 26 Oct 2011 02:33:08 +0000
treeherdermozilla-inbound@2cfcb3a27d44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs688438, 688423
milestone10.0a1
backs out269ee0275709eb007bc3cc8f82fe649efe07791a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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())