diff options
-rw-r--r-- | firefox-dev.spec | 12 | ||||
-rw-r--r-- | revert-562138.patch | 290 |
2 files changed, 299 insertions, 3 deletions
diff --git a/firefox-dev.spec b/firefox-dev.spec index 7f5e7e1..d758e92 100644 --- a/firefox-dev.spec +++ b/firefox-dev.spec @@ -31,7 +31,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 4.0 -Release: 0.19.beta10%{?dist} +Release: 0.20.beta10%{?dist} URL: http://www.mozilla.org/projects/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -80,7 +80,7 @@ Patch0: firefox4-version.patch #Patch1: firefox4-jemalloc.patch = xulrunner / firefox4-jemalloc.patch #Patch2: firefox4-build-throw.patch = xulrunner / mozilla-malloc.patch -#Patch30: firefox4-disable-checkupdates.patch +Patch30: revert-562138.patch Patch31: firefox4-default.patch @@ -230,7 +230,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{internal_version}/' %{P:%%PATCH0} \ %endif %patch23 -p1 -b .wmclass -#%patch30 -p1 -b .checkupdates +%patch30 -p1 -b .revert-562138 %patch31 -p1 -b .default %if 0%{?fedora} >= 15 @@ -586,6 +586,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Thu Jan 27 2011 Remi Collet <rpms@famillecollet.com> - 4.0-0.20.beta10 +- latest patch from rawhide + +* Wed Jan 26 2011 Christopher Aillon <caillon@redhat.com> - 2.0-0.18 +- Fix issue with popup windows showing in the wrong place + * Wed Jan 26 2011 Remi Collet <rpms@famillecollet.com> - 4.0-0.19.beta10 - update to 4.0b10 - switch to system cairo on fedora >= 15 only (patches from rawhide) diff --git a/revert-562138.patch b/revert-562138.patch new file mode 100644 index 0000000..cc97d00 --- /dev/null +++ b/revert-562138.patch @@ -0,0 +1,290 @@ +See https://bugzilla.mozilla.org/show_bug.cgi?id=562138#c8 + +# HG changeset patch +# User Markus Stange <mstange@themasta.com> +# Date 1296111298 -3600 +# Node ID 433f39574cd72d30e47e6500fad52a0398753367 +# Parent f948c56cb86f83354f0bd9d579cd51167464b4f2 +Backed out changeset f948c56cb86f (bug 562138 part 2) because it depends on changeset 44c42d8b8d08 which is going to be backed out. + +diff --git a/widget/src/cocoa/nsCocoaWindow.h b/widget/src/cocoa/nsCocoaWindow.h +--- a/widget/src/cocoa/nsCocoaWindow.h ++++ b/widget/src/cocoa/nsCocoaWindow.h +@@ -291,17 +291,16 @@ public: + NS_IMETHOD ResetInputState(); + + NS_IMETHOD BeginSecureKeyboardInput(); + NS_IMETHOD EndSecureKeyboardInput(); + + static void UnifiedShading(void* aInfo, const CGFloat* aIn, CGFloat* aOut); + + void SetPopupWindowLevel(); +- PRBool IsVisible(); + + PRBool IsChildInFailingLeftClickThrough(NSView *aChild); + PRBool ShouldFocusPlugin(); + + NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); + protected: + + nsresult CreateNativeWindow(const NSRect &aRect, +@@ -335,14 +334,13 @@ protected: + PRInt32 mShadowStyle; + NSUInteger mWindowFilter; + + PRPackedBool mWindowMadeHere; // true if we created the window, false for embedding + PRPackedBool mSheetNeedsShow; // if this is a sheet, are we waiting to be shown? + // this is used for sibling sheet contention only + PRPackedBool mFullScreen; + PRPackedBool mModal; +- PRPackedBool mIsShowing; // PR_TRUE during a Show(PR_TRUE) call. + + PRInt32 mNumModalDescendents; + }; + + #endif // nsCocoaWindow_h_ +diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm +--- a/widget/src/cocoa/nsCocoaWindow.mm ++++ b/widget/src/cocoa/nsCocoaWindow.mm +@@ -143,17 +143,16 @@ nsCocoaWindow::nsCocoaWindow() + , mSheetWindowParent(nil) + , mPopupContentView(nil) + , mShadowStyle(NS_STYLE_WINDOW_SHADOW_DEFAULT) + , mWindowFilter(0) + , mWindowMadeHere(PR_FALSE) + , mSheetNeedsShow(PR_FALSE) + , mFullScreen(PR_FALSE) + , mModal(PR_FALSE) +-, mIsShowing(PR_FALSE) + , mNumModalDescendents(0) + { + + } + + void nsCocoaWindow::DestroyNativeWindow() + { + NS_OBJC_BEGIN_TRY_ABORT_BLOCK; +@@ -528,30 +527,24 @@ void* nsCocoaWindow::GetNativeData(PRUin + break; + } + + return retVal; + + NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL; + } + +-PRBool +-nsCocoaWindow::IsVisible() +-{ +- NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; +- +- return [mWindow isVisible] || mSheetNeedsShow || mIsShowing; +- +- NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE); +-} +- + NS_IMETHODIMP nsCocoaWindow::IsVisible(PRBool & aState) + { +- aState = IsVisible(); ++ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; ++ ++ aState = ([mWindow isVisible] || mSheetNeedsShow); + return NS_OK; ++ ++ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; + } + + NS_IMETHODIMP nsCocoaWindow::SetModal(PRBool aState) + { + // This is used during startup (outside the event loop) when creating + // the add-ons compatibility checking dialog and the profile manager UI; + // therefore, it needs to provide an autorelease pool to avoid cocoa + // objects leaking. +@@ -626,42 +619,29 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(PR + + // Hide or show this window + NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState) + { + NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; + + // We need to re-execute sometimes in order to bring already-visible + // windows forward. +- if (!bState && !IsVisible()) ++ if (!mSheetNeedsShow && !bState && ![mWindow isVisible]) + return NS_OK; + + nsIWidget* parentWidget = mParent; + nsCOMPtr<nsPIWidgetCocoa> piParentWidget(do_QueryInterface(parentWidget)); + NSWindow* nativeParentWindow = (parentWidget) ? + (NSWindow*)parentWidget->GetNativeData(NS_NATIVE_WINDOW) : nil; + + if (bState && !mBounds.IsEmpty()) { +- // IsVisible can be entered from inside this method, for example through +- // synchronous painting. Unfortunately, at that point [mWindow isVisible] +- // still returns NO, so we use mIsShowing to tell us that we should return +- // true from IsVisible anyway. +- mIsShowing = PR_TRUE; +- +- if (mPopupContentView) { +- // Ensure our content view is visible. We never need to hide it. +- mPopupContentView->Show(PR_TRUE); +- } +- + if (mWindowType == eWindowType_sheet) { + // bail if no parent window (its basically what we do in Carbon) +- if (!nativeParentWindow || !piParentWidget) { +- mIsShowing = PR_FALSE; ++ if (!nativeParentWindow || !piParentWidget) + return NS_ERROR_FAILURE; +- } + + NSWindow* topNonSheetWindow = nativeParentWindow; + + // If this sheet is the child of another sheet, hide the parent so that + // this sheet can be displayed. Leave the parent mSheetNeedsShow alone, + // that is only used to handle sibling sheet contention. The parent will + // return once there are no more child sheets. + PRBool parentIsSheet = PR_FALSE; +@@ -744,17 +724,16 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool + } + else { + [mWindow setAcceptsMouseMovedEvents:YES]; + NS_OBJC_BEGIN_TRY_LOGONLY_BLOCK; + [mWindow makeKeyAndOrderFront:nil]; + NS_OBJC_END_TRY_LOGONLY_BLOCK; + SendSetZLevelEvent(); + } +- mIsShowing = PR_FALSE; + } + else { + // roll up any popups if a top-level window is going away + if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) + RollUpPopups(); + + // now get rid of the window/sheet + if (mWindowType == eWindowType_sheet) { +@@ -850,16 +829,19 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool + if ([mWindow isKindOfClass:[PopupWindow class]] && + [(PopupWindow*) mWindow isContextMenu]) { + [[NSDistributedNotificationCenter defaultCenter] + postNotificationName:@"com.apple.HIToolbox.endMenuTrackingNotification" + object:@"org.mozilla.gecko.PopupWindow"]; + } + } + } ++ ++ if (mPopupContentView) ++ mPopupContentView->Show(bState); + + return NS_OK; + + NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; + } + + struct ShadowParams { + float standardDeviation; + + +# HG changeset patch +# User Markus Stange <mstange@themasta.com> +# Date 1296111382 -3600 +# Node ID 2cfc443d28ee87835e17b665d41be3a6fb0dca23 +# Parent 44c42d8b8d087ed22c02ffe90f7d23f84ee8abbb +Backed out changeset 44c42d8b8d08 (bug 562138 part 1) because it caused bug 627824 and bug 628861. + +diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp +--- a/view/src/nsView.cpp ++++ b/view/src/nsView.cpp +@@ -433,63 +433,51 @@ nsIntRect nsIView::CalcWidgetBounds(nsWi + void nsView::DoResetWidgetBounds(PRBool aMoveOnly, + PRBool aInvalidateChangedSize) { + // The geometry of a root view's widget is controlled externally, + // NOT by sizing or positioning the view + if (mViewManager->GetRootView() == this) { + return; + } + +- NS_PRECONDITION(mWindow, "Why was this called??"); +- + nsIntRect curBounds; + mWindow->GetBounds(curBounds); + + nsWindowType type; + mWindow->GetWindowType(type); + + if (curBounds.IsEmpty() && mDimBounds.IsEmpty() && type == eWindowType_popup) { + // Don't manipulate empty popup widgets. For example there's no point + // moving hidden comboboxes around, or doing X server roundtrips + // to compute their true screen position. This could mean that WidgetToScreen + // operations on these widgets don't return up-to-date values, but popup + // positions aren't reliable anyway because of correction to be on or off-screen. + return; + } + ++ NS_PRECONDITION(mWindow, "Why was this called??"); ++ + nsIntRect newBounds = CalcWidgetBounds(type); + + PRBool changedPos = curBounds.TopLeft() != newBounds.TopLeft(); + PRBool changedSize = curBounds.Size() != newBounds.Size(); + +- PRBool curVisibility; +- mWindow->IsVisible(curVisibility); +- PRBool newVisibility = IsEffectivelyVisible(); +- +- if (curVisibility && !newVisibility) { +- mWindow->Show(PR_FALSE); +- } +- + // Child views are never attached to top level widgets, this is safe. + if (changedPos) { + if (changedSize && !aMoveOnly) { + mWindow->Resize(newBounds.x, newBounds.y, newBounds.width, newBounds.height, + aInvalidateChangedSize); + } else { + mWindow->Move(newBounds.x, newBounds.y); + } + } else { + if (changedSize && !aMoveOnly) { + mWindow->Resize(newBounds.width, newBounds.height, aInvalidateChangedSize); + } // else do nothing! + } +- +- if (!curVisibility && newVisibility) { +- mWindow->Show(PR_TRUE); +- } + } + + void nsView::SetDimensions(const nsRect& aRect, PRBool aPaint, PRBool aResizeWidget) + { + nsRect dims = aRect; + dims.MoveBy(mPosX, mPosY); + + // Don't use nsRect's operator== here, since it returns true when +@@ -511,17 +499,23 @@ void nsView::NotifyEffectiveVisibilityCh + { + if (!aEffectivelyVisible) + { + DropMouseGrabbing(); + } + + if (nsnull != mWindow) + { +- ResetWidgetBounds(PR_FALSE, PR_TRUE, PR_FALSE); ++ if (aEffectivelyVisible) ++ { ++ DoResetWidgetBounds(PR_FALSE, PR_TRUE); ++ mWindow->Show(PR_TRUE); ++ } ++ else ++ mWindow->Show(PR_FALSE); + } + + for (nsView* child = mFirstChild; child; child = child->mNextSibling) { + if (child->mVis == nsViewVisibility_kHide) { + // It was effectively hidden and still is + continue; + } + // Our child is visible if we are + + |