зеркало из https://github.com/mozilla/gecko-dev.git
Bug 539356 - Part 22 - Force a background color when running android reftests. r=roc
This commit is contained in:
Родитель
3ea3ebe3ad
Коммит
31c89114da
|
@ -260,6 +260,10 @@ function InitAndStartRefTests()
|
|||
} catch(e) {
|
||||
gDumpLog("REFTEST TEST-UNEXPECTED-FAIL | | EXCEPTION: " + e + "\n");
|
||||
}
|
||||
|
||||
try {
|
||||
prefs.setBoolPref("android.widget_paints_background", false);
|
||||
} catch (e) {}
|
||||
|
||||
/* set the gLoadTimeout */
|
||||
try {
|
||||
|
|
|
@ -98,7 +98,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
|||
// (except here at least TextSelectBackground and TextSelectForeground)
|
||||
// The CSS2 colors below are used.
|
||||
case eColorID_WindowBackground:
|
||||
aColor = mSystemColors.colorBackground;
|
||||
aColor = NS_RGB(0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
case eColorID_WindowForeground:
|
||||
aColor = mSystemColors.textColorPrimary;
|
||||
|
|
|
@ -2247,6 +2247,10 @@ nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect)
|
|||
|
||||
AndroidGeckoLayerClient& client = AndroidBridge::Bridge()->GetLayerClient();
|
||||
if (!client.CreateFrame(&jniFrame, mLayerRendererFrame)) return;
|
||||
|
||||
if (!WidgetPaintsBackground())
|
||||
return;
|
||||
|
||||
if (!client.ActivateProgram(&jniFrame)) return;
|
||||
if (!mLayerRendererFrame.BeginDrawing(&jniFrame)) return;
|
||||
if (!mLayerRendererFrame.DrawBackground(&jniFrame)) return;
|
||||
|
@ -2316,5 +2320,21 @@ nsWindow::ScheduleResumeComposition(int width, int height)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
nsWindow::WidgetPaintsBackground()
|
||||
{
|
||||
static bool sWidgetPaintsBackground = true;
|
||||
static bool sWidgetPaintsBackgroundPrefCached = false;
|
||||
|
||||
if (!sWidgetPaintsBackgroundPrefCached) {
|
||||
sWidgetPaintsBackgroundPrefCached = true;
|
||||
mozilla::Preferences::AddBoolVarCache(&sWidgetPaintsBackground,
|
||||
"android.widget_paints_background",
|
||||
true);
|
||||
}
|
||||
|
||||
return sWidgetPaintsBackground;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ public:
|
|||
static void SchedulePauseComposition();
|
||||
static void ScheduleResumeComposition(int width, int height);
|
||||
|
||||
virtual bool WidgetPaintsBackground() { return true; }
|
||||
virtual bool WidgetPaintsBackground();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
|
Загрузка…
Ссылка в новой задаче