Backed out changeset 7d3a598c1285 (bug 1499209),for Android build bustages on AccessibleWrap.cpp:416
authorarthur.iakab <aiakab@mozilla.com>
Fri, 19 Oct 2018 01:26:11 +0300
changeset 500465 889b103b4e312bf7f0b407c0485bdd7c3e14e516
parent 500464 8dd09fad1f352d3814244908f0ea04f29fa2a307
child 500466 74ce6fcac2111570473f580669c536d93f816133
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1499209
milestone64.0a1
backs out7d3a598c12859f4bed3fc560bad3ae37af5f272a
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
Backed out changeset 7d3a598c1285 (bug 1499209),for Android build bustages on AccessibleWrap.cpp:416
accessible/android/AccessibleWrap.cpp
accessible/android/AccessibleWrap.h
accessible/android/SessionAccessibility.cpp
--- a/accessible/android/AccessibleWrap.cpp
+++ b/accessible/android/AccessibleWrap.cpp
@@ -368,69 +368,59 @@ AccessibleWrap::WrapperRangeInfo(double*
     *aStep = Step();
     return true;
   }
 
   return false;
 }
 
 mozilla::java::GeckoBundle::LocalRef
-AccessibleWrap::ToBundle(bool aMinimal)
+AccessibleWrap::ToBundle()
 {
   if (IsDefunct()) {
     return nullptr;
   }
 
   GECKOBUNDLE_START(nodeInfo);
   GECKOBUNDLE_PUT(nodeInfo, "id", java::sdk::Integer::ValueOf(VirtualViewID()));
 
   AccessibleWrap* parent = WrapperParent();
   GECKOBUNDLE_PUT(nodeInfo, "parentId",
     java::sdk::Integer::ValueOf(parent ? parent->VirtualViewID() : 0));
 
   role role = WrapperRole();
   uint64_t state = State();
   uint64_t flags = GetFlags(role, state);
   GECKOBUNDLE_PUT(nodeInfo, "flags", java::sdk::Integer::ValueOf(flags));
+
+  nsAutoString geckoRole;
+  nsAutoString roleDescription;
+  if (VirtualViewID() != kNoID) {
+    GetRoleDescription(role, geckoRole, roleDescription);
+  }
+
+  GECKOBUNDLE_PUT(
+    nodeInfo, "roleDescription", jni::StringParam(roleDescription));
+  GECKOBUNDLE_PUT(nodeInfo, "geckoRole", jni::StringParam(geckoRole));
   GECKOBUNDLE_PUT(nodeInfo, "className", java::sdk::Integer::ValueOf(AndroidClass()));
 
   nsAutoString text;
   if (state & states::EDITABLE) {
     Value(text);
   }
 
   if (!text.IsEmpty()) {
     nsAutoString hint;
     Name(hint);
     GECKOBUNDLE_PUT(nodeInfo, "hint", jni::StringParam(hint));
   } else {
     Name(text);
   }
   GECKOBUNDLE_PUT(nodeInfo, "text", jni::StringParam(text));
 
-  if (aMinimal) {
-    GECKOBUNDLE_FINISH(nodeInfo);
-    return nodeInfo;
-  }
-
-  nsAutoString geckoRole;
-  nsAutoString roleDescription;
-  int32_t androidClass = java::SessionAccessibility::CLASSNAME_VIEW;
-  if (VirtualViewID() != kNoID) {
-    GetRoleDescription(role, geckoRole, roleDescription);
-  }
-
-  GECKOBUNDLE_PUT(
-    nodeInfo, "roleDescription", jni::StringParam(roleDescription));
-  GECKOBUNDLE_PUT(nodeInfo, "geckoRole", jni::StringParam(geckoRole));
-
-  GECKOBUNDLE_PUT(
-    nodeInfo, "roleDescription", jni::StringParam(roleDescription));
-  GECKOBUNDLE_PUT(nodeInfo, "geckoRole", jni::StringParam(geckoRole));
-
   nsAutoString viewIdResourceName;
   WrapperDOMNodeID(viewIdResourceName);
   if (!viewIdResourceName.IsEmpty()) {
     GECKOBUNDLE_PUT(
       nodeInfo, "viewIdResourceName", jni::StringParam(viewIdResourceName));
   }
 
   nsIntRect bounds = Bounds();
--- a/accessible/android/AccessibleWrap.h
+++ b/accessible/android/AccessibleWrap.h
@@ -26,17 +26,17 @@ public:
   int32_t VirtualViewID() const { return mID; }
 
   virtual void SetTextContents(const nsAString& aText);
 
   virtual void GetTextContents(nsAString& aText);
 
   virtual bool GetSelectionBounds(int32_t* aStartOffset, int32_t* aEndOffset);
 
-  mozilla::java::GeckoBundle::LocalRef ToBundle(bool aMinimal = false);
+  mozilla::java::GeckoBundle::LocalRef ToBundle();
 
   int32_t AndroidClass()
   {
     return mID == kNoID ? java::SessionAccessibility::CLASSNAME_WEBVIEW
                         : GetAndroidClass(WrapperRole());
   }
 
   static const int32_t kNoID = -1;
--- a/accessible/android/SessionAccessibility.cpp
+++ b/accessible/android/SessionAccessibility.cpp
@@ -146,40 +146,40 @@ SessionAccessibility::GetInstanceFor(Acc
   return nullptr;
 }
 
 void
 SessionAccessibility::SendAccessibilityFocusedEvent(AccessibleWrap* aAccessible)
 {
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_ACCESSIBILITY_FOCUSED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
   aAccessible->ScrollTo(nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE);
 }
 
 void
 SessionAccessibility::SendHoverEnterEvent(AccessibleWrap* aAccessible)
 {
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_HOVER_ENTER,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendFocusEvent(AccessibleWrap* aAccessible)
 {
   // Suppress focus events from about:blank pages.
   // This is important for tests.
   if (aAccessible->IsDoc() && aAccessible->ChildCount() == 0) {
     return;
   }
 
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_FOCUSED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendScrollingEvent(AccessibleWrap* aAccessible,
                                          int32_t aScrollX,
                                          int32_t aScrollY,
                                          int32_t aMaxScrollX,
                                          int32_t aMaxScrollY)
@@ -194,42 +194,42 @@ SessionAccessibility::SendScrollingEvent
   GECKOBUNDLE_START(eventInfo);
   GECKOBUNDLE_PUT(eventInfo, "scrollX", java::sdk::Integer::ValueOf(aScrollX));
   GECKOBUNDLE_PUT(eventInfo, "scrollY", java::sdk::Integer::ValueOf(aScrollY));
   GECKOBUNDLE_PUT(eventInfo, "maxScrollX", java::sdk::Integer::ValueOf(aMaxScrollX));
   GECKOBUNDLE_PUT(eventInfo, "maxScrollY", java::sdk::Integer::ValueOf(aMaxScrollY));
   GECKOBUNDLE_FINISH(eventInfo);
 
   mSessionAccessibility->SendEvent(
-    java::sdk::AccessibilityEvent::TYPE_VIEW_SCROLLED, virtualViewId, eventInfo,
-    aAccessible->ToBundle(true));
+    java::sdk::AccessibilityEvent::TYPE_VIEW_SCROLLED, virtualViewId,
+    eventInfo, aAccessible->ToBundle());
 
   SendWindowContentChangedEvent(aAccessible);
 }
 
 void
 SessionAccessibility::SendWindowContentChangedEvent(AccessibleWrap* aAccessible)
 {
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_WINDOW_CONTENT_CHANGED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendWindowStateChangedEvent(AccessibleWrap* aAccessible)
 {
   // Suppress window state changed events from about:blank pages.
   // This is important for tests.
   if (aAccessible->IsDoc() && aAccessible->ChildCount() == 0) {
     return;
   }
 
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_WINDOW_STATE_CHANGED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendTextSelectionChangedEvent(AccessibleWrap* aAccessible,
                                                     int32_t aCaretOffset)
 {
   int32_t fromIndex = aCaretOffset;
   int32_t startSel = -1;
@@ -240,17 +240,17 @@ SessionAccessibility::SendTextSelectionC
 
   GECKOBUNDLE_START(eventInfo);
   GECKOBUNDLE_PUT(eventInfo, "fromIndex", java::sdk::Integer::ValueOf(fromIndex));
   GECKOBUNDLE_PUT(eventInfo, "toIndex", java::sdk::Integer::ValueOf(aCaretOffset));
   GECKOBUNDLE_FINISH(eventInfo);
 
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_TEXT_SELECTION_CHANGED,
-    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendTextChangedEvent(AccessibleWrap* aAccessible,
                                            const nsString& aStr,
                                            int32_t aStart,
                                            uint32_t aLen,
                                            bool aIsInsert,
@@ -274,17 +274,17 @@ SessionAccessibility::SendTextChangedEve
   GECKOBUNDLE_PUT(eventInfo, "text", jni::StringParam(text));
   GECKOBUNDLE_PUT(eventInfo, "beforeText", jni::StringParam(beforeText));
   GECKOBUNDLE_PUT(eventInfo, "addedCount", java::sdk::Integer::ValueOf(aIsInsert ? aLen : 0));
   GECKOBUNDLE_PUT(eventInfo, "removedCount", java::sdk::Integer::ValueOf(aIsInsert ? 0 : aLen));
   GECKOBUNDLE_FINISH(eventInfo);
 
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_TEXT_CHANGED,
-    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendTextTraversedEvent(AccessibleWrap* aAccessible,
                                              int32_t aStartOffset,
                                              int32_t aEndOffset)
 {
   nsAutoString text;
@@ -294,26 +294,26 @@ SessionAccessibility::SendTextTraversedE
   GECKOBUNDLE_PUT(eventInfo, "text", jni::StringParam(text));
   GECKOBUNDLE_PUT(eventInfo, "fromIndex", java::sdk::Integer::ValueOf(aStartOffset));
   GECKOBUNDLE_PUT(eventInfo, "toIndex", java::sdk::Integer::ValueOf(aEndOffset));
   GECKOBUNDLE_FINISH(eventInfo);
 
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::
       TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY,
-    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), eventInfo, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendClickedEvent(AccessibleWrap* aAccessible)
 {
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_CLICKED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }
 
 void
 SessionAccessibility::SendSelectedEvent(AccessibleWrap* aAccessible)
 {
   mSessionAccessibility->SendEvent(
     java::sdk::AccessibilityEvent::TYPE_VIEW_SELECTED,
-    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle(true));
+    aAccessible->VirtualViewID(), nullptr, aAccessible->ToBundle());
 }