mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 728284. Don't try to paint an opaque background for widgets that do it themselves. r=roc
This commit is contained in:
parent
ff25496dd5
commit
ff0f226d01
@ -5060,7 +5060,8 @@ void PresShell::UpdateCanvasBackground()
|
||||
nscolor PresShell::ComputeBackstopColor(nsIView* aDisplayRoot)
|
||||
{
|
||||
nsIWidget* widget = aDisplayRoot->GetWidget();
|
||||
if (widget && widget->GetTransparencyMode() != eTransparencyOpaque) {
|
||||
if (widget && (widget->GetTransparencyMode() != eTransparencyOpaque ||
|
||||
widget->WidgetPaintsBackground())) {
|
||||
// Within a transparent widget, so the backstop color must be
|
||||
// totally transparent.
|
||||
return NS_RGBA(0,0,0,0);
|
||||
|
@ -187,6 +187,8 @@ public:
|
||||
static void ScheduleComposite();
|
||||
static void SchedulePauseComposition();
|
||||
static void ScheduleResumeComposition();
|
||||
|
||||
virtual bool WidgetPaintsBackground() { return true; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
@ -118,8 +118,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
|
||||
#endif
|
||||
|
||||
#define NS_IWIDGET_IID \
|
||||
{ 0xb5bb55c7, 0x9a50, 0x4fa8, \
|
||||
{ 0xa7, 0x6e, 0xbd, 0x31, 0x6f, 0x3e, 0x9c, 0x13 } }
|
||||
{ 0x7c7ff2ff, 0x61f9, 0x4240, \
|
||||
{ 0xaa, 0x58, 0x74, 0xb0, 0xcd, 0xa9, 0xe3, 0x05 } }
|
||||
|
||||
/*
|
||||
* Window shadow styles
|
||||
@ -1595,6 +1595,13 @@ class nsIWidget : public nsISupports {
|
||||
*/
|
||||
virtual bool HasGLContext() { return false; }
|
||||
|
||||
/**
|
||||
* Returns true to indicate that this widget paints an opaque background
|
||||
* that we want to be visible under the page, so layout should not force
|
||||
* a default background.
|
||||
*/
|
||||
virtual bool WidgetPaintsBackground() { return false; }
|
||||
|
||||
protected:
|
||||
|
||||
// keep the list of children. We also keep track of our siblings.
|
||||
|
Loading…
Reference in New Issue
Block a user