mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 817820 - Change cursor to reflect that middle-click scrolling (autoscroll) is active. r=mbrubeck
This commit is contained in:
parent
f8777270e3
commit
a6a03481c6
@ -51,6 +51,8 @@
|
||||
this.removeEventListener("pageshow", this.onPageShow, true);
|
||||
this.removeEventListener("pagehide", this.onPageHide, true);
|
||||
this.removeEventListener("DOMPopupBlocked", this.onPopupBlocked, true);
|
||||
|
||||
this.setAttribute("autoscrollpopup", "autoscrollerid");
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
|
37
browser/metro/base/content/bindings/popup.xml
Normal file
37
browser/metro/base/content/bindings/popup.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<bindings xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<binding id="element-popup">
|
||||
|
||||
<implementation implements="nsIPopupBoxObject">
|
||||
<method name="showPopup">
|
||||
<parameter name="srcConent"/>
|
||||
<parameter name="xpos"/>
|
||||
<parameter name="ypos"/>
|
||||
<parameter name="popupType"/>
|
||||
<parameter name="anchorAlignment"/>
|
||||
<parameter name="popupAlignment"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.style.visibility = 'visible';
|
||||
this.style.left = xpos + "px";
|
||||
this.style.top = ypos + "px";
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="hidePopup">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.style.visibility = 'hidden';
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("popuphidden", true, false);
|
||||
let dispatcher = this;
|
||||
dispatcher.dispatchEvent(event);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
@ -42,6 +42,10 @@ setting {
|
||||
display: none;
|
||||
}
|
||||
|
||||
autoscroller {
|
||||
-moz-binding: url('chrome://browser/content/bindings/popup.xml#element-popup');
|
||||
}
|
||||
|
||||
setting[type="bool"] {
|
||||
display: -moz-box;
|
||||
-moz-binding: url("chrome://browser/content/bindings/toggleswitch.xml#setting-fulltoggle-bool");
|
||||
|
@ -369,6 +369,8 @@
|
||||
<!-- onclick addresses dom bug 835175, str in bug 832957 -->
|
||||
<box onclick="false" class="selection-overlay-hidden" id="selection-overlay"/>
|
||||
|
||||
<autoscroller class="autoscroller" id="autoscrollerid"/>
|
||||
|
||||
<html:div id="overlay-back" class="overlay-button"
|
||||
observes="cmd_back" onclick="CommandUpdater.doCommand('cmd_back');"></html:div>
|
||||
<html:div id="overlay-plus" class="overlay-button"
|
||||
|
@ -27,6 +27,7 @@ chrome.jar:
|
||||
content/bindings/flyoutpanel.xml (content/bindings/flyoutpanel.xml)
|
||||
content/bindings/selectionoverlay.xml (content/bindings/selectionoverlay.xml)
|
||||
content/bindings/cssthrobber.xml (content/bindings/cssthrobber.xml)
|
||||
content/bindings/popup.xml (content/bindings/popup.xml)
|
||||
|
||||
content/prompt/alert.xul (content/prompt/alert.xul)
|
||||
content/prompt/confirm.xul (content/prompt/confirm.xul)
|
||||
|
@ -1013,3 +1013,30 @@ setting[type="radio"] > vbox {
|
||||
margin-left: -18px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* :::::: autoscroll popup ::::: */
|
||||
|
||||
.autoscroller {
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
border: none;
|
||||
margin: -14px;
|
||||
padding: 0;
|
||||
background-image: url("chrome://browser/skin/images/autoscroll.png");
|
||||
background-color: transparent;
|
||||
position: fixed;
|
||||
visibility: hidden;
|
||||
background-repeat: no-repeat;
|
||||
background-origin: padding-box;
|
||||
background-clip: padding-box;
|
||||
background-position: right top;
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
.autoscroller[scrolldir="NS"] {
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
.autoscroller[scrolldir="EW"] {
|
||||
background-position: right bottom;
|
||||
}
|
BIN
browser/metro/theme/images/autoscroll.png
Normal file
BIN
browser/metro/theme/images/autoscroll.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -82,3 +82,4 @@ chrome.jar:
|
||||
|
||||
skin/images/overlay-back.png (images/overlay-back.png)
|
||||
skin/images/overlay-plus.png (images/overlay-plus.png)
|
||||
skin/images/autoscroll.png (images/autoscroll.png)
|
Loading…
Reference in New Issue
Block a user