[xulrunner] Fixed 813997 patch

Jan Horak xhorak at fedoraproject.org
Fri Dec 7 16:15:34 UTC 2012


commit 7b291c742e272d2226e49f457253f38d53266135
Author: Jan Horak <jhorak at redhat.com>
Date:   Fri Dec 7 17:15:28 2012 +0100

    Fixed 813997 patch

 mozilla-813997.patch |   83 ++++++-------------------------------------------
 xulrunner.spec       |    2 +-
 2 files changed, 12 insertions(+), 73 deletions(-)
---
diff --git a/mozilla-813997.patch b/mozilla-813997.patch
index c720789..0f63a8d 100644
--- a/mozilla-813997.patch
+++ b/mozilla-813997.patch
@@ -2,15 +2,10 @@
 # Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29
 b=813997 keep window max size to 16 bits r?roc
 
-diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
---- a/widget/gtk2/nsWindow.cpp
-+++ b/widget/gtk2/nsWindow.cpp
-@@ -359,16 +359,17 @@ nsWindow::nsWindow()
-     mWindowGroup         = nullptr;
-     mHasMappedToplevel   = false;
-     mIsFullyObscured     = false;
-     mRetryPointerGrab    = false;
-     mTransientParent     = nullptr;
+diff -up mozilla-release/widget/gtk2/nsWindow.cpp.813997 mozilla-release/widget/gtk2/nsWindow.cpp
+--- mozilla-release/widget/gtk2/nsWindow.cpp.813997	2012-11-29 05:44:34.000000000 +0100
++++ mozilla-release/widget/gtk2/nsWindow.cpp	2012-12-07 15:41:02.166873611 +0100
+@@ -358,6 +358,7 @@ nsWindow::nsWindow()
      mWindowType          = eWindowType_child;
      mSizeState           = nsSizeMode_Normal;
      mLastSizeMode        = nsSizeMode_Normal;
@@ -18,17 +13,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
  
  #ifdef MOZ_X11
      mOldFocusWindow      = 0;
- #endif /* MOZ_X11 */
-     mPluginType          = PluginType_NONE;
- 
-     if (!gGlobalsInitialized) {
-         gGlobalsInitialized = true;
-@@ -933,29 +934,30 @@ nsWindow::ConstrainPosition(bool aAllowS
-                 *aY = screenHeight - mBounds.height;
-         }
-     }
-     return NS_OK;
- }
+@@ -925,19 +926,20 @@ nsWindow::ConstrainPosition(bool aAllowS
  
  void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints)
  {
@@ -43,11 +28,10 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
 -    gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr,
 -                                  &geometry, GdkWindowHints(hints));
 -  }
--
--  nsBaseWidget::SetSizeConstraints(aConstraints);
 +    mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize);
 +    mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize);
-+
+ 
+-  nsBaseWidget::SetSizeConstraints(aConstraints);
 +    if (mShell) {
 +        GdkGeometry geometry;
 +        geometry.min_width = mSizeConstraints.mMinSize.width;
@@ -62,17 +46,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
  }
  
  NS_IMETHODIMP
- nsWindow::Show(bool aState)
- {
-     if (aState == mIsShown)
-         return NS_OK;
- 
-@@ -1012,17 +1014,17 @@ NS_IMETHODIMP
- nsWindow::Resize(int32_t aWidth, int32_t aHeight, bool aRepaint)
- {
-     ConstrainSize(&aWidth, &aHeight);
- 
-     // For top-level windows, aWidth and aHeight should possibly be
+@@ -1004,7 +1006,7 @@ nsWindow::Resize(int32_t aWidth, int32_t
      // interpreted as frame bounds, but NativeResize treats these as window
      // bounds (Bug 581866).
  
@@ -81,17 +55,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
  
      if (!mCreated)
          return NS_OK;
- 
-     // There are several cases here that we need to handle, based on a
-     // matrix of the visibility of the widget, the sanity of this resize
-     // and whether or not the widget was previously sane.
- 
-@@ -1087,17 +1089,17 @@ nsWindow::Resize(int32_t aWidth, int32_t
- NS_IMETHODIMP
- nsWindow::Resize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight,
-                        bool aRepaint)
- {
-     ConstrainSize(&aWidth, &aHeight);
+@@ -1080,7 +1082,7 @@ nsWindow::Resize(int32_t aX, int32_t aY,
  
      mBounds.x = aX;
      mBounds.y = aY;
@@ -100,17 +64,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
  
      mNeedsMove = true;
  
-     if (!mCreated)
-         return NS_OK;
- 
-     // There are several cases here that we need to handle, based on a
-     // matrix of the visibility of the widget, the sanity of this resize
-@@ -3365,16 +3367,17 @@ nsWindow::Create(nsIWidget        *aPare
-     if (aNativeParent || (aInitData && aInitData->mListenForResizes))
-         listenForResizes = true;
- 
-     // and do our common creation
-     CommonCreate(aParent, listenForResizes);
+@@ -3373,6 +3375,7 @@ nsWindow::Create(nsIWidget        *aPare
  
      // save our bounds
      mBounds = aRect;
@@ -118,17 +72,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
  
      // figure out our parent window
      GtkWidget      *parentMozContainer = nullptr;
-     GtkContainer   *parentGtkContainer = nullptr;
-     GdkWindow      *parentGdkWindow = nullptr;
-     GtkWindow      *topLevelParent = nullptr;
-     nsWindow       *parentnsWindow = nullptr;
-     GtkWidget      *eventWidget = nullptr;
-@@ -3971,24 +3974,26 @@ nsWindow::SetHasMappedToplevel(bool aSta
-             child->SetHasMappedToplevel(aState);
-         }
-     }
- }
- 
+@@ -3964,14 +3967,16 @@ nsWindow::SetHasMappedToplevel(bool aSta
  nsIntSize
  nsWindow::GetSafeWindowSize(nsIntSize aSize)
  {
@@ -147,8 +91,3 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
          result.height = kInt16Max;
      }
      return result;
- }
- 
- void
- nsWindow::EnsureGrabs(void)
- {
diff --git a/xulrunner.spec b/xulrunner.spec
index 7390bf7..040f2e2 100644
--- a/xulrunner.spec
+++ b/xulrunner.spec
@@ -229,7 +229,7 @@ cd %{tarballdir}
 %patch20 -p2 -b .pk
 
 %patch49 -p2 -b .746112
-%patch50 -p1 -b 813997
+%patch50 -p1 -b .813997
 
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig


More information about the scm-commits mailing list