Merge m-c to inbound, a=merge

MozReview-Commit-ID: 4AoCDs2oeJ0
This commit is contained in:
Wes Kocher 2017-02-09 17:05:15 -08:00
commit b2e0ca9ab0
154 changed files with 17663 additions and 16536 deletions

View File

@ -11,8 +11,15 @@ jobs:
target-tasks-method: nightly_linux
run-on-projects:
- mozilla-central
- mozilla-aurora
- date
when: [] # never (temporary)
when:
by-project:
# Match buildbot starts for now
date: [{hour: 16, minute: 0}]
mozilla-central: [{hour: 11, minute: 0}]
mozilla-aurora: [{hour: 8, minute: 45}] # Buildbot uses minute 40
# No default
- name: nightly-android
job:
@ -22,8 +29,15 @@ jobs:
target-tasks-method: nightly_fennec
run-on-projects:
- mozilla-central
- mozilla-aurora
- date
when: [] # never (temporary)
when:
by-project:
# Match buildbot starts for now
date: [{hour: 16, minute: 0}]
mozilla-central: [{hour: 11, minute: 0}]
mozilla-aurora: [{hour: 8, minute: 45}] # Buildbot uses minute 40
# No default
- name: nightly-mochitest-valgrind
job:

View File

@ -2143,12 +2143,16 @@
<versionRange maxVersion="13.0.0.302" minVersion="13.0.0.302" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1495" os="Linux">
<match exp="" name="name"/>
<match exp="libflashplayer\.so" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="24.0.0.186" minVersion="23.0.0.207" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1420">
<pluginItem blockID="p1420" os="">
<match exp="" name="name"/>
<match exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="23.0.0.205" minVersion="23.0.0.185" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
@ -2202,7 +2206,9 @@
<versionRange maxVersion="*" minVersion="0"/>
</pluginItem>
<pluginItem blockID="p1419" os="Linux">
<match exp="" name="name"/>
<match exp="libflashplayer\.so" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="11.2.202.643" minVersion="11.2.202.637" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
@ -2459,8 +2465,10 @@
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="18.0.0.232" minVersion="18.0.0.204" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1274">
<pluginItem blockID="p1274" os="">
<match exp="" name="name"/>
<match exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="22.0.0.211" minVersion="22.0.0.192" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
@ -2571,8 +2579,10 @@
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1494">
<pluginItem blockID="p1494" os="">
<match exp="" name="name"/>
<match exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="24.0.0.186" minVersion="23.0.0.207" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
@ -2640,8 +2650,10 @@
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="18.0.0.352" minVersion="18.0.0.343" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p160">
<pluginItem blockID="p160" os="">
<match exp="" name="name"/>
<match exp="NPSWF32\.dll" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="10.2.9999" minVersion="0" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
@ -2810,7 +2822,9 @@
<match exp="NPFFAddOn.dll" name="filename"/>
</pluginItem>
<pluginItem blockID="p1421" os="Linux">
<match exp="" name="name"/>
<match exp="libflashplayer\.so" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="23.0.0.207" minVersion="11.2.202.643" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
@ -3006,8 +3020,10 @@
<infoURL>https://get.adobe.com/reader</infoURL>
<versionRange maxVersion="15.006.30174" minVersion="15.006.30174" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1422">
<pluginItem blockID="p1422" os="">
<match exp="" name="name"/>
<match exp="(NPSWF32.*\.dll)|(NPSWF64.*\.dll)|(Flash\ Player\.plugin)" name="filename"/>
<match exp="" name="description"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="23.0.0.207" minVersion="23.0.0.205" severity="0" vulnerabilitystatus="1"/>
</pluginItem>

View File

@ -12,6 +12,7 @@ module.exports = { // eslint-disable-line no-undef
"WindowEventManager": true,
"browserActionFor": true,
"getCookieStoreIdForTab": true,
"getDevToolsTargetForContext": true,
"makeWidgetId": true,
"pageActionFor": true,
"tabTracker": true,

View File

@ -0,0 +1,35 @@
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/ExtensionUtils.jsm");
const {
SingletonEventManager,
} = ExtensionUtils;
extensions.registerSchemaAPI("devtools.network", "devtools_parent", (context) => {
return {
devtools: {
network: {
onNavigated: new SingletonEventManager(context, "devtools.onNavigated", fire => {
let listener = (event, data) => {
fire.async(data.url);
};
let targetPromise = getDevToolsTargetForContext(context);
targetPromise.then(target => {
target.on("will-navigate", listener);
});
return () => {
targetPromise.then(target => {
target.off("will-navigate", listener);
});
};
}).api(),
},
},
};
});

View File

@ -7,6 +7,7 @@ category webextension-scripts contextMenus chrome://browser/content/ext-contextM
category webextension-scripts desktop-runtime chrome://browser/content/ext-desktop-runtime.js
category webextension-scripts devtools chrome://browser/content/ext-devtools.js
category webextension-scripts devtools-inspectedWindow chrome://browser/content/ext-devtools-inspectedWindow.js
category webextension-scripts devtools-network chrome://browser/content/ext-devtools-network.js
category webextension-scripts history chrome://browser/content/ext-history.js
category webextension-scripts omnibox chrome://browser/content/ext-omnibox.js
category webextension-scripts pageAction chrome://browser/content/ext-pageAction.js
@ -34,6 +35,7 @@ category webextension-schemas context_menus chrome://browser/content/schemas/con
category webextension-schemas context_menus_internal chrome://browser/content/schemas/context_menus_internal.json
category webextension-schemas devtools chrome://browser/content/schemas/devtools.json
category webextension-schemas devtools_inspected_window chrome://browser/content/schemas/devtools_inspected_window.json
category webextension-schemas devtools_network chrome://browser/content/schemas/devtools_network.json
category webextension-schemas history chrome://browser/content/schemas/history.json
category webextension-schemas omnibox chrome://browser/content/schemas/omnibox.json
category webextension-schemas page_action chrome://browser/content/schemas/page_action.json

View File

@ -20,6 +20,7 @@ browser.jar:
content/browser/ext-desktop-runtime.js
content/browser/ext-devtools.js
content/browser/ext-devtools-inspectedWindow.js
content/browser/ext-devtools-network.js
content/browser/ext-history.js
content/browser/ext-omnibox.js
content/browser/ext-pageAction.js

View File

@ -0,0 +1,93 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace": "devtools.network",
"allowedContexts": ["devtools", "devtools_only"],
"defaultContexts": ["devtools", "devtools_only"],
"description": "Use the <code>chrome.devtools.network</code> API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.",
"types": [
{
"id": "Request",
"type": "object",
"description": "Represents a network request for a document resource (script, image and so on). See HAR Specification for reference.",
"functions": [
{
"name": "getContent",
"type": "function",
"description": "Returns content of the response body.",
"async": "callback",
"parameters": [
{
"name": "callback",
"type": "function",
"description": "A function that receives the response body when the request completes.",
"parameters": [
{
"name": "content",
"type": "string",
"description": "Content of the response body (potentially encoded)."
},
{
"name": "encoding",
"type": "string",
"description": "Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported."
}
]
}
]
}
]
}
],
"functions": [
{
"name": "getHAR",
"unsupported": true,
"type": "function",
"description": "Returns HAR log that contains all known network requests.",
"async": "callback",
"parameters": [
{
"name": "callback",
"type": "function",
"description": "A function that receives the HAR log when the request completes.",
"parameters": [
{
"name": "harLog",
"type": "object",
"additionalProperties": {"type": "any"},
"description": "A HAR log. See HAR specification for details."
}
]
}
]
}
],
"events": [
{
"name": "onRequestFinished",
"unsupported": true,
"type": "function",
"description": "Fired when a network request is finished and all request data are available.",
"parameters": [
{ "name": "request", "$ref": "Request", "description": "Description of a network request in the form of a HAR entry. See HAR specification for details." }
]
},
{
"name": "onNavigated",
"type": "function",
"description": "Fired when the inspected window navigates to a new page.",
"parameters": [
{
"name": "url",
"type": "string",
"description": "URL of the new page."
}
]
}
]
}
]

View File

@ -11,6 +11,7 @@ browser.jar:
content/browser/schemas/context_menus_internal.json
content/browser/schemas/devtools.json
content/browser/schemas/devtools_inspected_window.json
content/browser/schemas/devtools_network.json
content/browser/schemas/history.json
content/browser/schemas/omnibox.json
content/browser/schemas/page_action.json

View File

@ -52,6 +52,7 @@ support-files =
[browser_ext_currentWindow.js]
[browser_ext_devtools_inspectedWindow.js]
[browser_ext_devtools_inspectedWindow_reload.js]
[browser_ext_devtools_network.js]
[browser_ext_devtools_page.js]
[browser_ext_getViews.js]
[browser_ext_incognito_views.js]

View File

@ -0,0 +1,94 @@
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
XPCOMUtils.defineLazyModuleGetter(this, "devtools",
"resource://devtools/shared/Loader.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
"resource://devtools/client/framework/gDevTools.jsm");
add_task(async function test_devtools_network_on_navigated() {
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
function background() {
browser.test.onMessage.addListener(msg => {
let code;
if (msg === "navigate") {
code = "window.wrappedJSObject.location.href = 'http://example.com/';";
browser.tabs.executeScript({code});
} else if (msg === "reload") {
code = "window.wrappedJSObject.location.reload(true);";
browser.tabs.executeScript({code});
}
});
browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === "complete" && tab.url === "http://example.com/") {
browser.test.sendMessage("tabUpdated");
}
});
browser.test.sendMessage("ready");
}
function devtools_page() {
let eventCount = 0;
let listener = url => {
eventCount++;
browser.test.assertEq("http://example.com/", url, "onNavigated received the expected url.");
if (eventCount === 2) {
browser.devtools.network.onNavigated.removeListener(listener);
}
browser.test.sendMessage("onNavigatedFired", eventCount);
};
browser.devtools.network.onNavigated.addListener(listener);
}
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
permissions: ["tabs", "http://mochi.test/", "http://example.com/"],
devtools_page: "devtools_page.html",
},
files: {
"devtools_page.html": `<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="devtools_page.js"></script>
</head>
<body>
</body>
</html>`,
"devtools_page.js": devtools_page,
},
});
await extension.startup();
await extension.awaitMessage("ready");
let target = devtools.TargetFactory.forTab(tab);
await gDevTools.showToolbox(target, "webconsole");
info("Developer toolbox opened.");
extension.sendMessage("navigate");
await extension.awaitMessage("tabUpdated");
let eventCount = await extension.awaitMessage("onNavigatedFired");
is(eventCount, 1, "The expected number of events were fired.");
extension.sendMessage("reload");
await extension.awaitMessage("tabUpdated");
eventCount = await extension.awaitMessage("onNavigatedFired");
is(eventCount, 2, "The expected number of events were fired.");
// do a reload after the listener has been removed, do not expect a message to be sent
extension.sendMessage("reload");
await extension.awaitMessage("tabUpdated");
await gDevTools.closeToolbox(target);
await target.destroy();
await extension.unload();
await BrowserTestUtils.removeTab(tab);
});

View File

@ -514,7 +514,7 @@ PlacesTreeView.prototype = {
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
.getService(Ci.nsIXULChromeRegistry)
.getSelectedLocale("global", true);
const dtOptions = { year: "2-digit", month: "numeric", day: "numeric",
const dtOptions = { year: "numeric", month: "numeric", day: "numeric",
hour: "numeric", minute: "numeric" };
this.__dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
}

View File

@ -127,7 +127,7 @@
case "date":
let timeObj = new Date(node.time / 1000);
// Default is short date format.
let dtOptions = { year: '2-digit', month: 'numeric', day: 'numeric',
let dtOptions = { year: 'numeric', month: 'numeric', day: 'numeric',
hour: 'numeric', minute: 'numeric' };
// For today's visits we don't show date portion.
if (node.uri == "http://at.midnight.com/" ||

View File

@ -0,0 +1,89 @@
'use strict';
class PasswordPrompt {
/**
* @constructs PasswordPrompt
*/
constructor(viewport) {
this.overlayName = 'passwordOverlay';
this.container = document.getElementById('passwordOverlay');
this.overlaysParent = document.getElementById('overlayContainer');
this.label = document.getElementById('passwordText');
this.input = document.getElementById('password');
this.submitButton = document.getElementById('passwordSubmit');
this.cancelButton = document.getElementById('passwordCancel');
this.updateCallback = null;
this.reason = null;
this.active = false;
this._viewport = viewport;
// PDFium doesn't return the result of password check. We count the retries
// to determine whether to show "invalid password" prompt instead.
// PDFium allows at most 3 times of tries.
this._passwordTries = 0;
this._viewport.onPasswordRequest = this.open.bind(this);
// Attach the event listeners.
this.submitButton.addEventListener('click', this);
this.cancelButton.addEventListener('click', this);
this.input.addEventListener('keydown', this);
}
handleEvent(e) {
switch(e.type) {
case 'keydown':
if (e.target == this.input && e.keyCode === KeyEvent.DOM_VK_RETURN) {
this.verify();
e.stopPropagation();
} else if (e.currentTarget == window &&
e.keyCode === KeyEvent.DOM_VK_ESCAPE) {
this.close();
e.preventDefault();
e.stopImmediatePropagation();
}
break;
case 'click':
if (e.target == this.submitButton) {
this.verify();
} else if (e.target == this.cancelButton) {
this.close();
}
break;
}
}
open() {
this.container.classList.remove('hidden');
this.overlaysParent.classList.remove('hidden');
window.addEventListener('keydown', this);
this.active = true;
let promptKey = this._passwordTries ? 'password_invalid' : 'password_label';
this._passwordTries++;
this.input.type = 'password';
this.input.focus();
document.l10n.formatValue(promptKey).then(promptString => {
this.label.textContent = promptString;
});
}
close() {
this.container.classList.add('hidden');
this.overlaysParent.classList.add('hidden');
window.removeEventListener('keydown', this);
this.active = false;
this.input.value = '';
this.input.type = '';
}
verify() {
let password = this.input.value;
if (password && password.length > 0) {
this.close();
this._viewport.verifyPassword(password);
}
}
}

View File

@ -7,6 +7,7 @@
window.addEventListener('DOMContentLoaded', function() {
let viewport = new Viewport();
let toolbar = new Toolbar(viewport);
let passwordPrompt = new PasswordPrompt(viewport);
// Expose the custom viewport object to runtime
window.createCustomViewport = function(actionHandler) {

View File

@ -36,6 +36,7 @@ class Viewport {
this.onZoomChanged = null;
this.onDimensionChanged = null;
this.onPageChanged = null;
this.onPasswordRequest = null;
this._viewportController.addEventListener('scroll', this);
window.addEventListener('resize', this);
@ -123,14 +124,14 @@ class Viewport {
}
_getScrollbarWidth() {
var div = document.createElement('div');
let div = document.createElement('div');
div.style.visibility = 'hidden';
div.style.overflow = 'scroll';
div.style.width = '50px';
div.style.height = '50px';
div.style.position = 'absolute';
document.body.appendChild(div);
var result = div.offsetWidth - div.clientWidth;
let result = div.offsetWidth - div.clientWidth;
div.remove();
return result;
}
@ -468,6 +469,13 @@ class Viewport {
}
}
verifyPassword(password) {
this._doAction({
type: 'getPasswordComplete',
password: password
});
}
handleEvent(evt) {
switch(evt.type) {
case 'resize':
@ -591,6 +599,9 @@ class Viewport {
case 'fullscreenChange':
this._handleFullscreenChange(message.fullscreen);
break;
case 'getPassword':
this.onPasswordRequest && this.onPasswordRequest();
break;
}
}
}

View File

@ -18,6 +18,7 @@
<script src="js/polyfill.js"></script>
<script src="js/toolbar.js"></script>
<script src="js/viewport.js"></script>
<script src="js/password-prompt.js"></script>
<script src="js/viewer.js"></script>
</head>

View File

@ -61,12 +61,12 @@ webextPerms.sideloadMenuItem=%1$S added to %2$S
# %S is replaced with the localized name of the extension being installed.
# Note, this string will be used as raw markup. Avoid characters like <, >, &
webextPerms.sideloadHeader=%S added
webextPerms.sideloadText=Another program on your computer installed an add-on that may affect your browser. Please review this add-ons permissions requests and choose to Enable or Disable.
webextPerms.sideloadText2=Another program on your computer installed an add-on that may affect your browser. Please review this add-ons permissions requests and choose to Enable or Cancel (to leave it disabled).
webextPerms.sideloadEnable.label=Enable
webextPerms.sideloadEnable.accessKey=E
webextPerms.sideloadDisable.label=Disable
webextPerms.sideloadDisable.accessKey=D
webextPerms.sideloadCancel.label=Cancel
webextPerms.sideloadCancel.accessKey=C
# LOCALIZATION NOTE (webextPerms.updateMenuItem)
# %S will be replaced with the localized name of the extension which

View File

@ -197,11 +197,11 @@ this.ExtensionsUI = {
if (info.type == "sideload") {
result.header = bundle.formatStringFromName("webextPerms.sideloadHeader", [addonName], 1);
result.text = bundle.GetStringFromName("webextPerms.sideloadText");
result.text = bundle.GetStringFromName("webextPerms.sideloadText2");
result.acceptText = bundle.GetStringFromName("webextPerms.sideloadEnable.label");
result.acceptKey = bundle.GetStringFromName("webextPerms.sideloadEnable.accessKey");
result.cancelText = bundle.GetStringFromName("webextPerms.sideloadDisable.label");
result.cancelKey = bundle.GetStringFromName("webextPerms.sideloadDisable.accessKey");
result.cancelText = bundle.GetStringFromName("webextPerms.sideloadCancel.label");
result.cancelKey = bundle.GetStringFromName("webextPerms.sideloadCancel.accessKey");
} else if (info.type == "update") {
result.header = "";
result.text = bundle.formatStringFromName("webextPerms.updateText", [addonName], 1);

View File

@ -2,15 +2,19 @@
* 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/. */
/* globals NetMonitorController */
"use strict";
const {
ADD_REQUEST,
UPDATE_REQUEST,
CLEAR_REQUESTS,
CLONE_SELECTED_REQUEST,
REMOVE_SELECTED_CUSTOM_REQUEST,
CLEAR_REQUESTS,
SEND_CUSTOM_REQUEST,
UPDATE_REQUEST,
} = require("../constants");
const { getSelectedRequest } = require("../selectors/index");
function addRequest(id, data, batch) {
return {
@ -40,6 +44,43 @@ function cloneSelectedRequest() {
};
}
/**
* Send a new HTTP request using the data in the custom request form.
*/
function sendCustomRequest() {
if (!NetMonitorController.supportsCustomRequest) {
return cloneSelectedRequest();
}
return (dispatch, getState) => {
const selected = getSelectedRequest(getState());
if (!selected) {
return;
}
// Send a new HTTP request using the data in the custom request form
let data = {
url: selected.url,
method: selected.method,
httpVersion: selected.httpVersion,
};
if (selected.requestHeaders) {
data.headers = selected.requestHeaders.headers;
}
if (selected.requestPostData) {
data.body = selected.requestPostData.postData.text;
}
NetMonitorController.webConsoleClient.sendHTTPRequest(data, (response) => {
return dispatch({
type: SEND_CUSTOM_REQUEST,
id: response.eventActor.actor,
});
});
};
}
/**
* Remove a request from the list. Supports removing only cloned requests with a
* "isCustom" attribute. Other requests never need to be removed.
@ -58,8 +99,9 @@ function clearRequests() {
module.exports = {
addRequest,
updateRequest,
clearRequests,
cloneSelectedRequest,
removeSelectedCustomRequest,
clearRequests,
sendCustomRequest,
updateRequest,
};

View File

@ -5,19 +5,7 @@
"use strict";
const { getDisplayedRequests } = require("../selectors/index");
const { SELECT_REQUEST, PRESELECT_REQUEST } = require("../constants");
/**
* When a new request with a given id is added in future, select it immediately.
* Used by the "Edit and Resend" feature, where we know in advance the ID of the
* request, at a time when it wasn't sent yet.
*/
function preselectRequest(id) {
return {
type: PRESELECT_REQUEST,
id
};
}
const { SELECT_REQUEST } = require("../constants");
/**
* Select request with a given id.
@ -61,7 +49,6 @@ function selectDelta(delta) {
}
module.exports = {
preselectRequest,
selectRequest,
selectDelta,
};

View File

@ -21,10 +21,10 @@ const actionTypes = {
ENABLE_REQUEST_FILTER_TYPE_ONLY: "ENABLE_REQUEST_FILTER_TYPE_ONLY",
OPEN_SIDEBAR: "OPEN_SIDEBAR",
OPEN_STATISTICS: "OPEN_STATISTICS",
PRESELECT_REQUEST: "PRESELECT_REQUEST",
REMOVE_SELECTED_CUSTOM_REQUEST: "REMOVE_SELECTED_CUSTOM_REQUEST",
SELECT_REQUEST: "SELECT_REQUEST",
SELECT_DETAILS_PANEL_TAB: "SELECT_DETAILS_PANEL_TAB",
SEND_CUSTOM_REQUEST: "SEND_CUSTOM_REQUEST",
SET_REQUEST_FILTER_TEXT: "SET_REQUEST_FILTER_TEXT",
SORT_BY: "SORT_BY",
TOGGLE_REQUEST_FILTER_TYPE: "TOGGLE_REQUEST_FILTER_TYPE",

View File

@ -1,222 +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/. */
/* globals window, dumpn, gNetwork, $, EVENTS, NetMonitorView */
"use strict";
const { Task } = require("devtools/shared/task");
const { writeHeaderText,
getKeyWithEvent,
getUrlQuery,
parseQueryString } = require("./request-utils");
const Actions = require("./actions/index");
/**
* Functions handling the custom request view.
*/
function CustomRequestView() {
dumpn("CustomRequestView was instantiated");
}
CustomRequestView.prototype = {
/**
* Initialization function, called when the network monitor is started.
*/
initialize: function () {
dumpn("Initializing the CustomRequestView");
this.updateCustomRequestEvent = getKeyWithEvent(this.onUpdate.bind(this));
$("#custom-pane").addEventListener("input",
this.updateCustomRequestEvent);
},
/**
* Destruction function, called when the network monitor is closed.
*/
destroy: function () {
dumpn("Destroying the CustomRequestView");
$("#custom-pane").removeEventListener("input",
this.updateCustomRequestEvent);
},
/**
* Populates this view with the specified data.
*
* @param object data
* The data source (this should be the attachment of a request item).
* @return object
* Returns a promise that resolves upon population the view.
*/
populate: Task.async(function* (data) {
$("#custom-url-value").value = data.url;
$("#custom-method-value").value = data.method;
this.updateCustomQuery(data.url);
if (data.requestHeaders) {
let headers = data.requestHeaders.headers;
$("#custom-headers-value").value = writeHeaderText(headers);
}
if (data.requestPostData) {
let postData = data.requestPostData.postData.text;
$("#custom-postdata-value").value = yield gNetwork.getString(postData);
}
window.emit(EVENTS.CUSTOMREQUESTVIEW_POPULATED);
}),
/**
* Handle user input in the custom request form.
*
* @param object field
* the field that the user updated.
*/
onUpdate: function (field) {
let selectedItem = NetMonitorView.RequestsMenu.selectedItem;
let store = NetMonitorView.RequestsMenu.store;
let value;
switch (field) {
case "method":
value = $("#custom-method-value").value.trim();
store.dispatch(Actions.updateRequest(selectedItem.id, { method: value }));
break;
case "url":
value = $("#custom-url-value").value;
this.updateCustomQuery(value);
store.dispatch(Actions.updateRequest(selectedItem.id, { url: value }));
break;
case "query":
let query = $("#custom-query-value").value;
this.updateCustomUrl(query);
value = $("#custom-url-value").value;
store.dispatch(Actions.updateRequest(selectedItem.id, { url: value }));
break;
case "body":
value = $("#custom-postdata-value").value;
store.dispatch(Actions.updateRequest(selectedItem.id, {
requestPostData: {
postData: { text: value }
}
}));
break;
case "headers":
let headersText = $("#custom-headers-value").value;
value = parseHeadersText(headersText);
store.dispatch(Actions.updateRequest(selectedItem.id, {
requestHeaders: { headers: value }
}));
break;
}
},
/**
* Update the query string field based on the url.
*
* @param object url
* The URL to extract query string from.
*/
updateCustomQuery: function (url) {
const paramsArray = parseQueryString(getUrlQuery(url));
if (!paramsArray) {
$("#custom-query").hidden = true;
return;
}
$("#custom-query").hidden = false;
$("#custom-query-value").value = writeQueryText(paramsArray);
},
/**
* Update the url based on the query string field.
*
* @param object queryText
* The contents of the query string field.
*/
updateCustomUrl: function (queryText) {
let params = parseQueryText(queryText);
let queryString = writeQueryString(params);
let url = $("#custom-url-value").value;
let oldQuery = getUrlQuery(url);
let path = url.replace(oldQuery, queryString);
$("#custom-url-value").value = path;
}
};
/**
* Parse text representation of multiple HTTP headers.
*
* @param string text
* Text of headers
* @return array
* Array of headers info {name, value}
*/
function parseHeadersText(text) {
return parseRequestText(text, "\\S+?", ":");
}
/**
* Parse readable text list of a query string.
*
* @param string text
* Text of query string representation
* @return array
* Array of query params {name, value}
*/
function parseQueryText(text) {
return parseRequestText(text, ".+?", "=");
}
/**
* Parse a text representation of a name[divider]value list with
* the given name regex and divider character.
*
* @param string text
* Text of list
* @return array
* Array of headers info {name, value}
*/
function parseRequestText(text, namereg, divider) {
let regex = new RegExp("(" + namereg + ")\\" + divider + "\\s*(.+)");
let pairs = [];
for (let line of text.split("\n")) {
let matches;
if (matches = regex.exec(line)) { // eslint-disable-line
let [, name, value] = matches;
pairs.push({name: name, value: value});
}
}
return pairs;
}
/**
* Write out a list of query params into a chunk of text
*
* @param array params
* Array of query params {name, value}
* @return string
* List of query params in text format
*/
function writeQueryText(params) {
return params.map(({name, value}) => name + "=" + value).join("\n");
}
/**
* Write out a list of query params into a query string
*
* @param array params
* Array of query params {name, value}
* @return string
* Query string that can be appended to a url.
*/
function writeQueryString(params) {
return params.map(({name, value}) => name + "=" + value).join("&");
}
exports.CustomRequestView = CustomRequestView;

View File

@ -62,9 +62,6 @@ const EVENTS = {
// Fired when Sidebar has finished being populated.
SIDEBAR_POPULATED: "NetMonitor:SidebarPopulated",
// Fired when CustomRequestView has finished being populated.
CUSTOMREQUESTVIEW_POPULATED: "NetMonitor:CustomRequestViewPopulated",
// Fired when charts have been displayed in the PerformanceStatisticsView.
PLACEHOLDER_CHARTS_DISPLAYED: "NetMonitor:PlaceholderChartsDisplayed",
PRIMED_CACHE_CHART_DISPLAYED: "NetMonitor:PrimedChartsDisplayed",

View File

@ -15,7 +15,6 @@ DIRS += [
DevToolsModules(
'constants.js',
'custom-request-view.js',
'events.js',
'filter-predicates.js',
'l10n.js',

View File

@ -9,7 +9,6 @@
const { Task } = require("devtools/shared/task");
const { ViewHelpers } = require("devtools/client/shared/widgets/view-helpers");
const { RequestsMenuView } = require("./requests-menu-view");
const { CustomRequestView } = require("./custom-request-view");
const { SidebarView } = require("./sidebar-view");
const { ACTIVITY_TYPE } = require("./constants");
const { Prefs } = require("./prefs");
@ -19,6 +18,7 @@ const ReactDOM = require("devtools/client/shared/vendor/react-dom");
const Provider = createFactory(require("devtools/client/shared/vendor/react-redux").Provider);
// Components
const CustomRequestPanel = createFactory(require("./shared/components/custom-request-panel"));
const DetailsPanel = createFactory(require("./shared/components/details-panel"));
const StatisticsPanel = createFactory(require("./components/statistics-panel"));
const Toolbar = createFactory(require("./components/toolbar"));
@ -33,6 +33,13 @@ var NetMonitorView = {
initialize: function () {
this._initializePanes();
this.customRequestPanel = $("#react-custom-request-panel-hook");
ReactDOM.render(Provider(
{ store: gStore },
CustomRequestPanel(),
), this.customRequestPanel);
this.detailsPanel = $("#react-details-panel-hook");
ReactDOM.render(Provider(
@ -55,7 +62,6 @@ var NetMonitorView = {
), this.toolbar);
this.RequestsMenu.initialize(gStore);
this.CustomRequest.initialize();
// Store watcher here is for observing the statisticsOpen state change.
// It should be removed once we migrate to react and apply react/redex binding.
@ -72,7 +78,7 @@ var NetMonitorView = {
destroy: function () {
this._isDestroyed = true;
this.RequestsMenu.destroy();
this.CustomRequest.destroy();
ReactDOM.unmountComponentAtNode(this.customRequestPanel);
ReactDOM.unmountComponentAtNode(this.detailsPanel);
ReactDOM.unmountComponentAtNode(this.statisticsPanel);
ReactDOM.unmountComponentAtNode(this.toolbar);
@ -195,6 +201,5 @@ function storeWatcher(initialValue, reduceValue, onChange) {
*/
NetMonitorView.Sidebar = new SidebarView();
NetMonitorView.RequestsMenu = new RequestsMenuView();
NetMonitorView.CustomRequest = new CustomRequestView();
exports.NetMonitorView = NetMonitorView;

View File

@ -35,65 +35,8 @@
<deck id="details-pane"
hidden="true">
<vbox id="custom-pane"
class="tabpanel-content">
<hbox align="baseline">
<label data-localization="content=netmonitor.custom.newRequest"
class="plain tabpanel-summary-label
custom-header"/>
<hbox flex="1" pack="end"
class="devtools-toolbarbutton-group">
<button id="custom-request-send-button"
class="devtools-toolbarbutton"
data-localization="label=netmonitor.custom.send"/>
<button id="custom-request-close-button"
class="devtools-toolbarbutton"
data-localization="label=netmonitor.custom.cancel"/>
</hbox>
</hbox>
<hbox id="custom-method-and-url"
class="tabpanel-summary-container"
align="center">
<textbox id="custom-method-value"
data-key="method"/>
<textbox id="custom-url-value"
flex="1"
data-key="url"/>
</hbox>
<vbox id="custom-query"
class="tabpanel-summary-container custom-section">
<label class="plain tabpanel-summary-label"
data-localization="content=netmonitor.custom.query"/>
<textbox id="custom-query-value"
class="tabpanel-summary-input"
multiline="true"
rows="4"
wrap="off"
data-key="query"/>
</vbox>
<vbox id="custom-headers"
class="tabpanel-summary-container custom-section">
<label class="plain tabpanel-summary-label"
data-localization="content=netmonitor.custom.headers"/>
<textbox id="custom-headers-value"
class="tabpanel-summary-input"
multiline="true"
rows="8"
wrap="off"
data-key="headers"/>
</vbox>
<vbox id="custom-postdata"
class="tabpanel-summary-container custom-section">
<label class="plain tabpanel-summary-label"
data-localization="content=netmonitor.custom.postData"/>
<textbox id="custom-postdata-value"
class="tabpanel-summary-input"
multiline="true"
rows="6"
wrap="off"
data-key="body"/>
</vbox>
</vbox>
<html:div xmlns="http://www.w3.org/1999/xhtml"
id="react-custom-request-panel-hook"/>
<html:div xmlns="http://www.w3.org/1999/xhtml"
id="react-details-panel-hook"/>
</deck>

View File

@ -8,13 +8,13 @@ const I = require("devtools/client/shared/vendor/immutable");
const { getUrlDetails } = require("../request-utils");
const {
ADD_REQUEST,
UPDATE_REQUEST,
CLEAR_REQUESTS,
SELECT_REQUEST,
PRESELECT_REQUEST,
CLONE_SELECTED_REQUEST,
REMOVE_SELECTED_CUSTOM_REQUEST,
OPEN_SIDEBAR,
REMOVE_SELECTED_CUSTOM_REQUEST,
SELECT_REQUEST,
SEND_CUSTOM_REQUEST,
UPDATE_REQUEST,
} = require("../constants");
const Request = I.Record({
@ -43,6 +43,9 @@ const Request = I.Record({
totalTime: undefined,
eventTimings: undefined,
headersSize: undefined,
// Text value is used for storing custom request query
// which only appears when user edit the custom requst form
customQueryValue: undefined,
requestHeaders: undefined,
requestHeadersFromUploadStream: undefined,
requestCookies: undefined,
@ -81,6 +84,7 @@ const UPDATE_PROPS = [
"totalTime",
"eventTimings",
"headersSize",
"customQueryValue",
"requestHeaders",
"requestHeadersFromUploadStream",
"requestCookies",
@ -92,6 +96,29 @@ const UPDATE_PROPS = [
"formDataSections",
];
/**
* Remove the currently selected custom request.
*/
function closeCustomRequest(state) {
let { requests, selectedId } = state;
if (!selectedId) {
return state;
}
let removedRequest = requests.get(selectedId);
// Only custom requests can be removed
if (!removedRequest || !removedRequest.isCustom) {
return state;
}
return state.withMutations(st => {
st.requests = st.requests.delete(selectedId);
st.selectedId = null;
});
}
function requestsReducer(state = new Requests(), action) {
switch (action.type) {
case ADD_REQUEST: {
@ -119,7 +146,6 @@ function requestsReducer(state = new Requests(), action) {
}
});
}
case UPDATE_REQUEST: {
let { requests, lastEndedMillis } = state;
@ -166,9 +192,6 @@ function requestsReducer(state = new Requests(), action) {
case SELECT_REQUEST: {
return state.set("selectedId", action.id);
}
case PRESELECT_REQUEST: {
return state.set("preselectedId", action.id);
}
case CLONE_SELECTED_REQUEST: {
let { requests, selectedId } = state;
@ -197,22 +220,13 @@ function requestsReducer(state = new Requests(), action) {
});
}
case REMOVE_SELECTED_CUSTOM_REQUEST: {
let { requests, selectedId } = state;
if (!selectedId) {
return state;
}
// Only custom requests can be removed
let removedRequest = requests.get(selectedId);
if (!removedRequest || !removedRequest.isCustom) {
return state;
}
return state.withMutations(st => {
st.requests = requests.delete(selectedId);
st.selectedId = null;
});
return closeCustomRequest(state);
}
case SEND_CUSTOM_REQUEST: {
// When a new request with a given id is added in future, select it immediately.
// where we know in advance the ID of the request, at a time when it
// wasn't sent yet.
return closeCustomRequest(state.set("preselectedId", action.id));
}
case OPEN_SIDEBAR: {
if (!action.open) {

View File

@ -6,35 +6,8 @@
"use strict";
const { KeyCodes } = require("devtools/client/shared/keycodes");
const { Task } = require("devtools/shared/task");
/**
* Helper method to get a wrapped function which can be bound to as
* an event listener directly and is executed only when data-key is
* present in event.target.
*
* @param {function} callback - function to execute execute when data-key
* is present in event.target.
* @param {bool} onlySpaceOrReturn - flag to indicate if callback should only
* be called when the space or return button
* is pressed
* @return {function} wrapped function with the target data-key as the first argument
* and the event as the second argument.
*/
function getKeyWithEvent(callback, onlySpaceOrReturn) {
return function (event) {
let key = event.target.getAttribute("data-key");
let filterKeyboardEvent = !onlySpaceOrReturn ||
event.keyCode === KeyCodes.DOM_VK_SPACE ||
event.keyCode === KeyCodes.DOM_VK_RETURN;
if (key && filterKeyboardEvent) {
callback(key);
}
};
}
/**
* Extracts any urlencoded form data sections (e.g. "?foo=bar&baz=42") from a
* POST request.
@ -254,7 +227,6 @@ function parseQueryString(query) {
}
module.exports = {
getKeyWithEvent,
getFormDataSections,
fetchHeaders,
formDataURI,

View File

@ -139,9 +139,6 @@ RequestsMenuView.prototype = {
},
));
this.sendCustomRequestEvent = this.sendCustomRequest.bind(this);
this.closeCustomRequestEvent = this.closeCustomRequest.bind(this);
this._summary = $("#requests-menu-network-summary-button");
this._summary.setAttribute("label", L10N.getStr("networkMenu.empty"));
@ -157,17 +154,6 @@ RequestsMenuView.prototype = {
{ store: this.store },
RequestList()
), this.mountPoint);
window.once("connected", this._onConnect.bind(this));
},
_onConnect() {
if (NetMonitorController.supportsCustomRequest) {
$("#custom-request-send-button")
.addEventListener("click", this.sendCustomRequestEvent);
$("#custom-request-close-button")
.addEventListener("click", this.closeCustomRequestEvent);
}
},
/**
@ -178,13 +164,6 @@ RequestsMenuView.prototype = {
Prefs.filters = getActiveFilters(this.store.getState());
// this.flushRequestsTask.disarm();
$("#custom-request-send-button")
.removeEventListener("click", this.sendCustomRequestEvent);
$("#custom-request-close-button")
.removeEventListener("click", this.closeCustomRequestEvent);
this._splitter.removeEventListener("mouseup", this.onResize);
window.removeEventListener("resize", this.onResize);
@ -426,48 +405,7 @@ RequestsMenuView.prototype = {
this.store.dispatch(Actions.resizeWaterfall(width));
}
});
},
/**
* Create a new custom request form populated with the data from
* the currently selected request.
*/
cloneSelectedRequest() {
this.store.dispatch(Actions.cloneSelectedRequest());
},
/**
* Send a new HTTP request using the data in the custom request form.
*/
sendCustomRequest: function () {
let selected = getSelectedRequest(this.store.getState());
let data = {
url: selected.url,
method: selected.method,
httpVersion: selected.httpVersion,
};
if (selected.requestHeaders) {
data.headers = selected.requestHeaders.headers;
}
if (selected.requestPostData) {
data.body = selected.requestPostData.postData.text;
}
NetMonitorController.webConsoleClient.sendHTTPRequest(data, response => {
let id = response.eventActor.actor;
this.store.dispatch(Actions.preselectRequest(id));
});
this.closeCustomRequest();
},
/**
* Remove the currently selected custom request.
*/
closeCustomRequest() {
this.store.dispatch(Actions.removeSelectedCustomRequest());
},
}
};
exports.RequestsMenuView = RequestsMenuView;

View File

@ -94,7 +94,7 @@ const getDisplayedRequestsSummary = createSelector(
const getSelectedRequest = createSelector(
state => state.requests,
({ selectedId, requests }) => selectedId ? requests.get(selectedId) : null
({ selectedId, requests }) => selectedId ? requests.get(selectedId) : undefined
);
function getRequestById(state, id) {

View File

@ -0,0 +1,257 @@
/* 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/. */
"use strict";
const {
DOM,
PropTypes,
} = require("devtools/client/shared/vendor/react");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const { L10N } = require("../../l10n");
const Actions = require("../../actions/index");
const { getSelectedRequest } = require("../../selectors/index");
const {
getUrlQuery,
parseQueryString,
writeHeaderText,
} = require("../../request-utils");
const {
button,
div,
input,
textarea,
} = DOM;
const CUSTOM_CANCEL = L10N.getStr("netmonitor.custom.cancel");
const CUSTOM_HEADERS = L10N.getStr("netmonitor.custom.headers");
const CUSTOM_NEW_REQUEST = L10N.getStr("netmonitor.custom.newRequest");
const CUSTOM_POSTDATA = L10N.getStr("netmonitor.custom.postData");
const CUSTOM_QUERY = L10N.getStr("netmonitor.custom.query");
const CUSTOM_SEND = L10N.getStr("netmonitor.custom.send");
function CustomRequestPanel({
removeSelectedCustomRequest,
request = {},
sendCustomRequest,
updateRequest,
}) {
let {
method,
customQueryValue,
requestHeaders,
requestPostData,
url,
} = request;
let headers = "";
if (requestHeaders) {
headers = requestHeaders.customHeadersValue ?
requestHeaders.customHeadersValue : writeHeaderText(requestHeaders.headers);
}
let queryArray = url ? parseQueryString(getUrlQuery(url)) : [];
let params = customQueryValue;
if (!params) {
params = queryArray ?
queryArray.map(({ name, value }) => name + "=" + value).join("\n") : "";
}
let postData = requestPostData && requestPostData.postData.text ?
requestPostData.postData.text : "";
return (
div({ className: "custom-request-panel" },
div({ className: "tabpanel-summary-container custom-request" },
div({ className: "custom-request-label custom-header" },
CUSTOM_NEW_REQUEST
),
button({
className: "devtools-button",
id: "custom-request-send-button",
onClick: sendCustomRequest,
},
CUSTOM_SEND
),
button({
className: "devtools-button",
id: "custom-request-close-button",
onClick: removeSelectedCustomRequest,
},
CUSTOM_CANCEL
),
),
div({
className: "tabpanel-summary-container custom-method-and-url",
id: "custom-method-and-url",
},
input({
className: "custom-method-value",
id: "custom-method-value",
onChange: (evt) => updateCustomRequestFields(evt, request, updateRequest),
value: method || "GET",
}),
input({
className: "custom-url-value",
id: "custom-url-value",
onChange: (evt) => updateCustomRequestFields(evt, request, updateRequest),
value: url || "http://",
}),
),
// Hide query field when there is no params
params ? div({
className: "tabpanel-summary-container custom-section",
id: "custom-query",
},
div({ className: "custom-request-label" }, CUSTOM_QUERY),
textarea({
className: "tabpanel-summary-input",
id: "custom-query-value",
onChange: (evt) => updateCustomRequestFields(evt, request, updateRequest),
rows: 4,
value: params,
wrap: "off",
})
) : null,
div({
id: "custom-headers",
className: "tabpanel-summary-container custom-section",
},
div({ className: "custom-request-label" }, CUSTOM_HEADERS),
textarea({
className: "tabpanel-summary-input",
id: "custom-headers-value",
onChange: (evt) => updateCustomRequestFields(evt, request, updateRequest),
rows: 8,
value: headers,
wrap: "off",
})
),
div({
id: "custom-postdata",
className: "tabpanel-summary-container custom-section",
},
div({ className: "custom-request-label" }, CUSTOM_POSTDATA),
textarea({
className: "tabpanel-summary-input",
id: "custom-postdata-value",
onChange: (evt) => updateCustomRequestFields(evt, request, updateRequest),
rows: 6,
value: postData,
wrap: "off",
})
),
)
);
}
CustomRequestPanel.displayName = "CustomRequestPanel";
CustomRequestPanel.propTypes = {
removeSelectedCustomRequest: PropTypes.func.isRequired,
request: PropTypes.object,
sendCustomRequest: PropTypes.func.isRequired,
updateRequest: PropTypes.func.isRequired,
};
/**
* Parse a text representation of a name[divider]value list with
* the given name regex and divider character.
*
* @param {string} text - Text of list
* @return {array} array of headers info {name, value}
*/
function parseRequestText(text, namereg, divider) {
let regex = new RegExp(`(${namereg})\\${divider}\\s*(.+)`);
let pairs = [];
for (let line of text.split("\n")) {
let matches = regex.exec(line);
if (matches) {
let [, name, value] = matches;
pairs.push({ name, value });
}
}
return pairs;
}
/**
* Update Custom Request Fields
*
* @param {Object} evt click event
* @param {Object} request current request
* @param {updateRequest} updateRequest action
*/
function updateCustomRequestFields(evt, request, updateRequest) {
const val = evt.target.value;
let data;
switch (evt.target.id) {
case "custom-headers-value":
let customHeadersValue = val || "";
// Parse text representation of multiple HTTP headers
let headersArray = parseRequestText(customHeadersValue, "\\S+?", ":");
// Remove temp customHeadersValue while query string is parsable
if (customHeadersValue === "" ||
headersArray.length === customHeadersValue.split("\n").length) {
customHeadersValue = null;
}
data = {
requestHeaders: {
customHeadersValue,
headers: headersArray,
},
};
break;
case "custom-method-value":
data = { method: val.trim() };
break;
case "custom-postdata-value":
data = {
requestPostData: {
postData: { text: val },
}
};
break;
case "custom-query-value":
let customQueryValue = val || "";
// Parse readable text list of a query string
let queryArray = customQueryValue ?
parseRequestText(customQueryValue, ".+?", "=") : [];
// Write out a list of query params into a query string
let queryString = queryArray.map(
({ name, value }) => name + "=" + value).join("&");
let url = queryString ? [request.url.split("?")[0], queryString].join("?") :
request.url.split("?")[0];
// Remove temp customQueryValue while query string is parsable
if (customQueryValue === "" ||
queryArray.length === customQueryValue.split("\n").length) {
customQueryValue = null;
}
data = {
customQueryValue,
url,
};
break;
case "custom-url-value":
data = {
customQueryValue: null,
url: val
};
break;
default:
break;
}
if (data) {
// All updateRequest batch mode should be disabled to make UI editing in sync
updateRequest(request.id, data, false);
}
}
module.exports = connect(
(state) => ({ request: getSelectedRequest(state) }),
(dispatch) => ({
removeSelectedCustomRequest: () => dispatch(Actions.removeSelectedCustomRequest()),
sendCustomRequest: () => dispatch(Actions.sendCustomRequest()),
updateRequest: (id, data, batch) => dispatch(Actions.updateRequest(id, data, batch)),
})
)(CustomRequestPanel);

View File

@ -4,6 +4,7 @@
DevToolsModules(
'cookies-panel.js',
'custom-request-panel.js',
'details-panel.js',
'editor.js',
'headers-mdn.js',

View File

@ -63,14 +63,25 @@ function ParamsPanel({
name ? Object.assign(acc, { [name]: value }) : acc
, {});
}
// Form Data section
if (formDataSections && formDataSections.length > 0) {
let sections = formDataSections.filter((str) => /\S/.test(str)).join("&");
object[PARAMS_FORM_DATA] =
parseQueryString(sections)
.reduce((acc, { name, value }) =>
name ? Object.assign(acc, { [name]: value }) : acc
, {});
.reduce((map, obj) => {
let value = map[obj.name];
// Deal with duplicate key case (ex: multiple selection)
if (value) {
if (typeof value !== "object") {
map[obj.name] = [value];
}
map[obj.name].push(obj.value);
} else {
map[obj.name] = obj.value;
}
return map;
}, {});
}
// Request payload section

View File

@ -38,10 +38,6 @@ SidebarView.prototype = {
populate: Task.async(function* (data) {
let isCustom = data.isCustom;
if (isCustom) {
yield NetMonitorView.CustomRequest.populate(data);
}
$("#details-pane").selectedIndex = isCustom ? 0 : 1;
window.emit(EVENTS.SIDEBAR_POPULATED);

View File

@ -134,6 +134,7 @@ skip-if = (os == 'linux' && debug && bits == 32) # Bug 1303439
[browser_net_req-resp-bodies.js]
[browser_net_resend_cors.js]
[browser_net_resend_headers.js]
[browser_net_resend.js]
[browser_net_security-details.js]
[browser_net_security-error.js]
[browser_net_security-icon-click.js]

View File

@ -30,13 +30,13 @@ add_task(function* () {
wait = waitForDOM(document, ".raw-headers-container textarea", 2);
EventUtils.sendMouseEvent({ type: "click" },
document.querySelectorAll(".tool-button")[1]);
document.querySelectorAll(".headers-summary .tool-button")[1]);
yield wait;
testShowRawHeaders(origItem);
EventUtils.sendMouseEvent({ type: "click" },
document.querySelectorAll(".tool-button")[1]);
document.querySelectorAll(".headers-summary .tool-button")[1]);
testHideRawHeaders(document);

View File

@ -17,7 +17,8 @@ add_task(function* () {
info("Starting test... ");
let { panelWin } = monitor;
let { document, EVENTS, NetMonitorView } = panelWin;
let { document, gStore, NetMonitorView, windowRequire } = panelWin;
let Actions = windowRequire("devtools/client/netmonitor/actions/index");
let { RequestsMenu } = NetMonitorView;
RequestsMenu.lazyUpdate = false;
@ -33,9 +34,7 @@ add_task(function* () {
RequestsMenu.selectedItem = origItem;
// add a new custom request cloned from selected request
let onPopulated = panelWin.once(EVENTS.CUSTOMREQUESTVIEW_POPULATED);
RequestsMenu.cloneSelectedRequest();
yield onPopulated;
gStore.dispatch(Actions.cloneSelectedRequest());
testCustomForm(origItem);
@ -50,7 +49,7 @@ add_task(function* () {
// send the new request
wait = waitForNetworkEvents(monitor, 0, 1);
RequestsMenu.sendCustomRequest();
gStore.dispatch(Actions.sendCustomRequest());
yield wait;
let sentItem = RequestsMenu.selectedItem;

View File

@ -12,7 +12,8 @@ add_task(function* () {
let { tab, monitor } = yield initNetMonitor(CORS_URL);
info("Starting test... ");
let { EVENTS, NetMonitorView } = monitor.panelWin;
let { gStore, NetMonitorView, windowRequire } = monitor.panelWin;
let Actions = windowRequire("devtools/client/netmonitor/actions/index");
let { RequestsMenu } = NetMonitorView;
RequestsMenu.lazyUpdate = false;
@ -27,51 +28,45 @@ add_task(function* () {
yield wait;
const METHODS = ["OPTIONS", "POST"];
const ITEMS = METHODS.map((val, i) => RequestsMenu.getItemAtIndex(i));
// Check the requests that were sent
for (let [i, method] of METHODS.entries()) {
let item = RequestsMenu.getItemAtIndex(i);
is(item.method, method, `The ${method} request has the right method`);
is(item.url, requestUrl, `The ${method} request has the right URL`);
}
ITEMS.forEach((item, i) => {
is(item.method, METHODS[i], `The ${item.method} request has the right method`);
is(item.url, requestUrl, `The ${item.method} request has the right URL`);
});
// Resend both requests without modification. Wait for resent OPTIONS, then POST.
// POST is supposed to have no preflight OPTIONS request this time (CORS is disabled)
let onRequests = waitForNetworkEvents(monitor, 1, 1);
for (let [i, method] of METHODS.entries()) {
let item = RequestsMenu.getItemAtIndex(i);
info(`Selecting the ${method} request (at index ${i})`);
let onRequests = waitForNetworkEvents(monitor, 1, 0);
ITEMS.forEach((item) => {
info(`Selecting the ${item.method} request`);
RequestsMenu.selectedItem = item;
info("Cloning the selected request into a custom clone");
let onPopulate = monitor.panelWin.once(EVENTS.CUSTOMREQUESTVIEW_POPULATED);
RequestsMenu.cloneSelectedRequest();
yield onPopulate;
gStore.dispatch(Actions.cloneSelectedRequest());
info("Sending the cloned request (without change)");
RequestsMenu.sendCustomRequest();
}
gStore.dispatch(Actions.sendCustomRequest());
});
info("Waiting for both resent requests");
yield onRequests;
// Check the resent requests
for (let [i, method] of METHODS.entries()) {
let index = i + 2;
let item = RequestsMenu.getItemAtIndex(index);
is(item.method, method, `The ${method} request has the right method`);
is(item.url, requestUrl, `The ${method} request has the right URL`);
is(item.status, 200, `The ${method} response has the right status`);
ITEMS.forEach((item, i) => {
is(item.method, METHODS[i], `The ${item.method} request has the right method`);
is(item.url, requestUrl, `The ${item.method} request has the right URL`);
is(item.status, 200, `The ${item.method} response has the right status`);
if (method === "POST") {
if (item.method === "POST") {
is(item.requestPostData.postData.text, "post-data",
"The POST request has the right POST data");
// eslint-disable-next-line mozilla/no-cpows-in-tests
is(item.responseContent.content.text, "Access-Control-Allow-Origin: *",
"The POST response has the right content");
}
}
});
info("Finishing the test");
return teardown(monitor);

View File

@ -28,6 +28,7 @@
align-items: center;
}
.custom-request-panel,
#details-pane {
/* Make details-pane's width adjustable by splitter */
min-width: 50px;
@ -45,18 +46,10 @@
display: none;
}
#custom-pane {
overflow: auto;
}
#response-content-image-box {
overflow: auto;
}
#network-statistics-charts {
overflow: auto;
}
.cropped-textbox .textbox-input {
/* workaround for textbox not supporting the @crop attribute */
text-overflow: ellipsis;
@ -96,7 +89,7 @@
--table-splitter-color: rgba(0,0,0,0.15);
--table-zebra-background: rgba(0,0,0,0.05);
--timing-blocked-color: rgba(235, 83, 104, 0.8); /* red */
--timing-blocked-color: rgba(235, 83, 104, 0.8); /* red */
--timing-dns-color: rgba(223, 128, 255, 0.8); /* pink */
--timing-connect-color: rgba(217, 102, 41, 0.8); /* orange */
--timing-send-color: rgba(70, 175, 227, 0.8); /* light blue */
@ -661,14 +654,6 @@
/* Network request details tabpanels */
.tabpanel-content {
background-color: var(--theme-sidebar-background);
}
.theme-dark .tabpanel-content {
color: var(--theme-selection-color);
}
.theme-firebug .variables-view-scope:focus > .title {
color: var(--theme-body-color);
}
@ -785,24 +770,61 @@
}
}
/* Custom request form */
/* Custom request view */
#custom-pane {
padding: 0.6em 0.5em;
.custom-request-panel {
overflow: auto;
/* Full view hight - toolbar height */
height: calc(100vh - 24px);
padding: 6px 4px;
background-color: var(--theme-sidebar-background);
}
.theme-dark .custom-request-panel {
color: var(--theme-selection-color);
}
.custom-request-label {
font-weight: 600;
}
.custom-request-panel textarea {
resize: none;
font: message-box;
}
.custom-request-panel .devtools-button {
margin: 3px 1px;
min-width: 78px;
}
.custom-header,
.custom-method-and-url,
.custom-request,
.custom-section {
display: flex;
}
.custom-header {
flex-grow: 1;
font-size: 1.1em;
padding-top: 4px;
}
.custom-section {
flex-direction: column;
margin-top: 0.5em;
}
#custom-method-value {
.custom-method-value {
width: 4.5em;
}
.custom-url-value {
flex-grow: 1;
margin-inline-start: 6px;
}
/* Performance analysis buttons */
#requests-menu-network-summary-button {
@ -1002,6 +1024,11 @@
padding-left: 8px;
}
.custom-request-panel {
height: 100%;
}
.custom-request-panel,
#details-pane {
margin: 0 !important;
/* To prevent all the margin hacks to hide the sidebar. */
@ -1212,34 +1239,39 @@
}
.headers-summary .tool-button {
border: 1px solid transparent;
color: var(--theme-body-color);
transition: background 0.05s ease-in-out;
margin-inline-end: 6px;
padding: 0 5px;
}
.theme-light .headers-summary .tool-button {
.tool-button {
background: transparent;
border: none;
border-color: var(--toolbar-button-border-color);
color: var(--theme-body-color);
min-height: 18px;
transition: background 0.05s ease-in-out;
}
.theme-light .tool-button {
background-color: var(--toolbar-tab-hover);
}
.theme-light .headers-summary .tool-button:hover {
.theme-light .tool-button:hover {
background-color: rgba(170, 170, 170, 0.3);
}
.theme-light .headers-summary .tool-button:hover:active {
.theme-light .tool-button:hover:active {
background-color: var(--toolbar-tab-hover-active);
}
.theme-dark .headers-summary .tool-button {
.theme-dark .tool-button {
background-color: rgba(0, 0, 0, 0.2);
}
.theme-dark .headers-summary .tool-button:hover {
.theme-dark .tool-button:hover {
background-color: rgba(0, 0, 0, 0.3);
}
.theme-dark .headers-summary .tool-button:hover:active {
.theme-dark .tool-button:hover:active {
background-color: rgba(0, 0, 0, 0.4);
}
@ -1254,7 +1286,7 @@
.headers-summary .raw-headers {
width: 50%;
padding: 0px 4px;
padding: 0 4px;
}
.headers-summary .raw-headers textarea {
@ -1297,6 +1329,7 @@
overflow: hidden;
}
#react-custom-request-panel-hook,
#statistics-panel,
#react-details-panel-hook {
display: flex;

View File

@ -1870,6 +1870,10 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
extraArgs.push_back("-stringPrefs");
extraArgs.push_back(stringPrefs.str());
if (gSafeMode) {
extraArgs.push_back("-safeMode");
}
if (!mSubprocess->LaunchAndWaitForProcessHandle(extraArgs)) {
MarkAsDead();
return false;

View File

@ -197,6 +197,9 @@ ContentProcess::Init(int aArgc, char* aArgv[])
SET_PREF_PHASE(END_INIT_PREFS);
foundStringPrefs = true;
}
else if (!strcmp(aArgv[idx], "-safeMode")) {
gSafeMode = true;
}
#if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
else if (!strcmp(aArgv[idx], "-profile")) {

View File

@ -160,7 +160,7 @@ parent:
async ReturnSitesWithData(nsCString[] aSites, uint64_t aCallbackId);
sync GetKeyState(int32_t aVirtKey)
intr GetKeyState(int32_t aVirtKey)
returns (int16_t aState);
intr NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges(bool shouldRegister)

View File

@ -2118,7 +2118,7 @@ PMCGetKeyState(int aVirtKey)
PluginModuleChild* chromeInstance = PluginModuleChild::GetChrome();
if (chromeInstance) {
int16_t ret = 0;
if (chromeInstance->SendGetKeyState(aVirtKey, &ret)) {
if (chromeInstance->CallGetKeyState(aVirtKey, &ret)) {
return ret;
}
}

View File

@ -3403,19 +3403,19 @@ PluginModuleChromeParent::RecvProfile(const nsCString& aProfile)
}
mozilla::ipc::IPCResult
PluginModuleParent::RecvGetKeyState(const int32_t& aVirtKey, int16_t* aRet)
PluginModuleParent::AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet)
{
return IPC_FAIL_NO_REASON(this);
}
mozilla::ipc::IPCResult
PluginModuleChromeParent::RecvGetKeyState(const int32_t& aVirtKey,
PluginModuleChromeParent::AnswerGetKeyState(const int32_t& aVirtKey,
int16_t* aRet)
{
#if defined(XP_WIN)
*aRet = ::GetKeyState(aVirtKey);
return IPC_OK();
#else
return PluginModuleParent::RecvGetKeyState(aVirtKey, aRet);
return PluginModuleParent::AnswerGetKeyState(aVirtKey, aRet);
#endif
}

View File

@ -213,7 +213,7 @@ protected:
virtual mozilla::ipc::IPCResult RecvProfile(const nsCString& aProfile) override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
virtual mozilla::ipc::IPCResult AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
virtual mozilla::ipc::IPCResult RecvReturnClearSiteData(const NPError& aRv,
const uint64_t& aCallbackId) override;
@ -507,7 +507,7 @@ class PluginModuleChromeParent
RecvProfile(const nsCString& aProfile) override;
virtual mozilla::ipc::IPCResult
RecvGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet) override;
private:
virtual void

View File

@ -1383,9 +1383,12 @@ EditorBase::CreateNode(nsIAtom* aTag,
AutoRules beginRulesSniffing(this, EditAction::createNode, nsIEditor::eNext);
for (auto& listener : mActionListeners) {
listener->WillCreateNode(nsDependentAtomString(aTag),
GetAsDOMNode(aParent), aPosition);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillCreateNode(nsDependentAtomString(aTag),
GetAsDOMNode(aParent), aPosition);
}
}
nsCOMPtr<Element> ret;
@ -1400,9 +1403,12 @@ EditorBase::CreateNode(nsIAtom* aTag,
mRangeUpdater.SelAdjCreateNode(aParent, aPosition);
for (auto& listener : mActionListeners) {
listener->DidCreateNode(nsDependentAtomString(aTag), GetAsDOMNode(ret),
GetAsDOMNode(aParent), aPosition, rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidCreateNode(nsDependentAtomString(aTag), GetAsDOMNode(ret),
GetAsDOMNode(aParent), aPosition, rv);
}
}
return ret.forget();
@ -1427,9 +1433,12 @@ EditorBase::InsertNode(nsIContent& aNode,
{
AutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
for (auto& listener : mActionListeners) {
listener->WillInsertNode(aNode.AsDOMNode(), aParent.AsDOMNode(),
aPosition);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillInsertNode(aNode.AsDOMNode(), aParent.AsDOMNode(),
aPosition);
}
}
RefPtr<InsertNodeTransaction> transaction =
@ -1438,9 +1447,12 @@ EditorBase::InsertNode(nsIContent& aNode,
mRangeUpdater.SelAdjInsertNode(aParent.AsDOMNode(), aPosition);
for (auto& listener : mActionListeners) {
listener->DidInsertNode(aNode.AsDOMNode(), aParent.AsDOMNode(), aPosition,
rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidInsertNode(aNode.AsDOMNode(), aParent.AsDOMNode(), aPosition,
rv);
}
}
return rv;
@ -1466,8 +1478,11 @@ EditorBase::SplitNode(nsIContent& aNode,
{
AutoRules beginRulesSniffing(this, EditAction::splitNode, nsIEditor::eNext);
for (auto& listener : mActionListeners) {
listener->WillSplitNode(aNode.AsDOMNode(), aOffset);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillSplitNode(aNode.AsDOMNode(), aOffset);
}
}
RefPtr<SplitNodeTransaction> transaction =
@ -1480,9 +1495,12 @@ EditorBase::SplitNode(nsIContent& aNode,
mRangeUpdater.SelAdjSplitNode(aNode, aOffset, newNode);
nsresult rv = aResult.StealNSResult();
for (auto& listener : mActionListeners) {
listener->DidSplitNode(aNode.AsDOMNode(), aOffset, GetAsDOMNode(newNode),
rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidSplitNode(aNode.AsDOMNode(), aOffset, GetAsDOMNode(newNode),
rv);
}
}
// Note: result might be a success code, so we can't use Throw() to
// set it on aResult.
@ -1518,9 +1536,12 @@ EditorBase::JoinNodes(nsINode& aLeftNode,
// Find the number of children of the lefthand node
uint32_t oldLeftNodeLen = aLeftNode.Length();
for (auto& listener : mActionListeners) {
listener->WillJoinNodes(aLeftNode.AsDOMNode(), aRightNode.AsDOMNode(),
parent->AsDOMNode());
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillJoinNodes(aLeftNode.AsDOMNode(), aRightNode.AsDOMNode(),
parent->AsDOMNode());
}
}
nsresult rv = NS_OK;
@ -1533,9 +1554,12 @@ EditorBase::JoinNodes(nsINode& aLeftNode,
mRangeUpdater.SelAdjJoinNodes(aLeftNode, aRightNode, *parent, offset,
(int32_t)oldLeftNodeLen);
for (auto& listener : mActionListeners) {
listener->DidJoinNodes(aLeftNode.AsDOMNode(), aRightNode.AsDOMNode(),
parent->AsDOMNode(), rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidJoinNodes(aLeftNode.AsDOMNode(), aRightNode.AsDOMNode(),
parent->AsDOMNode(), rv);
}
}
return rv;
@ -1556,8 +1580,11 @@ EditorBase::DeleteNode(nsINode* aNode)
nsIEditor::ePrevious);
// save node location for selection updating code.
for (auto& listener : mActionListeners) {
listener->WillDeleteNode(aNode->AsDOMNode());
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillDeleteNode(aNode->AsDOMNode());
}
}
RefPtr<DeleteNodeTransaction> transaction;
@ -1566,8 +1593,11 @@ EditorBase::DeleteNode(nsINode* aNode)
rv = DoTransaction(transaction);
}
for (auto& listener : mActionListeners) {
listener->DidDeleteNode(aNode->AsDOMNode(), rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidDeleteNode(aNode->AsDOMNode(), rv);
}
}
NS_ENSURE_SUCCESS(rv, rv);
@ -1842,7 +1872,7 @@ void
EditorBase::NotifyEditorObservers(NotificationForEditorObservers aNotification)
{
// Copy the observers since EditAction()s can modify mEditorObservers.
nsTArray<mozilla::OwningNonNull<nsIEditorObserver>> observers(mEditorObservers);
AutoEditorObserverArray observers(mEditorObservers);
switch (aNotification) {
case eNotifyEditorObserversOfEnd:
mIsInEditAction = false;
@ -2504,10 +2534,13 @@ EditorBase::InsertTextIntoTextNodeImpl(const nsAString& aStringToInsert,
}
// Let listeners know what's up
for (auto& listener : mActionListeners) {
listener->WillInsertText(
static_cast<nsIDOMCharacterData*>(insertedTextNode->AsDOMNode()),
insertedOffset, aStringToInsert);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillInsertText(
static_cast<nsIDOMCharacterData*>(insertedTextNode->AsDOMNode()),
insertedOffset, aStringToInsert);
}
}
// XXX We may not need these view batches anymore. This is handled at a
@ -2517,10 +2550,13 @@ EditorBase::InsertTextIntoTextNodeImpl(const nsAString& aStringToInsert,
EndUpdateViewBatch();
// let listeners know what happened
for (auto& listener : mActionListeners) {
listener->DidInsertText(
static_cast<nsIDOMCharacterData*>(insertedTextNode->AsDOMNode()),
insertedOffset, aStringToInsert, rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidInsertText(
static_cast<nsIDOMCharacterData*>(insertedTextNode->AsDOMNode()),
insertedOffset, aStringToInsert, rv);
}
}
// Added some cruft here for bug 43366. Layout was crashing because we left
@ -2582,8 +2618,7 @@ EditorBase::NotifyDocumentListeners(
return NS_OK;
}
nsTArray<OwningNonNull<nsIDocumentStateListener>>
listeners(mDocStateListeners);
AutoDocumentStateListenerArray listeners(mDocStateListeners);
nsresult rv = NS_OK;
switch (aNotificationType) {
@ -2655,19 +2690,25 @@ EditorBase::DeleteText(nsGenericDOMDataNode& aCharData,
nsIEditor::ePrevious);
// Let listeners know what's up
for (auto& listener : mActionListeners) {
listener->WillDeleteText(
static_cast<nsIDOMCharacterData*>(GetAsDOMNode(&aCharData)), aOffset,
aLength);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->WillDeleteText(
static_cast<nsIDOMCharacterData*>(GetAsDOMNode(&aCharData)), aOffset,
aLength);
}
}
nsresult rv = DoTransaction(transaction);
// Let listeners know what happened
for (auto& listener : mActionListeners) {
listener->DidDeleteText(
static_cast<nsIDOMCharacterData*>(GetAsDOMNode(&aCharData)), aOffset,
aLength, rv);
{
AutoActionListenerArray listeners(mActionListeners);
for (auto& listener : listeners) {
listener->DidDeleteText(
static_cast<nsIDOMCharacterData*>(GetAsDOMNode(&aCharData)), aOffset,
aLength, rv);
}
}
return rv;
@ -4031,17 +4072,20 @@ EditorBase::DeleteSelectionImpl(EDirection aAction,
if (NS_SUCCEEDED(rv)) {
AutoRules beginRulesSniffing(this, EditAction::deleteSelection, aAction);
// Notify nsIEditActionListener::WillDelete[Selection|Text|Node]
if (!deleteNode) {
for (auto& listener : mActionListeners) {
listener->WillDeleteSelection(selection);
}
} else if (deleteCharData) {
for (auto& listener : mActionListeners) {
listener->WillDeleteText(deleteCharData, deleteCharOffset, 1);
}
} else {
for (auto& listener : mActionListeners) {
listener->WillDeleteNode(deleteNode->AsDOMNode());
{
AutoActionListenerArray listeners(mActionListeners);
if (!deleteNode) {
for (auto& listener : listeners) {
listener->WillDeleteSelection(selection);
}
} else if (deleteCharData) {
for (auto& listener : listeners) {
listener->WillDeleteText(deleteCharData, deleteCharOffset, 1);
}
} else {
for (auto& listener : listeners) {
listener->WillDeleteNode(deleteNode->AsDOMNode());
}
}
}
@ -4049,17 +4093,20 @@ EditorBase::DeleteSelectionImpl(EDirection aAction,
rv = DoTransaction(transaction);
// Notify nsIEditActionListener::DidDelete[Selection|Text|Node]
if (!deleteNode) {
for (auto& listener : mActionListeners) {
listener->DidDeleteSelection(selection);
}
} else if (deleteCharData) {
for (auto& listener : mActionListeners) {
listener->DidDeleteText(deleteCharData, deleteCharOffset, 1, rv);
}
} else {
for (auto& listener : mActionListeners) {
listener->DidDeleteNode(deleteNode->AsDOMNode(), rv);
{
AutoActionListenerArray listeners(mActionListeners);
if (!deleteNode) {
for (auto& listener : mActionListeners) {
listener->DidDeleteSelection(selection);
}
} else if (deleteCharData) {
for (auto& listener : mActionListeners) {
listener->DidDeleteText(deleteCharData, deleteCharOffset, 1, rv);
}
} else {
for (auto& listener : mActionListeners) {
listener->DidDeleteNode(deleteNode->AsDOMNode(), rv);
}
}
}
}

View File

@ -26,6 +26,7 @@
#include "nsIWeakReferenceUtils.h" // for nsWeakPtr
#include "nsLiteralString.h" // for NS_LITERAL_STRING
#include "nsString.h" // for nsCString
#include "nsTArray.h" // for nsTArray and nsAutoTArray
#include "nsWeakReference.h" // for nsSupportsWeakReference
#include "nscore.h" // for nsresult, nsAString, etc.
@ -1003,11 +1004,17 @@ protected:
RefPtr<TextComposition> mComposition;
// Listens to all low level actions on the doc.
nsTArray<OwningNonNull<nsIEditActionListener>> mActionListeners;
typedef AutoTArray<OwningNonNull<nsIEditActionListener>, 5>
AutoActionListenerArray;
AutoActionListenerArray mActionListeners;
// Just notify once per high level change.
nsTArray<OwningNonNull<nsIEditorObserver>> mEditorObservers;
typedef AutoTArray<OwningNonNull<nsIEditorObserver>, 3>
AutoEditorObserverArray;
AutoEditorObserverArray mEditorObservers;
// Listen to overall doc state (dirty or not, just created, etc.).
nsTArray<OwningNonNull<nsIDocumentStateListener>> mDocStateListeners;
typedef AutoTArray<OwningNonNull<nsIDocumentStateListener>, 1>
AutoDocumentStateListenerArray;
AutoDocumentStateListenerArray mDocStateListeners;
// Cached selection for AutoSelectionRestorer.
SelectionState mSavedSel;

View File

@ -16,7 +16,7 @@ namespace mozilla {
namespace _ipdltest {
bool
IPDLUnitTestProcessChild::Init()
IPDLUnitTestProcessChild::Init(int aArgc, char* aArgv[])
{
IPDLUnitTestChildInit(IOThreadChild::channel(),
ParentPid(),

View File

@ -23,7 +23,7 @@ public:
~IPDLUnitTestProcessChild()
{ }
virtual bool Init();
virtual bool Init(int aArgc, char* aArgv[]) override;
};
} // namespace _ipdltest

View File

@ -347,7 +347,7 @@
['arm_neon==1', {
'defines': ['WEBRTC_HAS_NEON',],
}],
['arm_neon==0 and (OS=="android" or moz_widget_toolkit_gonk==1)', {
['arm_neon==0 and arm_neon_optional==1', {
'defines': ['WEBRTC_DETECT_NEON',],
}],
],

View File

@ -1077,7 +1077,7 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
// Hence the weird SELECT * FROM (SELECT ...relevant suggested sites... LIMIT ?)
" SELECT * FROM (SELECT " +
Bookmarks._ID + ", " +
Bookmarks._ID + " AS " + Combined.BOOKMARK_ID + ", " +
" NULL " + " AS " + Combined.BOOKMARK_ID + ", " +
" -1 AS " + Combined.HISTORY_ID + ", " +
Bookmarks.URL + ", " +
Bookmarks.TITLE + ", " +

View File

@ -26,9 +26,10 @@ public class TopSite implements Item {
final String title = cursor.getString(cursor.getColumnIndexOrThrow(BrowserContract.Combined.TITLE));
final int type = cursor.getInt(cursor.getColumnIndexOrThrow(BrowserContract.TopSites.TYPE));
// We can't figure out bookmark state of a pin, so we leave it as unknown to be queried later.
// We can't figure out bookmark state of a pin or suggested site, so we leave it as unknown to be queried later.
Boolean isBookmarked = null;
if (type != BrowserContract.TopSites.TYPE_PINNED) {
if (type != BrowserContract.TopSites.TYPE_PINNED &&
type != BrowserContract.TopSites.TYPE_SUGGESTED) {
isBookmarked = !cursor.isNull(cursor.getColumnIndexOrThrow(BrowserContract.Combined.BOOKMARK_ID));
}

View File

@ -45,6 +45,9 @@ import android.util.Log;
public class GeckoNetworkManager extends BroadcastReceiver implements BundleEventListener {
private static final String LOGTAG = "GeckoNetworkManager";
// If network configuration and/or status changed, we send details of what changed.
// If we received a "check out new network state!" intent from the OS but nothing in it looks
// different, we ignore it. See Bug 1330836 for some relevant details.
private static final String LINK_DATA_CHANGED = "changed";
private static GeckoNetworkManager instance;
@ -321,8 +324,9 @@ public class GeckoNetworkManager extends BroadcastReceiver implements BundleEven
* Send current network state and connection type to whomever is listening.
*/
private void sendNetworkStateToListeners(final Context context) {
if (currentConnectionType != previousConnectionType ||
currentConnectionSubtype != previousConnectionSubtype) {
final boolean connectionTypeOrSubtypeChanged = currentConnectionType != previousConnectionType ||
currentConnectionSubtype != previousConnectionSubtype;
if (connectionTypeOrSubtypeChanged) {
previousConnectionType = currentConnectionType;
previousConnectionSubtype = currentConnectionSubtype;
@ -341,20 +345,26 @@ public class GeckoNetworkManager extends BroadcastReceiver implements BundleEven
}
}
final String status;
// If neither network status nor network configuration changed, do nothing.
if (currentNetworkStatus == previousNetworkStatus && !connectionTypeOrSubtypeChanged) {
return;
}
if (currentNetworkStatus != previousNetworkStatus) {
// If network status remains the same, send "changed". Otherwise, send new network status.
// See Bug 1330836 for relevant details.
final String status;
if (currentNetworkStatus == previousNetworkStatus) {
status = LINK_DATA_CHANGED;
} else {
previousNetworkStatus = currentNetworkStatus;
status = currentNetworkStatus.value;
} else {
status = LINK_DATA_CHANGED;
}
if (GeckoThread.isRunning()) {
onStatusChanged(status);
} else {
GeckoThread.queueNativeCall(GeckoNetworkManager.class, "onStatusChanged",
String.class, status);
String.class, status);
}
}

View File

@ -11,6 +11,7 @@
#include "mozilla/Logging.h"
#include "mozilla/Telemetry.h"
#include "nsCOMArray.h"
#include "nsDependentSubstring.h"
#include "nsIAsyncInputStream.h"
#include "nsIFile.h"
#include "nsIMutableArray.h"
@ -893,11 +894,11 @@ BackgroundFileSaver::ExtractSignatureInfo(const nsAString& filePath)
continue;
}
nsCOMPtr<nsIX509Cert> nssCert = nullptr;
rv = certDB->ConstructX509(
nsDependentCSubstring certDER(
reinterpret_cast<char *>(
certChainElement->pCertContext->pbCertEncoded),
certChainElement->pCertContext->cbCertEncoded,
getter_AddRefs(nssCert));
certChainElement->pCertContext->cbCertEncoded);
rv = certDB->ConstructX509(certDER, getter_AddRefs(nssCert));
if (!nssCert) {
extractionSuccess = false;
LOG(("Couldn't create NSS cert [this = %p]", this));

View File

@ -8,6 +8,7 @@
#include "mozilla/net/DNS.h"
#include "nsAutoPtr.h"
#include "nsComponentManagerUtils.h"
#include "nsDependentSubstring.h"
#include "nsIServerSocket.h"
#include "nsITimer.h"
#include "nsIX509Cert.h"
@ -467,9 +468,10 @@ TLSServerConnectionInfo::HandshakeCallback(PRFileDesc* aFD)
}
nsCOMPtr<nsIX509Cert> clientCertPSM;
rv = certDB->ConstructX509(reinterpret_cast<char*>(clientCert->derCert.data),
clientCert->derCert.len,
getter_AddRefs(clientCertPSM));
nsDependentCSubstring certDER(
reinterpret_cast<char*>(clientCert->derCert.data),
clientCert->derCert.len);
rv = certDB->ConstructX509(certDER, getter_AddRefs(clientCertPSM));
if (NS_FAILED(rv)) {
return rv;
}

View File

@ -1155,4 +1155,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1495033969959000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1495121617234000);

View File

@ -82,7 +82,7 @@ interface nsIX509CertDB : nsISupports {
* @param aDBkey Database internal key, as obtained using
* attribute dbkey in nsIX509Cert.
*/
nsIX509Cert findCertByDBKey(in string aDBkey);
nsIX509Cert findCertByDBKey(in ACString aDBkey);
/**
* Find a certificate by email address.
@ -92,7 +92,7 @@ interface nsIX509CertDB : nsISupports {
*
* @return The matching certificate if found.
*/
nsIX509Cert findCertByEmailAddress(in string aEmailAddress);
nsIX509Cert findCertByEmailAddress(in ACString aEmailAddress);
/**
* Use this to import a stream sent down as a mime type into
@ -220,10 +220,9 @@ interface nsIX509CertDB : nsISupports {
*
* @param certDER The raw representation of a certificate,
* encoded as raw DER.
* @param length The length of the DER string.
* @return The new certificate object.
*/
nsIX509Cert constructX509(in string certDER, in unsigned long length);
nsIX509Cert constructX509(in ACString certDER);
/**
* Verifies the signature on the given JAR file to verify that it has a
@ -337,7 +336,7 @@ interface nsIX509CertDB : nsISupports {
verifyCertAtTime(in nsIX509Cert aCert,
in int64_t /*SECCertificateUsage*/ aUsage,
in uint32_t aFlags,
in string aHostname,
in ACString aHostname,
in uint64_t aTime,
out nsIX509CertList aVerifiedChain,
out bool aHasEVPolicy);
@ -345,7 +344,7 @@ interface nsIX509CertDB : nsISupports {
verifyCertNow(in nsIX509Cert aCert,
in int64_t /*SECCertificateUsage*/ aUsage,
in uint32_t aFlags,
in string aHostname,
in ACString aHostname,
out nsIX509CertList aVerifiedChain,
out bool aHasEVPolicy);
@ -356,7 +355,7 @@ interface nsIX509CertDB : nsISupports {
void asyncVerifyCertAtTime(in nsIX509Cert aCert,
in int64_t /*SECCertificateUsage*/ aUsage,
in uint32_t aFlags,
in string aHostname,
in ACString aHostname,
in uint64_t aTime,
in nsICertVerificationCallback aCallback);

View File

@ -94,13 +94,16 @@ nsNSSCertificateDB::~nsNSSCertificateDB()
}
NS_IMETHODIMP
nsNSSCertificateDB::FindCertByDBKey(const char* aDBKey,nsIX509Cert** _cert)
nsNSSCertificateDB::FindCertByDBKey(const nsACString& aDBKey,
/*out*/ nsIX509Cert** _cert)
{
NS_ENSURE_ARG_POINTER(aDBKey);
NS_ENSURE_ARG(aDBKey[0]);
NS_ENSURE_ARG_POINTER(_cert);
*_cert = nullptr;
if (aDBKey.IsEmpty()) {
return NS_ERROR_INVALID_ARG;
}
nsNSSShutDownPreventionLock locker;
if (isAlreadyShutDown()) {
return NS_ERROR_NOT_AVAILABLE;
@ -124,7 +127,7 @@ nsNSSCertificateDB::FindCertByDBKey(const char* aDBKey,nsIX509Cert** _cert)
}
nsresult
nsNSSCertificateDB::FindCertByDBKey(const char* aDBKey,
nsNSSCertificateDB::FindCertByDBKey(const nsACString& aDBKey,
UniqueCERTCertificate& cert)
{
static_assert(sizeof(uint64_t) == 8, "type size sanity check");
@ -994,7 +997,7 @@ nsNSSCertificateDB::ExportPKCS12File(nsIFile* aFile, uint32_t count,
}
NS_IMETHODIMP
nsNSSCertificateDB::FindCertByEmailAddress(const char* aEmailAddress,
nsNSSCertificateDB::FindCertByEmailAddress(const nsACString& aEmailAddress,
nsIX509Cert** _retval)
{
nsNSSShutDownPreventionLock locker;
@ -1005,8 +1008,9 @@ nsNSSCertificateDB::FindCertByEmailAddress(const char* aEmailAddress,
RefPtr<SharedCertVerifier> certVerifier(GetDefaultCertVerifier());
NS_ENSURE_TRUE(certVerifier, NS_ERROR_UNEXPECTED);
const nsCString& flatEmailAddress = PromiseFlatCString(aEmailAddress);
UniqueCERTCertList certlist(
PK11_FindCertsFromEmailAddress(aEmailAddress, nullptr));
PK11_FindCertsFromEmailAddress(flatEmailAddress.get(), nullptr));
if (!certlist)
return NS_ERROR_FAILURE;
@ -1073,12 +1077,11 @@ nsNSSCertificateDB::ConstructX509FromBase64(const nsACString& base64,
return rv;
}
return ConstructX509(certDER.get(), certDER.Length(), _retval);
return ConstructX509(certDER, _retval);
}
NS_IMETHODIMP
nsNSSCertificateDB::ConstructX509(const char* certDER,
uint32_t lengthDER,
nsNSSCertificateDB::ConstructX509(const nsACString& certDER,
nsIX509Cert** _retval)
{
nsNSSShutDownPreventionLock locker;
@ -1089,13 +1092,13 @@ nsNSSCertificateDB::ConstructX509(const char* certDER,
return NS_ERROR_INVALID_POINTER;
}
SECItem secitem_cert;
secitem_cert.type = siDERCertBuffer;
secitem_cert.data = (unsigned char*)certDER;
secitem_cert.len = lengthDER;
SECItem certData;
certData.type = siDERCertBuffer;
certData.data = BitwiseCast<unsigned char*, const char*>(certDER.BeginReading());
certData.len = certDER.Length();
UniqueCERTCertificate cert(CERT_NewTempCertificate(CERT_GetDefaultCertDB(),
&secitem_cert, nullptr,
&certData, nullptr,
false, true));
if (!cert)
return (PORT_GetError() == SEC_ERROR_NO_MEMORY)
@ -1364,7 +1367,7 @@ nsresult
VerifyCertAtTime(nsIX509Cert* aCert,
int64_t /*SECCertificateUsage*/ aUsage,
uint32_t aFlags,
const char* aHostname,
const nsACString& aHostname,
mozilla::pkix::Time aTime,
nsIX509CertList** aVerifiedChain,
bool* aHasEVPolicy,
@ -1392,13 +1395,14 @@ VerifyCertAtTime(nsIX509Cert* aCert,
SECOidTag evOidPolicy;
mozilla::pkix::Result result;
if (aHostname && aUsage == certificateUsageSSLServer) {
const nsCString& flatHostname = PromiseFlatCString(aHostname);
if (!aHostname.IsVoid() && aUsage == certificateUsageSSLServer) {
result = certVerifier->VerifySSLServerCert(nssCert,
nullptr, // stapledOCSPResponse
nullptr, // sctsFromTLSExtension
aTime,
nullptr, // Assume no context
aHostname,
flatHostname.get(),
resultChain,
false, // don't save intermediates
aFlags,
@ -1407,7 +1411,8 @@ VerifyCertAtTime(nsIX509Cert* aCert,
} else {
result = certVerifier->VerifyCert(nssCert.get(), aUsage, aTime,
nullptr, // Assume no context
aHostname,
aHostname.IsVoid() ? nullptr
: flatHostname.get(),
resultChain,
aFlags,
nullptr, // stapledOCSPResponse
@ -1434,7 +1439,7 @@ NS_IMETHODIMP
nsNSSCertificateDB::VerifyCertNow(nsIX509Cert* aCert,
int64_t /*SECCertificateUsage*/ aUsage,
uint32_t aFlags,
const char* aHostname,
const nsACString& aHostname,
nsIX509CertList** aVerifiedChain,
bool* aHasEVPolicy,
int32_t* /*PRErrorCode*/ _retval)
@ -1453,7 +1458,7 @@ NS_IMETHODIMP
nsNSSCertificateDB::VerifyCertAtTime(nsIX509Cert* aCert,
int64_t /*SECCertificateUsage*/ aUsage,
uint32_t aFlags,
const char* aHostname,
const nsACString& aHostname,
uint64_t aTime,
nsIX509CertList** aVerifiedChain,
bool* aHasEVPolicy,
@ -1473,7 +1478,7 @@ class VerifyCertAtTimeTask final : public CryptoTask
{
public:
VerifyCertAtTimeTask(nsIX509Cert* aCert, int64_t aUsage, uint32_t aFlags,
const char* aHostname, uint64_t aTime,
const nsACString& aHostname, uint64_t aTime,
nsICertVerificationCallback* aCallback)
: mCert(aCert)
, mUsage(aUsage)
@ -1494,13 +1499,7 @@ private:
if (!certDB) {
return NS_ERROR_FAILURE;
}
// Unfortunately mHostname will have made the empty string out of a null
// pointer passed in the constructor. If we pass the empty string on to
// VerifyCertAtTime with the usage certificateUsageSSLServer, it will call
// VerifySSLServerCert, which expects a non-empty hostname. To avoid this,
// check the length and use nullptr if appropriate.
const char* hostname = mHostname.Length() > 0 ? mHostname.get() : nullptr;
return certDB->VerifyCertAtTime(mCert, mUsage, mFlags, hostname, mTime,
return certDB->VerifyCertAtTime(mCert, mUsage, mFlags, mHostname, mTime,
getter_AddRefs(mVerifiedCertList),
&mHasEVPolicy, &mPRErrorCode);
}
@ -1534,7 +1533,7 @@ NS_IMETHODIMP
nsNSSCertificateDB::AsyncVerifyCertAtTime(nsIX509Cert* aCert,
int64_t /*SECCertificateUsage*/ aUsage,
uint32_t aFlags,
const char* aHostname,
const nsACString& aHostname,
uint64_t aTime,
nsICertVerificationCallback* aCallback)
{

View File

@ -40,7 +40,7 @@ public:
// This is a separate static method so nsNSSComponent can use it during NSS
// initialization. Other code should probably not use it.
static nsresult
FindCertByDBKey(const char* aDBKey, mozilla::UniqueCERTCertificate& cert);
FindCertByDBKey(const nsACString& aDBKey, mozilla::UniqueCERTCertificate& cert);
protected:
virtual ~nsNSSCertificateDB();

View File

@ -2158,8 +2158,7 @@ ClientAuthDataRunnable::RunOnTargetThread()
nsCOMPtr<nsIX509CertDB> certdb = do_GetService(NS_X509CERTDB_CONTRACTID);
if (certdb) {
nsCOMPtr<nsIX509Cert> foundCert;
rv = certdb->FindCertByDBKey(rememberedDBKey.get(),
getter_AddRefs(foundCert));
rv = certdb->FindCertByDBKey(rememberedDBKey, getter_AddRefs(foundCert));
if (NS_SUCCEEDED(rv) && foundCert) {
nsNSSCertificate* objCert =
BitwiseCast<nsNSSCertificate*, nsIX509Cert*>(foundCert.get());

View File

@ -28,6 +28,7 @@
1xcess.com: did not receive HSTS header
1years.cc: did not receive HSTS header
206rc.net: max-age too low: 2592000
246060.ru: could not connect to host
247loan.com: max-age too low: 0
25daysof.io: could not connect to host
2600hq.com: could not connect to host
@ -42,9 +43,10 @@
365.or.jp: did not receive HSTS header
3chit.cf: could not connect to host
3click-loan.com: could not connect to host
3sreporting.com: did not receive HSTS header
3yearloans.com: max-age too low: 0
404.sh: max-age too low: 0
420dongstorm.com: could not connect to host
404404.info: could not connect to host
42ms.org: could not connect to host
4455software.com: did not receive HSTS header
4679.space: could not connect to host
@ -100,8 +102,6 @@ actu-medias.com: did not receive HSTS header
actualite-videos.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
acuve.jp: could not connect to host
ada.is: max-age too low: 2592000
adam-kostecki.de: did not receive HSTS header
adamkostecki.de: did not receive HSTS header
adams.net: max-age too low: 0
adamwk.com: did not receive HSTS header
addaxpetroleum.com: could not connect to host
@ -133,8 +133,8 @@ aficotroceni.ro: did not receive HSTS header
afp548.tk: could not connect to host
agalaxyfarfaraway.co.uk: could not connect to host
agbremen.de: did not receive HSTS header
agentseeker.ca: could not connect to host
agilebits.net: could not connect to host
agrias.com.br: could not connect to host
agrimap.com: did not receive HSTS header
agrios.de: did not receive HSTS header
agro-id.gov.ua: could not connect to host
@ -153,7 +153,6 @@ aiw-thkoeln.online: could not connect to host
ajmahal.com: could not connect to host
akclinics.org: did not receive HSTS header
akombakom.net: did not receive HSTS header
akostecki.de: did not receive HSTS header
akselimedia.fi: did not receive HSTS header
akutun.cl: did not receive HSTS header
al-shami.net: could not connect to host
@ -177,7 +176,7 @@ alfa24.pro: could not connect to host
alittlebitcheeky.com: did not receive HSTS header
alkami.com: did not receive HSTS header
all-subtitles.com: did not receive HSTS header
all.tf: could not connect to host
all.tf: did not receive HSTS header
alldaymonitoring.com: could not connect to host
allforyou.at: could not connect to host
allinnote.com: could not connect to host
@ -211,7 +210,6 @@ analytic-s.ml: could not connect to host
anarchistischegroepnijmegen.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
anassiriphotography.com: could not connect to host
ancientkarma.com: could not connect to host
andbraiz.com: could not connect to host
andere-gedanken.net: max-age too low: 10
andiplusben.com: could not connect to host
andisadhdspot.com: did not receive HSTS header
@ -303,6 +301,7 @@ asc16.com: could not connect to host
asdpress.cn: could not connect to host
ashlane-cottages.com: could not connect to host
ashutoshmishra.org: did not receive HSTS header
asianodor.com: could not connect to host
askfit.cz: did not receive HSTS header
asm-x.com: could not connect to host
asmui.ga: could not connect to host
@ -316,6 +315,8 @@ asset-alive.net: did not receive HSTS header
astrath.net: could not connect to host
astrolpost.com: could not connect to host
astromelody.com: did not receive HSTS header
asuhe.cc: did not receive HSTS header
asuhe.win: did not receive HSTS header
atavio.at: could not connect to host
atavio.ch: could not connect to host
atavio.de: did not receive HSTS header
@ -345,7 +346,8 @@ authentication.io: could not connect to host
authoritynutrition.com: did not receive HSTS header
auto-serwis.zgorzelec.pl: did not receive HSTS header
auto4trade.nl: could not connect to host
autojuhos.sk: did not receive HSTS header
autoepc.ro: did not receive HSTS header
autojuhos.sk: could not connect to host
autokovrik-diskont.ru: did not receive HSTS header
autotsum.com: could not connect to host
autumnwindsagility.com: could not connect to host
@ -381,12 +383,10 @@ bakingstone.com: could not connect to host
bakkerdesignandbuild.com: did not receive HSTS header
balcan-underground.net: could not connect to host
baldwinkoo.com: could not connect to host
baleares.party: could not connect to host
bandb.xyz: could not connect to host
bandrcrafts.com: could not connect to host
bannisbierblog.de: could not connect to host
banqingdiao.com: could not connect to host
bardiharborow.tk: could not connect to host
barely.sexy: did not receive HSTS header
bashcode.ninja: could not connect to host
basicsolutionsus.com: did not receive HSTS header
@ -397,7 +397,6 @@ baud.ninja: could not connect to host
baumstark.ca: could not connect to host
baysse.eu: could not connect to host
bazarstupava.sk: could not connect to host
bbb1991.me: did not receive HSTS header
bcbsmagentprofile.com: could not connect to host
bccx.com: could not connect to host
bckp.de: could not connect to host
@ -437,6 +436,7 @@ besixdouze.world: could not connect to host
bestbeards.ca: could not connect to host
bestcellular.com: did not receive HSTS header
betafive.net: could not connect to host
betcafearena.ro: did not receive HSTS header
betnet.fr: could not connect to host
betplanning.it: did not receive HSTS header
bets.de: did not receive HSTS header
@ -487,12 +487,6 @@ bityes.org: could not connect to host
bivsi.com: could not connect to host
bizcms.com: did not receive HSTS header
bizon.sk: did not receive HSTS header
bl4ckb0x.com: did not receive HSTS header
bl4ckb0x.de: did not receive HSTS header
bl4ckb0x.eu: did not receive HSTS header
bl4ckb0x.info: did not receive HSTS header
bl4ckb0x.net: did not receive HSTS header
bl4ckb0x.org: did not receive HSTS header
black-armada.com.pl: could not connect to host
black-armada.pl: could not connect to host
blackburn.link: could not connect to host
@ -514,6 +508,7 @@ bloglikepro.com: could not connect to host
blubbablasen.de: could not connect to host
blucas.org: did not receive HSTS header
blueglobalmedia.com: max-age too low: 0
blueimp.net: did not receive HSTS header
blueliv.com: did not receive HSTS header
bluescloud.xyz: could not connect to host
bluetenmeer.com: did not receive HSTS header
@ -536,7 +531,7 @@ bonigo.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_
bonitabrazilian.co.nz: did not receive HSTS header
bookcelerator.com: did not receive HSTS header
booked.holiday: could not connect to host
bookourdjs.com: could not connect to host
bookourdjs.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
boomerang.com: could not connect to host
boosterlearnpro.com: did not receive HSTS header
bootjp.me: did not receive HSTS header
@ -564,6 +559,7 @@ brettabel.com: did not receive HSTS header
brianmwaters.net: did not receive HSTS header
brickoo.com: could not connect to host
brid.gy: did not receive HSTS header
bristebein.com: could not connect to host
britzer-toner.de: did not receive HSTS header
brks.xyz: could not connect to host
broken-oak.com: could not connect to host
@ -593,6 +589,7 @@ burian-server.cz: could not connect to host
burrow.ovh: could not connect to host
burtrum.me: could not connect to host
burtrum.top: could not connect to host
busindre.com: could not connect to host
business.lookout.com: could not connect to host
businesshosting.nl: did not receive HSTS header
businessloanstoday.com: max-age too low: 0
@ -611,7 +608,6 @@ bysymphony.com: max-age too low: 0
byte.wtf: did not receive HSTS header
bytepark.de: did not receive HSTS header
bytesund.biz: could not connect to host
bytesystems.com: could not connect to host
c1yd3i.me: could not connect to host
c3b.info: could not connect to host
cabarave.com: could not connect to host
@ -800,7 +796,6 @@ cmsbattle.com: could not connect to host
cmscafe.ru: did not receive HSTS header
cn.search.yahoo.com: did not receive HSTS header
cni-certing.it: max-age too low: 0
cnwarn.com: could not connect to host
co50.com: did not receive HSTS header
cocaine-import.agency: could not connect to host
cocktailfuture.fr: could not connect to host
@ -812,14 +807,15 @@ codeco.pw: could not connect to host
codeforce.io: could not connect to host
codelayer.ca: could not connect to host
codepoet.de: could not connect to host
codepult.com: could not connect to host
codepx.com: did not receive HSTS header
codereview.appspot.com: did not receive HSTS header (error ignored - included regardless)
codereview.chromium.org: did not receive HSTS header (error ignored - included regardless)
codiva.io: max-age too low: 2592000
coffeeetc.co.uk: did not receive HSTS header
coffeestrategies.com: max-age too low: 2592000
coiffeurschnittstelle.ch: did not receive HSTS header
coindam.com: could not connect to host
colinwolff.com: could not connect to host
colisfrais.com: did not receive HSTS header
collegepulse.org: could not connect to host
collies.eu: did not receive HSTS header
@ -843,7 +839,6 @@ condesaelectronics.com: max-age too low: 0
confirm365.com: could not connect to host
conformal.com: could not connect to host
connect.ua: did not receive HSTS header
conrad-kostecki.de: did not receive HSTS header
consciousandglamorous.com: could not connect to host
console.python.org: did not receive HSTS header
constructionjobs.com: did not receive HSTS header
@ -854,9 +849,10 @@ continuumgaming.com: could not connect to host
controlcenter.gigahost.dk: did not receive HSTS header
convert.zone: could not connect to host
coolchevy.org.ua: could not connect to host
coopens.com: could not connect to host
cor-ser.es: could not connect to host
coralproject.net: did not receive HSTS header
coralrosado.com.br: could not connect to host
coralrosado.com.br: did not receive HSTS header
cordial-restaurant.com: did not receive HSTS header
core.mx: could not connect to host
core4system.de: could not connect to host
@ -892,7 +888,6 @@ crestoncottage.com: could not connect to host
criticalaim.com: could not connect to host
crizk.com: could not connect to host
crosssec.com: did not receive HSTS header
crow.tw: could not connect to host
crowd.supply: could not connect to host
crowdcurity.com: did not receive HSTS header
crowdjuris.com: could not connect to host
@ -931,7 +926,9 @@ cupidmentor.com: did not receive HSTS header
curroapp.com: could not connect to host
custe.rs: could not connect to host
cuvva.insure: did not receive HSTS header
cwage.com: could not connect to host
cyanogenmod.xxx: could not connect to host
cyberianhusky.com: could not connect to host
cyberpunk.ca: could not connect to host
cybershambles.com: could not connect to host
cycleluxembourg.lu: did not receive HSTS header
@ -949,6 +946,7 @@ daku.gdn: did not receive HSTS header
dalingk.co: could not connect to host
damianuv-blog.cz: did not receive HSTS header
dango.in: did not receive HSTS header
daniel-steuer.de: could not connect to host
danielcowie.me: could not connect to host
danieldk.eu: did not receive HSTS header
danieliancu.com: could not connect to host
@ -991,7 +989,6 @@ davidnoren.com: did not receive HSTS header
davidreinhardt.de: could not connect to host
davidscherzer.at: could not connect to host
daylightcompany.com: did not receive HSTS header
dayman.net: did not receive HSTS header
daytonaseaside.com: did not receive HSTS header
db.gy: did not receive HSTS header
dbx.ovh: could not connect to host
@ -1038,12 +1035,14 @@ derevtsov.com: did not receive HSTS header
derhil.de: did not receive HSTS header
derwolfe.net: did not receive HSTS header
desiccantpackets.com: did not receive HSTS header
designgears.com: max-age too low: 0
designthinking.or.jp: did not receive HSTS header
despora.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
destinationbijoux.fr: could not connect to host
destom.be: could not connect to host
detector.exposed: could not connect to host
devcu.net: did not receive HSTS header
devdoodle.net: could not connect to host
deviltracks.net: could not connect to host
devincrow.me: could not connect to host
devtub.com: did not receive HSTS header
@ -1058,7 +1057,6 @@ digitaldaddy.net: could not connect to host
digitalriver.tk: could not connect to host
digitalskillswap.com: could not connect to host
dim.lighting: could not connect to host
dimonb.com: could not connect to host
dinamoelektrik.com: max-age too low: 0
dinkum.online: could not connect to host
discoveringdocker.com: did not receive HSTS header
@ -1107,6 +1105,7 @@ doridian.net: did not receive HSTS header
doridian.org: could not connect to host
dossplumbing.co.za: did not receive HSTS header
dotadata.me: could not connect to host
dothebangthingsalon.com: did not receive HSTS header
dovetailnow.com: could not connect to host
download.jitsi.org: did not receive HSTS header
downsouthweddings.com.au: did not receive HSTS header
@ -1120,6 +1119,7 @@ drdevil.ru: could not connect to host
drdim.ru: could not connect to host
dreadbyte.com: could not connect to host
dreaming.solutions: did not receive HSTS header
dredgepress.com: did not receive HSTS header
drishti.guru: could not connect to host
drive.google.com: did not receive HSTS header (error ignored - included regardless)
drobniuch.pl: could not connect to host
@ -1133,6 +1133,7 @@ dubrovskiy.net: could not connect to host
dubrovskiy.pro: could not connect to host
duesee.org: could not connect to host
dullsir.com: did not receive HSTS header
dungi.org: could not connect to host
duria.de: max-age too low: 3600
dustri.org: did not receive HSTS header
dutchrank.com: could not connect to host
@ -1144,7 +1145,7 @@ dylanscott.com.au: did not receive HSTS header
dymersion.com: did not receive HSTS header
dzimejl.sk: did not receive HSTS header
dzlibs.io: could not connect to host
dzndk.com: could not connect to host
dzndk.net: could not connect to host
dzndk.org: could not connect to host
e-deca2.org: did not receive HSTS header
e-sa.com: did not receive HSTS header
@ -1170,6 +1171,7 @@ ecole-en-danger.fr: could not connect to host
ecole-maternelle-saint-joseph.be: could not connect to host
ecomparemo.com: did not receive HSTS header
ecorus.eu: did not receive HSTS header
ecupcafe.com: did not receive HSTS header
edcphenix.tk: could not connect to host
edelsteincosmetic.com: did not receive HSTS header
edissecurity.sk: did not receive HSTS header
@ -1179,7 +1181,6 @@ edmodo.com: did not receive HSTS header
edp-collaborative.com: max-age too low: 2500
eduvance.in: did not receive HSTS header
edxg.de: could not connect to host
eewna.org: did not receive HSTS header
efficienthealth.com: did not receive HSTS header
effortlesshr.com: did not receive HSTS header
egg-ortho.ch: did not receive HSTS header
@ -1190,22 +1191,18 @@ ehrenamt-skpfcw.de: could not connect to host
eicfood.com: could not connect to host
eidolonhost.com: did not receive HSTS header
ekbanden.nl: could not connect to host
ekostecki.de: did not receive HSTS header
elaintehtaat.fi: did not receive HSTS header
elan-organics.com: did not receive HSTS header
elanguest.pl: could not connect to host
elbetech.net: could not connect to host
electricianforum.co.uk: did not receive HSTS header
electromc.com: could not connect to host
elektronring.com: could not connect to host
elemenx.com: did not receive HSTS header
elemprendedor.com.ve: could not connect to host
elenag.ga: could not connect to host
elenoon.ir: did not receive HSTS header
elgacien.de: could not connect to host
elimdengelen.com: did not receive HSTS header
elisabeth-kostecki.de: did not receive HSTS header
elisabethkostecki.de: did not receive HSTS header
elitefishtank.com: could not connect to host
elliotgluck.com: could not connect to host
elnutricionista.es: did not receive HSTS header
@ -1346,6 +1343,8 @@ fallenangelspirits.uk: could not connect to host
familie-sprink.de: could not connect to host
familie-zimmermann.at: could not connect to host
fanyl.cn: could not connect to host
farhadexchange.com: did not receive HSTS header
farhood.org: could not connect to host
fashioncare.cz: did not receive HSTS header
fasset.jp: could not connect to host
fastograph.com: could not connect to host
@ -1420,6 +1419,7 @@ flouartistique.ch: could not connect to host
flow.pe: could not connect to host
flow.su: could not connect to host
flowersandclouds.com: could not connect to host
flowlo.me: could not connect to host
flushstudios.com: did not receive HSTS header
flyaces.com: did not receive HSTS header
fm83.nl: could not connect to host
@ -1445,6 +1445,9 @@ fotopasja.info: could not connect to host
fourchin.net: could not connect to host
foxdev.io: could not connect to host
foxelbox.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
foxley-farm.co.uk: could not connect to host
foxley-seeds.co.uk: could not connect to host
foxleyseeds.co.uk: could not connect to host
foxtrot.pw: could not connect to host
fr33d0m.link: could not connect to host
francescopalazzo.com: could not connect to host
@ -1467,6 +1470,7 @@ freeutopia.org: did not receive HSTS header
frenzel.dk: could not connect to host
freqlabs.com: could not connect to host
freshfind.xyz: could not connect to host
freshlymind.com: did not receive HSTS header
frezbo.com: could not connect to host
frforms.com: did not receive HSTS header
friendica.ch: could not connect to host
@ -1479,6 +1483,7 @@ fruitusers.com: could not connect to host
frusky.net: could not connect to host
fspphoto.com: could not connect to host
ftctele.com: did not receive HSTS header
fuckav.ru: could not connect to host
fuckbilibili.com: did not receive HSTS header
fuckgfw233.org: could not connect to host
fukushima-web.com: did not receive HSTS header
@ -1533,7 +1538,7 @@ gatapro.net: could not connect to host
gatilagata.com.br: could not connect to host
gchq.wtf: could not connect to host
gdpventure.com: max-age too low: 0
gedankenbude.info: did not receive HSTS header
gedankenbude.info: could not connect to host
geekcast.co.uk: did not receive HSTS header
geeky.software: could not connect to host
geli-graphics.com: did not receive HSTS header
@ -1554,6 +1559,7 @@ getblys.com.au: did not receive HSTS header
getbooks.co.il: did not receive HSTS header
getcarefirst.com: did not receive HSTS header
getcolor.com: did not receive HSTS header
getfirepress.com: did not receive HSTS header
getgeek.dk: did not receive HSTS header
getgeek.eu: did not receive HSTS header
getgeek.fi: did not receive HSTS header
@ -1582,6 +1588,7 @@ gheorghesarcov.tk: could not connect to host
giakki.eu: could not connect to host
gietvloergarant.nl: did not receive HSTS header
gigacloud.org: max-age too low: 0
gilgaz.com: did not receive HSTS header
gilly.berlin: did not receive HSTS header
gingali.de: did not receive HSTS header
gintenreiter-photography.com: did not receive HSTS header
@ -1592,6 +1599,7 @@ gistfy.com: could not connect to host
github.party: could not connect to host
givemyanswer.com: did not receive HSTS header
gizzo.sk: could not connect to host
gjung.com: could not connect to host
gkralik.eu: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
gl.search.yahoo.com: did not receive HSTS header
glass.google.com: did not receive HSTS header (error ignored - included regardless)
@ -1627,7 +1635,7 @@ gogold-g.com: could not connect to host
gold24.in: did not receive HSTS header
goldendata.io: could not connect to host
golocal-media.de: did not receive HSTS header
gonzalosanchez.mx: did not receive HSTS header
gonzalosanchez.mx: could not connect to host
goodenough.nz: did not receive HSTS header
goodwin43.ru: could not connect to host
google: could not connect to host (error ignored - included regardless)
@ -1645,6 +1653,7 @@ gov.ax: could not connect to host
govillemo.ca: did not receive HSTS header
gozel.com.tr: did not receive HSTS header
gparent.org: did not receive HSTS header
gps.com.br: could not connect to host
gpsfix.cz: could not connect to host
gpstuner.com: did not receive HSTS header
gracesofgrief.com: max-age too low: 86400
@ -1661,6 +1670,8 @@ greatnet.de: did not receive HSTS header
greenhillantiques.co.uk: did not receive HSTS header
greenvines.com.tw: did not receive HSTS header
greg.red: could not connect to host
gregmilton.com: could not connect to host
gregmilton.org: could not connect to host
gregorytlee.me: did not receive HSTS header
gremots.com: did not receive HSTS header
greplin.com: could not connect to host
@ -1686,10 +1697,6 @@ gulenet.com: could not connect to host
gunnarhafdal.com: did not receive HSTS header
gurom.lv: could not connect to host
gurusupe.com: could not connect to host
guso.gq: could not connect to host
guso.ml: could not connect to host
guso.site: could not connect to host
guso.tech: could not connect to host
gussi.is: did not receive HSTS header
gvt2.com: could not connect to host (error ignored - included regardless)
gvt3.com: could not connect to host (error ignored - included regardless)
@ -1705,13 +1712,12 @@ gyz.io: could not connect to host
h2check.org: could not connect to host
haarkliniek.com: did not receive HSTS header
habanaavenue.com: did not receive HSTS header
habbo.life: did not receive HSTS header
habbo.life: could not connect to host
hablemosdetecnologia.com.ve: could not connect to host
hack.cz: could not connect to host
hack.li: did not receive HSTS header
hacker.one: could not connect to host
hackerforever.com: did not receive HSTS header
hackernet.se: could not connect to host
hackerone-ext-adroll.com: could not connect to host
hackest.org: did not receive HSTS header
hackit.im: could not connect to host
@ -1728,7 +1734,6 @@ halo.red: could not connect to host
hancc.net: could not connect to host
hanfu.la: could not connect to host
hang333.pw: did not receive HSTS header
hannover-banditen.de: did not receive HSTS header
hansen.hn: could not connect to host
hao2taiwan.com: max-age too low: 0
haoyugao.com: could not connect to host
@ -1755,10 +1760,9 @@ haufschild.de: could not connect to host
haurumcraft.net: could not connect to host
hausarzt-stader-str.de: did not receive HSTS header
haveeruexaminer.com: could not connect to host
haxoff.com: did not receive HSTS header
haxoff.com: could not connect to host
haydenhill.us: could not connect to host
hazcod.com: could not connect to host
hazyrom.net: could not connect to host
hcie.pl: could not connect to host
hcs-company.com: did not receive HSTS header
hcs-company.nl: did not receive HSTS header
@ -1782,9 +1786,9 @@ henriknoerr.com: could not connect to host
hepteract.us: did not receive HSTS header
hermes-net.de: could not connect to host
herpaderp.net: could not connect to host
herrenfahrt.com: did not receive HSTS header
herzbotschaft.de: did not receive HSTS header
heutger.net: did not receive HSTS header
hexagon-e.com: could not connect to host
hibilog.com: could not connect to host
hicn.gq: could not connect to host
hiddendepth.ie: max-age too low: 0
@ -1806,7 +1810,6 @@ hn.search.yahoo.com: did not receive HSTS header
hodne.io: could not connect to host
hoerbuecher-und-hoerspiele.de: could not connect to host
hogar123.es: could not connect to host
hokieprivacy.org: could not connect to host
holifestival-freyung.de: could not connect to host
holymoly.lu: could not connect to host
homa.website: could not connect to host
@ -1841,6 +1844,7 @@ hsts.date: could not connect to host
hstsfail.appspot.com: did not receive HSTS header
hstspreload.appspot.com: did not receive HSTS header
hstspreload.org: did not receive HSTS header
html-lab.tk: could not connect to host
http418.xyz: could not connect to host
httpstatuscode418.xyz: could not connect to host
hu.search.yahoo.com: did not receive HSTS header
@ -1853,6 +1857,7 @@ humpteedumptee.in: did not receive HSTS header
huntshomeinspections.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
hurricanelabs.com: did not receive HSTS header
huskybutt.dog: could not connect to host
huskyinc.us: could not connect to host
hydra.ws: could not connect to host
hydronium.cf: could not connect to host
hydronium.ga: could not connect to host
@ -1872,6 +1877,7 @@ ichnichtskaufmann.de: could not connect to host
ichoosebtec.com: could not connect to host
icpc2016.in.th: could not connect to host
icreative.nl: did not receive HSTS header
ictinforensics.org: could not connect to host
ictual.com: max-age too low: 0
id-co.in: could not connect to host
id-conf.com: could not connect to host
@ -1891,6 +1897,7 @@ ies-italia.it: did not receive HSTS header
ies.id.lv: could not connect to host
ifad.org: did not receive HSTS header
ifleurs.com: could not connect to host
ifx.ee: could not connect to host
ignatisd.gr: did not receive HSTS header
igule.net: could not connect to host
ihrlotto.de: could not connect to host
@ -1943,6 +1950,7 @@ inkstory.gr: did not receive HSTS header
inksupply.com: did not receive HSTS header
inleaked.com: could not connect to host
inmyarea.com: max-age too low: 0
innoloop.com: did not receive HSTS header
innophate-security.nl: could not connect to host
ins1gn1a.com: did not receive HSTS header
insane-bullets.com: could not connect to host
@ -1981,6 +1989,7 @@ ipmimagazine.com: did not receive HSTS header
iprody.com: could not connect to host
iptel.by: max-age too low: 0
iptel.ro: could not connect to host
ipuservicedesign.com: could not connect to host
ipv6cloud.club: could not connect to host
iqcn.co: did not receive HSTS header
iqualtech.com: did not receive HSTS header
@ -1990,6 +1999,7 @@ irazimina.ru: did not receive HSTS header
irccloud.com: did not receive HSTS header
ireef.tv: could not connect to host
irelandesign.com: did not receive HSTS header
irmtrudjurke.de: did not receive HSTS header
ischool.co.jp: did not receive HSTS header
iseek.biz: max-age too low: 0
iseulde.com: could not connect to host
@ -1998,7 +2008,6 @@ isitamor.pm: could not connect to host
iskaz.rs: did not receive HSTS header
israkurort.com: did not receive HSTS header
istaspirtslietas.lv: did not receive HSTS header
isteinbaby.de: could not connect to host
it-go.net: did not receive HSTS header
itechgeek.com: max-age too low: 0
itos.asia: did not receive HSTS header
@ -2010,8 +2019,6 @@ itsamurai.ru: max-age too low: 2592000
itsecurityassurance.pw: could not connect to host
itsg-faq.de: could not connect to host
itshost.ru: could not connect to host
itskayla.com: did not receive HSTS header
itsryan.com: did not receive HSTS header
ivi-fertility.com: max-age too low: 0
ivi.es: max-age too low: 0
ivk.website: could not connect to host
@ -2080,7 +2087,7 @@ jetsetcharge.com: could not connect to host
jetsetpay.com: could not connect to host
jettshome.org: could not connect to host
jeugdkans.nl: did not receive HSTS header
jf.duckdns.org: could not connect to host
jf.duckdns.org: max-age too low: 0
jfmel.com: did not receive HSTS header
jfx.space: did not receive HSTS header
jh-media.eu: could not connect to host
@ -2184,7 +2191,6 @@ kerangalam.com: could not connect to host
kerksanders.nl: did not receive HSTS header
kermadec.net: could not connect to host
kernl.us: did not receive HSTS header
kevinmeijer.nl: could not connect to host
keymaster.lookout.com: did not receive HSTS header
kgxtech.com: max-age too low: 2592000
ki-on.net: did not receive HSTS header
@ -2224,16 +2230,13 @@ kleinblogje.nl: [Exception... "Component returned failure code: 0x80004005 (NS_E
kletterkater.com: did not receive HSTS header
klicktojob.de: could not connect to host
kmartin.io: did not receive HSTS header
kn007.net: could not connect to host
knccloud.com: could not connect to host
knightsbridgegroup.org: could not connect to host
knowledgesnap.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
knowledgesnapsites.com: could not connect to host
kodokushi.fr: could not connect to host
koen.io: did not receive HSTS header
koenrouwhorst.nl: did not receive HSTS header
kojipkgs.fedoraproject.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
kolaykaydet.com: did not receive HSTS header
kollabria.com: max-age too low: 0
komikito.com: could not connect to host
kompetenzwerft.de: did not receive HSTS header
@ -2254,7 +2257,6 @@ krayx.com: could not connect to host
kreavis.com: did not receive HSTS header
kredite.sale: could not connect to host
kriegt.es: could not connect to host
kristikala.nl: could not connect to host
krmela.com: could not connect to host
kroetenfuchs.de: could not connect to host
kropkait.pl: could not connect to host
@ -2334,7 +2336,6 @@ lemp.io: did not receive HSTS header
lenovogaming.com: did not receive HSTS header
lentri.com: did not receive HSTS header
leob.in: did not receive HSTS header
leolana.com: could not connect to host
leon-jaekel.com: could not connect to host
leopold.email: could not connect to host
leopotamgroup.com: could not connect to host
@ -2399,6 +2400,7 @@ linuxfixed.it: could not connect to host
linuxforyou.com: could not connect to host
linuxgeek.ro: could not connect to host
linuxmonitoring.net: did not receive HSTS header
linuxwebservertips.in: could not connect to host
liquorsanthe.in: could not connect to host
lisonfan.com: did not receive HSTS header
listafirmelor.com: could not connect to host
@ -2407,10 +2409,11 @@ livedemo.io: could not connect to host
livej.am: could not connect to host
livi.co: did not receive HSTS header
loadingdeck.com: did not receive HSTS header
loadso.me: could not connect to host
loafbox.com: could not connect to host
locchat.com: did not receive HSTS header
locktheirphone.com: could not connect to host
locomotive.ca: did not receive HSTS header
loforo.com: could not connect to host
login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless)
loginseite.com: could not connect to host
lolicore.ch: could not connect to host
@ -2426,7 +2429,6 @@ lookastic.mx: [Exception... "Component returned failure code: 0x80004005 (NS_ERR
lookastic.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
lookout.com: did not receive HSTS header
lookzook.com: did not receive HSTS header
loongsg.xyz: could not connect to host
lostinsecurity.com: could not connect to host
lostinweb.eu: could not connect to host
lothai.re: could not connect to host
@ -2559,6 +2561,7 @@ matty.digital: max-age too low: 3600
maultrom.ml: could not connect to host
maur.cz: did not receive HSTS header
mavisang.cf: could not connect to host
mawe.red: could not connect to host
maxfox.me: did not receive HSTS header
maxhoechtl.at: could not connect to host
maya.mg: could not connect to host
@ -2569,9 +2572,7 @@ mccarty.io: could not connect to host
mccrackon.com: could not connect to host
mcdonalds.ru: did not receive HSTS header
mcga.media: did not receive HSTS header
mckinley1.com: did not receive HSTS header
mclab.su: could not connect to host
mdcloudps.com: could not connect to host
mdewendt.de: could not connect to host
mdfnet.se: did not receive HSTS header
mdscomp.net: did not receive HSTS header
@ -2620,7 +2621,6 @@ meuemail.pro: could not connect to host
mexbt.com: could not connect to host
mfcatalin.com: could not connect to host
mfiles.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
mgrossklaus.de: did not receive HSTS header
mh-bloemen.co.jp: could not connect to host
mhdsyarif.com: did not receive HSTS header
mhealthdemocamp.com: could not connect to host
@ -2649,6 +2649,7 @@ mijn-email.org: could not connect to host
mikadoe.nl: could not connect to host
mikaelemilsson.net: did not receive HSTS header
mikeburns.com: did not receive HSTS header
mikecb.org: did not receive HSTS header
mikeg.de: did not receive HSTS header
mikeology.org: could not connect to host
mikonmaa.fi: could not connect to host
@ -2665,7 +2666,6 @@ mineover.es: could not connect to host
minikneet.com: did not receive HSTS header
minikneet.nl: did not receive HSTS header
minnesotadata.com: could not connect to host
minora.io: could not connect to host
miragrow.com: could not connect to host
mirindadomo.ru: did not receive HSTS header
mironized.com: did not receive HSTS header
@ -2705,6 +2705,7 @@ mogry.net: did not receive HSTS header
moho.kr: did not receive HSTS header
monarca.systems: could not connect to host
monasterialis.eu: could not connect to host
mondar.io: did not receive HSTS header
mondopoint.com: did not receive HSTS header
moneytoday.com: max-age too low: 0
monitman.com: could not connect to host
@ -2715,7 +2716,6 @@ moov.is: could not connect to host
moparisthebest.biz: could not connect to host
moparisthebest.info: could not connect to host
moparscape.org: did not receive HSTS header
mople71.cz: could not connect to host
mor.gl: could not connect to host
morethanadream.lv: could not connect to host
moriz.net: could not connect to host
@ -2734,13 +2734,14 @@ moula.com.au: did not receive HSTS header
mountainmusicpromotions.com: did not receive HSTS header
moviesabout.net: could not connect to host
moy-gorod.od.ua: did not receive HSTS header
moy.cat: could not connect to host
moy.cat: did not receive HSTS header
mp3juices.is: could not connect to host
mqas.net: could not connect to host
mrettich.org: did not receive HSTS header
mrnonz.com: max-age too low: 0
mrpopat.in: did not receive HSTS header
mrs-shop.com: did not receive HSTS header
ms-alternativ.de: could not connect to host
msc-seereisen.net: could not connect to host
msno.no: did not receive HSTS header
mszaki.com: did not receive HSTS header
@ -2971,7 +2972,7 @@ nz.search.yahoo.com: max-age too low: 172800
nzb.cat: max-age too low: 7776000
nzquakes.maori.nz: did not receive HSTS header
o0o.one: did not receive HSTS header
oasis.mobi: could not connect to host
oasis.mobi: did not receive HSTS header
oasisim.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
oauth-dropins.appspot.com: did not receive HSTS header
obsydian.org: could not connect to host
@ -3104,6 +3105,7 @@ pahae.de: did not receive HSTS header
paintingat.com: could not connect to host
paisaone.com: did not receive HSTS header
paku.me: could not connect to host
palmer.im: could not connect to host
pamplona.tv: could not connect to host
pamsoft.pl: max-age too low: 0
panaceallc.net: could not connect to host
@ -3129,7 +3131,6 @@ partyvan.it: could not connect to host
partyvan.moe: could not connect to host
partyvan.nl: could not connect to host
partyvan.se: could not connect to host
pasadenapooch.org: did not receive HSTS header
passwordbox.com: did not receive HSTS header
passwordrevelator.net: did not receive HSTS header
passwords.google.com: did not receive HSTS header (error ignored - included regardless)
@ -3197,7 +3198,6 @@ php-bach.org: could not connect to host
phpfashion.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
phurl.de: could not connect to host
phus.lu: did not receive HSTS header
pickme.nl: could not connect to host
pickr.co: could not connect to host
picotronic.biz: could not connect to host
picscare.co.uk: did not receive HSTS header
@ -3256,19 +3256,18 @@ poleartschool.com: could not connect to host
policeiwitness.sg: could not connect to host
polimat.org: could not connect to host
politically-incorrect.xyz: could not connect to host
politologos.org: did not receive HSTS header
politologos.org: could not connect to host
polycoise.com: could not connect to host
polymathematician.com: could not connect to host
polypho.nyc: could not connect to host
pompompoes.com: could not connect to host
pontokay.com.br: did not receive HSTS header
pontualcomp.com: max-age too low: 2592000
poolsandstuff.com: did not receive HSTS header
poon.tech: could not connect to host
pornstars.me: could not connect to host
portalplatform.net: did not receive HSTS header
poshpak.com: max-age too low: 86400
postcodewise.co.uk: did not receive HSTS header
posterspy.com: did not receive HSTS header
postscheduler.org: could not connect to host
posylka.de: did not receive HSTS header
poussinooz.fr: could not connect to host
@ -3376,7 +3375,6 @@ rafaelcz.de: could not connect to host
railgun.com.cn: could not connect to host
rainbowbarracuda.com: could not connect to host
ramonj.nl: could not connect to host
ramshair.jp: could not connect to host
randomcage.com: did not receive HSTS header
randomcloud.net: could not connect to host
rankthespot.com: could not connect to host
@ -3388,8 +3386,8 @@ raspass.me: could not connect to host
rastreador.com.es: did not receive HSTS header
ratajczak.fr: could not connect to host
rate-esport.de: could not connect to host
rathorian.fr: could not connect to host
raulfraile.net: could not connect to host
raven.lipetsk.ru: could not connect to host
rawet.se: did not receive HSTS header
rawstorieslondon.com: could not connect to host
raydan.space: could not connect to host
@ -3493,7 +3491,7 @@ rodosto.com: did not receive HSTS header
roeper.party: could not connect to host
rohitagr.com: did not receive HSTS header
rolemaster.net: could not connect to host
romans-place.me.uk: could not connect to host
romans-place.me.uk: did not receive HSTS header
ron2k.za.net: could not connect to host
ronvandordt.info: could not connect to host
ronwo.de: max-age too low: 1
@ -3522,6 +3520,7 @@ rubyshop.nl: max-age too low: 604800
rudeotter.com: could not connect to host
rudloff.pro: did not receive HSTS header
rugirlfriend.com: could not connect to host
rugk.dedyn.io: could not connect to host
ruiming.me: did not receive HSTS header
runawebinar.nl: could not connect to host
runementors.com: could not connect to host
@ -3559,11 +3558,12 @@ samraskauskas.com: could not connect to host
samsen.club: did not receive HSTS header
samuelkeeley.com: could not connect to host
sanasalud.org: could not connect to host
sanchez.adv.br: could not connect to host
sandrolittke.de: did not receive HSTS header
sandviks.com: did not receive HSTS header
sangwon.org: could not connect to host
sansemea.com: did not receive HSTS header
sansonehowell.com: could not connect to host
sansonehowell.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
sarah-beckett-harpist.com: did not receive HSTS header
sarahsweetlife.com: could not connect to host
sarisonproductions.com: did not receive HSTS header
@ -3633,8 +3633,6 @@ securityinet.biz: did not receive HSTS header
securityinet.net: did not receive HSTS header
securityinet.org.il: did not receive HSTS header
securiviera.ch: did not receive HSTS header
sedoexpert.nl: could not connect to host
sedoexperts.nl: could not connect to host
seedbox.fr: did not receive HSTS header
seedboxers.net: did not receive HSTS header
seele.ca: could not connect to host
@ -3680,7 +3678,6 @@ seyahatsagliksigortalari.com: could not connect to host
sfsltd.com: did not receive HSTS header
shadoom.com: did not receive HSTS header
shadowmorph.info: did not receive HSTS header
shadowsocks.com: could not connect to host
shadowsocks.net: could not connect to host
shakepeers.org: did not receive HSTS header
shanesage.com: could not connect to host
@ -3751,6 +3748,7 @@ skile.ru: could not connect to host
skk.io: could not connect to host
skoda-clever-lead.de: could not connect to host
skoda-im-dialog.de: could not connect to host
skou.dk: could not connect to host
skullhouse.nyc: did not receive HSTS header
skyasker.cn: could not connect to host
skyflix.me: did not receive HSTS header
@ -3769,7 +3767,6 @@ sluitkampzeist.nl: [Exception... "Component returned failure code: 0x80004005 (N
slycurity.de: did not receive HSTS header
smart-mirror.de: did not receive HSTS header
smart-ov.nl: could not connect to host
smartairkey.com: could not connect to host
smartcoin.com.br: could not connect to host
smartlend.se: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
smartofficesandsmarthomes.com: did not receive HSTS header
@ -3798,7 +3795,7 @@ snoozedds.com: max-age too low: 600
snoqualmiefiber.org: did not receive HSTS header
sobabox.ru: could not connect to host
sobie.ch: could not connect to host
sobotkama.eu: did not receive HSTS header
sobotkama.eu: could not connect to host
soccergif.com: could not connect to host
soci.ml: did not receive HSTS header
socialbillboard.com: could not connect to host
@ -3809,6 +3806,7 @@ socialspirit.com.br: did not receive HSTS header
socioambiental.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
sockeye.cc: could not connect to host
socomponents.co.uk: did not receive HSTS header
sodacore.com: could not connect to host
sogeek.me: did not receive HSTS header
sol-3.de: did not receive HSTS header
solidfuelappliancespares.co.uk: did not receive HSTS header
@ -3819,7 +3817,7 @@ solsystems.ru: could not connect to host
someshit.xyz: could not connect to host
somethingnew.xyz: did not receive HSTS header
sonicrainboom.rocks: could not connect to host
sotiran.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
sotiran.com: did not receive HSTS header
sotor.de: did not receive HSTS header
soulboy.io: could not connect to host
soulema.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
@ -3890,6 +3888,7 @@ stargatepartners.com: did not receive HSTS header
starmusic.ga: did not receive HSTS header
stat.ink: did not receive HSTS header
state-sponsored-actors.net: could not connect to host
statementinsertsforless.com: did not receive HSTS header
stateofexception.io: could not connect to host
static.or.at: did not receive HSTS header
staticanime.net: could not connect to host
@ -3940,6 +3939,7 @@ studiozelden.com: did not receive HSTS header
studybay.com: did not receive HSTS header
studydrive.net: did not receive HSTS header
stugb.de: did not receive HSTS header
sturbock.me: did not receive HSTS header
stw-group.at: could not connect to host
stygium.net: could not connect to host
stylenda.com: could not connect to host
@ -3964,6 +3964,7 @@ superbabysitting.ch: could not connect to host
superbike.tw: could not connect to host
supereight.net: did not receive HSTS header
superiorfloridavacation.com: did not receive HSTS header
superpase.com: could not connect to host
supersalescontest.nl: did not receive HSTS header
supersecurefancydomain.com: could not connect to host
superuser.fi: could not connect to host
@ -4044,6 +4045,7 @@ teamsocial.co: did not receive HSTS header
teamzeus.cz: could not connect to host
tech55i.com: did not receive HSTS header
techassist.io: did not receive HSTS header
techelements.co: could not connect to host
techhipster.net: could not connect to host
techhub.ml: could not connect to host
techllage.com: could not connect to host
@ -4052,6 +4054,7 @@ techmatehq.com: could not connect to host
technogroup.cz: did not receive HSTS header
technosavvyport.com: did not receive HSTS header
techpointed.com: could not connect to host
tedb.us: did not receive HSTS header
tegelsensanitaironline.nl: did not receive HSTS header
tekshrek.com: did not receive HSTS header
telefonnummer.online: could not connect to host
@ -4129,7 +4132,6 @@ thezonders.com: did not receive HSTS header
thierfreund.de: could not connect to host
thinkcoding.de: could not connect to host
thinkcoding.org: could not connect to host
thinktux.net: could not connect to host
thirdpartytrade.com: did not receive HSTS header
thirty5.net: did not receive HSTS header
thisisacompletetest.ga: could not connect to host
@ -4142,7 +4144,6 @@ thriveapproach.co.uk: did not receive HSTS header
thumbtack.com: did not receive HSTS header
thusoy.com: did not receive HSTS header
tibbitshall.ca: did not receive HSTS header
ticketmates.com.au: did not receive HSTS header
tickettoaster.de: max-age too low: 0
tickopa.co.uk: could not connect to host
tickreport.com: did not receive HSTS header
@ -4172,7 +4173,6 @@ titouan.co: did not receive HSTS header
tittelbach.at: did not receive HSTS header
titties.ml: could not connect to host
tkarstens.de: did not receive HSTS header
tlach.cz: did not receive HSTS header
tlo.hosting: could not connect to host
tlo.link: did not receive HSTS header
tlo.network: could not connect to host
@ -4198,7 +4198,7 @@ tomberek.info: could not connect to host
tomeara.net: could not connect to host
tomharling.co.uk: max-age too low: 86400
tomharling.uk: max-age too low: 86400
tomharris.tech: did not receive HSTS header
tomharris.tech: could not connect to host
tomlankhorst.nl: did not receive HSTS header
tommsy.com: did not receive HSTS header
tommyads.com: could not connect to host
@ -4206,7 +4206,6 @@ tonburi.jp: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR
tonsit.org: did not receive HSTS header
tonyfantjr.com: could not connect to host
toomanypillows.com: could not connect to host
tooti.biz: could not connect to host
topbargains.com.au: did not receive HSTS header
topdeskdev.net: could not connect to host
topmarine.se: could not connect to host
@ -4231,6 +4230,7 @@ trainut.com: could not connect to host
transitownplaza.com: could not connect to host
translate.googleapis.com: did not receive HSTS header (error ignored - included regardless)
transportal.sk: did not receive HSTS header
travelinsurance.co.nz: did not receive HSTS header
treeby.net: could not connect to host
trendberry.ru: could not connect to host
trinityaffirmations.com: max-age too low: 0
@ -4282,14 +4282,12 @@ txclimbers.com: could not connect to host
txf.pw: could not connect to host
ty2u.com: did not receive HSTS header
tylian.net: max-age too low: 0
typingrevolution.com: did not receive HSTS header
tyrelius.com: did not receive HSTS header
tyroproducts.eu: did not receive HSTS header
tzappa.net: could not connect to host
u-blox.com: max-age too low: 0
ua.search.yahoo.com: did not receive HSTS header
uadp.pw: did not receive HSTS header
uasmi.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
ubicloud.de: could not connect to host
ubicv.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
ublox.com: did not receive HSTS header
@ -4339,7 +4337,6 @@ uonstaffhub.com: could not connect to host
uow.ninja: could not connect to host
up1.ca: could not connect to host
upaknship.com: did not receive HSTS header
upandclear.org: could not connect to host
upani.net: did not receive HSTS header
upldr.pw: could not connect to host
uprotect.it: could not connect to host
@ -4375,6 +4372,7 @@ valleyridgepta.org: could not connect to host
vallis.net: did not receive HSTS header
valmagus.com: could not connect to host
vampirism.eu: could not connect to host
vanacht.co.za: did not receive HSTS header
vanderkley.it: could not connect to host
vanderstraeten.dynv6.net: could not connect to host
vanestack.com: could not connect to host
@ -4390,10 +4388,9 @@ vbulletin-russia.com: could not connect to host
vbulletinrussia.com: could not connect to host
vcdove.com: did not receive HSTS header
vcr.re: could not connect to host
vdrpro.com: could not connect to host
veblen.com: could not connect to host
vechkasov.ru: did not receive HSTS header
vehent.org: did not receive HSTS header
vehent.org: could not connect to host
vemokin.net: did not receive HSTS header
venixplays-stream.ml: could not connect to host
verifikatorindonesia.com: could not connect to host
@ -4408,13 +4405,13 @@ videnskabsklubben.dk: did not receive HSTS header
videomuz.com: did not receive HSTS header
vidz.ga: could not connect to host
vieaw.com: could not connect to host
viemeister.com: could not connect to host
viewsea.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
vigilo.cf: could not connect to host
viktorsvantesson.net: did not receive HSTS header
vincentkooijman.at: did not receive HSTS header
vincentkooijman.nl: did not receive HSTS header
vincentpancol.com: could not connect to host
vinicius.sl: did not receive HSTS header
vintageheartcoffee.com: did not receive HSTS header
vio.no: did not receive HSTS header
viperdns.com: could not connect to host
@ -4431,10 +4428,10 @@ vlora.city: could not connect to host
vm0.eu: did not receive HSTS header
vmrdev.com: could not connect to host
voceinveste.com: did not receive HSTS header
vodpay.com: could not connect to host
vodpay.net: could not connect to host
vodpay.org: could not connect to host
vogler.name: did not receive HSTS header
voicesuk.co.uk: did not receive HSTS header
voicesuk.co.uk: could not connect to host
voidpay.com: could not connect to host
voidpay.net: could not connect to host
voidpay.org: could not connect to host
@ -4470,11 +4467,11 @@ warandpeace.xyz: could not connect to host
warehost.de: did not receive HSTS header
warhistoryonline.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
warlions.info: did not receive HSTS header
warmlyyours.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
warped.com: did not receive HSTS header
warsentech.com: did not receive HSTS header
washingtonviews.com: did not receive HSTS header
watchium.com: did not receive HSTS header
watersportmarkt.net: did not receive HSTS header
watsonhall.uk: could not connect to host
wave.is: could not connect to host
wavefrontsystemstech.com: could not connect to host
@ -4569,7 +4566,6 @@ winecodeavocado.com: could not connect to host
winged.io: could not connect to host
wingos.net: could not connect to host
wingumd.net: could not connect to host
winhistory-forum.net: did not receive HSTS header
winpack.cf: could not connect to host
winpack.eu.org: could not connect to host
winsec.nl: did not receive HSTS header
@ -4605,8 +4601,6 @@ wootton95.com: could not connect to host
woresite.jp: did not receive HSTS header
workfone.io: did not receive HSTS header
workwithgo.com: could not connect to host
wormdisk.net: could not connect to host
wow-foederation.de: could not connect to host
wowapi.org: could not connect to host
wphostingspot.com: did not receive HSTS header
wpmetadatastandardsproject.org: could not connect to host
@ -4614,6 +4608,7 @@ writeapp.me: did not receive HSTS header
wsscompany.com.ve: could not connect to host
wufu.org: did not receive HSTS header
wuhengmin.com: did not receive HSTS header
wuji.cz: could not connect to host
wurzelzwerg.net: could not connect to host
wusx.club: could not connect to host
www.apollo-auto.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
@ -4781,6 +4776,7 @@ zomerschoen.nl: [Exception... "Component returned failure code: 0x80004005 (NS_E
zoneminder.com: did not receive HSTS header
zoo24.de: did not receive HSTS header
zoomingin.net: max-age too low: 5184000
zoommailing.com: did not receive HSTS header
zortium.report: could not connect to host
zoznamrealit.sk: did not receive HSTS header
zqhong.com: could not connect to host

File diff suppressed because it is too large Load Diff

View File

@ -152,7 +152,7 @@ function constructCertFromFile(filename) {
let certdb = Cc["@mozilla.org/security/x509certdb;1"]
.getService(Ci.nsIX509CertDB);
try {
return certdb.constructX509(certBytes, certBytes.length);
return certdb.constructX509(certBytes);
} catch (e) {}
// It might be PEM instead of DER.
return certdb.constructX509FromBase64(pemToBase64(certBytes));

View File

@ -127,7 +127,7 @@ function loadCertificates(certFile, currentWhitelist) {
cert = gCertDB.constructX509FromBase64(certData);
} catch (e) {}
if (!cert) {
cert = gCertDB.constructX509(certData, certData.length);
cert = gCertDB.constructX509(certData);
}
// Don't add multiple copies of any particular certificate.
if (cert.sha256Fingerprint in certMap) {

18
servo/Cargo.lock generated
View File

@ -934,7 +934,7 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.17.0",
"selectors 0.18.0",
"servo_url 0.0.1",
"style 0.0.1",
"style_traits 0.0.1",
@ -1355,7 +1355,7 @@ dependencies = [
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"selectors 0.17.0",
"selectors 0.18.0",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1401,7 +1401,7 @@ dependencies = [
"script 0.0.1",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"selectors 0.17.0",
"selectors 0.18.0",
"serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
@ -2292,7 +2292,7 @@ dependencies = [
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"selectors 0.17.0",
"selectors 0.18.0",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
@ -2336,7 +2336,7 @@ dependencies = [
"profile_traits 0.0.1",
"range 0.0.1",
"script_traits 0.0.1",
"selectors 0.17.0",
"selectors 0.18.0",
"servo_url 0.0.1",
"style 0.0.1",
]
@ -2386,7 +2386,7 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.17.0"
version = "0.18.0"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2766,7 +2766,7 @@ dependencies = [
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.17.0",
"selectors 0.18.0",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
@ -2792,7 +2792,7 @@ dependencies = [
"parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.17.0",
"selectors 0.18.0",
"servo_atoms 0.0.1",
"servo_config 0.0.1",
"servo_url 0.0.1",
@ -2829,7 +2829,7 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.17.0",
"selectors 0.18.0",
"servo_url 0.0.1",
"style 0.0.1",
"style_traits 0.0.1",

View File

@ -1072,15 +1072,18 @@ impl FragmentDisplayListBuilding for Fragment {
style: &ServoComputedValues,
bounds: &Rect<Au>,
clip: &ClippingRegion) {
use style::values::Either;
let width = style.get_outline().outline_width;
if width == Au(0) {
return
}
let outline_style = style.get_outline().outline_style;
if outline_style == border_style::T::none {
return
}
let outline_style = match style.get_outline().outline_style {
Either::First(_auto) => border_style::T::solid,
Either::Second(border_style::T::none) => return,
Either::Second(border_style) => border_style
};
// Outlines are not accounted for in the dimensions of the border box, so adjust the
// absolute bounds.

View File

@ -1051,7 +1051,8 @@ impl Fragment {
// Note: We can not precompute the ratio and store it as a float, because
// doing so may result one pixel difference in calculation for certain
// images, thus make some tests fail.
inline_size * intrinsic_block_size.0 / intrinsic_inline_size.0
Au((inline_size.0 as i64 * intrinsic_block_size.0 as i64 /
intrinsic_inline_size.0 as i64) as i32)
} else {
intrinsic_block_size
};
@ -1060,7 +1061,8 @@ impl Fragment {
(MaybeAuto::Auto, MaybeAuto::Specified(block_size)) => {
let block_size = block_constraint.clamp(block_size);
let inline_size = if self.has_intrinsic_ratio() {
block_size * intrinsic_inline_size.0 / intrinsic_block_size.0
Au((block_size.0 as i64 * intrinsic_inline_size.0 as i64 /
intrinsic_block_size.0 as i64) as i32)
} else {
intrinsic_inline_size
};
@ -1075,10 +1077,11 @@ impl Fragment {
// First, create two rectangles that keep aspect ratio while may be clamped
// by the contraints;
let first_isize = inline_constraint.clamp(intrinsic_inline_size);
let first_bsize = first_isize * intrinsic_block_size.0 / intrinsic_inline_size.0;
let first_bsize = Au((first_isize.0 as i64 * intrinsic_block_size.0 as i64 /
intrinsic_inline_size.0 as i64) as i32);
let second_bsize = block_constraint.clamp(intrinsic_block_size);
let second_isize = second_bsize * intrinsic_inline_size.0 / intrinsic_block_size.0;
let second_isize = Au((second_bsize.0 as i64 * intrinsic_inline_size.0 as i64 /
intrinsic_block_size.0 as i64) as i32);
let (inline_size, block_size) = match (first_isize.cmp(&intrinsic_inline_size) ,
second_isize.cmp(&intrinsic_inline_size)) {
(Ordering::Equal, Ordering::Equal) =>

View File

@ -716,14 +716,14 @@ pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
// has a mechanism to give us that within a defined scope (after which point
// it's cleared to maintained style system invariants).
let mut tlc = ThreadLocalStyleContext::new(&context.style_context);
let context = StyleContext {
let mut context = StyleContext {
shared: &context.style_context,
thread_local: &mut tlc,
};
let mut result = None;
let ensure = |el: N::ConcreteElement| el.as_node().initialize_data();
let clear = |el: N::ConcreteElement| el.as_node().clear_data();
resolve_style(&context, element, &ensure, &clear, |_: &_| {
resolve_style(&mut context, element, &ensure, &clear, |_: &_| {
let s = process_resolved_style_request_internal(node, pseudo, property, layout_root);
result = Some(s);
});

View File

@ -76,6 +76,7 @@ use script_layout_interface::reporter::CSSErrorReporter;
use script_layout_interface::rpc::LayoutRPC;
use script_traits::{DocumentActivity, TimerEventId, TimerSource, TouchpadPressurePhase};
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
use selectors::matching::ElementSelectorFlags;
use serde::{Deserialize, Serialize};
use servo_atoms::Atom;
use servo_url::ServoUrl;
@ -347,6 +348,7 @@ unsafe_no_jsmanaged_fields!(TimeProfilerChan);
unsafe_no_jsmanaged_fields!(MemProfilerChan);
unsafe_no_jsmanaged_fields!(PseudoElement);
unsafe_no_jsmanaged_fields!(Length);
unsafe_no_jsmanaged_fields!(ElementSelectorFlags);
unsafe_no_jsmanaged_fields!(ElementState);
unsafe_no_jsmanaged_fields!(DOMString);
unsafe_no_jsmanaged_fields!(Mime);

View File

@ -83,7 +83,7 @@ use parking_lot::RwLock;
use ref_filter_map::ref_filter_map;
use script_layout_interface::message::ReflowQueryType;
use script_thread::Runnable;
use selectors::matching::{ElementFlags, MatchingReason, matches};
use selectors::matching::{ElementSelectorFlags, matches};
use selectors::matching::{HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS};
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_atoms::Atom;
@ -95,7 +95,6 @@ use std::default::Default;
use std::fmt;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use style::context::{QuirksMode, ReflowGoal};
use style::element_state::*;
@ -109,6 +108,7 @@ use style::rule_tree::CascadeLevel;
use style::selector_parser::{NonTSPseudoClass, RestyleDamage, SelectorImpl, SelectorParser};
use style::sink::Push;
use style::stylist::ApplicableDeclarationBlock;
use style::thread_state;
use style::values::CSSFloat;
use style::values::specified::{self, CSSColor, CSSRGBA};
use stylesheet_loader::StylesheetOwner;
@ -131,7 +131,12 @@ pub struct Element {
attr_list: MutNullableJS<NamedNodeMap>,
class_list: MutNullableJS<DOMTokenList>,
state: Cell<ElementState>,
atomic_flags: AtomicElementFlags,
/// These flags are set by the style system to indicate the that certain
/// operations may require restyling this element or its descendants. The
/// flags are not atomic, so the style system takes care of only set them
/// when it has exclusive access to the element.
#[ignore_heap_size_of = "bitflags defined in rust-selectors"]
selector_flags: Cell<ElementSelectorFlags>,
}
impl fmt::Debug for Element {
@ -219,7 +224,7 @@ impl Element {
attr_list: Default::default(),
class_list: Default::default(),
state: Cell::new(state),
atomic_flags: AtomicElementFlags::new(),
selector_flags: Cell::new(ElementSelectorFlags::empty()),
}
}
@ -351,7 +356,8 @@ pub trait LayoutElementHelpers {
fn get_checked_state_for_layout(&self) -> bool;
fn get_indeterminate_state_for_layout(&self) -> bool;
fn get_state_for_layout(&self) -> ElementState;
fn insert_atomic_flags(&self, flags: ElementFlags);
fn insert_selector_flags(&self, flags: ElementSelectorFlags);
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
}
impl LayoutElementHelpers for LayoutJS<Element> {
@ -401,7 +407,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
if let Some(color) = bgcolor {
hints.push(from_declaration(
PropertyDeclaration::BackgroundColor(DeclaredValue::Value(
CSSColor { parsed: Color::RGBA(color), authored: None }))));
Box::new(CSSColor { parsed: Color::RGBA(color), authored: None })))));
}
let background = if let Some(this) = self.downcast::<HTMLBodyElement>() {
@ -434,10 +440,10 @@ impl LayoutElementHelpers for LayoutJS<Element> {
if let Some(color) = color {
hints.push(from_declaration(
PropertyDeclaration::Color(DeclaredValue::Value(CSSRGBA {
PropertyDeclaration::Color(DeclaredValue::Value(Box::new(CSSRGBA {
parsed: color,
authored: None,
}))));
})))));
}
let font_family = if let Some(this) = self.downcast::<HTMLFontElement>() {
@ -474,10 +480,10 @@ impl LayoutElementHelpers for LayoutJS<Element> {
let width_value = specified::Length::from_px(cellspacing as f32);
hints.push(from_declaration(
PropertyDeclaration::BorderSpacing(DeclaredValue::Value(
border_spacing::SpecifiedValue {
Box::new(border_spacing::SpecifiedValue {
horizontal: width_value.clone(),
vertical: width_value,
}))));
})))));
}
@ -720,9 +726,19 @@ impl LayoutElementHelpers for LayoutJS<Element> {
#[inline]
#[allow(unsafe_code)]
fn insert_atomic_flags(&self, flags: ElementFlags) {
fn insert_selector_flags(&self, flags: ElementSelectorFlags) {
debug_assert!(thread_state::get() == thread_state::LAYOUT);
unsafe {
(*self.unsafe_get()).atomic_flags.insert(flags);
let f = &(*self.unsafe_get()).selector_flags;
f.set(f.get() | flags);
}
}
#[inline]
#[allow(unsafe_code)]
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool {
unsafe {
(*self.unsafe_get()).selector_flags.get().contains(flags)
}
}
}
@ -1973,7 +1989,7 @@ impl ElementMethods for Element {
match SelectorParser::parse_author_origin_no_namespace(&selectors) {
Err(()) => Err(Error::Syntax),
Ok(selectors) => {
Ok(matches(&selectors.0, &Root::from_ref(self), None, MatchingReason::Other))
Ok(matches(&selectors.0, &Root::from_ref(self), None))
}
}
}
@ -1991,7 +2007,8 @@ impl ElementMethods for Element {
let root = self.upcast::<Node>();
for element in root.inclusive_ancestors() {
if let Some(element) = Root::downcast::<Element>(element) {
if matches(&selectors.0, &element, None, MatchingReason::Other) {
if matches(&selectors.0, &element, None)
{
return Ok(Some(element));
}
}
@ -2231,7 +2248,7 @@ impl VirtualMethods for Element {
s.children_changed(mutation);
}
let flags = self.atomic_flags.get();
let flags = self.selector_flags.get();
if flags.intersects(HAS_SLOW_SELECTOR) {
// All children of this node need to be restyled when any child changes.
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
@ -2744,24 +2761,6 @@ impl<'a> AttributeMutation<'a> {
}
}
/// Thread-safe wrapper for ElementFlags set during selector matching
#[derive(JSTraceable, HeapSizeOf)]
struct AtomicElementFlags(AtomicUsize);
impl AtomicElementFlags {
fn new() -> Self {
AtomicElementFlags(AtomicUsize::new(0))
}
fn get(&self) -> ElementFlags {
ElementFlags::from_bits_truncate(self.0.load(Ordering::Relaxed) as u8)
}
fn insert(&self, flags: ElementFlags) {
self.0.fetch_or(flags.bits() as usize, Ordering::Relaxed);
}
}
/// A holder for an element's "tag name", which will be lazily
/// resolved and cached. Should be reset when the document
/// owner changes.

View File

@ -67,7 +67,7 @@ use script_layout_interface::{LayoutElementType, LayoutNodeType, TrustedNodeAddr
use script_layout_interface::message::Msg;
use script_traits::DocumentActivity;
use script_traits::UntrustedNodeAddress;
use selectors::matching::{MatchingReason, matches};
use selectors::matching::matches;
use selectors::parser::SelectorList;
use servo_url::ServoUrl;
use std::borrow::ToOwned;
@ -322,7 +322,7 @@ impl<'a> Iterator for QuerySelectorIterator {
// (instead of passing `None`)? Probably.
self.iterator.by_ref().filter_map(|node| {
if let Some(element) = Root::downcast(node) {
if matches(selectors, &element, None, MatchingReason::Other) {
if matches(selectors, &element, None) {
return Some(Root::upcast(element));
}
}
@ -685,7 +685,7 @@ impl Node {
// Step 3.
Ok(selectors) => {
Ok(self.traverse_preorder().filter_map(Root::downcast).find(|element| {
matches(&selectors.0, element, None, MatchingReason::Other)
matches(&selectors.0, element, None)
}))
}
}

View File

@ -11,8 +11,8 @@ use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::globalscope::GlobalScope;
use dom::storageevent::StorageEvent;
use dom::window::Window;
use ipc_channel::ipc::{self, IpcSender};
use net_traits::IpcSend;
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
@ -35,7 +35,7 @@ impl Storage {
}
}
pub fn new(global: &GlobalScope, storage_type: StorageType) -> Root<Storage> {
pub fn new(global: &Window, storage_type: StorageType) -> Root<Storage> {
reflect_dom_object(box Storage::new_inherited(storage_type), global, StorageBinding::Wrap)
}
@ -196,7 +196,7 @@ impl Runnable for StorageEventRunnable {
let window = global.as_window();
let storage_event = StorageEvent::new(
&global,
&window,
atom!("storage"),
EventBubbles::DoesNotBubble, EventCancelable::NotCancelable,
this.key.map(DOMString::from), this.old_value.map(DOMString::from), this.new_value.map(DOMString::from),

View File

@ -11,7 +11,6 @@ use dom::bindings::js::{MutNullableJS, Root, RootedReference};
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::globalscope::GlobalScope;
use dom::storage::Storage;
use dom::window::Window;
use servo_atoms::Atom;
@ -50,7 +49,7 @@ impl StorageEvent {
StorageEventBinding::Wrap)
}
pub fn new(global: &GlobalScope,
pub fn new(global: &Window,
type_: Atom,
bubbles: EventBubbles,
cancelable: EventCancelable,
@ -70,7 +69,7 @@ impl StorageEvent {
ev
}
pub fn Constructor(global: &GlobalScope,
pub fn Constructor(global: &Window,
type_: DOMString,
init: &StorageEventBinding::StorageEventInit) -> Fallible<Root<StorageEvent>> {
let key = init.key.clone();

View File

@ -7,7 +7,7 @@
*
*/
[Exposed=(Window,Worker)]
[Exposed=Window]
interface Storage {
readonly attribute unsigned long length;

View File

@ -9,7 +9,7 @@
* Event sent to a window when a storage area changes.
*/
[Constructor(DOMString type, optional StorageEventInit eventInitDict), Exposed=(Window,Worker)]
[Constructor(DOMString type, optional StorageEventInit eventInitDict), Exposed=Window]
interface StorageEvent : Event {
readonly attribute DOMString? key;
readonly attribute DOMString? oldValue;

View File

@ -469,12 +469,12 @@ impl WindowMethods for Window {
// https://html.spec.whatwg.org/multipage/#dom-sessionstorage
fn SessionStorage(&self) -> Root<Storage> {
self.session_storage.or_init(|| Storage::new(self.upcast(), StorageType::Session))
self.session_storage.or_init(|| Storage::new(self, StorageType::Session))
}
// https://html.spec.whatwg.org/multipage/#dom-localstorage
fn LocalStorage(&self) -> Root<Storage> {
self.local_storage.or_init(|| Storage::new(self.upcast(), StorageType::Local))
self.local_storage.or_init(|| Storage::new(self, StorageType::Local))
}
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-GlobalCrypto

View File

@ -49,7 +49,7 @@ use script_layout_interface::{HTMLCanvasData, LayoutNodeType, SVGSVGData, Truste
use script_layout_interface::{OpaqueStyleAndLayoutData, PartialPersistentLayoutData};
use script_layout_interface::wrapper_traits::{DangerousThreadSafeLayoutNode, GetLayoutData, LayoutNode};
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use selectors::matching::ElementFlags;
use selectors::matching::ElementSelectorFlags;
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_atoms::Atom;
use servo_url::ServoUrl;
@ -437,6 +437,14 @@ impl<'le> TElement for ServoLayoutElement<'le> {
fn skip_root_and_item_based_display_fixup(&self) -> bool {
false
}
unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {
self.element.insert_selector_flags(flags);
}
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool {
self.element.has_selector_flags(flags)
}
}
impl<'le> PartialEq for ServoLayoutElement<'le> {
@ -665,10 +673,6 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
self.element.html_element_in_html_document_for_layout()
}
}
fn insert_flags(&self, flags: ElementFlags) {
self.element.insert_atomic_flags(flags);
}
}
#[derive(Copy, Clone, Debug)]
@ -1009,6 +1013,10 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
self.as_node().type_id()
}
unsafe fn unsafe_get(self) -> ServoLayoutElement<'le> {
self.element
}
fn get_attr<'a>(&'a self, namespace: &Namespace, name: &LocalName) -> Option<&'a str> {
self.element.get_attr(namespace, name)
}

View File

@ -313,6 +313,15 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
/// Returns `None` if this is a pseudo-element; otherwise, returns `Some`.
fn type_id(&self) -> Option<LayoutNodeType>;
/// Returns access to the underlying TElement. This is breaks the abstraction
/// barrier of ThreadSafeLayout wrapper layer, and can lead to races if not used
/// carefully.
///
/// We need this so that the functions defined on this trait can call
/// lazily_compute_pseudo_element_style, which operates on TElement.
unsafe fn unsafe_get(self) ->
<<Self::ConcreteThreadSafeLayoutNode as ThreadSafeLayoutNode>::ConcreteNode as TNode>::ConcreteElement;
#[inline]
fn get_attr(&self, namespace: &Namespace, name: &LocalName) -> Option<&str>;
@ -413,7 +422,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
let new_style =
context.stylist
.lazily_compute_pseudo_element_style(
self,
unsafe { &self.unsafe_get() },
&style_pseudo,
&data.styles().primary.values,
&context.default_computed_values);

View File

@ -1,7 +1,7 @@
[package]
name = "selectors"
version = "0.17.0"
version = "0.18.0" # Not yet published
authors = ["Simon Sapin <simon.sapin@exyr.org>", "Alan Jeffrey <ajeffrey@mozilla.com>"]
documentation = "https://docs.rs/selectors/"

View File

@ -7,27 +7,6 @@ use parser::{SimpleSelector, Selector, SelectorImpl};
use std::borrow::Borrow;
use tree::Element;
/// The reason why we're doing selector matching.
///
/// If this is for styling, this will include the flags in the parent element.
///
/// This is done because Servo doesn't need those flags at all when it's not
/// styling (e.g., when you're doing document.querySelector). For example, a
/// slow selector in an API like querySelector doesn't imply that the parent
/// could match it.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum MatchingReason {
ForStyling,
Other,
}
impl MatchingReason {
#[inline]
fn for_styling(&self) -> bool {
*self == MatchingReason::ForStyling
}
}
// The bloom filter for descendant CSS selectors will have a <1% false
// positive rate until it has this many selectors in it, then it will
// rapidly increase.
@ -84,23 +63,20 @@ bitflags! {
}
bitflags! {
/// Set of flags that are set on the parent depending on whether a child
/// could potentially match a selector.
///
/// These setters, in the case of Servo, must be atomic, due to the parallel
/// traversal.
pub flags ElementFlags: u8 {
/// When a child is added or removed from this element, all the children
/// Set of flags that are set on either the element or its parent (depending
/// on the flag) if the element could potentially match a selector.
pub flags ElementSelectorFlags: u8 {
/// When a child is added or removed from the parent, all the children
/// must be restyled, because they may match :nth-last-child,
/// :last-of-type, :nth-last-of-type, or :only-of-type.
const HAS_SLOW_SELECTOR = 1 << 0,
/// When a child is added or removed from this element, any later
/// When a child is added or removed from the parent, any later
/// children must be restyled, because they may match :nth-child,
/// :first-of-type, or :nth-of-type.
const HAS_SLOW_SELECTOR_LATER_SIBLINGS = 1 << 1,
/// When a child is added or removed from this element, the first and
/// When a child is added or removed from the parent, the first and
/// last children must be restyled, because they may match :first-child,
/// :last-child, or :only-child.
const HAS_EDGE_CHILD_SELECTOR = 1 << 2,
@ -111,16 +87,28 @@ bitflags! {
}
}
impl ElementSelectorFlags {
/// Returns the subset of flags that apply to the element.
pub fn for_self(self) -> ElementSelectorFlags {
self & (HAS_EMPTY_SELECTOR)
}
/// Returns the subset of flags that apply to the parent.
pub fn for_parent(self) -> ElementSelectorFlags {
self & (HAS_SLOW_SELECTOR | HAS_SLOW_SELECTOR_LATER_SIBLINGS | HAS_EDGE_CHILD_SELECTOR)
}
}
pub fn matches<E>(selector_list: &[Selector<E::Impl>],
element: &E,
parent_bf: Option<&BloomFilter>,
reason: MatchingReason)
parent_bf: Option<&BloomFilter>)
-> bool
where E: Element
{
selector_list.iter().any(|selector| {
selector.pseudo_element.is_none() &&
matches_complex_selector(&*selector.complex_selector, element, parent_bf, &mut StyleRelations::empty(), reason)
matches_complex_selector(&*selector.complex_selector, element, parent_bf,
&mut StyleRelations::empty(), &mut ElementSelectorFlags::empty())
})
}
@ -134,11 +122,11 @@ pub fn matches_complex_selector<E>(selector: &ComplexSelector<E::Impl>,
element: &E,
parent_bf: Option<&BloomFilter>,
relations: &mut StyleRelations,
reason: MatchingReason)
flags: &mut ElementSelectorFlags)
-> bool
where E: Element
{
match matches_complex_selector_internal(selector, element, parent_bf, relations, reason) {
match matches_complex_selector_internal(selector, element, parent_bf, relations, flags) {
SelectorMatchingResult::Matched => {
match selector.next {
Some((_, Combinator::NextSibling)) |
@ -209,12 +197,12 @@ fn can_fast_reject<E>(mut selector: &ComplexSelector<E::Impl>,
element: &E,
parent_bf: Option<&BloomFilter>,
relations: &mut StyleRelations,
reason: MatchingReason)
flags: &mut ElementSelectorFlags)
-> Option<SelectorMatchingResult>
where E: Element
{
if !selector.compound_selector.iter().all(|simple_selector| {
matches_simple_selector(simple_selector, element, parent_bf, relations, reason) }) {
matches_simple_selector(simple_selector, element, parent_bf, relations, flags) }) {
return Some(SelectorMatchingResult::NotMatchedAndRestartFromClosestLaterSibling);
}
@ -271,11 +259,11 @@ fn matches_complex_selector_internal<E>(selector: &ComplexSelector<E::Impl>,
element: &E,
parent_bf: Option<&BloomFilter>,
relations: &mut StyleRelations,
reason: MatchingReason)
flags: &mut ElementSelectorFlags)
-> SelectorMatchingResult
where E: Element
{
if let Some(result) = can_fast_reject(selector, element, parent_bf, relations, reason) {
if let Some(result) = can_fast_reject(selector, element, parent_bf, relations, flags) {
return result;
}
@ -302,7 +290,7 @@ fn matches_complex_selector_internal<E>(selector: &ComplexSelector<E::Impl>,
&element,
parent_bf,
relations,
reason);
flags);
match (result, combinator) {
// Return the status immediately.
(SelectorMatchingResult::Matched, _) => return result,
@ -346,7 +334,7 @@ fn matches_simple_selector<E>(
element: &E,
parent_bf: Option<&BloomFilter>,
relations: &mut StyleRelations,
reason: MatchingReason)
flags: &mut ElementSelectorFlags)
-> bool
where E: Element
{
@ -429,14 +417,14 @@ fn matches_simple_selector<E>(
AFFECTED_BY_STATE)
}
SimpleSelector::FirstChild => {
relation_if!(matches_first_child(element, reason), AFFECTED_BY_CHILD_INDEX)
relation_if!(matches_first_child(element, flags), AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::LastChild => {
relation_if!(matches_last_child(element, reason), AFFECTED_BY_CHILD_INDEX)
relation_if!(matches_last_child(element, flags), AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::OnlyChild => {
relation_if!(matches_first_child(element, reason) &&
matches_last_child(element, reason), AFFECTED_BY_CHILD_INDEX)
relation_if!(matches_first_child(element, flags) &&
matches_last_child(element, flags), AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::Root => {
// We never share styles with an element with no parent, so no point
@ -444,43 +432,41 @@ fn matches_simple_selector<E>(
element.is_root()
}
SimpleSelector::Empty => {
if reason.for_styling() {
element.insert_flags(HAS_EMPTY_SELECTOR);
}
flags.insert(HAS_EMPTY_SELECTOR);
relation_if!(element.is_empty(), AFFECTED_BY_EMPTY)
}
SimpleSelector::NthChild(a, b) => {
relation_if!(matches_generic_nth_child(element, a, b, false, false, reason),
relation_if!(matches_generic_nth_child(element, a, b, false, false, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::NthLastChild(a, b) => {
relation_if!(matches_generic_nth_child(element, a, b, false, true, reason),
relation_if!(matches_generic_nth_child(element, a, b, false, true, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::NthOfType(a, b) => {
relation_if!(matches_generic_nth_child(element, a, b, true, false, reason),
relation_if!(matches_generic_nth_child(element, a, b, true, false, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::NthLastOfType(a, b) => {
relation_if!(matches_generic_nth_child(element, a, b, true, true, reason),
relation_if!(matches_generic_nth_child(element, a, b, true, true, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::FirstOfType => {
relation_if!(matches_generic_nth_child(element, 0, 1, true, false, reason),
relation_if!(matches_generic_nth_child(element, 0, 1, true, false, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::LastOfType => {
relation_if!(matches_generic_nth_child(element, 0, 1, true, true, reason),
relation_if!(matches_generic_nth_child(element, 0, 1, true, true, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::OnlyOfType => {
relation_if!(matches_generic_nth_child(element, 0, 1, true, false, reason) &&
matches_generic_nth_child(element, 0, 1, true, true, reason),
relation_if!(matches_generic_nth_child(element, 0, 1, true, false, flags) &&
matches_generic_nth_child(element, 0, 1, true, true, flags),
AFFECTED_BY_CHILD_INDEX)
}
SimpleSelector::Negation(ref negated) => {
!negated.iter().all(|s| {
matches_complex_selector(s, element, parent_bf, relations, reason)
matches_complex_selector(s, element, parent_bf, relations, flags)
})
}
}
@ -492,22 +478,15 @@ fn matches_generic_nth_child<E>(element: &E,
b: i32,
is_of_type: bool,
is_from_end: bool,
reason: MatchingReason) -> bool
flags: &mut ElementSelectorFlags)
-> bool
where E: Element
{
// Selectors Level 4 changed from Level 3:
// This can match without a parent element:
// https://drafts.csswg.org/selectors-4/#child-index
if reason.for_styling() {
if let Some(parent) = element.parent_element() {
parent.insert_flags(if is_from_end {
HAS_SLOW_SELECTOR
} else {
HAS_SLOW_SELECTOR_LATER_SIBLINGS
});
}
}
flags.insert(if is_from_end {
HAS_SLOW_SELECTOR
} else {
HAS_SLOW_SELECTOR_LATER_SIBLINGS
});
let mut index = 1;
let mut next_sibling = if is_from_end {
@ -546,28 +525,15 @@ fn matches_generic_nth_child<E>(element: &E,
}
#[inline]
fn matches_first_child<E>(element: &E, reason: MatchingReason) -> bool where E: Element {
// Selectors Level 4 changed from Level 3:
// This can match without a parent element:
// https://drafts.csswg.org/selectors-4/#child-index
if reason.for_styling() {
if let Some(parent) = element.parent_element() {
parent.insert_flags(HAS_EDGE_CHILD_SELECTOR);
}
}
fn matches_first_child<E>(element: &E, flags: &mut ElementSelectorFlags)
-> bool where E: Element {
flags.insert(HAS_EDGE_CHILD_SELECTOR);
element.prev_sibling_element().is_none()
}
#[inline]
fn matches_last_child<E>(element: &E, reason: MatchingReason) -> bool where E: Element {
// Selectors Level 4 changed from Level 3:
// This can match without a parent element:
// https://drafts.csswg.org/selectors-4/#child-index
if reason.for_styling() {
if let Some(parent) = element.parent_element() {
parent.insert_flags(HAS_EDGE_CHILD_SELECTOR);
}
}
fn matches_last_child<E>(element: &E, flags: &mut ElementSelectorFlags)
-> bool where E: Element {
flags.insert(HAS_EDGE_CHILD_SELECTOR);
element.next_sibling_element().is_none()
}

View File

@ -5,7 +5,6 @@
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and
//! style.
use matching::ElementFlags;
use parser::{AttrSelector, SelectorImpl};
use std::ascii::AsciiExt;
@ -162,16 +161,4 @@ pub trait Element: MatchAttr + Sized {
// in the future when we have associated types and/or a more convenient
// JS GC story... --pcwalton
fn each_class<F>(&self, callback: F) where F: FnMut(&<Self::Impl as SelectorImpl>::ClassName);
/// Add flags to the element. See the `ElementFlags` docs for details.
///
/// This may be called while the element *or one of its children* is being
/// matched. Therefore the implementation must be thread-safe if children
/// may be matched in parallel.
fn insert_flags(&self, _flags: ElementFlags) {}
/// Clears the relevant ElementFlags. This is *not* called from
/// rust-selectors, but provided as part of the Element interface since it
/// makes sense.
fn clear_flags(&self) {}
}

View File

@ -66,7 +66,7 @@ impl<E: TElement> StyleBloom<E> {
/// Push an element to the bloom filter, knowing that it's a child of the
/// last element parent.
fn push(&mut self, element: E) {
pub fn push(&mut self, element: E) {
if cfg!(debug_assertions) {
if self.elements.is_empty() {
assert!(element.parent_element().is_none());
@ -86,12 +86,20 @@ impl<E: TElement> StyleBloom<E> {
popped
}
fn clear(&mut self) {
/// Returns true if the bloom filter is empty.
pub fn is_empty(&self) -> bool {
self.elements.is_empty()
}
/// Clears the bloom filter.
pub fn clear(&mut self) {
self.filter.clear();
self.elements.clear();
}
fn rebuild(&mut self, mut element: E) -> usize {
/// Rebuilds the bloom filter up to the parent of the given element.
pub fn rebuild(&mut self, mut element: E) -> usize {
self.clear();
while let Some(parent) = element.parent_element() {

View File

@ -505,6 +505,7 @@ mod bindings {
"RawServoDeclarationBlock",
"RawGeckoPresContext",
"RawGeckoPresContextOwned",
"RefPtr",
"ThreadSafeURIHolder",
"ThreadSafePrincipalHolder",
"CSSPseudoClassType",

View File

@ -9,12 +9,14 @@ use animation::Animation;
use app_units::Au;
use bloom::StyleBloom;
use data::ElementData;
use dom::{OpaqueNode, TNode, TElement};
use dom::{OpaqueNode, TNode, TElement, SendElement};
use error_reporting::ParseErrorReporter;
use euclid::Size2D;
use matching::StyleSharingCandidateCache;
use parking_lot::RwLock;
use properties::ComputedValues;
use selectors::matching::ElementSelectorFlags;
use servo_config::opts;
use std::collections::HashMap;
use std::env;
use std::fmt;
@ -22,6 +24,7 @@ use std::ops::Add;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::Sender;
use stylist::Stylist;
use thread_state;
use timer::Timer;
/// This structure is used to create a local style context from a shared one.
@ -160,7 +163,35 @@ lazy_static! {
impl TraversalStatistics {
/// Returns whether statistics dumping is enabled.
pub fn should_dump() -> bool {
*DUMP_STYLE_STATISTICS
*DUMP_STYLE_STATISTICS || opts::get().style_sharing_stats
}
}
/// A task to be run in sequential mode on the parent (non-worker) thread. This
/// is used by the style system to queue up work which is not safe to do during
/// the parallel traversal.
pub enum SequentialTask<E: TElement> {
/// Sets selector flags. This is used when we need to set flags on an
/// element that we don't have exclusive access to (i.e. the parent).
SetSelectorFlags(SendElement<E>, ElementSelectorFlags),
}
impl<E: TElement> SequentialTask<E> {
/// Executes this task.
pub fn execute(self) {
use self::SequentialTask::*;
debug_assert!(thread_state::get() == thread_state::LAYOUT);
match self {
SetSelectorFlags(el, flags) => {
unsafe { el.set_selector_flags(flags) };
}
}
}
/// Creates a task to set the selector flags on an element.
pub fn set_selector_flags(el: E, flags: ElementSelectorFlags) -> Self {
use self::SequentialTask::*;
SetSelectorFlags(unsafe { SendElement::new(el) }, flags)
}
}
@ -177,6 +208,10 @@ pub struct ThreadLocalStyleContext<E: TElement> {
/// A channel on which new animations that have been triggered by style
/// recalculation can be sent.
pub new_animations_sender: Sender<Animation>,
/// A set of tasks to be run (on the parent thread) in sequential mode after
/// the rest of the styling is complete. This is useful for infrequently-needed
/// non-threadsafe operations.
pub tasks: Vec<SequentialTask<E>>,
/// Statistics about the traversal.
pub statistics: TraversalStatistics,
/// Information related to the current element, non-None during processing.
@ -190,6 +225,7 @@ impl<E: TElement> ThreadLocalStyleContext<E> {
style_sharing_candidate_cache: StyleSharingCandidateCache::new(),
bloom_filter: StyleBloom::new(),
new_animations_sender: shared.local_context_creation_data.lock().unwrap().new_animations_sender.clone(),
tasks: Vec::new(),
statistics: TraversalStatistics::default(),
current_element_info: None,
}
@ -221,10 +257,15 @@ impl<E: TElement> ThreadLocalStyleContext<E> {
}
}
#[cfg(debug_assertions)]
impl<E: TElement> Drop for ThreadLocalStyleContext<E> {
fn drop(&mut self) {
debug_assert!(self.current_element_info.is_none());
// Execute any enqueued sequential tasks.
debug_assert!(thread_state::get() == thread_state::LAYOUT);
for task in self.tasks.drain(..) {
task.execute();
}
}
}

View File

@ -8,7 +8,7 @@
use Atom;
use cssparser::{Delimiter, Parser, SourcePosition, Token, TokenSerializationType};
use parser::{Parse, ParserContext};
use parser::ParserContext;
use properties::DeclaredValue;
use std::ascii::AsciiExt;
use std::borrow::Cow;
@ -129,16 +129,17 @@ impl ComputedValue {
}
}
impl Parse for SpecifiedValue {
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
impl SpecifiedValue {
/// Parse a custom property SpecifiedValue.
pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Box<Self>, ()> {
let mut references = Some(HashSet::new());
let (first, css, last) = try!(parse_self_contained_declaration_value(input, &mut references));
Ok(SpecifiedValue {
Ok(Box::new(SpecifiedValue {
css: css.into_owned(),
first_token_type: first,
last_token_type: last,
references: references.unwrap(),
})
}))
}
}
@ -328,7 +329,7 @@ pub fn cascade<'a>(custom_properties: &mut Option<HashMap<&'a Name, BorrowedSpec
inherited: &'a Option<Arc<HashMap<Name, ComputedValue>>>,
seen: &mut HashSet<&'a Name>,
name: &'a Name,
specified_value: &'a DeclaredValue<SpecifiedValue>) {
specified_value: &'a DeclaredValue<Box<SpecifiedValue>>) {
let was_already_present = !seen.insert(name);
if was_already_present {
return;
@ -360,7 +361,7 @@ pub fn cascade<'a>(custom_properties: &mut Option<HashMap<&'a Name, BorrowedSpec
references: Some(&specified_value.references),
});
},
DeclaredValue::WithVariables { .. } => unreachable!(),
DeclaredValue::WithVariables(_) => unreachable!(),
DeclaredValue::Initial => {
map.remove(&name);
}

View File

@ -14,6 +14,7 @@ use element_state::ElementState;
use parking_lot::RwLock;
use properties::{ComputedValues, PropertyDeclarationBlock};
use selector_parser::{ElementExt, PreExistingComputedValues, PseudoElement};
use selectors::matching::ElementSelectorFlags;
use sink::Push;
use std::fmt;
use std::fmt::Debug;
@ -321,6 +322,19 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
/// blockification on this element. (This function exists so that Gecko
/// native anonymous content can opt out of this style fixup.)
fn skip_root_and_item_based_display_fixup(&self) -> bool;
/// Sets selector flags, which indicate what kinds of selectors may have
/// matched on this element and therefore what kind of work may need to
/// be performed when DOM state changes.
///
/// This is unsafe, like all the flag-setting methods, because it's only safe
/// to call with exclusive access to the element. When setting flags on the
/// parent during parallel traversal, we use SequentialTask to queue up the
/// set to run after the threads join.
unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags);
/// Returns true if the element has all the specified selector flags.
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
}
/// TNode and TElement aren't Send because we want to be careful and explicit

View File

@ -46,6 +46,7 @@ use properties::PropertyDeclarationBlock;
use rule_tree::CascadeLevel as ServoCascadeLevel;
use selector_parser::{ElementExt, Snapshot};
use selectors::Element;
use selectors::matching::ElementSelectorFlags;
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_url::ServoUrl;
use sink::Push;
@ -379,6 +380,29 @@ lazy_static! {
};
}
/// Converts flags from the layout used by rust-selectors to the layout used
/// by Gecko. We could align these and then do this without conditionals, but
/// it's probably not worth the trouble.
fn selector_flags_to_node_flags(flags: ElementSelectorFlags) -> u32 {
use gecko_bindings::structs::*;
use selectors::matching::*;
let mut gecko_flags = 0u32;
if flags.contains(HAS_SLOW_SELECTOR) {
gecko_flags |= NODE_HAS_SLOW_SELECTOR as u32;
}
if flags.contains(HAS_SLOW_SELECTOR_LATER_SIBLINGS) {
gecko_flags |= NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS as u32;
}
if flags.contains(HAS_EDGE_CHILD_SELECTOR) {
gecko_flags |= NODE_HAS_EDGE_CHILD_SELECTOR as u32;
}
if flags.contains(HAS_EMPTY_SELECTOR) {
gecko_flags |= NODE_HAS_EMPTY_SELECTOR as u32;
}
gecko_flags
}
impl<'le> TElement for GeckoElement<'le> {
type ConcreteNode = GeckoNode<'le>;
@ -476,6 +500,16 @@ impl<'le> TElement for GeckoElement<'le> {
// are NAC handles both cases.
self.flags() & (NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE as u32) != 0
}
unsafe fn set_selector_flags(&self, flags: ElementSelectorFlags) {
debug_assert!(!flags.is_empty());
self.set_flags(selector_flags_to_node_flags(flags));
}
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool {
let node_flags = selector_flags_to_node_flags(flags);
(self.flags() & node_flags) == node_flags
}
}
impl<'le> PartialEq for GeckoElement<'le> {

View File

@ -156,6 +156,7 @@ use gecko_bindings::structs::Loader;
use gecko_bindings::structs::ServoStyleSheet;
use gecko_bindings::structs::EffectCompositor_CascadeLevel;
use gecko_bindings::structs::RawServoAnimationValueBorrowedListBorrowed;
use gecko_bindings::structs::RefPtr;
pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray<usize>;
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
@ -1301,6 +1302,15 @@ extern "C" {
RawServoAnimationValueBorrowedListBorrowed)
-> RawServoDeclarationBlockStrong;
}
extern "C" {
pub fn Servo_AnimationValues_GetOpacity(value:
RawServoAnimationValueBorrowed)
-> f32;
}
extern "C" {
pub fn Servo_AnimationValues_GetTransform(value: RawServoAnimationValueBorrowed,
list: &mut RefPtr<nsCSSValueSharedList>);
}
extern "C" {
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
-> RawServoDeclarationBlockStrong;

View File

@ -5152,10 +5152,15 @@ pub mod root {
pub struct ContainerLayerParameters([u8; 0]);
#[repr(C)]
#[derive(Debug)]
pub struct AnimationValue {
pub mGecko: root::mozilla::StyleAnimationValue,
pub mServo: root::RefPtr<root::RawServoAnimationValue>,
}
#[repr(C)]
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
pub mValue: root::mozilla::AnimationValue,
}
#[test]
fn bindgen_test_layout_PropertyStyleAnimationValuePair() {

View File

@ -5068,10 +5068,15 @@ pub mod root {
pub struct ContainerLayerParameters([u8; 0]);
#[repr(C)]
#[derive(Debug)]
pub struct AnimationValue {
pub mGecko: root::mozilla::StyleAnimationValue,
pub mServo: root::RefPtr<root::RawServoAnimationValue>,
}
#[repr(C)]
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
pub mValue: root::mozilla::AnimationValue,
}
#[test]
fn bindgen_test_layout_PropertyStyleAnimationValuePair() {

View File

@ -12,7 +12,7 @@ use animation::{self, Animation, PropertyAnimation};
use atomic_refcell::AtomicRefMut;
use cache::LRUCache;
use cascade_info::CascadeInfo;
use context::{SharedStyleContext, StyleContext};
use context::{SequentialTask, SharedStyleContext, StyleContext};
use data::{ComputedStyle, ElementData, ElementStyles, PseudoRuleNodes, PseudoStyles};
use dom::{SendElement, TElement, TNode};
use properties::{CascadeFlags, ComputedValues, SHAREABLE, SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP, cascade};
@ -22,7 +22,8 @@ use rule_tree::{CascadeLevel, StrongRuleNode};
use selector_parser::{PseudoElement, RestyleDamage, SelectorImpl};
use selectors::MatchAttr;
use selectors::bloom::BloomFilter;
use selectors::matching::{AFFECTED_BY_PSEUDO_ELEMENTS, AFFECTED_BY_STYLE_ATTRIBUTE, MatchingReason, StyleRelations};
use selectors::matching::{AFFECTED_BY_PSEUDO_ELEMENTS, AFFECTED_BY_STYLE_ATTRIBUTE};
use selectors::matching::{ElementSelectorFlags, StyleRelations};
use servo_config::opts;
use sink::ForgetfulSink;
use std::collections::HashMap;
@ -577,8 +578,7 @@ impl<E: TElement> PrivateMatchMethods for E {}
pub trait MatchMethods : TElement {
/// Runs selector matching of this element, and returns the result.
fn match_element(&self,
context: &StyleContext<Self>,
parent_bf: Option<&BloomFilter>)
context: &mut StyleContext<Self>)
-> MatchResults
{
let mut applicable_declarations =
@ -587,16 +587,17 @@ pub trait MatchMethods : TElement {
let stylist = &context.shared.stylist;
let style_attribute = self.style_attribute();
let animation_rules = self.get_animation_rules(None);
let mut flags = ElementSelectorFlags::empty();
// Compute the primary rule node.
let mut primary_relations =
stylist.push_applicable_declarations(self,
parent_bf,
Some(context.thread_local.bloom_filter.filter()),
style_attribute,
animation_rules,
None,
&mut applicable_declarations,
MatchingReason::ForStyling);
&mut flags);
let primary_rule_node = compute_rule_node(context, &mut applicable_declarations);
// Compute the pseudo rule nodes.
@ -604,11 +605,12 @@ pub trait MatchMethods : TElement {
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
debug_assert!(applicable_declarations.is_empty());
let pseudo_animation_rules = self.get_animation_rules(Some(&pseudo));
stylist.push_applicable_declarations(self, parent_bf, None,
pseudo_animation_rules,
stylist.push_applicable_declarations(self,
Some(context.thread_local.bloom_filter.filter()),
None, pseudo_animation_rules,
Some(&pseudo),
&mut applicable_declarations,
MatchingReason::ForStyling);
&mut flags);
if !applicable_declarations.is_empty() {
let rule_node = compute_rule_node(context, &mut applicable_declarations);
@ -621,6 +623,22 @@ pub trait MatchMethods : TElement {
primary_relations |= AFFECTED_BY_PSEUDO_ELEMENTS;
}
// Apply the selector flags.
let self_flags = flags.for_self();
if !self_flags.is_empty() {
unsafe { self.set_selector_flags(self_flags); }
}
let parent_flags = flags.for_parent();
if !parent_flags.is_empty() {
if let Some(p) = self.parent_element() {
// Avoid the overhead of the SequentialTask if the flags are already set.
if !p.has_selector_flags(parent_flags) {
let task = SequentialTask::set_selector_flags(p, parent_flags);
context.thread_local.tasks.push(task);
}
}
}
MatchResults {
primary: primary_rule_node,
relations: primary_relations,

View File

@ -26,7 +26,6 @@ use context::TraversalStatistics;
use dom::{OpaqueNode, SendNode, TElement, TNode};
use rayon;
use scoped_tls::ScopedTLS;
use servo_config::opts;
use std::borrow::Borrow;
use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken};
@ -75,7 +74,7 @@ pub fn traverse_dom<E, D>(traversal: &D,
});
// Dump statistics to stdout if requested.
if TraversalStatistics::should_dump() || opts::get().style_sharing_stats {
if TraversalStatistics::should_dump() {
let slots = unsafe { tls.unsafe_get() };
let aggregate = slots.iter().fold(TraversalStatistics::default(), |acc, t| {
match *t.borrow() {

View File

@ -96,7 +96,7 @@ class Longhand(object):
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
need_clone=False, need_index=False, gecko_ffi_name=None, depend_on_viewport_size=False,
allowed_in_keyframe_block=True, complex_color=False, cast_type='u8',
has_uncacheable_values=False, logical=False, alias=None, extra_prefixes=None):
has_uncacheable_values=False, logical=False, alias=None, extra_prefixes=None, boxed=False):
self.name = name
if not spec:
raise TypeError("Spec should be specified for %s" % name)
@ -119,6 +119,7 @@ class Longhand(object):
self.logical = arg_to_bool(logical)
self.alias = alias.split() if alias else []
self.extra_prefixes = extra_prefixes.split() if extra_prefixes else []
self.boxed = arg_to_bool(boxed)
# https://drafts.csswg.org/css-animations/#keyframes
# > The <declaration-list> inside of <keyframe-block> accepts any CSS property

View File

@ -59,6 +59,8 @@ use std::ptr;
use std::sync::Arc;
use std::cmp;
use values::computed::ToComputedValue;
use values::{Either, Auto};
use computed_values::border_style;
pub mod style_structs {
% for style_struct in data.style_structs:
@ -166,8 +168,16 @@ impl ComputedValues {
PropertyDeclarationBlock {
declarations: vec![
(PropertyDeclaration::${prop.camel_case}(DeclaredValue::Value(
% if prop.boxed:
Box::new(
% endif
longhands::${prop.ident}::SpecifiedValue::from_computed_value(
&self.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}()))),
&self.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}())
% if prop.boxed:
)
% endif
)),
Importance::Normal)
],
important_count: 0
@ -913,7 +923,38 @@ fn static_assert() {
skip_longhands="${skip_outline_longhands}"
skip_additionals="*">
<% impl_keyword("outline_style", "mOutlineStyle", border_style_keyword, need_clone=True) %>
#[allow(non_snake_case)]
pub fn set_outline_style(&mut self, v: longhands::outline_style::computed_value::T) {
// FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
let result = match v {
% for value in border_style_keyword.values_for('gecko'):
Either::Second(border_style::T::${to_rust_ident(value)}) =>
structs::${border_style_keyword.gecko_constant(value)} ${border_style_keyword.maybe_cast("u8")},
% endfor
Either::First(Auto) =>
structs::${border_style_keyword.gecko_constant('auto')} ${border_style_keyword.maybe_cast("u8")},
};
${set_gecko_property("mOutlineStyle", "result")}
}
#[allow(non_snake_case)]
pub fn copy_outline_style_from(&mut self, other: &Self) {
self.gecko.mOutlineStyle = other.gecko.mOutlineStyle;
}
#[allow(non_snake_case)]
pub fn clone_outline_style(&self) -> longhands::outline_style::computed_value::T {
// FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
match ${get_gecko_property("mOutlineStyle")} ${border_style_keyword.maybe_cast("u32")} {
% for value in border_style_keyword.values_for('gecko'):
structs::${border_style_keyword.gecko_constant(value)} => Either::Second(border_style::T::${value}),
% endfor
structs::${border_style_keyword.gecko_constant('auto')} => Either::First(Auto),
% if border_style_keyword.gecko_inexhaustive:
x => panic!("Found unexpected value in style struct for outline_style property: {:?}", x),
% endif
}
}
<% impl_app_units("outline_width", "mActualOutlineWidth", need_clone=True,
round_to_pixels=True) %>
@ -1322,7 +1363,7 @@ fn static_assert() {
"number" : "bindings::Gecko_CSSValue_SetNumber(%s, %s)",
}
%>
ComputedOperation::${name.title()}(${pattern}) => {
longhands::transform::computed_value::ComputedOperation::${name.title()}(${pattern}) => {
bindings::Gecko_CSSValue_SetFunction(gecko_value, ${len(items) + 1});
bindings::Gecko_CSSValue_SetKeyword(
bindings::Gecko_CSSValue_GetArrayItem(gecko_value, 0),
@ -1336,27 +1377,20 @@ fn static_assert() {
% endfor
}
</%def>
pub fn set_transform(&mut self, other: longhands::transform::computed_value::T) {
pub fn convert_transform(input: Vec<longhands::transform::computed_value::ComputedOperation>,
output: &mut structs::root::RefPtr<structs::root::nsCSSValueSharedList>) {
use gecko_bindings::structs::nsCSSKeyword::*;
use gecko_bindings::sugar::refptr::RefPtr;
use properties::longhands::transform::computed_value::ComputedMatrix;
use properties::longhands::transform::computed_value::ComputedOperation;
let vec = if let Some(v) = other.0 {
v
} else {
unsafe {
self.gecko.mSpecifiedTransform.clear();
}
return;
};
unsafe { output.clear() };
let list = unsafe {
RefPtr::from_addrefed(bindings::Gecko_NewCSSValueSharedList(vec.len() as u32))
RefPtr::from_addrefed(bindings::Gecko_NewCSSValueSharedList(input.len() as u32))
};
let mut cur = list.mHead;
let mut iter = vec.into_iter();
let mut iter = input.into_iter();
while !cur.is_null() {
let gecko_value = unsafe { &mut (*cur).mValue };
let servo = iter.next().expect("Gecko_NewCSSValueSharedList should create a shared \
@ -1374,7 +1408,19 @@ fn static_assert() {
}
}
debug_assert!(iter.next().is_none());
unsafe { self.gecko.mSpecifiedTransform.set_move(list) };
unsafe { output.set_move(list) };
}
pub fn set_transform(&mut self, other: longhands::transform::computed_value::T) {
let vec = if let Some(v) = other.0 {
v
} else {
unsafe {
self.gecko.mSpecifiedTransform.clear();
}
return;
};
Self::convert_transform(vec, &mut self.gecko.mSpecifiedTransform);
}
pub fn copy_transform_from(&mut self, other: &Self) {
@ -2804,4 +2850,3 @@ pub unsafe extern "C" fn Servo_GetStyleVariables(_cv: ServoComputedValuesBorrowe
-> *const nsStyleVariables {
&*EMPTY_VARIABLES_STRUCT
}

View File

@ -9,8 +9,13 @@
${caller.body()}
% if not data.longhands_by_name[name].derived_from:
pub fn parse_specified(context: &ParserContext, input: &mut Parser)
-> Result<DeclaredValue<SpecifiedValue>, ()> {
parse(context, input).map(DeclaredValue::Value)
% if data.longhands_by_name[name].boxed:
-> Result<DeclaredValue<Box<SpecifiedValue>>, ()> {
parse(context, input).map(|result| DeclaredValue::Value(Box::new(result)))
% else:
-> Result<DeclaredValue<SpecifiedValue>, ()> {
parse(context, input).map(DeclaredValue::Value)
% endif
}
% endif
</%call>
@ -191,7 +196,7 @@
% if not property.derived_from:
use cssparser::Parser;
use parser::{Parse, ParserContext, ParserContextExtraData};
use properties::{CSSWideKeyword, DeclaredValue, ShorthandId};
use properties::{CSSWideKeyword, DeclaredValue, UnparsedValue, ShorthandId};
% endif
use values::{Auto, Either, None_, Normal};
use cascade_info::CascadeInfo;
@ -254,7 +259,7 @@
.set_${property.ident}(computed ${maybe_wm});
% endif
}
DeclaredValue::WithVariables { .. } => unreachable!(),
DeclaredValue::WithVariables(_) => unreachable!(),
% if not data.current_style_struct.inherited:
DeclaredValue::Unset |
% endif
@ -298,7 +303,11 @@
}
% if not property.derived_from:
pub fn parse_declared(context: &ParserContext, input: &mut Parser)
-> Result<DeclaredValue<SpecifiedValue>, ()> {
% if property.boxed:
-> Result<DeclaredValue<Box<SpecifiedValue>>, ()> {
% else:
-> Result<DeclaredValue<SpecifiedValue>, ()> {
% endif
match input.try(|i| CSSWideKeyword::parse(context, i)) {
Ok(CSSWideKeyword::InheritKeyword) => Ok(DeclaredValue::Inherit),
Ok(CSSWideKeyword::InitialKeyword) => Ok(DeclaredValue::Initial),
@ -315,12 +324,12 @@
input.reset(start);
let (first_token_type, css) = try!(
::custom_properties::parse_non_custom_with_var(input));
return Ok(DeclaredValue::WithVariables {
return Ok(DeclaredValue::WithVariables(Box::new(UnparsedValue {
css: css.into_owned(),
first_token_type: first_token_type,
base_url: context.base_url.clone(),
from_shorthand: None,
})
})))
}
specified
}
@ -333,9 +342,9 @@
<%def name="single_keyword(name, values, vector=False, **kwargs)">
<%call expr="single_keyword_computed(name, values, vector, **kwargs)">
use values::computed::ComputedValueAsSpecified;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
impl ComputedValueAsSpecified for SpecifiedValue {}
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
</%call>
</%def>
@ -412,7 +421,8 @@
#[allow(unused_imports)]
use cssparser::Parser;
use parser::ParserContext;
use properties::{longhands, PropertyDeclaration, DeclaredValue, ShorthandId};
use properties::{DeclaredValue, PropertyDeclaration, UnparsedValue};
use properties::{ShorthandId, longhands};
use properties::declaration_block::Importance;
use std::fmt;
use style_traits::ToCss;
@ -429,7 +439,13 @@
/// correspond to a shorthand.
pub struct LonghandsToSerialize<'a> {
% for sub_property in shorthand.sub_properties:
pub ${sub_property.ident}: &'a DeclaredValue<longhands::${sub_property.ident}::SpecifiedValue>,
% if sub_property.boxed:
pub ${sub_property.ident}:
&'a DeclaredValue<Box<longhands::${sub_property.ident}::SpecifiedValue>>,
% else:
pub ${sub_property.ident}:
&'a DeclaredValue<longhands::${sub_property.ident}::SpecifiedValue>,
% endif
% endfor
}
@ -489,7 +505,7 @@
DeclaredValue::Initial => all_flags &= ALL_INITIAL,
DeclaredValue::Inherit => all_flags &= ALL_INHERIT,
DeclaredValue::Unset => all_flags &= ALL_UNSET,
DeclaredValue::WithVariables {..} => with_variables = true,
DeclaredValue::WithVariables(_) => with_variables = true,
DeclaredValue::Value(..) => {
all_flags = SerializeFlags::empty();
}
@ -529,7 +545,11 @@
% for sub_property in shorthand.sub_properties:
declarations.push((PropertyDeclaration::${sub_property.camel_case}(
match value.${sub_property.ident} {
Some(value) => DeclaredValue::Value(value),
% if sub_property.boxed:
Some(value) => DeclaredValue::Value(Box::new(value)),
% else:
Some(value) => DeclaredValue::Value(value),
% endif
None => DeclaredValue::Initial,
}
), Importance::Normal));
@ -541,12 +561,12 @@
::custom_properties::parse_non_custom_with_var(input));
% for sub_property in shorthand.sub_properties:
declarations.push((PropertyDeclaration::${sub_property.camel_case}(
DeclaredValue::WithVariables {
DeclaredValue::WithVariables(Box::new(UnparsedValue {
css: css.clone().into_owned(),
first_token_type: first_token_type,
base_url: context.base_url.clone(),
from_shorthand: Some(ShorthandId::${shorthand.camel_case}),
}
}))
), Importance::Normal));
% endfor
Ok(())

View File

@ -278,7 +278,11 @@ impl AnimationValue {
AnimationValue::${prop.camel_case}(ref from) => {
PropertyDeclaration::${prop.camel_case}(
DeclaredValue::Value(
longhands::${prop.ident}::SpecifiedValue::from_computed_value(from)))
% if prop.boxed:
Box::new(longhands::${prop.ident}::SpecifiedValue::from_computed_value(from))))
% else:
longhands::${prop.ident}::SpecifiedValue::from_computed_value(from)))
% endif
}
% endif
% endfor
@ -293,7 +297,7 @@ impl AnimationValue {
PropertyDeclaration::${prop.camel_case}(ref val) => {
let computed = match *val {
// https://bugzilla.mozilla.org/show_bug.cgi?id=1326131
DeclaredValue::WithVariables{..} => unimplemented!(),
DeclaredValue::WithVariables(_) => unimplemented!(),
DeclaredValue::Value(ref val) => val.to_computed_value(context),
% if not prop.style_struct.inherited:
DeclaredValue::Unset |

View File

@ -9,15 +9,15 @@
${helpers.predefined_type("background-color", "CSSColor",
"::cssparser::Color::RGBA(::cssparser::RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */",
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
animatable=True, complex_color=True)}
animatable=True, complex_color=True, boxed=True)}
<%helpers:vector_longhand name="background-image" animatable="False"
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image"
has_uncacheable_values="${product == 'gecko'}">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::Image;
use values::NoViewportPercentage;
pub mod computed_value {
use values::computed;
@ -35,7 +35,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
}
}
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]

View File

@ -20,13 +20,13 @@
"::cssparser::Color::CurrentColor",
alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-color"),
spec=maybe_logical_spec(side, "color"),
animatable=True, logical = side[1])}
animatable=True, logical = side[1], boxed=True)}
% endfor
% for side in ALL_SIDES:
${helpers.predefined_type("border-%s-style" % side[0], "BorderStyle",
"specified::BorderStyle::none",
needs_context=False, need_clone=True,
need_clone=True,
alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-style"),
spec=maybe_logical_spec(side, "style"),
animatable=False, logical = side[1])}
@ -83,14 +83,14 @@ ${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-float-edge)",
animatable=False)}
<%helpers:longhand name="border-image-source" products="gecko" animatable="False"
<%helpers:longhand name="border-image-source" products="gecko" animatable="False" boxed="True"
spec="https://drafts.csswg.org/css-backgrounds/#border-image-source">
use std::fmt;
use style_traits::ToCss;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
use values::specified::Image;
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
pub mod computed_value {
use values::computed;
@ -279,9 +279,9 @@ ${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-repeat">
use std::fmt;
use style_traits::ToCss;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
pub mod computed_value {
pub use super::RepeatKeyword;
@ -557,10 +557,10 @@ ${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice">
use std::fmt;
use style_traits::ToCss;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
use values::specified::{Number, Percentage};
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
pub mod computed_value {
use values::computed::Number;

View File

@ -31,8 +31,8 @@
%>
use values::computed::ComputedValueAsSpecified;
use style_traits::ToCss;
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
pub mod computed_value {
pub use super::SpecifiedValue as T;
@ -113,8 +113,8 @@ ${helpers.single_keyword("-moz-top-layer", "none top",
}
}
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
impl ToComputedValue for SpecifiedValue {
type ComputedValue = computed_value::T;
@ -152,8 +152,8 @@ ${helpers.single_keyword("-moz-top-layer", "none top",
gecko_inexhaustive="True"
gecko_ffi_name="mFloat"
spec="https://drafts.csswg.org/css-box/#propdef-float">
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
impl ToComputedValue for SpecifiedValue {
type ComputedValue = computed_value::T;
@ -194,8 +194,8 @@ ${helpers.single_keyword("-moz-top-layer", "none top",
gecko_enum_prefix="StyleClear"
gecko_ffi_name="mBreakType"
spec="https://www.w3.org/TR/CSS2/visuren.html#flow-control">
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
impl ToComputedValue for SpecifiedValue {
type ComputedValue = computed_value::T;
@ -396,9 +396,9 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
use std::fmt;
use style_traits::ToCss;
use values::computed::ComputedValueAsSpecified;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
impl ToCss for SpecifiedValue {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
@ -442,8 +442,8 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
use values::specified::Time;
pub use values::specified::Time as SpecifiedValue;
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
pub mod computed_value {
pub use values::computed::Time as T;
@ -703,8 +703,8 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
}
}
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
#[inline]
pub fn get_initial_value() -> computed_value::T {
@ -745,8 +745,8 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
SpecifiedValue::parse(input)
}
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
impl ComputedValueAsSpecified for SpecifiedValue { }
</%helpers:vector_longhand>
@ -773,7 +773,7 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
use std::ops::Deref;
use style_traits::ToCss;
use values::computed::ComputedValueAsSpecified;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
pub mod computed_value {
pub use super::SpecifiedValue as T;
@ -805,7 +805,7 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
})
}
}
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
SpecifiedValue::parse(context, input)
@ -847,7 +847,7 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
use std::fmt;
use style_traits::ToCss;
use values::computed::ComputedValueAsSpecified;
use values::NoViewportPercentage;
use values::HasViewportPercentage;
pub mod computed_value {
pub use super::SpecifiedValue as T;
@ -885,7 +885,7 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
}
}
impl NoViewportPercentage for SpecifiedValue {}
no_viewport_percentage!(SpecifiedValue);
#[inline]
pub fn get_initial_value() -> computed_value::T {
@ -1755,7 +1755,7 @@ ${helpers.single_keyword("transform-style",
extra_prefixes="moz webkit",
animatable=False)}
<%helpers:longhand name="transform-origin" animatable="True" extra_prefixes="moz webkit"
<%helpers:longhand name="transform-origin" animatable="True" extra_prefixes="moz webkit" boxed="True"
spec="https://drafts.csswg.org/css-transforms/#transform-origin-property">
use app_units::Au;
use std::fmt;
@ -1896,7 +1896,8 @@ ${helpers.predefined_type("-moz-binding", "UrlOrNone", "Either::Second(None_)",
products="gecko",
animatable="False",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-binding)",
disable_when_testing="True")}
disable_when_testing="True",
boxed=True)}
${helpers.single_keyword("-moz-orient",
"inline block horizontal vertical",

View File

@ -6,7 +6,7 @@
<% data.new_style_struct("Color", inherited=True) %>
<%helpers:raw_longhand name="color" need_clone="True" animatable="True"
<%helpers:raw_longhand name="color" need_clone="True" animatable="True" boxed="True"
spec="https://drafts.csswg.org/css-color/#color">
use cssparser::Color as CSSParserColor;
use cssparser::RGBA;
@ -39,15 +39,15 @@
RGBA { red: 0., green: 0., blue: 0., alpha: 1. } /* black */
}
pub fn parse_specified(context: &ParserContext, input: &mut Parser)
-> Result<DeclaredValue<SpecifiedValue>, ()> {
-> Result<DeclaredValue<Box<SpecifiedValue>>, ()> {
let value = try!(CSSColor::parse(context, input));
let rgba = match value.parsed {
CSSParserColor::RGBA(rgba) => rgba,
CSSParserColor::CurrentColor => return Ok(DeclaredValue::Inherit)
};
Ok(DeclaredValue::Value(CSSRGBA {
Ok(DeclaredValue::Value(Box::new(CSSRGBA {
parsed: rgba,
authored: value.authored,
}))
})))
}
</%helpers:raw_longhand>

Some files were not shown because too many files have changed in this diff Show More