Bug 1423548: Use BaseRect access methods instead of member variables in toolkit/ r?jaws draft
authorMilan Sreckovic <milan@mozilla.com>
Wed, 10 Jan 2018 11:18:49 -0500
changeset 718582 1e7e10c9a855adadec404e48ea48fee474ee6c51
parent 718505 d5f42a23909eb181274731b07e4984bfbd18557d
child 745538 9ca6c1a299663d7be3f8837720f3c3ba8a6d635a
push id94984
push userbmo:milan@mozilla.com
push dateWed, 10 Jan 2018 16:19:09 +0000
reviewersjaws
bugs1423548
milestone59.0a1
Bug 1423548: Use BaseRect access methods instead of member variables in toolkit/ r?jaws MozReview-Commit-ID: ASnjeke9S4D
toolkit/components/browser/nsWebBrowser.cpp
--- a/toolkit/components/browser/nsWebBrowser.cpp
+++ b/toolkit/components/browser/nsWebBrowser.cpp
@@ -1422,26 +1422,26 @@ nsWebBrowser::GetPositionAndSize(int32_t
     }
     if (aCY) {
       *aCY = mInitInfo->cy;
     }
   } else if (mInternalWidget) {
     LayoutDeviceIntRect bounds = mInternalWidget->GetBounds();
 
     if (aX) {
-      *aX = bounds.x;
+      *aX = bounds.X();
     }
     if (aY) {
-      *aY = bounds.y;
+      *aY = bounds.Y();
     }
     if (aCX) {
-      *aCX = bounds.width;
+      *aCX = bounds.Width();
     }
     if (aCY) {
-      *aCY = bounds.height;
+      *aCY = bounds.Height();
     }
     return NS_OK;
   } else {
     // Can directly return this as it is the
     // same interface, thus same returns.
     return mDocShellAsWin->GetPositionAndSize(aX, aY, aCX, aCY);
   }
   return NS_OK;
@@ -1744,18 +1744,18 @@ DrawPaintedLayer(PaintedLayer* aLayer,
                  DrawRegionClip aClip,
                  const nsIntRegion& aRegionToInvalidate,
                  void* aCallbackData)
 {
   DrawTarget& aDrawTarget = *aContext->GetDrawTarget();
 
   ColorPattern color(ToDeviceColor(*static_cast<nscolor*>(aCallbackData)));
   nsIntRect dirtyRect = aRegionToDraw.GetBounds();
-  aDrawTarget.FillRect(
-    Rect(dirtyRect.x, dirtyRect.y, dirtyRect.width, dirtyRect.height), color);
+  aDrawTarget.FillRect( Rect(dirtyRect.X(), dirtyRect.Y(),
+                             dirtyRect.Width(), dirtyRect.Height()), color);
 }
 
 void
 nsWebBrowser::WindowActivated()
 {
 #if defined(DEBUG_smaug)
   nsCOMPtr<nsIDocument> document = mDocShell->GetDocument();
   nsAutoString documentURI;