Bug 639754 - Remove MOZ_IPC checks since IPC is always built now
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -432,22 +432,20 @@ gfxAndroidPlatform::FindFontsInDirectory
}
}
closedir(d);
}
void
gfxAndroidPlatform::GetFontList(InfallibleTArray<FontListEntry>* retValue)
{
-#ifdef MOZ_IPC
if (XRE_GetProcessType() != GeckoProcessType_Default) {
mozilla::dom::ContentChild::GetSingleton()->SendReadFontList(retValue);
return;
}
-#endif
if (mFontList.Length() > 0) {
*retValue = mFontList;
return;
}
// ANDROID_ROOT is the root of the android system, typically /system
// font files are in /$ANDROID_ROOT/fonts/
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1463,19 +1463,17 @@ nsGfxScrollFrameInner::nsGfxScrollFrameI
, mSkippedScrollbarLayout(PR_FALSE)
, mHadNonInitialReflow(PR_FALSE)
, mHorizontalOverflow(PR_FALSE)
, mVerticalOverflow(PR_FALSE)
, mPostedReflowCallback(PR_FALSE)
, mMayHaveDirtyFixedChildren(PR_FALSE)
, mUpdateScrollbarAttributes(PR_FALSE)
, mCollapsedResizer(PR_FALSE)
-#ifdef MOZ_IPC
, mShouldBuildLayer(PR_FALSE)
-#endif
{
// lookup if we're allowed to overlap the content from the look&feel object
PRBool canOverlap;
nsPresContext* presContext = mOuter->PresContext();
presContext->LookAndFeel()->
GetMetric(nsILookAndFeel::eMetric_ScrollbarsCanOverlapContent, canOverlap);
mScrollbarsCanOverlapContent = canOverlap;
mScrollingActive = IsAlwaysActive();
@@ -1899,21 +1897,17 @@ nsGfxScrollFrameInner::AppendScrollParts
}
}
return rv;
}
PRBool
nsGfxScrollFrameInner::ShouldBuildLayer() const
{
-#ifdef MOZ_IPC
return mShouldBuildLayer;
-#else
- return PR_FALSE;
-#endif
}
nsresult
nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsresult rv = mOuter->DisplayBorderBackgroundOutline(aBuilder, aLists);
@@ -1968,17 +1962,16 @@ nsGfxScrollFrameInner::BuildDisplayList(
// Override the dirty rectangle if the displayport has been set.
nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &dirtyRect);
nsDisplayListCollection set;
nsPresContext* presContext = mOuter->PresContext();
-#ifdef MOZ_IPC
// Since making new layers is expensive, only use nsDisplayScrollLayer
// if the area is scrollable.
//
// Scroll frames can be generated with a scroll range that is 0, 0.
// Furthermore, it is not worth the memory tradeoff to allow asynchronous
// scrolling of small scroll frames. We use an arbitrary minimum scroll
// range of 20 pixels to eliminate many gfx scroll frames from becoming a
// layer.
@@ -2001,17 +1994,16 @@ nsGfxScrollFrameInner::BuildDisplayList(
nsDisplayList list;
rv = mScrolledFrame->BuildDisplayListForStackingContext(
aBuilder, dirtyRect + mOuter->GetOffsetTo(mScrolledFrame), &list);
nsDisplayScrollLayer* layerItem = new (aBuilder) nsDisplayScrollLayer(
aBuilder, &list, mScrolledFrame, mOuter);
set.Content()->AppendNewToTop(layerItem);
} else
-#endif
{
rv = mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, set);
}
NS_ENSURE_SUCCESS(rv, rv);
nsRect clip;
clip = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -318,21 +318,19 @@ public:
// by placing descendant content into its own layer(s)
PRPackedBool mScrollingActive:1;
// If true, scrollbars are stacked on the top of the display list and can
// float above the content as a result
PRPackedBool mScrollbarsCanOverlapContent:1;
// If true, the resizer is collapsed and not displayed
PRPackedBool mCollapsedResizer:1;
-#ifdef MOZ_IPC
// If true, the layer should always be active because we always build a layer.
// Used for asynchronous scrolling.
PRPackedBool mShouldBuildLayer:1;
-#endif
};
/**
* The scroll frame creates and manages the scrolling view
*
* It only supports having a single child frame that typically is an area
* frame, but doesn't have to be. The child frame must have a view, though
*
--- a/toolkit/components/alerts/nsAlertsService.cpp
+++ b/toolkit/components/alerts/nsAlertsService.cpp
@@ -33,21 +33,19 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#ifdef MOZ_IPC
#include "mozilla/dom/ContentChild.h"
#include "nsXULAppAPI.h"
using mozilla::dom::ContentChild;
-#endif
#include "nsAlertsService.h"
#ifdef ANDROID
#include "AndroidBridge.h"
#else
#include "nsISupportsArray.h"
@@ -77,32 +75,30 @@ nsAlertsService::~nsAlertsService()
{}
NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle,
const nsAString & aAlertText, PRBool aAlertTextClickable,
const nsAString & aAlertCookie,
nsIObserver * aAlertListener,
const nsAString & aAlertName)
{
-#ifdef MOZ_IPC
if (XRE_GetProcessType() == GeckoProcessType_Content) {
ContentChild* cpc = ContentChild::GetSingleton();
if (aAlertListener)
cpc->AddRemoteAlertObserver(nsDependentString(aAlertCookie), aAlertListener);
cpc->SendShowAlertNotification(nsAutoString(aImageUrl),
nsAutoString(aAlertTitle),
nsAutoString(aAlertText),
aAlertTextClickable,
nsAutoString(aAlertCookie),
nsAutoString(aAlertName));
return NS_OK;
}
-#endif
#ifdef ANDROID
mozilla::AndroidBridge::Bridge()->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertCookie,
aAlertListener, aAlertName);
return NS_OK;
#else
// Check if there is an optional service that handles system-level notifications
nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));