mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to m-i
This commit is contained in:
commit
c13e087d44
@ -212,21 +212,6 @@ var TabsInTitlebar = {
|
||||
}
|
||||
this._sizePlaceholder("caption-buttons", captionButtonsBoxWidth);
|
||||
|
||||
if (!this._draghandles) {
|
||||
this._draghandles = {};
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
||||
|
||||
let mouseDownCheck = function () {
|
||||
return !this._dragBindingAlive && TabsInTitlebar.enabled;
|
||||
};
|
||||
|
||||
this._draghandles.tabsToolbar = new tmp.WindowDraggingElement(tabsToolbar);
|
||||
this._draghandles.tabsToolbar.mouseDownCheck = mouseDownCheck;
|
||||
|
||||
this._draghandles.navToolbox = new tmp.WindowDraggingElement(gNavToolbox);
|
||||
this._draghandles.navToolbox.mouseDownCheck = mouseDownCheck;
|
||||
}
|
||||
} else {
|
||||
document.documentElement.removeAttribute("tabsintitlebar");
|
||||
updateTitlebarDisplay();
|
||||
|
@ -72,10 +72,6 @@ toolbar[customizable="true"] {
|
||||
#toolbar-menubar {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-stub");
|
||||
}
|
||||
|
||||
toolbar[customizable="true"]:not([nowindowdrag="true"]) {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
%endif
|
||||
|
||||
#toolbar-menubar[autohide="true"] {
|
||||
@ -227,10 +223,7 @@ toolbar[customizing] > .overflow-button {
|
||||
|
||||
#titlebar {
|
||||
-moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
-moz-window-dragging: drag;
|
||||
%endif
|
||||
}
|
||||
|
||||
#titlebar-spacer {
|
||||
@ -297,6 +290,11 @@ toolbar[customizing] > .overflow-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar] #TabsToolbar,
|
||||
#main-window[tabsintitlebar] #toolbar-menubar:not([autohide=true]),
|
||||
#main-window[tabsintitlebar] #navigator-toolbox > toolbar:not(#toolbar-menubar):-moz-lwtheme {
|
||||
-moz-window-dragging: drag;
|
||||
}
|
||||
%endif
|
||||
|
||||
%endif
|
||||
@ -359,6 +357,16 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
/* Ensure that empty parts of the bookmarks container can be dragged on OSX, and on other OSes
|
||||
* only when a lwtheme is in use. */
|
||||
%ifdef XP_MACOSX
|
||||
#PlacesToolbarItems {
|
||||
%else
|
||||
#main-window[tabsintitlebar] #PlacesToolbarItems:-moz-lwtheme {
|
||||
%endif
|
||||
-moz-window-dragging: drag;
|
||||
}
|
||||
|
||||
#zoom-controls[cui-areatype="toolbar"]:not([overflowedItem=true]) > #zoom-reset-button > .toolbarbutton-text {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ add_task(function* testLastError() {
|
||||
// checked.
|
||||
for (let api of ["extension", "runtime"]) {
|
||||
let waitForConsole = new Promise(resolve => {
|
||||
SimpleTest.monitorConsole(resolve, [], true);
|
||||
SimpleTest.monitorConsole(resolve, [{message: /Invalid extension ID/, forbid: true}]);
|
||||
});
|
||||
|
||||
yield sendMessage({ checkLastError: api });
|
||||
@ -45,7 +45,7 @@ add_task(function* testLastError() {
|
||||
|
||||
// Check that we do have a console message when lastError is not checked.
|
||||
let waitForConsole = new Promise(resolve => {
|
||||
SimpleTest.monitorConsole(resolve, [/Unchecked lastError value: Invalid extension ID/], true);
|
||||
SimpleTest.monitorConsole(resolve, [{message: /Unchecked lastError value: Error: Invalid extension ID/}]);
|
||||
});
|
||||
|
||||
yield sendMessage({});
|
||||
|
@ -368,13 +368,6 @@
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
/* Make the window draggable by glassed toolbars (bug 555081) */
|
||||
#toolbar-menubar:not([autohide="true"]),
|
||||
#TabsToolbar,
|
||||
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#addon-bar):-moz-lwtheme {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#appcontent:not(:-moz-lwtheme) {
|
||||
background-color: -moz-dialog;
|
||||
}
|
||||
@ -471,11 +464,6 @@
|
||||
background-color: rgb(215,228,242);
|
||||
}
|
||||
|
||||
#toolbar-menubar:not([autohide=true]):not(:-moz-lwtheme),
|
||||
#TabsToolbar:not(:-moz-lwtheme) {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
/* Render a window top border for lwthemes: */
|
||||
#main-window[tabsintitlebar][sizemode="normal"] > #tab-view-deck > #browser-panel:-moz-lwtheme {
|
||||
background-image: linear-gradient(to bottom,
|
||||
|
@ -101,10 +101,6 @@
|
||||
margin-top: var(--space-above-tabbar);
|
||||
}
|
||||
|
||||
#toolbar-menubar:not([autohide="true"]) {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#main-window[customize-entered][tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[customizing-dragovertarget].customization-target::before,
|
||||
#main-window[customize-entered][tabsintitlebar]:not([inFullscreen]) #TabsToolbar[customizing-dragovertarget].customization-target::before,
|
||||
#main-window[customize-entered][tabsintitlebar]:not([inFullscreen]) #toolbar-menubar.customization-target:hover::before,
|
||||
|
@ -260,6 +260,12 @@
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
/* Disable dragging like in the default theme: */
|
||||
#main-window[tabsintitlebar] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):-moz-lwtheme,
|
||||
#main-window[tabsintitlebar] #PlacesToolbarItems:-moz-lwtheme {
|
||||
-moz-window-dragging: no-drag;
|
||||
}
|
||||
|
||||
/* The sidebar header has no background now that the background of the #browser-panel
|
||||
* has no image and is transparent. Fix: */
|
||||
.sidebar-header:-moz-lwtheme,
|
||||
|
@ -16,23 +16,13 @@ DEFINES += -DMOZ_APP_BUILDID=$(MOZ_APP_BUILDID)
|
||||
|
||||
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef MOZ_SOURCE_CHANGESET
|
||||
MOZ_SOURCE_STAMP := $(MOZ_SOURCE_CHANGESET)
|
||||
else
|
||||
MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node}\n' 2>/dev/null))
|
||||
endif
|
||||
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
|
||||
endif
|
||||
|
||||
|
||||
ifdef MOZ_INCLUDE_SOURCE_INFO
|
||||
ifdef MOZ_SOURCE_REPO
|
||||
source_repo := $(MOZ_SOURCE_REPO)
|
||||
else
|
||||
source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
|
||||
endif
|
||||
ifneq (,$(source_repo))
|
||||
DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
|
||||
endif
|
||||
|
17
configure.in
17
configure.in
@ -8713,18 +8713,13 @@ fi
|
||||
# On official builds, we need to know in Telemetry what revision this is built from.
|
||||
# This is e.g. needed to match incoming data to a specific revision of the Histograms.json
|
||||
# file.
|
||||
# External builds (specifically Ubuntu) may drop the hg repo information, so we allow to
|
||||
# explicitly set the repository and changeset information in.
|
||||
if test "$MOZILLA_OFFICIAL"; then
|
||||
if test -z "$MOZ_SOURCE_REPO" && test -z "$MOZ_SOURCE_CHANGESET" && test -d ${_topsrcdir}/.hg; then
|
||||
MOZ_SOURCE_CHANGESET=`cd $_topsrcdir && hg parent --template='{node}'`
|
||||
MOZ_SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'`
|
||||
if test "$MOZILLA_OFFICIAL" && test -d ${_topsrcdir}/.hg; then
|
||||
SOURCE_REV=`cd $_topsrcdir && hg parent --template='{node|short}'`
|
||||
SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'`
|
||||
SOURCE_REV_URL=$SOURCE_REPO/rev/$SOURCE_REV
|
||||
else
|
||||
SOURCE_REV_URL=
|
||||
fi
|
||||
SOURCE_REV_URL=$MOZ_SOURCE_REPO/rev/$MOZ_SOURCE_CHANGESET
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_SOURCE_CHANGESET)
|
||||
AC_SUBST(MOZ_SOURCE_REPO)
|
||||
AC_SUBST(SOURCE_REV_URL)
|
||||
|
||||
AC_SUBST(MOZ_INCLUDE_SOURCE_INFO)
|
||||
|
@ -1181,6 +1181,13 @@ nsDisplayListBuilder::AdjustWindowDraggingRegion(nsIFrame* aFrame)
|
||||
return;
|
||||
}
|
||||
|
||||
const nsStyleUIReset* styleUI = aFrame->StyleUIReset();
|
||||
if (styleUI->mWindowDragging == NS_STYLE_WINDOW_DRAGGING_DEFAULT) {
|
||||
// This frame has the default value and doesn't influence the window
|
||||
// dragging region.
|
||||
return;
|
||||
}
|
||||
|
||||
LayoutDeviceToLayoutDeviceMatrix4x4 referenceFrameToRootReferenceFrame;
|
||||
|
||||
// The const_cast is for nsLayoutUtils::GetTransformToAncestor.
|
||||
@ -1230,16 +1237,23 @@ nsDisplayListBuilder::AdjustWindowDraggingRegion(nsIFrame* aFrame)
|
||||
transformedDevPixelBorderBox.Round();
|
||||
LayoutDeviceIntRect transformedDevPixelBorderBoxInt;
|
||||
if (transformedDevPixelBorderBox.ToIntRect(&transformedDevPixelBorderBoxInt)) {
|
||||
const nsStyleUserInterface* styleUI = aFrame->StyleUserInterface();
|
||||
if (styleUI->mWindowDragging == NS_STYLE_WINDOW_DRAGGING_DRAG) {
|
||||
mWindowDraggingRegion.OrWith(transformedDevPixelBorderBoxInt);
|
||||
} else {
|
||||
mWindowDraggingRegion.SubOut(transformedDevPixelBorderBoxInt);
|
||||
mWindowNoDraggingRegion.OrWith(transformedDevPixelBorderBoxInt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LayoutDeviceIntRegion
|
||||
nsDisplayListBuilder::GetWindowDraggingRegion() const
|
||||
{
|
||||
LayoutDeviceIntRegion result;
|
||||
result.Sub(mWindowDraggingRegion, mWindowNoDraggingRegion);;
|
||||
return result;
|
||||
}
|
||||
|
||||
const uint32_t gWillChangeAreaMultiplier = 3;
|
||||
static uint32_t GetWillChangeCost(const nsSize& aSize) {
|
||||
// There's significant overhead for each layer created from Gecko
|
||||
|
@ -614,11 +614,12 @@ public:
|
||||
* Adjusts mWindowDraggingRegion to take into account aFrame. If aFrame's
|
||||
* -moz-window-dragging value is |drag|, its border box is added to the
|
||||
* collected dragging region; if the value is |no-drag|, the border box is
|
||||
* subtracted from the region.
|
||||
* subtracted from the region; if the value is |default|, that frame does
|
||||
* not influence the window dragging region.
|
||||
*/
|
||||
void AdjustWindowDraggingRegion(nsIFrame* aFrame);
|
||||
|
||||
const LayoutDeviceIntRegion& GetWindowDraggingRegion() { return mWindowDraggingRegion; }
|
||||
LayoutDeviceIntRegion GetWindowDraggingRegion() const;
|
||||
|
||||
/**
|
||||
* Allocate memory in our arena. It will only be freed when this display list
|
||||
@ -1227,6 +1228,7 @@ private:
|
||||
nsRegion mWindowExcludeGlassRegion;
|
||||
nsRegion mWindowOpaqueRegion;
|
||||
LayoutDeviceIntRegion mWindowDraggingRegion;
|
||||
LayoutDeviceIntRegion mWindowNoDraggingRegion;
|
||||
// The display item for the Windows window glass background, if any
|
||||
nsDisplayItem* mGlassDisplayItem;
|
||||
// When encountering inactive layers, we need to hoist scroll info items
|
||||
|
@ -3674,7 +3674,7 @@ CSS_PROP_POSITION(
|
||||
kWidthKTable,
|
||||
offsetof(nsStylePosition, mWidth),
|
||||
eStyleAnimType_Coord)
|
||||
CSS_PROP_USERINTERFACE(
|
||||
CSS_PROP_UIRESET(
|
||||
-moz-window-dragging,
|
||||
_moz_window_dragging,
|
||||
CSS_PROP_DOMPROP_PREFIXED(WindowDragging),
|
||||
|
@ -2116,6 +2116,7 @@ const KTableEntry nsCSSProps::kWidthKTable[] = {
|
||||
};
|
||||
|
||||
const KTableEntry nsCSSProps::kWindowDraggingKTable[] = {
|
||||
{ eCSSKeyword_default, NS_STYLE_WINDOW_DRAGGING_DEFAULT },
|
||||
{ eCSSKeyword_drag, NS_STYLE_WINDOW_DRAGGING_DRAG },
|
||||
{ eCSSKeyword_no_drag, NS_STYLE_WINDOW_DRAGGING_NO_DRAG },
|
||||
{ eCSSKeyword_UNKNOWN, -1 }
|
||||
|
@ -3844,7 +3844,7 @@ nsComputedDOMStyle::DoGetWindowDragging()
|
||||
{
|
||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||
val->SetIdent(
|
||||
nsCSSProps::ValueToKeywordEnum(StyleUserInterface()->mWindowDragging,
|
||||
nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mWindowDragging,
|
||||
nsCSSProps::kWindowDraggingKTable));
|
||||
return val.forget();
|
||||
}
|
||||
|
@ -4863,13 +4863,6 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct,
|
||||
parentUI->mUserFocus,
|
||||
NS_STYLE_USER_FOCUS_NONE, 0, 0, 0, 0);
|
||||
|
||||
// -moz-window-dragging: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForWindowDragging(),
|
||||
ui->mWindowDragging, conditions,
|
||||
SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT,
|
||||
parentUI->mWindowDragging,
|
||||
NS_STYLE_WINDOW_DRAGGING_NO_DRAG, 0, 0, 0, 0);
|
||||
|
||||
COMPUTE_END_INHERITED(UserInterface, ui)
|
||||
}
|
||||
|
||||
@ -4905,6 +4898,13 @@ nsRuleNode::ComputeUIResetData(void* aStartStruct,
|
||||
parentUI->mForceBrokenImageIcon,
|
||||
0, 0, 0, 0, 0);
|
||||
|
||||
// -moz-window-dragging: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForWindowDragging(),
|
||||
ui->mWindowDragging, conditions,
|
||||
SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
|
||||
parentUI->mWindowDragging,
|
||||
NS_STYLE_WINDOW_DRAGGING_DEFAULT, 0, 0, 0, 0);
|
||||
|
||||
// -moz-window-shadow: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForWindowShadow(),
|
||||
ui->mWindowShadow, conditions,
|
||||
|
@ -120,8 +120,9 @@ enum class StyleBoxSizing : uint8_t {
|
||||
#define NS_STYLE_USER_MODIFY_WRITE_ONLY 2
|
||||
|
||||
// -moz-window-dragging
|
||||
#define NS_STYLE_WINDOW_DRAGGING_DRAG 0
|
||||
#define NS_STYLE_WINDOW_DRAGGING_NO_DRAG 1
|
||||
#define NS_STYLE_WINDOW_DRAGGING_DEFAULT 0
|
||||
#define NS_STYLE_WINDOW_DRAGGING_DRAG 1
|
||||
#define NS_STYLE_WINDOW_DRAGGING_NO_DRAG 2
|
||||
|
||||
// box-align
|
||||
#define NS_STYLE_BOX_ALIGN_STRETCH 0
|
||||
|
@ -3789,7 +3789,6 @@ nsStyleUserInterface::nsStyleUserInterface(void)
|
||||
mUserInput = NS_STYLE_USER_INPUT_AUTO;
|
||||
mUserModify = NS_STYLE_USER_MODIFY_READ_ONLY;
|
||||
mUserFocus = NS_STYLE_USER_FOCUS_NONE;
|
||||
mWindowDragging = NS_STYLE_WINDOW_DRAGGING_NO_DRAG;
|
||||
|
||||
mCursor = NS_STYLE_CURSOR_AUTO; // fix for bugzilla bug 51113
|
||||
|
||||
@ -3801,7 +3800,6 @@ nsStyleUserInterface::nsStyleUserInterface(const nsStyleUserInterface& aSource)
|
||||
mUserInput(aSource.mUserInput),
|
||||
mUserModify(aSource.mUserModify),
|
||||
mUserFocus(aSource.mUserFocus),
|
||||
mWindowDragging(aSource.mWindowDragging),
|
||||
mCursor(aSource.mCursor)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsStyleUserInterface);
|
||||
@ -3841,10 +3839,6 @@ nsChangeHint nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aO
|
||||
NS_UpdateHint(hint, nsChangeHint_NeutralChange);
|
||||
}
|
||||
|
||||
if (mWindowDragging != aOther.mWindowDragging) {
|
||||
NS_UpdateHint(hint, nsChangeHint_SchedulePaint);
|
||||
}
|
||||
|
||||
return hint;
|
||||
}
|
||||
|
||||
@ -3873,6 +3867,7 @@ nsStyleUIReset::nsStyleUIReset(void)
|
||||
mUserSelect = NS_STYLE_USER_SELECT_AUTO;
|
||||
mForceBrokenImageIcon = 0;
|
||||
mIMEMode = NS_STYLE_IME_MODE_AUTO;
|
||||
mWindowDragging = NS_STYLE_WINDOW_DRAGGING_DEFAULT;
|
||||
mWindowShadow = NS_STYLE_WINDOW_SHADOW_DEFAULT;
|
||||
}
|
||||
|
||||
@ -3882,6 +3877,7 @@ nsStyleUIReset::nsStyleUIReset(const nsStyleUIReset& aSource)
|
||||
mUserSelect = aSource.mUserSelect;
|
||||
mForceBrokenImageIcon = aSource.mForceBrokenImageIcon;
|
||||
mIMEMode = aSource.mIMEMode;
|
||||
mWindowDragging = aSource.mWindowDragging;
|
||||
mWindowShadow = aSource.mWindowShadow;
|
||||
}
|
||||
|
||||
@ -3903,6 +3899,11 @@ nsChangeHint nsStyleUIReset::CalcDifference(const nsStyleUIReset& aOther) const
|
||||
}
|
||||
if (mUserSelect != aOther.mUserSelect)
|
||||
return NS_STYLE_HINT_VISUAL;
|
||||
|
||||
if (mWindowDragging != aOther.mWindowDragging) {
|
||||
return nsChangeHint_SchedulePaint;
|
||||
}
|
||||
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
|
||||
|
@ -2951,6 +2951,7 @@ struct nsStyleUIReset
|
||||
uint8_t mUserSelect; // [reset] (selection-style)
|
||||
uint8_t mForceBrokenImageIcon; // [reset] (0 if not forcing, otherwise forcing)
|
||||
uint8_t mIMEMode; // [reset]
|
||||
uint8_t mWindowDragging; // [reset]
|
||||
uint8_t mWindowShadow; // [reset]
|
||||
};
|
||||
|
||||
@ -3017,7 +3018,6 @@ struct nsStyleUserInterface
|
||||
uint8_t mUserInput; // [inherited]
|
||||
uint8_t mUserModify; // [inherited] (modify-content)
|
||||
uint8_t mUserFocus; // [inherited] (auto-select)
|
||||
uint8_t mWindowDragging; // [inherited]
|
||||
|
||||
uint8_t mCursor; // [inherited] See nsStyleConsts.h
|
||||
|
||||
|
@ -4434,10 +4434,10 @@ var gCSSProperties = {
|
||||
},
|
||||
"-moz-window-dragging": {
|
||||
domProp: "MozWindowDragging",
|
||||
inherited: true,
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "no-drag" ],
|
||||
other_values: [ "drag" ],
|
||||
initial_values: [ "default" ],
|
||||
other_values: [ "drag", "no-drag" ],
|
||||
invalid_values: [ "none" ]
|
||||
},
|
||||
"align-content": {
|
||||
|
@ -11,21 +11,13 @@ DEFINES += \
|
||||
-DCPPFLAGS='$(CPPFLAGS)' \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_SOURCE_CHANGESET
|
||||
MOZ_SOURCE_STAMP = $(MOZ_SOURCE_CHANGESET)
|
||||
else
|
||||
MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template='{node}\n' 2>/dev/null)
|
||||
endif
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
DEFINES += -DSOURCE_CHANGESET='$(MOZ_SOURCE_STAMP)'
|
||||
endif
|
||||
|
||||
ifdef MOZ_INCLUDE_SOURCE_INFO
|
||||
ifdef MOZ_SOURCE_REPO
|
||||
source_repo = $(MOZ_SOURCE_REPO)
|
||||
else
|
||||
source_repo ?= $(call getSourceRepo)
|
||||
endif
|
||||
ifneq (,$(filter http%,$(source_repo)))
|
||||
DEFINES += -DSOURCE_REPO='$(source_repo)'
|
||||
else ifneq (,$(strip $(source_repo)))
|
||||
|
@ -255,15 +255,16 @@ caption {
|
||||
titlebar,
|
||||
toolbar:not([nowindowdrag="true"]):not([customizing="true"]),
|
||||
statusbar:not([nowindowdrag="true"]),
|
||||
%endif
|
||||
windowdragbox {
|
||||
-moz-window-dragging: drag;
|
||||
}
|
||||
|
||||
/* The list below is non-comprehensive and will probably need some tweaking. */
|
||||
toolbaritem,
|
||||
toolbarbutton,
|
||||
button,
|
||||
textbox,
|
||||
searchbar,
|
||||
tab,
|
||||
radio,
|
||||
splitter,
|
||||
@ -271,7 +272,6 @@ scale,
|
||||
menulist {
|
||||
-moz-window-dragging: no-drag;
|
||||
}
|
||||
%endif
|
||||
|
||||
/******* toolbar *******/
|
||||
|
||||
|
@ -4,17 +4,17 @@
|
||||
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
const USE_HITTEST = /^(win|macosx)/i.test(AppConstants.platform);
|
||||
const HAVE_CSS_WINDOW_DRAG_SUPPORT = ["win", "macosx"].includes(AppConstants.platform);
|
||||
|
||||
this.EXPORTED_SYMBOLS = [ "WindowDraggingElement" ];
|
||||
|
||||
this.WindowDraggingElement = function WindowDraggingElement(elem) {
|
||||
this._elem = elem;
|
||||
this._window = elem.ownerDocument.defaultView;
|
||||
if (HAVE_CSS_WINDOW_DRAG_SUPPORT && !this.isPanel()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (USE_HITTEST && !this.isPanel())
|
||||
this._elem.addEventListener("MozMouseHittest", this, false);
|
||||
else
|
||||
this._elem.addEventListener("mousedown", this, false);
|
||||
};
|
||||
|
||||
@ -57,12 +57,6 @@ WindowDraggingElement.prototype = {
|
||||
},
|
||||
handleEvent: function(aEvent) {
|
||||
let isPanel = this.isPanel();
|
||||
if (USE_HITTEST && !isPanel) {
|
||||
if (this.shouldDrag(aEvent))
|
||||
aEvent.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (aEvent.type) {
|
||||
case "mousedown":
|
||||
if (!this.shouldDrag(aEvent))
|
||||
|
@ -156,21 +156,15 @@ ifndef INCLUDED_RCS_MK
|
||||
include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
|
||||
endif
|
||||
|
||||
ifdef MOZ_SOURCE_CHANGESET
|
||||
MOZ_SOURCE_STAMP = $(MOZ_SOURCE_CHANGESET)
|
||||
else
|
||||
MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node}\n" 2>/dev/null))
|
||||
endif
|
||||
|
||||
###########################################################################
|
||||
# bug: 746277 - preserve existing functionality.
|
||||
# MOZILLA_DIR="": cd $(SPACE); hg # succeeds if ~/.hg exists
|
||||
###########################################################################
|
||||
ifdef MOZ_INCLUDE_SOURCE_INFO
|
||||
ifndef MOZ_SOURCE_REPO
|
||||
MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL))
|
||||
endif
|
||||
endif
|
||||
|
||||
MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
|
||||
MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
|
||||
|
@ -19,21 +19,13 @@ $(call warnIfEmpty,TOOLKIT_EM_VERSION)
|
||||
# Valid if null: {warn,error}IfEmpty
|
||||
DEFINES += -DTOOLKIT_EM_VERSION='"$(TOOLKIT_EM_VERSION)"'
|
||||
|
||||
ifdef MOZ_SOURCE_CHANGESET
|
||||
MOZ_SOURCE_STAMP = $MOZ_SOURCE_CHANGESET
|
||||
else
|
||||
MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template='{node}\n' 2>/dev/null))
|
||||
endif
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
|
||||
INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
|
||||
|
||||
ifdef MOZ_INCLUDE_SOURCE_INFO
|
||||
ifdef MOZ_SOURCE_REPO
|
||||
source_repo = $MOZ_SOURCE_REPO
|
||||
else
|
||||
source_repo := $(call getSourceRepo)
|
||||
endif
|
||||
|
||||
# extra sanity check for old versions of hg, no showconfig support
|
||||
ifneq (,$(filter http%,$(source_repo)))
|
||||
|
@ -5227,20 +5227,13 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
WidgetMouseEvent::eLeftButton :
|
||||
WidgetMouseEvent::eRightButton,
|
||||
MOUSE_INPUT_SOURCE());
|
||||
if (lParam != -1 && !result && mCustomNonClient) {
|
||||
WidgetMouseEvent event(true, eMouseHitTest, this,
|
||||
WidgetMouseEvent::eReal,
|
||||
WidgetMouseEvent::eNormal);
|
||||
event.refPoint = LayoutDeviceIntPoint(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
|
||||
event.inputSource = MOUSE_INPUT_SOURCE();
|
||||
event.mFlags.mOnlyChromeDispatch = true;
|
||||
if (DispatchWindowEvent(&event)) {
|
||||
if (lParam != -1 && !result && mCustomNonClient &&
|
||||
mDraggableRegion.Contains(GET_X_LPARAM(pos), GET_Y_LPARAM(pos))) {
|
||||
// Blank area hit, throw up the system menu.
|
||||
DisplaySystemMenu(mWnd, mSizeMode, mIsRTL, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDBLCLK:
|
||||
@ -5949,25 +5942,12 @@ nsWindow::ClientMarginHitTestPoint(int32_t mx, int32_t my)
|
||||
if (pt.x == mCachedHitTestPoint.x && pt.y == mCachedHitTestPoint.y &&
|
||||
TimeStamp::Now() - mCachedHitTestTime < TimeDuration::FromMilliseconds(HITTEST_CACHE_LIFETIME_MS)) {
|
||||
return mCachedHitTestResult;
|
||||
} else if (mDraggableRegion.Contains(pt.x, pt.y)) {
|
||||
}
|
||||
if (mDraggableRegion.Contains(pt.x, pt.y)) {
|
||||
testResult = HTCAPTION;
|
||||
} else {
|
||||
WidgetMouseEvent event(true, eMouseHitTest, this,
|
||||
WidgetMouseEvent::eReal,
|
||||
WidgetMouseEvent::eNormal);
|
||||
event.refPoint = LayoutDeviceIntPoint(pt.x, pt.y);
|
||||
event.inputSource = MOUSE_INPUT_SOURCE();
|
||||
event.mFlags.mOnlyChromeDispatch = true;
|
||||
bool result = ConvertStatus(DispatchInputEvent(&event));
|
||||
if (result) {
|
||||
// The mouse is over a blank area
|
||||
testResult = testResult == HTCLIENT ? HTCAPTION : testResult;
|
||||
} else {
|
||||
// There's content over the mouse pointer. Set HTCLIENT
|
||||
// to possibly override a resizer border.
|
||||
testResult = HTCLIENT;
|
||||
}
|
||||
}
|
||||
mCachedHitTestPoint = pt;
|
||||
mCachedHitTestTime = TimeStamp::Now();
|
||||
mCachedHitTestResult = testResult;
|
||||
|
Loading…
Reference in New Issue
Block a user