Bug 1037147 - Purge EOL whitespace. - r=mattwoodrow
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 11 Jul 2014 13:50:23 -0700
changeset 215608 40cdc0d326d734b694d4d310db5c51e6ac436147
parent 215607 f71f64ee925b196f10d687af3c2bf9dd73ee00c0
child 215609 0d237b824f96c1d05466442f068ebc0a7b49fa78
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1037147
milestone33.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 1037147 - Purge EOL whitespace. - r=mattwoodrow
dom/plugins/ipc/PluginInstanceParent.cpp
gfx/layers/ImageContainer.cpp
--- a/dom/plugins/ipc/PluginInstanceParent.cpp
+++ b/dom/plugins/ipc/PluginInstanceParent.cpp
@@ -578,17 +578,17 @@ PluginInstanceParent::RecvShow(const NPR
         RefPtr<MacIOSurface> newIOSurface =
           MacIOSurface::LookupSurface(iodesc.surfaceId(),
                                       iodesc.contentsScaleFactor());
 
         if (!newIOSurface) {
             NS_WARNING("Got bad IOSurfaceDescriptor in RecvShow");
             return false;
         }
-      
+
         if (mFrontIOSurface)
             *prevSurface = IOSurfaceDescriptor(mFrontIOSurface->GetIOSurfaceID(),
                                                mFrontIOSurface->GetContentsScaleFactor());
         else
             *prevSurface = null_t();
 
         mFrontIOSurface = newIOSurface;
 
@@ -619,17 +619,17 @@ PluginInstanceParent::RecvShow(const NPR
         // referencing it.
 #ifdef MOZ_X11
         if (mFrontSurface->GetType() == gfxSurfaceType::Xlib) {
             // Finish with the surface and XSync here to ensure the server has
             // finished operations on the surface before the plugin starts
             // scribbling on it again, or worse, destroys it.
             mFrontSurface->Finish();
             FinishX(DefaultXDisplay());
-        } else 
+        } else
 #endif
         {
             mFrontSurface->Flush();
         }
     }
 
     if (mFrontSurface && gfxSharedImageSurface::IsSharedImage(mFrontSurface))
         *prevSurface = static_cast<gfxSharedImageSurface*>(mFrontSurface.get())->GetShmem();
@@ -692,17 +692,17 @@ PluginInstanceParent::AsyncSetWindow(NPW
     return NS_OK;
 }
 
 nsresult
 PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
 {
 #ifdef XP_MACOSX
     MacIOSurface* ioSurface = nullptr;
-  
+
     if (mFrontIOSurface) {
       ioSurface = mFrontIOSurface;
     } else if (mIOSurface) {
       ioSurface = mIOSurface;
     }
 
     if (!mFrontSurface && !ioSurface)
 #else
@@ -996,34 +996,34 @@ PluginInstanceParent::NPP_SetWindow(cons
 
 #if defined(XP_MACOSX)
     double floatScaleFactor = 1.0;
     mNPNIface->getvalue(mNPP, NPNVcontentsScaleFactor, &floatScaleFactor);
     int scaleFactor = ceil(floatScaleFactor);
     window.contentsScaleFactor = floatScaleFactor;
 
     if (mShWidth != window.width * scaleFactor || mShHeight != window.height * scaleFactor) {
-        if (mDrawingModel == NPDrawingModelCoreAnimation || 
+        if (mDrawingModel == NPDrawingModelCoreAnimation ||
             mDrawingModel == NPDrawingModelInvalidatingCoreAnimation) {
             mIOSurface = MacIOSurface::CreateIOSurface(window.width, window.height,
                                                        floatScaleFactor);
         } else if (uint32_t(mShWidth * mShHeight) !=
                    window.width * scaleFactor * window.height * scaleFactor) {
             if (mShWidth != 0 && mShHeight != 0) {
                 DeallocShmem(mShSurface);
                 mShWidth = 0;
                 mShHeight = 0;
             }
 
             if (window.width != 0 && window.height != 0) {
                 if (!AllocShmem(window.width * scaleFactor * window.height*4 * scaleFactor,
                                 SharedMemory::TYPE_BASIC, &mShSurface)) {
                     PLUGIN_LOG_DEBUG(("Shared memory could not be allocated."));
                     return NPERR_GENERIC_ERROR;
-                } 
+                }
             }
         }
         mShWidth = window.width * scaleFactor;
         mShHeight = window.height * scaleFactor;
     }
 #endif
 
 #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
@@ -1275,31 +1275,31 @@ PluginInstanceParent::NPP_HandleEvent(vo
 #ifdef XP_MACOSX
     if (npevent->type == NPCocoaEventDrawRect) {
         if (mDrawingModel == NPDrawingModelCoreAnimation ||
             mDrawingModel == NPDrawingModelInvalidatingCoreAnimation) {
             if (!mIOSurface) {
                 NS_ERROR("No IOSurface allocated.");
                 return false;
             }
-            if (!CallNPP_HandleEvent_IOSurface(npremoteevent, 
-                                               mIOSurface->GetIOSurfaceID(), 
-                                               &handled)) 
+            if (!CallNPP_HandleEvent_IOSurface(npremoteevent,
+                                               mIOSurface->GetIOSurfaceID(),
+                                               &handled))
                 return false; // no good way to handle errors here...
 
             CGContextRef cgContext = npevent->data.draw.context;
             if (!mShColorSpace) {
                 mShColorSpace = CreateSystemColorSpace();
             }
             if (!mShColorSpace) {
                 PLUGIN_LOG_DEBUG(("Could not allocate ColorSpace."));
                 return false;
             }
             if (cgContext) {
-                nsCARenderer::DrawSurfaceToCGContext(cgContext, mIOSurface, 
+                nsCARenderer::DrawSurfaceToCGContext(cgContext, mIOSurface,
                                                      mShColorSpace,
                                                      npevent->data.draw.x,
                                                      npevent->data.draw.y,
                                                      npevent->data.draw.width,
                                                      npevent->data.draw.height);
             }
             return true;
         } else if (mFrontIOSurface) {
@@ -1307,17 +1307,17 @@ PluginInstanceParent::NPP_HandleEvent(vo
             if (!mShColorSpace) {
                 mShColorSpace = CreateSystemColorSpace();
             }
             if (!mShColorSpace) {
                 PLUGIN_LOG_DEBUG(("Could not allocate ColorSpace."));
                 return false;
             }
             if (cgContext) {
-                nsCARenderer::DrawSurfaceToCGContext(cgContext, mFrontIOSurface, 
+                nsCARenderer::DrawSurfaceToCGContext(cgContext, mFrontIOSurface,
                                                      mShColorSpace,
                                                      npevent->data.draw.x,
                                                      npevent->data.draw.y,
                                                      npevent->data.draw.width,
                                                      npevent->data.draw.height);
             }
             return true;
         } else {
@@ -1325,51 +1325,51 @@ PluginInstanceParent::NPP_HandleEvent(vo
                 PLUGIN_LOG_DEBUG(("NPCocoaEventDrawRect on window of size 0."));
                 return false;
             }
             if (!mShSurface.IsReadable()) {
                 PLUGIN_LOG_DEBUG(("Shmem is not readable."));
                 return false;
             }
 
-            if (!CallNPP_HandleEvent_Shmem(npremoteevent, mShSurface, 
-                                           &handled, &mShSurface)) 
+            if (!CallNPP_HandleEvent_Shmem(npremoteevent, mShSurface,
+                                           &handled, &mShSurface))
                 return false; // no good way to handle errors here...
 
             if (!mShSurface.IsReadable()) {
                 PLUGIN_LOG_DEBUG(("Shmem not returned. Either the plugin crashed "
                                   "or we have a bug."));
                 return false;
             }
 
             char* shContextByte = mShSurface.get<char>();
 
             if (!mShColorSpace) {
                 mShColorSpace = CreateSystemColorSpace();
             }
             if (!mShColorSpace) {
                 PLUGIN_LOG_DEBUG(("Could not allocate ColorSpace."));
                 return false;
-            } 
-            CGContextRef shContext = ::CGBitmapContextCreate(shContextByte, 
-                                    mShWidth, mShHeight, 8, 
-                                    mShWidth*4, mShColorSpace, 
-                                    kCGImageAlphaPremultipliedFirst | 
+            }
+            CGContextRef shContext = ::CGBitmapContextCreate(shContextByte,
+                                    mShWidth, mShHeight, 8,
+                                    mShWidth*4, mShColorSpace,
+                                    kCGImageAlphaPremultipliedFirst |
                                     kCGBitmapByteOrder32Host);
             if (!shContext) {
                 PLUGIN_LOG_DEBUG(("Could not allocate CGBitmapContext."));
                 return false;
             }
 
             CGImageRef shImage = ::CGBitmapContextCreateImage(shContext);
             if (shImage) {
                 CGContextRef cgContext = npevent->data.draw.context;
-     
-                ::CGContextDrawImage(cgContext, 
-                                     CGRectMake(0,0,mShWidth,mShHeight), 
+
+                ::CGContextDrawImage(cgContext,
+                                     CGRectMake(0,0,mShWidth,mShHeight),
                                      shImage);
                 ::CGImageRelease(shImage);
             } else {
                 ::CGContextRelease(shContext);
                 return false;
             }
             ::CGContextRelease(shContext);
             return true;
@@ -1718,17 +1718,17 @@ PluginInstanceParent::AnswerNPN_InitAsyn
             *result = true;
             return true;
         }
 #ifdef XP_WIN
     case NPDrawingModelAsyncWindowsDXGISurface: {
             ID3D10Device1 *device = gfxWindowsPlatform::GetPlatform()->GetD3D10Device();
 
             nsRefPtr<ID3D10Texture2D> texture;
-            
+
             CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, size.width, size.height, 1, 1);
             desc.MiscFlags = D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX;
             desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
             if (FAILED(device->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)))) {
                 *result = false;
                 return true;
             }
 
@@ -1739,17 +1739,17 @@ PluginInstanceParent::AnswerNPN_InitAsyn
             }
 
             HANDLE sharedHandle;
 
             if (FAILED(resource->GetSharedHandle(&sharedHandle))) {
                 *result = false;
                 return true;
             }
-            
+
             surfData->size() = size;
             surfData->data() = sharedHandle;
             surfData->format() = format;
 
             mTextureMap.Put(sharedHandle, texture);
             *result = true;
         }
 #endif
@@ -1793,17 +1793,17 @@ PluginInstanceParent::RecvReleaseDXGISha
 #if defined(OS_WIN)
 
 /*
   plugin focus changes between processes
 
   focus from dom -> child:
     Focus manager calls on widget to set the focus on the window.
     We pick up the resulting wm_setfocus event here, and forward
-    that over ipc to the child which calls set focus on itself. 
+    that over ipc to the child which calls set focus on itself.
 
   focus from child -> focus manager:
     Child picks up the local wm_setfocus and sends it via ipc over
     here. We then post a custom event to widget/windows/nswindow
     which fires off a gui event letting the browser know.
 */
 
 static const wchar_t kPluginInstanceParentProperty[] =
@@ -1849,17 +1849,17 @@ PluginInstanceParent::PluginWindowHookPr
 void
 PluginInstanceParent::SubclassPluginWindow(HWND aWnd)
 {
     NS_ASSERTION(!(mPluginHWND && aWnd != mPluginHWND),
       "PluginInstanceParent::SubclassPluginWindow hwnd is not our window!");
 
     if (!mPluginHWND) {
         mPluginHWND = aWnd;
-        mPluginWndProc = 
+        mPluginWndProc =
             (WNDPROC)::SetWindowLongPtrA(mPluginHWND, GWLP_WNDPROC,
                          reinterpret_cast<LONG_PTR>(PluginWindowHookProc));
         DebugOnly<bool> bRes = ::SetPropW(mPluginHWND, kPluginInstanceParentProperty, this);
         NS_ASSERTION(mPluginWndProc,
           "PluginInstanceParent::SubclassPluginWindow failed to set subclass!");
         NS_ASSERTION(bRes,
           "PluginInstanceParent::SubclassPluginWindow failed to set prop!");
    }
@@ -1881,23 +1881,23 @@ PluginInstanceParent::UnsubclassPluginWi
 
 /* windowless drawing helpers */
 
 /*
  * Origin info:
  *
  * windowless, offscreen:
  *
- * WM_WINDOWPOSCHANGED: origin is relative to container 
+ * WM_WINDOWPOSCHANGED: origin is relative to container
  * setwindow: origin is 0,0
  * WM_PAINT: origin is 0,0
  *
  * windowless, native:
  *
- * WM_WINDOWPOSCHANGED: origin is relative to container 
+ * WM_WINDOWPOSCHANGED: origin is relative to container
  * setwindow: origin is relative to container
  * WM_PAINT: origin is relative to container
  *
  * PluginInstanceParent:
  *
  * painting: mPluginPort (nsIntRect, saved in SetWindow)
  */
 
--- a/gfx/layers/ImageContainer.cpp
+++ b/gfx/layers/ImageContainer.cpp
@@ -244,30 +244,30 @@ uint64_t ImageContainer::GetAsyncContain
 
 bool
 ImageContainer::HasCurrentImage()
 {
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
 
   if (mRemoteData) {
     CrossProcessMutexAutoLock autoLock(*mRemoteDataMutex);
-    
+
     EnsureActiveImage();
 
     return !!mActiveImage.get();
   }
 
   return !!mActiveImage.get();
 }
 
 already_AddRefed<Image>
 ImageContainer::LockCurrentImage()
 {
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
-  
+
   if (mRemoteData) {
     NS_ASSERTION(mRemoteDataMutex, "Should have remote data mutex when having remote data!");
     mRemoteDataMutex->Lock();
   }
 
   EnsureActiveImage();
 
   nsRefPtr<Image> retval = mActiveImage;
@@ -400,23 +400,23 @@ ImageContainer::EnsureActiveImage()
   if (mRemoteData) {
     if (mRemoteData->mWasUpdated) {
       mActiveImage = nullptr;
     }
 
     if (mRemoteData->mType == RemoteImageData::RAW_BITMAP &&
         mRemoteData->mBitmap.mData && !mActiveImage) {
       nsRefPtr<RemoteBitmapImage> newImg = new RemoteBitmapImage();
-      
+
       newImg->mFormat = mRemoteData->mFormat;
       newImg->mData = mRemoteData->mBitmap.mData;
       newImg->mSize = mRemoteData->mSize;
       newImg->mStride = mRemoteData->mBitmap.mStride;
       mRemoteData->mWasUpdated = false;
-              
+
       mActiveImage = newImg;
     }
 #ifdef XP_WIN
     else if (mRemoteData->mType == RemoteImageData::DXGI_TEXTURE_HANDLE &&
              mRemoteData->mTextureHandle && !mActiveImage) {
       nsRefPtr<RemoteDXGITextureImage> newImg = new RemoteDXGITextureImage();
       newImg->mSize = mRemoteData->mSize;
       newImg->mHandle = mRemoteData->mTextureHandle;
@@ -459,20 +459,20 @@ PlanarYCbCrImage::SizeOfExcludingThis(Ma
   size_t size = mBuffer.SizeOfExcludingThis(aMallocSizeOf);
 
   // Could add in the future:
   // - mBackendData (from base class)
 
   return size;
 }
 
-uint8_t* 
+uint8_t*
 PlanarYCbCrImage::AllocateBuffer(uint32_t aSize)
 {
-  return mRecycleBin->GetBuffer(aSize); 
+  return mRecycleBin->GetBuffer(aSize);
 }
 
 static void
 CopyPlane(uint8_t *aDst, const uint8_t *aSrc,
           const gfx::IntSize &aSize, int32_t aStride, int32_t aSkip)
 {
   if (!aSkip) {
     // Fast path: planar input.