mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- fix restore button on MacOS 10.6 fullscreen (08151078bd)
- Bug 1216580 - Make background-position:fixed clip stealing work with display items that create their own layer. r=mattwoodrow (7760c8ddd8)
- Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical (76e36824f0)
- Bug 1223310 (part 1) - Pass a LayoutDeviceIntPoint instead of an nsIntPoint to InitEvent(). r=kats. (ea95207afe)
- Bug 1223310 (part 2) - Use LayoutDeviceIntRect for bounds-related functions in nsIWidget. r=kats. (4993cccff8)
- Bug 1218552 - Fix GTK drag-and-drop coordinate scaling on HiDPI displays (r=karlt) (d03cf04136)
- fix preprocessing (2f4c1a1c94)
- Bug 1205923: Make VectorImage::GetWidth/GetHeight set outparam to 0 (not -1) on failure, to accomodate callers that don't check error codes. r=seth (487de31340)
- Bug 1212954 - Make BaseSize::IsEmpty return true for negative sizes to avoid NS_ERROR in VectorImage::GetFrameAtSize when root svg doesn't have intrinsic width or height. r=roc (402b154f56)
- fix ordering (ac8483c966)
- Bug 1216056 - Always sent OpRemoveTextureAsync as pending async Messages r=nica (66c9ee8708)
- Bug 121976 - Add a destruction handshake to PCompositable so as to avoid races between messages and the protocol. r=sotaro (636a669e44)
- Bug 1209724 - Cancel ImageBridge proxy functions if they are called too late. r=sotao (5bf81453ef)
- Bug 1221371 - Switch chromium IPC code to use mozilla::Tuple (r=jld,cpearce,kats) (eebcd419e9)
- Bug 1221371 - Remove unused Chromium callback code (r=jld) (3f2e882485)
- Bug 1221368 - Change MakeTuple to decay the types of its arguments (r=froydnj) (bed635f565)
- Bug 1181303. Set composition time earlier so that computing invalid regions works properly. r=mattwoodrow (7a3e41cd96)
- Bug 1150552 - Fix partial present bug with FPS counter. r=mattwoodrow (6e6ae92909)
- Bug 1216287 - Properly invalidate the debug overlay. r=mattwoodrow (60d4f3451a)
- Compute the compositor's damage region before composites, rather than layers updates. (bug 1217560, r=mattwoodrow) (6efcac085b)
- Bug 1216248 - Recomposite when the window overlay changes. r=mattwoodrow (8a8c5ccd07)
- Bug 1224021 - Support fractional async scroll offsets in the reftest harness. r=tn (353f75d3aa)
- Bug 1121072 - Always notify when layers cleared (r=dvander) (aa6ffc67e2)
- Bug 1224403 (part 1) - Make Configuration::mBounds a LayoutDeviceIntRect. r=kats. (7617b9da7e)
- Bug 1224403 (part 2) - Split GetClientOffset() into typed and untyped versions. r=kats. (06916479b1)
- Bug 1224403 (part 3) - Make mNonClientOffset a LayoutDeviceIntMargin. r=kats. (76efba1fb6)
- Bug 1224403 (part 4) - Make {Get,Set}NonClientMargins() return/take aLayoutDeviceIntMargin. r=kats. (99cfc2fdbc)
- Bug 1224403 (part 5) - Make OnDefaultButtonLoaded() return/take a LayoutDeviceIntMargin. r=kats (c402452f97)
- Bug 1224403 (part 6) - Remove one WidgetToScreenOffsetUntyped() call. r=kats. (8e4485a404)
- Bug 1224403 (part 7) - Use LayoutDeviceIntMargin more in IMMHandler. r=kats. (6b5e9124fc)
- Bug 1224403 (part 8) - Use LayoutDeviceIntMargin more in HyperTextAccessible. r=kats. (5bc1a04cc7)
- Bug 1224403 (part 9) - Remove GetRestoredBoundsUntyped(). r=kats. (20e2b28335)
- Bug 1224403 (part 10) - Make nsScreenGonk::GetNaturalBoundsUntyped() typed. r=kats. (9d19986f22)
- Bug 1224403 (part 11) - Remove a GetBoundsUntyped() call. r=kats. (58ce962157)
- Bug 1214267 - Followup to fix missing propagation of 'fixedPositionSides' to the compositor, and add it to the layers dump. r=mattwoodrow (7dc122eb62)
- Use compositor clip rects, not client clip rects, when computing the compositor's backbuffer damage region. (bug 1189159, r=mattwoodrow) (b70d71b1b7)
- Bug 1210784 - Layer tree invalidation with Preserves3D. r=roc (8a7bfa1a22)
- Bug 1166165 - Check if the timestamp is null to prevent assertion. r=nical (189a8d42d0)
- Bug 1137004 - Changed the location of the counter so when it is used in a maximized window it is no longer cut off, and added a little left padding. r=mattwoodrow (140d294445)
- Bug 1222661 - Replace FromUntyped(obj) calls with FromUnknown*(obj). r=nical (b399ccef2e)
- Bug 1216506. Properly initialize min inset box shadow color to black. r=mstange (335259200c)
- Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel. (5aef25158f)
- Bug 1056356 - Allow calling NewRunnableMethod() with a const pointer to the callee object. r=froydnj (145279b91c)
- Bug 1209649. Part 2: Reftest to test box shadows and border radii. r=mstange (9405ccfe23)
- Bug 1211363. Part 2: reftest with int border radius. r=mstange (9edb37635e)
- Bug 1216200. Inset box shadow reftest with negative spread value. r=mstange (8350478107)
- Bug 1211264. Fallback to render dest rect with outer box shadows on non-int transforms. r=mstange (a244775d24)
- Bug 1216200. Correct for negative spread values with inset box shadows. r=mstange (4851e9c792)
- cleanup (1f78332ad8)
- Bug 1213970 - Enable APZ on iOS r=kats (1d170e32e3)
- Bug 1217939 - part 1 - remove nsContentUtils::GetViewportInfo; r=smaug (8c25236851)
- Bug 1217939 - part 2 - move nsContentUtils::GetSelectionBoundingRect to nsLayoutUtils; r=smaug (6beb37157c)
- Bug 1146713 - Don't export NO_PKG_FILES (fix ssltunnel in b2g); r=glandium (a21152c79c)
- Bug 1222323 - Avoid passing extra defines to the compiler from config.mk. r=gps (2d1076d513)
- Bug 1222321 - Avoid the duplication of OS_CPPFLAGS on the compiler command line. r=gps (cf762f1644)
- Bug 1210687 - Separate out jar.mn parsing in a separate class. r=gps (d54cc5576b)
- Bug 1219147 - Use addEntriesToListFile in mozbuild.jar.JarMaker.updateManifest. r=mshal (3cd74ff478)
- Bug 1208160 - Show information when Xcode requires accepting license agreement; r=gps (352bb43d73)
- Bug 1174524 - Make objdir path comparison case-insensitive on Windows. r=mshal (6f74f10845)
- Bug 1158898 - Cache config.guess output; r=mshal (a7b01184fa)
- Bug 1187245 - Make .mozconfig.mk environment variables available to mach valgrind-test. r=gps (2033642ceb)
This commit is contained in:
+34
-38
@@ -1843,7 +1843,7 @@ NS_METHOD nsWindow::SetFocus(bool aRaise)
|
||||
// Return the window's full dimensions in screen coordinates.
|
||||
// If the window has a parent, converts the origin to an offset
|
||||
// of the parent's screen origin.
|
||||
NS_METHOD nsWindow::GetBounds(nsIntRect &aRect)
|
||||
NS_METHOD nsWindow::GetBoundsUntyped(nsIntRect &aRect)
|
||||
{
|
||||
if (mWnd) {
|
||||
RECT r;
|
||||
@@ -1897,7 +1897,7 @@ NS_METHOD nsWindow::GetBounds(nsIntRect &aRect)
|
||||
// adjust for chrome
|
||||
nsWindow* pWidget = static_cast<nsWindow*>(GetParent());
|
||||
if (pWidget && pWidget->IsTopLevelWidget()) {
|
||||
nsIntPoint clientOffset = pWidget->GetClientOffset();
|
||||
LayoutDeviceIntPoint clientOffset = pWidget->GetClientOffset();
|
||||
r.left -= clientOffset.x;
|
||||
r.top -= clientOffset.y;
|
||||
}
|
||||
@@ -1911,15 +1911,15 @@ NS_METHOD nsWindow::GetBounds(nsIntRect &aRect)
|
||||
}
|
||||
|
||||
// Get this component dimension
|
||||
NS_METHOD nsWindow::GetClientBounds(nsIntRect &aRect)
|
||||
NS_METHOD nsWindow::GetClientBoundsUntyped(nsIntRect &aRect)
|
||||
{
|
||||
if (mWnd) {
|
||||
RECT r;
|
||||
VERIFY(::GetClientRect(mWnd, &r));
|
||||
|
||||
nsIntRect bounds;
|
||||
GetBounds(bounds);
|
||||
aRect.MoveTo(bounds.TopLeft() + GetClientOffset());
|
||||
GetBoundsUntyped(bounds);
|
||||
aRect.MoveTo(bounds.TopLeft() + GetClientOffsetUntyped());
|
||||
aRect.width = r.right - r.left;
|
||||
aRect.height = r.bottom - r.top;
|
||||
|
||||
@@ -1930,7 +1930,7 @@ NS_METHOD nsWindow::GetClientBounds(nsIntRect &aRect)
|
||||
}
|
||||
|
||||
// Like GetBounds, but don't offset by the parent
|
||||
NS_METHOD nsWindow::GetScreenBounds(nsIntRect &aRect)
|
||||
NS_METHOD nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
|
||||
{
|
||||
if (mWnd) {
|
||||
RECT r;
|
||||
@@ -1946,7 +1946,7 @@ NS_METHOD nsWindow::GetScreenBounds(nsIntRect &aRect)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::GetRestoredBounds(nsIntRect &aRect)
|
||||
NS_METHOD nsWindow::GetRestoredBounds(LayoutDeviceIntRect &aRect)
|
||||
{
|
||||
if (SizeMode() == nsSizeMode_Normal) {
|
||||
return GetScreenBounds(aRect);
|
||||
@@ -1974,7 +1974,8 @@ NS_METHOD nsWindow::GetRestoredBounds(nsIntRect &aRect)
|
||||
|
||||
// return the x,y offset of the client area from the origin
|
||||
// of the window. If the window is borderless returns (0,0).
|
||||
nsIntPoint nsWindow::GetClientOffset()
|
||||
nsIntPoint
|
||||
nsWindow::GetClientOffsetUntyped()
|
||||
{
|
||||
if (!mWnd) {
|
||||
return nsIntPoint(0, 0);
|
||||
@@ -1996,17 +1997,17 @@ nsWindow::SetDrawsInTitlebar(bool aState)
|
||||
|
||||
if (aState) {
|
||||
// top, right, bottom, left for nsIntMargin
|
||||
nsIntMargin margins(0, -1, -1, -1);
|
||||
LayoutDeviceIntMargin margins(0, -1, -1, -1);
|
||||
SetNonClientMargins(margins);
|
||||
}
|
||||
else {
|
||||
nsIntMargin margins(-1, -1, -1, -1);
|
||||
LayoutDeviceIntMargin margins(-1, -1, -1, -1);
|
||||
SetNonClientMargins(margins);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::GetNonClientMargins(nsIntMargin &margins)
|
||||
nsWindow::GetNonClientMargins(LayoutDeviceIntMargin &margins)
|
||||
{
|
||||
nsWindow * window = GetTopLevelWindow(true);
|
||||
if (window && window != this) {
|
||||
@@ -2281,7 +2282,7 @@ nsWindow::UpdateNonClientMargins(int32_t aSizeMode, bool aReflowWindow)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::SetNonClientMargins(nsIntMargin &margins)
|
||||
nsWindow::SetNonClientMargins(LayoutDeviceIntMargin &margins)
|
||||
{
|
||||
if (!mIsTopWidgetWindow ||
|
||||
mBorderStyle == eBorderStyle_none)
|
||||
@@ -2646,12 +2647,12 @@ void nsWindow::UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion)
|
||||
if (child->IsPlugin()) {
|
||||
// Collect the bounds of all plugins for GetLargestRectangle.
|
||||
nsIntRect childBounds;
|
||||
child->GetBounds(childBounds);
|
||||
child->GetBoundsUntyped(childBounds);
|
||||
pluginBounds.UnionRect(pluginBounds, childBounds);
|
||||
}
|
||||
}
|
||||
|
||||
nsIntRect clientBounds;
|
||||
LayoutDeviceIntRect clientBounds;
|
||||
GetClientBounds(clientBounds);
|
||||
|
||||
// Find the largest rectangle and use that to calculate the inset. Our top
|
||||
@@ -3352,7 +3353,7 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||
**************************************************************/
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::OnDefaultButtonLoaded(const nsIntRect &aButtonRect)
|
||||
nsWindow::OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect)
|
||||
{
|
||||
if (aButtonRect.IsEmpty())
|
||||
return NS_OK;
|
||||
@@ -3375,13 +3376,13 @@ nsWindow::OnDefaultButtonLoaded(const nsIntRect &aButtonRect)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIntRect widgetRect;
|
||||
LayoutDeviceIntRect widgetRect;
|
||||
nsresult rv = GetScreenBounds(widgetRect);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsIntRect buttonRect(aButtonRect + widgetRect.TopLeft());
|
||||
LayoutDeviceIntRect buttonRect(aButtonRect + widgetRect.TopLeft());
|
||||
|
||||
nsIntPoint centerOfButton(buttonRect.x + buttonRect.width / 2,
|
||||
buttonRect.y + buttonRect.height / 2);
|
||||
LayoutDeviceIntPoint centerOfButton(buttonRect.x + buttonRect.width / 2,
|
||||
buttonRect.y + buttonRect.height / 2);
|
||||
// The center of the button can be outside of the widget.
|
||||
// E.g., it could be hidden by scrolling.
|
||||
if (!widgetRect.Contains(centerOfButton)) {
|
||||
@@ -3602,16 +3603,15 @@ nsWindow::GetMaxTouchPoints() const
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
// Event intialization
|
||||
void nsWindow::InitEvent(WidgetGUIEvent& event, nsIntPoint* aPoint)
|
||||
// Event initialization
|
||||
void nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
|
||||
{
|
||||
if (nullptr == aPoint) { // use the point from the event
|
||||
// get the message position in client coordinates
|
||||
if (mWnd != nullptr) {
|
||||
|
||||
DWORD pos = ::GetMessagePos();
|
||||
POINT cpos;
|
||||
|
||||
|
||||
cpos.x = GET_X_LPARAM(pos);
|
||||
cpos.y = GET_Y_LPARAM(pos);
|
||||
|
||||
@@ -3622,11 +3622,9 @@ void nsWindow::InitEvent(WidgetGUIEvent& event, nsIntPoint* aPoint)
|
||||
event.refPoint.x = 0;
|
||||
event.refPoint.y = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// use the point override if provided
|
||||
event.refPoint.x = aPoint->x;
|
||||
event.refPoint.y = aPoint->y;
|
||||
event.refPoint = *aPoint;
|
||||
}
|
||||
|
||||
event.time = ::GetMessageTime();
|
||||
@@ -3836,15 +3834,13 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
|
||||
|
||||
} // switch
|
||||
|
||||
nsIntPoint eventPoint;
|
||||
eventPoint.x = GET_X_LPARAM(lParam);
|
||||
eventPoint.y = GET_Y_LPARAM(lParam);
|
||||
LayoutDeviceIntPoint eventPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
|
||||
WidgetMouseEvent event(true, aEventMessage, this, WidgetMouseEvent::eReal,
|
||||
aIsContextMenuKey ? WidgetMouseEvent::eContextMenuKey :
|
||||
WidgetMouseEvent::eNormal);
|
||||
if (aEventMessage == eContextMenu && aIsContextMenuKey) {
|
||||
nsIntPoint zero(0, 0);
|
||||
LayoutDeviceIntPoint zero(0, 0);
|
||||
InitEvent(event, &zero);
|
||||
} else {
|
||||
InitEvent(event, &eventPoint);
|
||||
@@ -3858,7 +3854,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
|
||||
// convert it to pointer events as well
|
||||
event.convertToPointer = true;
|
||||
|
||||
nsIntPoint mpScreen = eventPoint + WidgetToScreenOffsetUntyped();
|
||||
LayoutDeviceIntPoint mpScreen = eventPoint + WidgetToScreenOffset();
|
||||
|
||||
// Suppress mouse moves caused by widget creation
|
||||
if (aEventMessage == eMouseMove) {
|
||||
@@ -4008,12 +4004,12 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
|
||||
if (nsToolkit::gMouseTrailer && !sIsInMouseCapture) {
|
||||
nsToolkit::gMouseTrailer->SetMouseTrailerWindow(mWnd);
|
||||
}
|
||||
nsIntRect rect;
|
||||
LayoutDeviceIntRect rect;
|
||||
GetBounds(rect);
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
|
||||
if (rect.Contains(LayoutDeviceIntPoint::ToUntyped(event.refPoint))) {
|
||||
if (rect.Contains(event.refPoint)) {
|
||||
if (sCurrentWindow == nullptr || sCurrentWindow != this) {
|
||||
if ((nullptr != sCurrentWindow) && (!sCurrentWindow->mInDtor)) {
|
||||
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
|
||||
@@ -5399,7 +5395,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
touchPoint = gestureinfo->ptsLocation;
|
||||
touchPoint.ScreenToClient(mWnd);
|
||||
WidgetGestureNotifyEvent gestureNotifyEvent(true, eGestureNotify, this);
|
||||
gestureNotifyEvent.refPoint = LayoutDeviceIntPoint::FromUntyped(touchPoint);
|
||||
gestureNotifyEvent.refPoint = LayoutDeviceIntPoint::FromUnknownPoint(touchPoint);
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&gestureNotifyEvent, status);
|
||||
mDisplayPanFeedback = gestureNotifyEvent.displayPanFeedback;
|
||||
@@ -6201,7 +6197,7 @@ bool nsWindow::OnTouch(WPARAM wParam, LPARAM lParam)
|
||||
|
||||
// Initialize the touch data.
|
||||
SingleTouchData touchData(pInputs[i].dwID, // aIdentifier
|
||||
ScreenIntPoint::FromUntyped(touchPoint), // aScreenPoint
|
||||
ScreenIntPoint::FromUnknownPoint(touchPoint), // aScreenPoint
|
||||
/* radius, if known */
|
||||
pInputs[i].dwFlags & TOUCHINPUTMASKF_CONTACTAREA
|
||||
? ScreenSize(
|
||||
@@ -6326,7 +6322,7 @@ nsWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
|
||||
"Configured widget is not a child");
|
||||
nsresult rv = w->SetWindowClipRegion(configuration.mClipRegion, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsIntRect bounds;
|
||||
LayoutDeviceIntRect bounds;
|
||||
w->GetBounds(bounds);
|
||||
if (bounds.Size() != configuration.mBounds.Size()) {
|
||||
w->Resize(configuration.mBounds.x, configuration.mBounds.y,
|
||||
@@ -6343,7 +6339,7 @@ nsWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
|
||||
// plugin window that might be touched by moving content somehow. The
|
||||
// underlying problem should be found and fixed!
|
||||
nsIntRegion r;
|
||||
r.Sub(bounds, configuration.mBounds);
|
||||
r.Sub(bounds.ToUnknownRect(), configuration.mBounds.ToUnknownRect());
|
||||
r.MoveBy(-bounds.x,
|
||||
-bounds.y);
|
||||
nsIntRect toInvalidate = r.GetBounds();
|
||||
|
||||
Reference in New Issue
Block a user