Bug 1088084 - Repair compilation issue with UIABridge. r=jimm
authorLebedev Maksim <Alessarik@gmail.com>
Thu, 23 Oct 2014 08:17:00 +0200
changeset 212232 5a26c66bc295bdf6a18a852f855a67b460a762f8
parent 212231 07e476ab730bc8dbf19ddeed751fc447314ac8ee
child 212233 d48c270e62c97747c1093a620f8e4f14a028be20
push id27702
push userkwierso@gmail.com
push dateFri, 24 Oct 2014 22:05:50 +0000
treeherdermozilla-central@c70f62375f7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1088084
milestone36.0a1
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
Bug 1088084 - Repair compilation issue with UIABridge. r=jimm
widget/windows/winrt/UIABridge.cpp
widget/windows/winrt/UIABridgePrivate.h
--- a/widget/windows/winrt/UIABridge.cpp
+++ b/widget/windows/winrt/UIABridge.cpp
@@ -145,19 +145,19 @@ UIABridge::ClearFocus()
 static void
 DumpChildInfo(nsRefPtr<Accessible>& aChild)
 {
 #ifdef DEBUG
   if (!aChild) {
     return;
   }
   nsString str;
-  aChild->GetName(str);
+  aChild->Name(str);
   BridgeLog("name: %ls", str.BeginReading());
-  aChild->GetDescription(str);
+  aChild->Description(str);
   BridgeLog("description: %ls", str.BeginReading());
 #endif
 }
 
 static bool
 ChildHasFocus(nsRefPtr<Accessible>& aChild)
 {
   BridgeLog("Focus element flags: editable:%d focusable:%d readonly:%d",
@@ -552,25 +552,24 @@ UIATextElement::get_BoundingRectangle(Ui
 {
   LogFunction();
   
   if (!mAccessItem) {
     return UIA_E_ELEMENTNOTAVAILABLE;
   }
 
   // bounds are in physical pixels
-  int32_t docX = 0, docY = 0, docWidth = 0, docHeight = 0;
-  mAccessItem->GetBounds(&docX, &docY, &docWidth, &docHeight);
-  
-  retVal->left = (float)docX;
-  retVal->top = (float)docY;
-  retVal->width = (float)docWidth;
-  retVal->height = (float)docHeight;
+  nsIntRect rect = mAccessItem->Bounds();
 
-  BridgeLog("get_BoundingRectangle: left=%d top=%d right=%d bottom=%d", docX, docY, docX + docWidth, docY + docHeight);
+  retVal->left = rect.x;
+  retVal->top = rect.y;
+  retVal->width = rect.width;
+  retVal->height = rect.height;
+
+  BridgeLog("get_BoundingRectangle: left=%d top=%d right=%d bottom=%d", rect.x, rect.y, rect.x + rect.width, rect.y + rect.height);
   return S_OK;
 }
 
 HRESULT
 UIATextElement::GetEmbeddedFragmentRoots(SAFEARRAY ** retVal)
 {
   *retVal = nullptr;
   return S_OK;
@@ -691,17 +690,16 @@ UIATextElement::GetPropertyValue(PROPERT
 
     case UIA_LocalizedControlTypePropertyId:
     case UIA_LabeledByPropertyId:
       break;
 
     case UIA_HasKeyboardFocusPropertyId:
     {
       if (mAccessItem) {
-        uint32_t state, extraState;
         if (mAccessItem->NativeState() & mozilla::a11y::states::FOCUSED) {
           pRetVal->vt = VT_BOOL;
           pRetVal->boolVal = VARIANT_TRUE;
           return S_OK;
         }
       }
       pRetVal->vt = VT_BOOL;
       pRetVal->boolVal = VARIANT_FALSE;
--- a/widget/windows/winrt/UIABridgePrivate.h
+++ b/widget/windows/winrt/UIABridgePrivate.h
@@ -128,12 +128,12 @@ public:
   IFACEMETHODIMP get_IsReadOnly(BOOL *pRetVal);
 
   void SetIndexID(int id) {
     mIndexID = id;
   }
 
 private:
   int mIndexID;
-  nsRefPtr<Accessible> mAccessItem;
+  nsRefPtr<a11y::Accessible> mAccessItem;
 };
 
 } } }