mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229237 (part 5) - Make Update{Opaque,WindowDragging}Region() take a LayoutDeviceIntRegion. r=botond.
This commit is contained in:
parent
7bb1055535
commit
2d25720ee9
@ -3439,11 +3439,10 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
||||
nsRegion opaqueRegion;
|
||||
opaqueRegion.And(builder.GetWindowExcludeGlassRegion(), builder.GetWindowOpaqueRegion());
|
||||
widget->UpdateOpaqueRegion(
|
||||
opaqueRegion.ToNearestPixels(presContext->AppUnitsPerDevPixel()));
|
||||
LayoutDeviceIntRegion::FromUnknownRegion(
|
||||
opaqueRegion.ToNearestPixels(presContext->AppUnitsPerDevPixel())));
|
||||
|
||||
const nsIntRegion& draggingRegion =
|
||||
builder.GetWindowDraggingRegion().ToUnknownRegion();
|
||||
widget->UpdateWindowDraggingRegion(draggingRegion);
|
||||
widget->UpdateWindowDraggingRegion(builder.GetWindowDraggingRegion());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ public:
|
||||
|
||||
virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) override;
|
||||
|
||||
virtual void UpdateWindowDraggingRegion(const nsIntRegion& aRegion) override;
|
||||
virtual void UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) override;
|
||||
const LayoutDeviceIntRegion& GetDraggableRegion() { return mDraggableRegion; }
|
||||
|
||||
virtual void ReportSwipeStarted(uint64_t aInputBlockId, bool aStartSwipe) override;
|
||||
|
@ -2713,12 +2713,10 @@ nsChildView::DoRemoteComposition(const LayoutDeviceIntRect& aRenderRect)
|
||||
}
|
||||
|
||||
void
|
||||
nsChildView::UpdateWindowDraggingRegion(const nsIntRegion& aRegion)
|
||||
nsChildView::UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion)
|
||||
{
|
||||
LayoutDeviceIntRegion region =
|
||||
LayoutDeviceIntRegion::FromUnknownRegion(aRegion);
|
||||
if (mDraggableRegion != region) {
|
||||
mDraggableRegion = region;
|
||||
if (mDraggableRegion != aRegion) {
|
||||
mDraggableRegion = aRegion;
|
||||
[(ChildView*)mView updateWindowDraggableState];
|
||||
}
|
||||
}
|
||||
|
@ -1296,12 +1296,12 @@ class nsIWidget : public nsISupports {
|
||||
*
|
||||
* @param aOpaqueRegion the region of the window that is opaque.
|
||||
*/
|
||||
virtual void UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion) {}
|
||||
virtual void UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion) {}
|
||||
|
||||
/**
|
||||
* Informs the widget about the region of the window that is draggable.
|
||||
*/
|
||||
virtual void UpdateWindowDraggingRegion(const nsIntRegion& aRegion) {}
|
||||
virtual void UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) {}
|
||||
|
||||
/**
|
||||
* Tells the widget whether the given input block results in a swipe.
|
||||
|
@ -2653,7 +2653,7 @@ void nsWindow::SetTransparencyMode(nsTransparencyMode aMode)
|
||||
GetTopLevelWindow(true)->SetWindowTranslucencyInner(aMode);
|
||||
}
|
||||
|
||||
void nsWindow::UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion)
|
||||
void nsWindow::UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion)
|
||||
{
|
||||
if (!HasGlass() || GetParent())
|
||||
return;
|
||||
@ -2679,7 +2679,7 @@ void nsWindow::UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion)
|
||||
// Find the largest rectangle and use that to calculate the inset. Our top
|
||||
// priority is to include the bounds of all plugins.
|
||||
LayoutDeviceIntRect largest =
|
||||
LayoutDeviceIntRegion::FromUnknownRegion(aOpaqueRegion).GetLargestRectangle(pluginBounds);
|
||||
aOpaqueRegion.GetLargestRectangle(pluginBounds);
|
||||
margins.cxLeftWidth = largest.x;
|
||||
margins.cxRightWidth = clientBounds.width - largest.XMost();
|
||||
margins.cyBottomHeight = clientBounds.height - largest.YMost();
|
||||
@ -2709,7 +2709,7 @@ void nsWindow::UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion)
|
||||
**************************************************************/
|
||||
|
||||
void
|
||||
nsWindow::UpdateWindowDraggingRegion(const nsIntRegion& aRegion)
|
||||
nsWindow::UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion)
|
||||
{
|
||||
if (mDraggableRegion != aRegion) {
|
||||
mDraggableRegion = aRegion;
|
||||
|
@ -191,7 +191,7 @@ public:
|
||||
#ifdef MOZ_XUL
|
||||
virtual void SetTransparencyMode(nsTransparencyMode aMode);
|
||||
virtual nsTransparencyMode GetTransparencyMode();
|
||||
virtual void UpdateOpaqueRegion(const nsIntRegion& aOpaqueRegion);
|
||||
virtual void UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion);
|
||||
#endif // MOZ_XUL
|
||||
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
|
||||
NS_IMETHOD GetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
|
||||
@ -199,7 +199,7 @@ public:
|
||||
void SetDrawsInTitlebar(bool aState);
|
||||
already_AddRefed<mozilla::gfx::DrawTarget> StartRemoteDrawing() override;
|
||||
virtual void EndRemoteDrawing() override;
|
||||
virtual void UpdateWindowDraggingRegion(const nsIntRegion& aRegion) override;
|
||||
virtual void UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) override;
|
||||
|
||||
virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) override;
|
||||
virtual uint32_t GetMaxTouchPoints() const override;
|
||||
@ -533,7 +533,7 @@ protected:
|
||||
nsCOMPtr<nsIIdleServiceInternal> mIdleService;
|
||||
|
||||
// Draggable titlebar region maintained by UpdateWindowDraggingRegion
|
||||
nsIntRegion mDraggableRegion;
|
||||
LayoutDeviceIntRegion mDraggableRegion;
|
||||
|
||||
// Hook Data Memebers for Dropdowns. sProcessHook Tells the
|
||||
// hook methods whether they should be processing the hook
|
||||
|
Loading…
Reference in New Issue
Block a user