зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 4 changesets (bug 1643503) for bc failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset a890be633ec3 (bug 1643503) Backed out changeset 1f8dcaafb864 (bug 1643503) Backed out changeset b28d0c018553 (bug 1643503) Backed out changeset 1bcaedf06fb9 (bug 1643503)
This commit is contained in:
Родитель
d213ae4f61
Коммит
fa98afc362
|
@ -45,10 +45,6 @@ function updateIndicatorState() {
|
|||
* Main control object for the WebRTC global indicator
|
||||
*/
|
||||
const WebRTCIndicator = {
|
||||
// This is the vertical offset from the bottom of the primary display where the
|
||||
// indicator will first appear.
|
||||
VERTICAL_OFFSET_PX: 80,
|
||||
|
||||
init(event) {
|
||||
addEventListener("load", this);
|
||||
addEventListener("unload", this);
|
||||
|
@ -185,10 +181,7 @@ const WebRTCIndicator = {
|
|||
//
|
||||
// To put the window at the bottom of the screen, just above any OS UI,
|
||||
// we subtract the window height from the available height.
|
||||
window.moveTo(
|
||||
(screenWidth - windowWidth) / 2,
|
||||
availHeight - windowHeight - this.VERTICAL_OFFSET_PX
|
||||
);
|
||||
window.moveTo((screenWidth - windowWidth) / 2, availHeight - windowHeight);
|
||||
},
|
||||
|
||||
handleEvent(event) {
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
</head>
|
||||
|
||||
<body role="alert">
|
||||
<div id="drag-indicator" />
|
||||
<div id="display-share" class="row-item">
|
||||
<image id="display-share-icon" />
|
||||
|
||||
|
@ -33,12 +32,8 @@
|
|||
<span id="screen-share-info" data-l10n-id="webrtc-sharing-screen"/>
|
||||
<button id="stop-sharing-screen" class="stop-button" data-l10n-id="webrtc-stop-sharing-button"/>
|
||||
</div>
|
||||
<div class="row-item separator" />
|
||||
<div id="device-share" class="row-item">
|
||||
<button id="microphone-button" class="control-icon" type="microphone" data-l10n-id="webrtc-microphone-button"/>
|
||||
<button id="camera-button" class="control-icon" type="camera" data-l10n-id="webrtc-camera-button"/>
|
||||
</div>
|
||||
<div class="row-item separator" />
|
||||
<button id="microphone-button" class="row-item control-icon" type="microphone" data-l10n-id="webrtc-microphone-button"/>
|
||||
<button id="camera-button" class="row-item control-icon" type="camera" data-l10n-id="webrtc-camera-button"/>
|
||||
<div id="window-controls" class="row-item">
|
||||
<button id="minimize" class="control-icon" data-l10n-id="webrtc-minimize"/>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,6 @@ browser.jar:
|
|||
skin/classic/browser/pageInfo.png
|
||||
* skin/classic/browser/searchbar.css
|
||||
skin/classic/browser/slowStartup-16.png
|
||||
* skin/classic/browser/webRTC-indicator.css
|
||||
skin/classic/browser/webRTC-legacy-indicator.css (../shared/webRTC-legacy-indicator.css)
|
||||
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
|
||||
* skin/classic/browser/customizableui/panelUI.css (customizableui/panelUI.css)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
%if 0
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/webRTC-indicator.inc.css
|
|
@ -12,7 +12,6 @@ browser.jar:
|
|||
skin/classic/browser/pageInfo.css
|
||||
* skin/classic/browser/searchbar.css
|
||||
skin/classic/browser/slowStartup-16.png
|
||||
* skin/classic/browser/webRTC-indicator.css
|
||||
skin/classic/browser/webRTC-menubar-indicator.css
|
||||
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
|
||||
* skin/classic/browser/customizableui/panelUI.css (customizableui/panelUI.css)
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
%if 0
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/webRTC-indicator.inc.css
|
||||
|
||||
/**
|
||||
* On macOS, the ordering of the drag indicator and window controls is reversed
|
||||
* to be more native. We re-order all items including their separators so that
|
||||
* the markup and separator hiding and showing logic in the shared CSS file
|
||||
* doesn't need to be macOS-specific.
|
||||
*/
|
||||
#window-controls {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
#display-share + .separator {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#display-share {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
#device-share + .separator {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
#device-share {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
#drag-indicator {
|
||||
order: 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimize button on macOS should be circular, and the icon should be
|
||||
* centered. The asset we have for the minimize icon puts it along the bottom,
|
||||
* so we manually offset it here.
|
||||
*/
|
||||
#minimize {
|
||||
background-position: center -5px;
|
||||
padding: 8px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 1000px;
|
||||
}
|
|
@ -75,7 +75,6 @@
|
|||
skin/classic/browser/notification-icons/default-info.svg (../shared/notification-icons/default-info.svg)
|
||||
skin/classic/browser/notification-icons/desktop-notification-blocked.svg (../shared/notification-icons/desktop-notification-blocked.svg)
|
||||
skin/classic/browser/notification-icons/desktop-notification.svg (../shared/notification-icons/desktop-notification.svg)
|
||||
skin/classic/browser/notification-icons/drag-indicator.svg (../shared/notification-icons/drag-indicator.svg)
|
||||
skin/classic/browser/notification-icons/focus-tab-by-prompt.svg (../shared/notification-icons/focus-tab-by-prompt.svg)
|
||||
skin/classic/browser/notification-icons/indexedDB.svg (../shared/notification-icons/indexedDB.svg)
|
||||
skin/classic/browser/notification-icons/microphone-blocked.svg (../shared/notification-icons/microphone-blocked.svg)
|
||||
|
@ -299,3 +298,4 @@
|
|||
skin/classic/browser/privatebrowsing/private-browsing.svg (../shared/privatebrowsing/private-browsing.svg)
|
||||
skin/classic/browser/install-ssb.svg (../shared/install-ssb.svg)
|
||||
skin/classic/browser/critical.svg (../shared/icons/critical.svg)
|
||||
skin/classic/browser/webRTC-indicator.css (../shared/webRTC-indicator.css)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<svg width="4" height="22" xmlns="http://www.w3.org/2000/svg" fill="context-fill" fill-opacity="context-fill-opacity"><path d="M3.5 21a.5.5 0 01.09.992L3.5 22h-3a.5.5 0 01-.09-.992L.5 21h3zm0-3a.5.5 0 01.09.992L3.5 19h-3a.5.5 0 01-.09-.992L.5 18h3zm0-3a.5.5 0 01.09.992L3.5 16h-3a.5.5 0 01-.09-.992L.5 15h3zm0-3a.5.5 0 01.09.992L3.5 13h-3a.5.5 0 01-.09-.992L.5 12h3zm0-3a.5.5 0 01.09.992L3.5 10h-3a.5.5 0 01-.09-.992L.5 9h3zm0-3a.5.5 0 01.09.992L3.5 7h-3a.5.5 0 01-.09-.992L.5 6h3zm0-3a.5.5 0 01.09.992L3.5 4h-3a.5.5 0 01-.09-.992L.5 3h3zm0-3a.5.5 0 01.09.992L3.5 1h-3A.5.5 0 01.41.008L.5 0h3z"/></svg>
|
До Ширина: | Высота: | Размер: 814 B |
|
@ -7,40 +7,23 @@
|
|||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
--indicator-height: 32px;
|
||||
--indicator-height: 60px;
|
||||
--indicator-background-color: rgb(249,249,250);
|
||||
--indicator-border-color: hsla(0,0%,0%,.32);
|
||||
--indicator-icon-fill: rgba(12,12,13,0.8);
|
||||
--indicator-item-separator: 1px solid hsla(210,4%,10%,.14);
|
||||
--indicator-stop-button-background-color: rgb(0,96,223);
|
||||
--indicator-stop-button-hover-background-color: rgb(0,62,170);
|
||||
--indicator-stop-button-color: rgb(255,255,255);
|
||||
--minimize-button-background-color: hsla(240,5%,5%,.1);
|
||||
--minimize-button-hover-background-color: hsla(240,5%,5%,.15);
|
||||
--minimize-button-active-background-color: hsla(240,5%,5%,.2);
|
||||
--device-button-hover-background-color: hsla(0,0%,70%,.4);
|
||||
--device-button-active-background-color: hsla(0,0%,70%,.6);
|
||||
max-height: var(--indicator-height);
|
||||
--control-icon-hover-background-color: rgb(215,215,219);
|
||||
}
|
||||
|
||||
body {
|
||||
display: inline-flex;
|
||||
background-color: var(--indicator-background-color);
|
||||
max-height: var(--indicator-height);
|
||||
margin: 0;
|
||||
user-select: none;
|
||||
-moz-window-dragging: drag;
|
||||
/**
|
||||
* On macOS, for windows with small enough dimensions, we seem to get
|
||||
* vertical scrollbars on the body, even when the contents initially
|
||||
* fit the window. We sidestep this by making sure we never display
|
||||
* scrollbars.
|
||||
*/
|
||||
overflow: hidden;
|
||||
cursor: move;
|
||||
border: 1px solid;
|
||||
border-color: var(--indicator-border-color);
|
||||
/* max-height = indicator height minus top and bottom border */
|
||||
max-height: calc(var(--indicator-height) - 2px);
|
||||
}
|
||||
|
||||
button {
|
||||
|
@ -56,18 +39,14 @@ button {
|
|||
.row-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 30px;
|
||||
margin: 5px 5px 5px 0px;
|
||||
min-width: 50px;
|
||||
height: var(--indicator-height);
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.separator {
|
||||
.row-item:not(:last-child) {
|
||||
border-right: var(--indicator-item-separator);
|
||||
min-width: 1px;
|
||||
padding: 0;
|
||||
inline-margin-start: 0px;
|
||||
inline-margin-end: 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,20 +66,18 @@ button {
|
|||
* hide the entire display sharing section.
|
||||
*/
|
||||
:root:not(:-moz-any([sharingscreen],[sharingwindow])) > body > #display-share,
|
||||
:root:not(:-moz-any([sharingscreen],[sharingwindow])) > body > #display-share + .separator,
|
||||
:root:not([sharingvideo]) > body > #device-share > #camera-button,
|
||||
:root:not([sharingaudio]) > body > #device-share > #microphone-button,
|
||||
:root:not(:-moz-any([sharingvideo],[sharingaudio])) > body > #device-share,
|
||||
:root:not(:-moz-any([sharingvideo],[sharingaudio])) > body > #device-share + .separator {
|
||||
:root:not([sharingvideo]) > body > #camera-button,
|
||||
:root:not([sharingaudio]) > body > #microphone-button {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.control-icon {
|
||||
background-position: center;
|
||||
background-position: center center;
|
||||
background-size: 16px;
|
||||
background-color: transparent;
|
||||
height: 16px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.control-icon:hover {
|
||||
background-color: var(--control-icon-hover-background-color);
|
||||
}
|
||||
|
||||
#display-share-icon {
|
||||
|
@ -108,23 +85,7 @@ button {
|
|||
width: 16px;
|
||||
height: 16px;
|
||||
margin-inline-start: 5px;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
|
||||
#device-share {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* For now, since the camera and microphone control buttons effectively do the
|
||||
* same thing, we'll make them seem like a single button when hovering.
|
||||
*/
|
||||
#device-share:hover {
|
||||
background-color: var(--device-button-hover-background-color);
|
||||
}
|
||||
|
||||
#device-share:active {
|
||||
background-color: var(--device-button-active-background-color);
|
||||
margin-inline-end: 15px;
|
||||
}
|
||||
|
||||
#camera-button {
|
||||
|
@ -139,7 +100,7 @@ button {
|
|||
background-color: var(--indicator-stop-button-background-color);
|
||||
color: var(--indicator-stop-button-color);
|
||||
border-radius: 5px;
|
||||
padding: 3px 5px;
|
||||
padding: 10px;
|
||||
margin-inline-start: 15px;
|
||||
}
|
||||
|
||||
|
@ -150,33 +111,13 @@ button {
|
|||
#window-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-items: self-end;
|
||||
}
|
||||
|
||||
#minimize {
|
||||
padding: 10px;
|
||||
min-width: unset;
|
||||
background-image: url("chrome://browser/skin/notification-icons/minimize.svg");
|
||||
background-color: var(--minimize-button-background-color);
|
||||
}
|
||||
|
||||
#minimize:hover {
|
||||
background-color: var(--minimize-button-hover-background-color);
|
||||
}
|
||||
|
||||
#minimize:active {
|
||||
background-color: var(--minimize-button-active-background-color);
|
||||
}
|
||||
|
||||
#drag-indicator {
|
||||
background-image: url("chrome://browser/skin/notification-icons/drag-indicator.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 5px;
|
||||
-moz-context-properties: fill, fill-opacity;
|
||||
fill: var(--indicator-icon-fill);
|
||||
fill-opacity: 0.4;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
:-moz-any(#microphone-button, #camera-button, .stop-button):-moz-focusring {
|
|
@ -15,7 +15,6 @@ browser.jar:
|
|||
skin/classic/browser/pageInfo.png
|
||||
* skin/classic/browser/searchbar.css
|
||||
skin/classic/browser/slowStartup-16.png
|
||||
* skin/classic/browser/webRTC-indicator.css
|
||||
skin/classic/browser/webRTC-legacy-indicator.css (../shared/webRTC-legacy-indicator.css)
|
||||
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
|
||||
* skin/classic/browser/customizableui/panelUI.css (customizableui/panelUI.css)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
%if 0
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/webRTC-indicator.inc.css
|
|
@ -1161,8 +1161,8 @@ void nsCocoaWindow::ConstrainPosition(bool aAllowSlop, int32_t* aX, int32_t* aY)
|
|||
void nsCocoaWindow::SetSizeConstraints(const SizeConstraints& aConstraints) {
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
// Popups can be smaller than (32, 32)
|
||||
NSRect rect = (mWindowType == eWindowType_popup) ? NSZeroRect : NSMakeRect(0.0, 0.0, 32, 32);
|
||||
// Popups can be smaller than (60, 60)
|
||||
NSRect rect = (mWindowType == eWindowType_popup) ? NSZeroRect : NSMakeRect(0.0, 0.0, 60, 60);
|
||||
rect = [mWindow frameRectForChildViewRect:rect];
|
||||
|
||||
CGFloat scaleFactor = BackingScaleFactor();
|
||||
|
|
Загрузка…
Ссылка в новой задаче