mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1829006 - Remove unnecessary restriction about opaque scrollable windows. r=dholbert
This comment doesn't make sense any more: * Scrollers don't use native anything. * Extensions can't openDialog themselves anymore. This would allow user CSS to e.g. make PiP windows transparent. An alternative would be to use scrolling="false" on the PiP window, but since the restriction doesn't really seem necessary seems worth removing. Differential Revision: https://phabricator.services.mozilla.com/D175952
This commit is contained in:
parent
caf33ecc17
commit
280ba92800
@ -11825,28 +11825,14 @@ void PresShell::SyncWindowProperties(bool aSync) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply color scheme to the top level window widget.
|
||||
windowWidget->SetColorScheme(
|
||||
Some(LookAndFeel::ColorSchemeForFrame(rootFrame)));
|
||||
|
||||
AutoWeakFrame weak(rootFrame);
|
||||
if (!GetRootScrollContainerFrame()) {
|
||||
// Scrollframes use native widgets which don't work well with
|
||||
// translucent windows, at least in Windows XP. So if the document
|
||||
// has a root scrollrame it's useless to try to make it transparent,
|
||||
// we'll just get something broken.
|
||||
// We can change this to allow translucent toplevel HTML documents
|
||||
// (e.g. to do something like Dashboard widgets), once we
|
||||
// have broad support for translucent scrolled documents, but be
|
||||
// careful because apparently some Firefox extensions expect
|
||||
// openDialog("something.html") to produce an opaque window
|
||||
// even if the HTML doesn't have a background-color set.
|
||||
auto* canvas = GetCanvasFrame();
|
||||
widget::TransparencyMode mode = nsLayoutUtils::GetFrameTransparency(
|
||||
canvas ? canvas : rootFrame, rootFrame);
|
||||
windowWidget->SetTransparencyMode(mode);
|
||||
|
||||
// For macOS, apply color scheme to the top level window widget.
|
||||
windowWidget->SetColorScheme(
|
||||
Some(LookAndFeel::ColorSchemeForFrame(rootFrame)));
|
||||
}
|
||||
|
||||
auto* canvas = GetCanvasFrame();
|
||||
windowWidget->SetTransparencyMode(nsLayoutUtils::GetFrameTransparency(
|
||||
canvas ? canvas : rootFrame, rootFrame));
|
||||
if (!weak.IsAlive()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user