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