Backed out changeset e16dda7ba4bf (bug 1570120) for failures on browser_parsable_css.js related to custom properties. CLOSED TREE
Before Width: | Height: | Size: 26 KiB |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><path d="M87.53,174a8.23,8.23,0,0,1-5.61-2.19L11.3,106.63a8.28,8.28,0,0,1,0-12.18L81.92,29.31A8.28,8.28,0,0,1,93.15,41.48l-64,59.06,64,59.06A8.28,8.28,0,0,1,87.53,174Z"/><path d="M182.39,108.82H16.91a8.28,8.28,0,0,1,0-16.56H182.39a8.28,8.28,0,1,1,0,16.56Z"/></svg>
|
Before Width: | Height: | Size: 564 B |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><path d="M112,174.23a8.28,8.28,0,0,1-5.62-14.37l64-59.06-64-59.06a8.28,8.28,0,0,1,11.23-12.17l70.62,65.14a8.28,8.28,0,0,1,0,12.18L117.65,172A8.29,8.29,0,0,1,112,174.23Z"/><path d="M182.65,109.08H17.18a8.28,8.28,0,1,1,0-16.56H182.65a8.28,8.28,0,1,1,0,16.56Z"/></svg>
|
Before Width: | Height: | Size: 565 B |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><path d="M161.53,192.17H125a8.28,8.28,0,0,1-8.28-8.28v-49H83.63v49a8.28,8.28,0,0,1-8.28,8.28H38.8a8.28,8.28,0,0,1-8.28-8.28V120H18.15a8.29,8.29,0,0,1-6.28-13.69l82-95.21a8.28,8.28,0,0,1,12.55,0l82,95.21A8.29,8.29,0,0,1,182.18,120H169.81v63.94A8.28,8.28,0,0,1,161.53,192.17Zm-28.27-16.56h20V111.67a8.28,8.28,0,0,1,8.28-8.28h2.59l-64-74.25L36.21,103.39H38.8a8.28,8.28,0,0,1,8.28,8.28v63.94h20v-49a8.27,8.27,0,0,1,8.28-8.28H125a8.27,8.27,0,0,1,8.28,8.28Z"/></svg>
|
Before Width: | Height: | Size: 760 B |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><path d="M182.14,25.22a8.43,8.43,0,0,0-9.07-8.38,8.72,8.72,0,0,0-8.38,9.06l1.67,43A78.45,78.45,0,1,0,93.91,177.18a78,78,0,0,0,62.83-31.39,8.73,8.73,0,1,0-14-10.5,61.07,61.07,0,1,1,9.47-54.82c.1.3.32.52.44.8H110.36a8.73,8.73,0,0,0,0,17.46h64.31a8.09,8.09,0,0,0,1.09-.22c.05,0,.09,0,.14,0h.35a8.72,8.72,0,0,0,8.38-9.06Z"/></svg>
|
Before Width: | Height: | Size: 626 B |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><rect x="44.73" y="90.19" width="110.54" height="76.6" rx="8.91"/><path d="M102.1,52.28A16.14,16.14,0,0,1,118,68.57v32.3a16.14,16.14,0,0,1-15.93,16.29H97.9A16.13,16.13,0,0,1,82,100.87V68.57A16.13,16.13,0,0,1,97.9,52.28h4.2m0-19.07H97.9c-19,0-34.57,15.91-34.57,35.36v32.3c0,19.45,15.55,35.36,34.57,35.36h4.2c19,0,34.58-15.91,34.58-35.36V68.57c0-19.45-15.56-35.36-34.58-35.36Z"/></svg>
|
Before Width: | Height: | Size: 683 B |
@ -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 https://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="context-fill"><path d="M163.4,170.84a8,8,0,0,1-5.66-2.33L30.93,42.92A8,8,0,0,1,42.26,31.49L169.07,157.08a8,8,0,0,1-5.67,13.76Z"/><path d="M36.86,171.11a8,8,0,0,1-5.68-13.74L157.45,31.25a8,8,0,1,1,11.37,11.38L42.55,168.76A8.06,8.06,0,0,1,36.86,171.11Z"/></svg>
|
Before Width: | Height: | Size: 545 B |
@ -1,174 +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/. */
|
||||
|
||||
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
:root {
|
||||
--void: #232426;
|
||||
--asphalt: #3d3d3d;
|
||||
--iron: #5d5d5d;
|
||||
--fog: #e2e6eb;
|
||||
--dusk: #556f8e;
|
||||
--azure: #518fe1;
|
||||
--secure: #f7ce4d;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--asphalt);
|
||||
|
||||
max-width: 1600px;
|
||||
min-width: 1600px;
|
||||
max-height: 800px;
|
||||
min-height: 800px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.navbar_container {
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.fxr_logo_container {
|
||||
width: 140px;
|
||||
height: 100px;
|
||||
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
}
|
||||
.fxr_logo {
|
||||
height: 48px;
|
||||
|
||||
margin: 26px;
|
||||
margin-inline-start: 38px;
|
||||
padding-inline-end: 32px;
|
||||
border-inline-end: 2px solid var(--iron);
|
||||
}
|
||||
|
||||
/* Sizing and positioning properties for all icons
|
||||
Color is determined by enabled/disabled classes below
|
||||
*/
|
||||
.icon_container {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
margin: 15px 10px;
|
||||
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
|
||||
background-size: 48px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-color: inherit;
|
||||
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--fog);
|
||||
}
|
||||
.icon_container:hover {
|
||||
background-color: var(--fog);
|
||||
fill: var(--asphalt);
|
||||
}
|
||||
.icon_container:active {
|
||||
background-color: var(--void);
|
||||
fill: var(--fog);
|
||||
}
|
||||
.icon_container:disabled {
|
||||
background-color: var(--asphalt);
|
||||
fill: var(--void);
|
||||
}
|
||||
|
||||
.icon_disabled_hide:disabled {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.icon_backward {
|
||||
background-image: url("assets/icon-backward.svg");
|
||||
}
|
||||
.icon_forward {
|
||||
background-image: url("assets/icon-forward.svg");
|
||||
}
|
||||
.icon_refresh {
|
||||
background-image: url("assets/icon-refresh.svg");
|
||||
}
|
||||
.icon_stop {
|
||||
background-image: url("assets/icon-stop-reload.svg");
|
||||
}
|
||||
.icon_home {
|
||||
background-image: url("assets/icon-home.svg");
|
||||
}
|
||||
|
||||
.urlbar_container {
|
||||
height: 62px;
|
||||
flex-grow: 1;
|
||||
|
||||
margin: 15px 10px;
|
||||
padding: 0;
|
||||
|
||||
border-radius: 10px;
|
||||
border: 4px solid transparent;
|
||||
|
||||
background-color: var(--iron);
|
||||
|
||||
vertical-align: top;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.urlbar_container:hover,
|
||||
.urlbar_container:focus-within {
|
||||
border-color:var(--azure);
|
||||
}
|
||||
|
||||
.urlbar_container:focus-within {
|
||||
background-color: var(--void);
|
||||
}
|
||||
|
||||
.urlbar_secure_icon {
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--secure);
|
||||
|
||||
height: 48px;
|
||||
padding: 6px;
|
||||
|
||||
visibility: hidden;
|
||||
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.urlbar_input {
|
||||
background-color: transparent;
|
||||
|
||||
vertical-align: top;
|
||||
height: 44px;
|
||||
flex-grow: 1;
|
||||
|
||||
padding: 11px 0;
|
||||
border: none;
|
||||
|
||||
font-size: 36px;
|
||||
color: var(--fog);
|
||||
|
||||
mask-image: linear-gradient(to left, transparent, black 5ch);
|
||||
}
|
||||
.urlbar_input::selection {
|
||||
background-color: var(--azure);
|
||||
}
|
||||
|
||||
xul|browser {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: var(--asphalt);
|
||||
}
|
@ -1,35 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- 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/. -->
|
||||
|
||||
<!--
|
||||
This file contains the HTML UI for the 2D window of Firefox Reality on Desktop
|
||||
-->
|
||||
|
||||
<html width="1600" height="800">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Firefox Reality</title>
|
||||
<link rel="stylesheet" href="fxrui.css" />
|
||||
<script src="fxrui.js"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: chocolate;
|
||||
}
|
||||
div {
|
||||
border: 2px solid gray;
|
||||
font-family: sans-serif;
|
||||
font-size: xx-large;
|
||||
width: 800px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
div:hover {
|
||||
background-color: dodgerblue;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function clickedcheck() {
|
||||
document.getElementById('clicked').textContent = "Clicked on " + new Date();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar_container">
|
||||
<div class="fxr_logo_container">
|
||||
<img class="fxr_logo" src="assets/Logo-256px.png" role="presentation" />
|
||||
</div>
|
||||
|
||||
<button id="eBack" class="icon_container icon_backward"></button>
|
||||
<button id="eForward" class="icon_container icon_forward"></button>
|
||||
<button id="eRefresh" class="icon_container icon_refresh icon_disabled_hide"></button>
|
||||
<button id="eStop" class="icon_container icon_stop icon_disabled_hide" disabled></button>
|
||||
<button id="eHome" class="icon_container icon_home" ></button>
|
||||
|
||||
<div class="urlbar_container urlbar_container_normal" id="eUrlBarContainer">
|
||||
<img class="urlbar_secure_icon" id="eUrlSecure" src="assets/icon-secure.svg" alt="Secure"/>
|
||||
<input class="urlbar_input" id="eUrlInput" type="text" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<body onclick="clickedcheck()">
|
||||
<div>Hello World!</div>
|
||||
<div id="clicked"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,142 +0,0 @@
|
||||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
|
||||
* 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/. */
|
||||
|
||||
// Configuration vars
|
||||
let homeURL = "https://www.mozilla.org/en-US/";
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/browser
|
||||
let browser = null;
|
||||
// The following variable map to UI elements whose behavior changes depending
|
||||
// on some state from the browser control
|
||||
let urlInput = null;
|
||||
let secureIcon = null;
|
||||
let backButton = null;
|
||||
let forwardButton = null;
|
||||
let refreshButton = null;
|
||||
let stopButton = null;
|
||||
|
||||
window.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
() => {
|
||||
urlInput = document.getElementById("eUrlInput");
|
||||
secureIcon = document.getElementById("eUrlSecure");
|
||||
backButton = document.getElementById("eBack");
|
||||
forwardButton = document.getElementById("eForward");
|
||||
refreshButton = document.getElementById("eRefresh");
|
||||
stopButton = document.getElementById("eStop");
|
||||
|
||||
setupBrowser();
|
||||
setupNavButtons();
|
||||
setupUrlBar();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
// Create XUL browser object
|
||||
function setupBrowser() {
|
||||
// Note: createXULElement is undefined when this page is not loaded
|
||||
// via chrome protocol
|
||||
if (document.createXULElement) {
|
||||
browser = document.createXULElement("browser");
|
||||
browser.setAttribute("type", "content");
|
||||
browser.setAttribute("remote", "true");
|
||||
document.body.append(browser);
|
||||
|
||||
urlInput.value = homeURL;
|
||||
browser.loadURI(homeURL);
|
||||
|
||||
browser.addProgressListener(
|
||||
{
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
]),
|
||||
onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
// When URL changes, update the URL in the URL bar and update
|
||||
// whether the back/forward buttons are enabled.
|
||||
urlInput.value = browser.currentURI.spec;
|
||||
|
||||
backButton.disabled = !browser.canGoBack;
|
||||
forwardButton.disabled = !browser.canGoForward;
|
||||
},
|
||||
onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
|
||||
// Network requests are complete. Disable (hide) the stop button
|
||||
// and enable (show) the refresh button
|
||||
refreshButton.disabled = false;
|
||||
stopButton.disabled = true;
|
||||
} else {
|
||||
// Network requests are outstanding. Disable (hide) the refresh
|
||||
// button and enable (show) the stop button
|
||||
refreshButton.disabled = true;
|
||||
stopButton.disabled = false;
|
||||
}
|
||||
},
|
||||
onSecurityChange(aWebProgress, aRequest, aState) {
|
||||
// Update the Secure Icon when the security status of the
|
||||
// content changes
|
||||
if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) {
|
||||
secureIcon.style.visibility = "visible";
|
||||
} else {
|
||||
secureIcon.style.visibility = "hidden";
|
||||
}
|
||||
},
|
||||
},
|
||||
Ci.nsIWebProgress.NOTIFY_LOCATION |
|
||||
Ci.nsIWebProgress.NOTIFY_SECURITY |
|
||||
Ci.nsIWebProgress.NOTIFY_STATE_REQUEST
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function setupNavButtons() {
|
||||
let aryNavButtons = ["eBack", "eForward", "eRefresh", "eStop", "eHome"];
|
||||
|
||||
function navButtonHandler(e) {
|
||||
if (!this.disabled) {
|
||||
switch (this.id) {
|
||||
case "eBack":
|
||||
browser.goBack();
|
||||
break;
|
||||
|
||||
case "eForward":
|
||||
browser.goForward();
|
||||
break;
|
||||
|
||||
case "eRefresh":
|
||||
browser.reload();
|
||||
break;
|
||||
|
||||
case "eStop":
|
||||
browser.stop();
|
||||
break;
|
||||
|
||||
case "eHome":
|
||||
browser.loadURI(homeURL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let btnName of aryNavButtons) {
|
||||
let elem = document.getElementById(btnName);
|
||||
elem.addEventListener("click", navButtonHandler);
|
||||
}
|
||||
}
|
||||
|
||||
function setupUrlBar() {
|
||||
// Navigate to new value when the user presses "Enter"
|
||||
urlInput.addEventListener("keypress", function(e) {
|
||||
if (e.key == "Enter") {
|
||||
browser.loadURI(urlInput.value);
|
||||
browser.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Upon focus, highlight the whole URL
|
||||
urlInput.addEventListener("focus", function() {
|
||||
urlInput.select();
|
||||
});
|
||||
}
|
@ -4,16 +4,6 @@
|
||||
|
||||
#if defined(NIGHTLY_BUILD) && defined(XP_WIN)
|
||||
browser.jar:
|
||||
% content fxr %content/browser/fxr/
|
||||
content/browser/fxr/fxrui.html (content/fxrui.html)
|
||||
content/browser/fxr/fxrui.css (content/fxrui.css)
|
||||
content/browser/fxr/fxrui.js (content/fxrui.js)
|
||||
|
||||
content/browser/fxr/assets/icon-backward.svg (content/assets/icon-backward.svg)
|
||||
content/browser/fxr/assets/icon-forward.svg (content/assets/icon-forward.svg)
|
||||
content/browser/fxr/assets/icon-home.svg (content/assets/icon-home.svg)
|
||||
content/browser/fxr/assets/icon-refresh.svg (content/assets/icon-refresh.svg)
|
||||
content/browser/fxr/assets/icon-secure.svg (content/assets/icon-secure.svg)
|
||||
content/browser/fxr/assets/icon-stop-reload.svg (content/assets/icon-stop-reload.svg)
|
||||
content/browser/fxr/assets/Logo-256px.png (content/assets/Logo-256px.png)
|
||||
% content fxr %content/browser/fxr/
|
||||
content/browser/fxr/fxrui.html (content/fxrui.html)
|
||||
#endif
|
||||
|
@ -12,7 +12,6 @@ EXPORTS
|
||||
;+= Public Export APIs for vrhost
|
||||
CreateVRWindow PRIVATE
|
||||
CloseVRWindow PRIVATE
|
||||
SendUIMessageToVRWindow PRIVATE
|
||||
|
||||
;+= Exports only available in Nightlies for testing
|
||||
SampleExport PRIVATE
|
||||
|
@ -231,6 +231,7 @@ void TestCreateVRWindow() {
|
||||
(PFN_CREATEVRWINDOW)::GetProcAddress(hVRHost, "CreateVRWindow");
|
||||
PFN_CLOSEVRWINDOW fnClose =
|
||||
(PFN_CLOSEVRWINDOW)::GetProcAddress(hVRHost, "CloseVRWindow");
|
||||
|
||||
PFN_SENDUIMSG fnSendMsg =
|
||||
(PFN_SENDUIMSG)::GetProcAddress(hVRHost, "SendUIMessageToVRWindow");
|
||||
|
||||
@ -257,26 +258,22 @@ void TestCreateVRWindow() {
|
||||
::Sleep(5000);
|
||||
|
||||
printf(
|
||||
"Now, simulating a click on the Home button, which should look "
|
||||
"pressed\n");
|
||||
POINT pt;
|
||||
pt.x = 450;
|
||||
pt.y = 50;
|
||||
fnSendMsg(windowId, WM_LBUTTONDOWN, 0, POINTTOPOINTS(pt));
|
||||
::Sleep(3000);
|
||||
fnSendMsg(windowId, WM_LBUTTONUP, 0, POINTTOPOINTS(pt));
|
||||
"Now, should see window contents turn from orange to blue with onclick "
|
||||
"event output...\n");
|
||||
|
||||
printf(
|
||||
"Next, simulating hovering across the URL bar, which should turn "
|
||||
"blue\n");
|
||||
pt.x = 600;
|
||||
// Simulate a click, then moving the mouse across the screen
|
||||
POINT pt;
|
||||
pt.x = 200;
|
||||
pt.y = 200;
|
||||
fnSendMsg(windowId, WM_LBUTTONDOWN, 0, POINTTOPOINTS(pt));
|
||||
fnSendMsg(windowId, WM_LBUTTONUP, 0, POINTTOPOINTS(pt));
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
pt.x++;
|
||||
fnSendMsg(windowId, WM_MOUSEMOVE, 0, POINTTOPOINTS(pt));
|
||||
::Sleep(5);
|
||||
}
|
||||
|
||||
::Sleep(5000);
|
||||
::Sleep(2000);
|
||||
|
||||
// Close the Firefox VR Window
|
||||
fnClose(windowId, true);
|
||||
|