Merge mozilla-central to inbound. r=merge a=merge on a CLOSED TREE

This commit is contained in:
Bogdan Tara 2017-12-20 00:17:00 +02:00
Родитель 5124576b71 7c64f58369
Коммит 9ac9aa3461
133 изменённых файлов: 1587 добавлений и 1774 удалений

Просмотреть файл

@ -16,12 +16,13 @@ var tabPreviews = {
gBrowser.tabContainer.addEventListener("TabSelect", this);
gBrowser.tabContainer.addEventListener("SSTabRestored", this);
},
let screenManager = Cc["@mozilla.org/gfx/screenmanager;1"]
.getService(Ci.nsIScreenManager);
let left = {}, top = {}, width = {}, height = {};
screenManager.primaryScreen.GetRectDisplayPix(left, top, width, height);
this.aspectRatio = height.value / width.value;
get aspectRatio() {
let { PageThumbUtils } = Cu.import("resource://gre/modules/PageThumbUtils.jsm", {});
let [ width, height ] = PageThumbUtils.getThumbnailSize(window);
delete this.aspectRatio;
return this.aspectRatio = height / width;
},
get: function tabPreviews_get(aTab) {

Просмотреть файл

@ -208,11 +208,6 @@ var FeedHandler = {
href = event.target.getAttribute("feed");
urlSecurityCheck(href, gBrowser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
let feedURI = makeURI(href, document.characterSet);
// Use the feed scheme so X-Moz-Is-Feed will be set
// The value doesn't matter
if (/^https?$/.test(feedURI.scheme))
href = "feed:" + href;
this.loadFeed(href, event);
},
@ -279,6 +274,13 @@ var FeedHandler = {
if (!browserForLink.feeds)
browserForLink.feeds = [];
urlSecurityCheck(link.href, gBrowser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
let feedURI = makeURI(link.href, document.characterSet);
if (!/^https?$/.test(feedURI.scheme))
return;
browserForLink.feeds.push({ href: link.href, title: link.title });
// If this addition was for the current browser, update the UI. For

Просмотреть файл

@ -8548,17 +8548,16 @@ var TabContextMenu = {
document.getElementById("context_unpinTab").hidden = !this.contextTab.pinned;
// Disable "Close Tabs to the Right" if there are no tabs
// following it and hide it when the user rightclicked on a pinned
// tab.
// following it.
document.getElementById("context_closeTabsToTheEnd").disabled =
gBrowser.getTabsToTheEndFrom(this.contextTab).length == 0;
document.getElementById("context_closeTabsToTheEnd").hidden = this.contextTab.pinned;
// Disable "Close other Tabs" if there is only one unpinned tab and
// hide it when the user rightclicked on a pinned tab.
let unpinnedTabs = gBrowser.visibleTabs.length - gBrowser._numPinnedTabs;
document.getElementById("context_closeOtherTabs").disabled = unpinnedTabs <= 1;
document.getElementById("context_closeOtherTabs").hidden = this.contextTab.pinned;
// Disable "Close other Tabs" if there are no unpinned tabs.
let unpinnedTabsToClose = gBrowser.visibleTabs.length - gBrowser._numPinnedTabs;
if (!this.contextTab.pinned) {
unpinnedTabsToClose--;
}
document.getElementById("context_closeOtherTabs").disabled = unpinnedTabsToClose < 1;
// Hide "Bookmark All Tabs" for a pinned tab. Update its state if visible.
let bookmarkAllTabs = document.getElementById("context_bookmarkAllTabs");

Просмотреть файл

@ -2971,9 +2971,12 @@
<parameter name="aTab"/>
<body>
<![CDATA[
var tabsToEnd = [];
let tabsToEnd = [];
let tabs = this.visibleTabs;
for (let i = tabs.length - 1; tabs[i] != aTab && i >= 0; --i) {
for (let i = tabs.length - 1; i >= 0; --i) {
if (tabs[i] == aTab || tabs[i].pinned) {
break;
}
tabsToEnd.push(tabs[i]);
}
return tabsToEnd;
@ -3015,9 +3018,9 @@
<parameter name="aTab"/>
<body>
<![CDATA[
if (aTab.pinned ||
!this.warnAboutClosingTabs(this.closingTabsEnum.OTHER))
if (!this.warnAboutClosingTabs(this.closingTabsEnum.OTHER)) {
return;
}
let tabs = this.visibleTabs.reverse();
this.selectedTab = aTab;

Просмотреть файл

@ -32,10 +32,15 @@ add_task(async function test() {
gBrowser.pinTab(pinned);
is(gBrowser.visibleTabs.length, 2, "now there are two visible tabs");
// Check the context menu on the pinned tab
updateTabContextMenu(pinned);
ok(!document.getElementById("context_closeOtherTabs").disabled, "Close Other Tabs is enabled on pinned tab");
ok(!document.getElementById("context_closeTabsToTheEnd").disabled, "Close Tabs To The End is enabled on pinned tab");
// Check the context menu on the unpinned visible tab
updateTabContextMenu(testTab);
is(document.getElementById("context_closeOtherTabs").disabled, true, "Close Other Tabs is disabled");
is(document.getElementById("context_closeTabsToTheEnd").disabled, true, "Close Tabs To The End is disabled");
ok(document.getElementById("context_closeOtherTabs").disabled, "Close Other Tabs is disabled on single unpinned tab");
ok(document.getElementById("context_closeTabsToTheEnd").disabled, "Close Tabs To The End is disabled on single unpinned tab");
// Show all tabs
let allTabs = Array.from(gBrowser.tabs);
@ -43,13 +48,15 @@ add_task(async function test() {
// Check the context menu now
updateTabContextMenu(testTab);
is(document.getElementById("context_closeOtherTabs").disabled, false, "Close Other Tabs is enabled");
is(document.getElementById("context_closeTabsToTheEnd").disabled, true, "Close Tabs To The End is disabled");
ok(!document.getElementById("context_closeOtherTabs").disabled,
"Close Other Tabs is enabled on unpinned tab when there's another unpinned tab");
ok(document.getElementById("context_closeTabsToTheEnd").disabled, "Close Tabs To The End is disabled on last unpinned tab");
// Check the context menu of the original tab
// Close Tabs To The End should now be enabled
updateTabContextMenu(origTab);
is(document.getElementById("context_closeTabsToTheEnd").disabled, false, "Close Tabs To The End is enabled");
ok(!document.getElementById("context_closeTabsToTheEnd").disabled,
"Close Tabs To The End is enabled on unpinned tab when followed by another");
gBrowser.removeTab(testTab);
gBrowser.removeTab(pinned);

Просмотреть файл

@ -12,6 +12,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=377611
<link rel="alternate" type="application/rss+xml" title="2" href="/2.rss" />
<link rel="feed" title="3" href="/3.xml" />
<!-- invalid protocol -->
<link rel="alternate" type="application/atom+xml" title="Bogus non file protocol" href="file://path/1.rss" />
<link rel="alternate" type="application/atom+xml" title="Bogus non feed:http protocol" href="feed:http://path/1.rss" />
<link rel="alternate" type="application/atom+xml" title="Bogus non pcast protocol" href="pcast://path/1.rss" />
<!-- rel is a space-separated list -->
<link rel=" alternate " type="application/atom+xml" title="4" href="/4.atom" />
<link rel="foo alternate" type="application/atom+xml" title="5" href="/5.atom" />

Просмотреть файл

@ -81,10 +81,6 @@ class BasePopup {
this.viewNode.addEventListener(this.DESTROY_EVENT, this);
let doc = viewNode.ownerDocument;
let arrowContent = doc.getAnonymousElementByAttribute(this.panel, "class", "panel-arrowcontent");
this.borderColor = doc.defaultView.getComputedStyle(arrowContent).borderTopColor;
this.browser = null;
this.browserLoaded = new Promise((resolve, reject) => {
this.browserLoadedDeferred = {resolve, reject};
@ -129,7 +125,6 @@ class BasePopup {
let {panel} = this;
if (panel) {
panel.style.removeProperty("--arrowpanel-background");
panel.style.removeProperty("--panel-arrow-image-vertical");
panel.removeAttribute("remote");
}
@ -344,24 +339,10 @@ class BasePopup {
this.browser.dispatchEvent(event);
}
setBackground(background) {
let panelBackground = "";
let panelArrow = "";
setBackground(background = "") {
if (background) {
let borderColor = this.borderColor || background;
panelBackground = background;
panelArrow = `url("data:image/svg+xml,${encodeURIComponent(`<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="10">
<path d="M 0,10 L 10,0 20,10 z" fill="${borderColor}"/>
<path d="M 1,10 L 10,1 19,10 z" fill="${background}"/>
</svg>
`)}")`;
this.panel.style.setProperty("--arrowpanel-background", background);
}
this.panel.style.setProperty("--arrowpanel-background", panelBackground);
this.panel.style.setProperty("--panel-arrow-image-vertical", panelArrow);
this.background = background;
}
}

Просмотреть файл

@ -42,30 +42,14 @@ add_task(async function testPopupBackground() {
let arrowContent = document.getAnonymousElementByAttribute(panel, "class", "panel-arrowcontent");
let arrow = document.getAnonymousElementByAttribute(panel, "anonid", "arrow");
let borderColor = getComputedStyle(arrowContent).borderTopColor;
let checkArrow = (background = null) => {
let image = getComputedStyle(arrow).listStyleImage;
if (background == null || !standAlone) {
ok(image.startsWith('url("chrome://'), `We should have the built-in background image (got: ${image})`);
ok(!arrow.style.hasOwnProperty("fill"), "Arrow fill should be the default one");
return;
}
if (AppConstants.platform == "mac") {
// Panels have a drop shadow rather than a border on OS-X, so we extend
// the background color through the border area instead.
borderColor = background;
}
image = decodeURIComponent(image);
let borderIndex = image.indexOf(`fill="${borderColor}"`);
let backgroundIndex = image.lastIndexOf(`fill="${background}"`);
ok(borderIndex >= 0, `Have border fill (index=${borderIndex})`);
ok(backgroundIndex >= 0, `Have background fill (index=${backgroundIndex})`);
is(getComputedStyle(arrowContent).backgroundColor, background, "Arrow content should have correct background");
isnot(borderIndex, backgroundIndex, "Border and background fills are separate elements");
is(getComputedStyle(arrow).fill, background, "Arrow should have correct background");
};
function getBackground(browser) {

Просмотреть файл

@ -14,10 +14,6 @@ contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.maybe.video.feed
contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.maybe.audio.feed&to=*/* {229fa115-9412-4d32-baf3-2fc407f76fb1}
component {2376201c-bbc6-472f-9b62-7548040a61c6} FeedConverter.js
contract @mozilla.org/browser/feeds/result-service;1 {2376201c-bbc6-472f-9b62-7548040a61c6}
component {4f91ef2e-57ba-472e-ab7a-b4999e42d6c0} FeedConverter.js
contract @mozilla.org/network/protocol;1?name=feed {4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}
component {1c31ed79-accd-4b94-b517-06e0c81999d5} FeedConverter.js
contract @mozilla.org/network/protocol;1?name=pcast {1c31ed79-accd-4b94-b517-06e0c81999d5}
component {49bb6593-3aff-4eb3-a068-2712c28bd58e} FeedWriter.js
contract @mozilla.org/browser/feeds/result-writer;1 {49bb6593-3aff-4eb3-a068-2712c28bd58e}
component {792a7e82-06a0-437c-af63-b2d12e808acc} WebContentConverter.js

Просмотреть файл

@ -455,123 +455,9 @@ FeedResultService.prototype = {
},
};
/**
* A protocol handler that attempts to deal with the variant forms of feed:
* URIs that are actually either http or https.
*/
function GenericProtocolHandler() {
}
GenericProtocolHandler.prototype = {
_init(scheme) {
this._http = Services.io.getProtocolHandler("http");
this._scheme = scheme;
},
get scheme() {
return this._scheme;
},
get protocolFlags() {
let {URI_DANGEROUS_TO_LOAD, ALLOWS_PROXY_HTTP, ALLOWS_PROXY} =
Ci.nsIProtocolHandler;
return URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY | ALLOWS_PROXY_HTTP;
},
get defaultPort() {
return this._http.defaultPort;
},
allowPort(port, scheme) {
return this._http.allowPort(port, scheme);
},
_getTelemetrySchemeId() {
// Gets a scheme id from 1-8
let schemeId;
if (!this._telemetrySubScheme) {
schemeId = 1;
} else {
switch (this._telemetryInnerScheme) {
case "http":
schemeId = 2;
break;
case "https":
schemeId = 3;
break;
default:
// Invalid scheme
schemeId = 4;
}
}
if (this._scheme === "pcast") {
schemeId += 4;
}
return schemeId;
},
newURI(spec, originalCharset, baseURI) {
// Feed URIs can be either nested URIs of the form feed:realURI (in which
// case we create a nested URI for the realURI) or feed://example.com, in
// which case we create a nested URI for the real protocol which is http.
let scheme = this._scheme + ":";
if (spec.substr(0, scheme.length) != scheme)
throw Cr.NS_ERROR_MALFORMED_URI;
this._telemetrySubScheme = spec.substr(scheme.length, 2) != "//";
let prefix = spec.substr(scheme.length, 2) == "//" ? "http:" : "";
let inner = Services.io.newURI(spec.replace(scheme, prefix),
originalCharset, baseURI);
this._telemetryInnerScheme = inner.scheme;
if (!["http", "https"].includes(inner.scheme))
throw Cr.NS_ERROR_MALFORMED_URI;
let uri = Services.io.QueryInterface(Ci.nsINetUtil).newSimpleNestedURI(inner);
uri.spec = inner.spec.replace(prefix, scheme);
return uri;
},
newChannel2(aUri, aLoadInfo) {
let inner = aUri.QueryInterface(Ci.nsINestedURI).innerURI;
let channel = Services.io.newChannelFromURIWithLoadInfo(inner, aLoadInfo);
const schemeId = this._getTelemetrySchemeId();
Services.telemetry.getHistogramById("FEED_PROTOCOL_USAGE").add(schemeId);
if (channel instanceof Components.interfaces.nsIHttpChannel)
// Set this so we know this is supposed to be a feed
channel.setRequestHeader("X-Moz-Is-Feed", "1", false);
channel.originalURI = aUri;
return channel;
},
QueryInterface(iid) {
if (iid.equals(Ci.nsIProtocolHandler) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
}
};
function FeedProtocolHandler() {
this._init("feed");
}
FeedProtocolHandler.prototype = new GenericProtocolHandler();
FeedProtocolHandler.prototype.classID = Components.ID("{4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}");
function PodCastProtocolHandler() {
this._init("pcast");
}
PodCastProtocolHandler.prototype = new GenericProtocolHandler();
PodCastProtocolHandler.prototype.classID = Components.ID("{1c31ed79-accd-4b94-b517-06e0c81999d5}");
var components = [FeedConverter,
FeedResultService,
FeedProtocolHandler,
PodCastProtocolHandler];
FeedResultService];
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);

Просмотреть файл

@ -4,7 +4,6 @@
# 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/.
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
MOCHITEST_MANIFESTS += ['test/mochitest.ini']

Просмотреть файл

@ -246,17 +246,6 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
bool noSniff = contentType.EqualsLiteral(TYPE_RSS) ||
contentType.EqualsLiteral(TYPE_ATOM);
// Check to see if this was a feed request from the location bar or from
// the feed: protocol. This is also a reliable indication.
// The value of the header doesn't matter.
if (!noSniff) {
nsAutoCString sniffHeader;
nsresult foundHeader =
channel->GetRequestHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"),
sniffHeader);
noSniff = NS_SUCCEEDED(foundHeader);
}
if (noSniff) {
// check for an attachment after we have a likely feed.
if(HasAttachmentDisposition(channel)) {

Просмотреть файл

@ -1175,10 +1175,13 @@ main {
offset-inline-end: 0;
position: absolute; }
.collapsible-section .section-top-bar .section-info-option .info-option::before {
background-image: url("chrome://global/skin/arrow/panelarrow-vertical-themed.svg");
background-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
background-position: right 6px bottom;
background-repeat: no-repeat;
background-size: 20px 10px;
-moz-context-properties: fill, stroke;
fill: #FFF;
stroke: #D7D7DB;
height: 32px;
top: -32px;
width: 43px; }

Просмотреть файл

@ -1175,10 +1175,13 @@ main {
offset-inline-end: 0;
position: absolute; }
.collapsible-section .section-top-bar .section-info-option .info-option::before {
background-image: url("chrome://global/skin/arrow/panelarrow-vertical@2x.png");
background-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
background-position: right 7px bottom;
background-repeat: no-repeat;
background-size: 18px 10px;
-moz-context-properties: fill, stroke;
fill: #FFF;
stroke: #D7D7DB;
height: 32px;
top: -32px;
width: 43px; }

Просмотреть файл

@ -1175,10 +1175,13 @@ main {
offset-inline-end: 0;
position: absolute; }
.collapsible-section .section-top-bar .section-info-option .info-option::before {
background-image: url("chrome://global/skin/arrow/panelarrow-vertical-themed.svg");
background-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
background-position: right 6px bottom;
background-repeat: no-repeat;
background-size: 20px 10px;
-moz-context-properties: fill, stroke;
fill: #FFF;
stroke: #D7D7DB;
height: 32px;
top: -32px;
width: 43px; }

Просмотреть файл

@ -95,34 +95,30 @@ AutofillProfileAutoCompleteSearch.prototype = {
* @param {Object} listener the listener to notify when the search is complete
*/
startSearch(searchString, searchParam, previousResult, listener) {
this.log.debug("startSearch: for", searchString, "with input", formFillController.focusedInput);
let {activeInput, activeSection, activeFieldDetail, savedFieldNames} = FormAutofillContent;
this.forceStop = false;
let savedFieldNames = FormAutofillContent.savedFieldNames;
this.log.debug("startSearch: for", searchString, "with input", activeInput);
let focusedInput = formFillController.focusedInput;
let info = FormAutofillContent.getInputDetails(focusedInput);
let isAddressField = FormAutofillUtils.isAddressField(info.fieldName);
let isInputAutofilled = info.state == FIELD_STATES.AUTO_FILLED;
let handler = FormAutofillContent.getFormHandler(focusedInput);
let allFieldNames = handler.getAllFieldNames(focusedInput);
let filledRecordGUID = handler.getFilledRecordGUID(focusedInput);
let isAddressField = FormAutofillUtils.isAddressField(activeFieldDetail.fieldName);
let isInputAutofilled = activeFieldDetail.state == FIELD_STATES.AUTO_FILLED;
let allFieldNames = activeSection.allFieldNames;
let filledRecordGUID = activeSection.getFilledRecordGUID();
let searchPermitted = isAddressField ?
FormAutofillUtils.isAutofillAddressesEnabled :
FormAutofillUtils.isAutofillCreditCardsEnabled;
let AutocompleteResult = isAddressField ? AddressResult : CreditCardResult;
ProfileAutocomplete.lastProfileAutoCompleteFocusedInput = focusedInput;
ProfileAutocomplete.lastProfileAutoCompleteFocusedInput = activeInput;
// Fallback to form-history if ...
// - specified autofill feature is pref off.
// - no profile can fill the currently-focused input.
// - the current form has already been populated.
// - (address only) less than 3 inputs are covered by all saved fields in the storage.
if (!searchPermitted || !savedFieldNames.has(info.fieldName) ||
if (!searchPermitted || !savedFieldNames.has(activeFieldDetail.fieldName) ||
(!isInputAutofilled && filledRecordGUID) || (isAddressField &&
allFieldNames.filter(field => savedFieldNames.has(field)).length < FormAutofillUtils.AUTOFILL_FIELDS_THRESHOLD)) {
if (focusedInput.autocomplete == "off") {
if (activeInput.autocomplete == "off") {
// Create a dummy result as an empty search result.
let result = new AutocompleteResult("", "", [], [], {});
listener.onSearchResult(this, result);
@ -146,7 +142,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
return;
}
let infoWithoutElement = Object.assign({}, info);
let infoWithoutElement = Object.assign({}, activeFieldDetail);
delete infoWithoutElement.elementWeakRef;
let data = {
@ -162,12 +158,13 @@ AutofillProfileAutoCompleteSearch.prototype = {
// Sort addresses by timeLastUsed for showing the lastest used address at top.
records.sort((a, b) => b.timeLastUsed - a.timeLastUsed);
let adaptedRecords = handler.getAdaptedProfiles(records, focusedInput);
let adaptedRecords = activeSection.getAdaptedProfiles(records);
let result = null;
let handler = FormAutofillContent.activeHandler;
let isSecure = InsecurePasswordUtils.isFormSecure(handler.form);
result = new AutocompleteResult(searchString,
info.fieldName,
activeFieldDetail.fieldName,
allFieldNames,
adaptedRecords,
{isSecure, isInputAutofilled});
@ -253,11 +250,11 @@ let ProfileAutocomplete = {
observe(subject, topic, data) {
switch (topic) {
case "autocomplete-will-enter-text": {
if (!formFillController.focusedInput) {
if (!FormAutofillContent.activeInput) {
// The observer notification is for autocomplete in a different process.
break;
}
this._fillFromAutocompleteRow(formFillController.focusedInput);
this._fillFromAutocompleteRow(FormAutofillContent.activeInput);
break;
}
}
@ -282,7 +279,7 @@ let ProfileAutocomplete = {
_fillFromAutocompleteRow(focusedInput) {
this.log.debug("_fillFromAutocompleteRow:", focusedInput);
let formDetails = FormAutofillContent.getFormDetails(focusedInput);
let formDetails = FormAutofillContent.activeFormDetails;
if (!formDetails) {
// The observer notification is for a different frame.
return;
@ -296,28 +293,23 @@ let ProfileAutocomplete = {
}
let profile = JSON.parse(this.lastProfileAutoCompleteResult.getCommentAt(selectedIndex));
let {fieldName} = FormAutofillContent.getInputDetails(focusedInput);
let formHandler = FormAutofillContent.getFormHandler(focusedInput);
let {fieldName} = FormAutofillContent.activeFieldDetail;
formHandler.autofillFormFields(profile, focusedInput).then(() => {
FormAutofillContent.activeHandler.autofillFormFields(profile).then(() => {
autocompleteController.searchString = profile[fieldName];
});
},
_clearProfilePreview() {
let focusedInput = formFillController.focusedInput || this.lastProfileAutoCompleteFocusedInput;
if (!focusedInput || !FormAutofillContent.getFormDetails(focusedInput)) {
if (!this.lastProfileAutoCompleteFocusedInput || !FormAutofillContent.activeSection) {
return;
}
let formHandler = FormAutofillContent.getFormHandler(focusedInput);
formHandler.clearPreviewedFormFields(focusedInput);
FormAutofillContent.activeSection.clearPreviewedFormFields();
},
_previewSelectedProfile(selectedIndex) {
let focusedInput = formFillController.focusedInput;
if (!focusedInput || !FormAutofillContent.getFormDetails(focusedInput)) {
if (!FormAutofillContent.activeInput || !FormAutofillContent.activeFormDetails) {
// The observer notification is for a different process/frame.
return;
}
@ -328,9 +320,7 @@ let ProfileAutocomplete = {
}
let profile = JSON.parse(this.lastProfileAutoCompleteResult.getCommentAt(selectedIndex));
let formHandler = FormAutofillContent.getFormHandler(focusedInput);
formHandler.previewFormFields(profile, focusedInput);
FormAutofillContent.activeSection.previewFormFields(profile);
},
};
@ -351,6 +341,12 @@ var FormAutofillContent = {
*/
savedFieldNames: null,
/**
* @type {Object} The object where to store the active items, e.g. element,
* handler, section, and field detail.
*/
_activeItems: {},
init() {
FormAutofillUtils.defineLazyLogGetter(this, "FormAutofillContent");
@ -440,25 +436,6 @@ var FormAutofillContent = {
}
},
/**
* Get the input's information from cache which is created after page identified.
*
* @param {HTMLInputElement} element Focused input which triggered profile searching
* @returns {Object|null}
* Return target input's information that cloned from content cache
* (or return null if the information is not found in the cache).
*/
getInputDetails(element) {
let formDetails = this.getFormDetails(element);
for (let detail of formDetails) {
let detailElement = detail.elementWeakRef.get();
if (detailElement && element == detailElement) {
return detail;
}
}
return null;
},
/**
* Get the form's handler from cache which is created after page identified.
*
@ -468,28 +445,82 @@ var FormAutofillContent = {
* (or return null if the information is not found in the cache).
*
*/
getFormHandler(element) {
_getFormHandler(element) {
let rootElement = FormLikeFactory.findRootForField(element);
return this._formsDetails.get(rootElement);
},
/**
* Get the form's information from cache which is created after page identified.
* Get the active form's information from cache which is created after page
* identified.
*
* @param {HTMLInputElement} element Focused input which triggered profile searching
* @returns {Array<Object>|null}
* Return target form's information from content cache
* (or return null if the information is not found in the cache).
*
*/
getFormDetails(element) {
let formHandler = this.getFormHandler(element);
get activeFormDetails() {
let formHandler = this.activeHandler;
return formHandler ? formHandler.fieldDetails : null;
},
getAllFieldNames(element) {
let formHandler = this.getFormHandler(element);
return formHandler ? formHandler.getAllFieldNames(element) : null;
/**
* All active items should be updated according the active element of
* `formFillController.focusedInput`. All of them including element,
* handler, section, and field detail, can be retrieved by their own getters.
*
* @param {HTMLElement|null} element The active item should be updated based
* on this or `formFillController.focusedInput` will be taken.
*/
updateActiveInput(element) {
element = element || formFillController.focusedInput;
let handler = this._getFormHandler(element);
if (handler) {
handler.focusedInput = element;
}
this._activeItems = {
handler,
elementWeakRef: Cu.getWeakReference(element),
section: handler ? handler.activeSection : null,
fieldDetail: null,
};
},
get activeInput() {
return this._activeItems.elementWeakRef.get();
},
get activeHandler() {
return this._activeItems.handler;
},
get activeSection() {
return this._activeItems.section;
},
/**
* Get the active input's information from cache which is created after page
* identified.
*
* @returns {Object|null}
* Return the active input's information that cloned from content cache
* (or return null if the information is not found in the cache).
*/
get activeFieldDetail() {
if (!this._activeItems.fieldDetail) {
let formDetails = this.activeFormDetails;
if (!formDetails) {
return null;
}
for (let detail of formDetails) {
let detailElement = detail.elementWeakRef.get();
if (detailElement && this.activeInput == detailElement) {
this._activeItems.fieldDetail = detail;
break;
}
}
}
return this._activeItems.fieldDetail;
},
identifyAutofillFields(element) {
@ -500,7 +531,7 @@ var FormAutofillContent = {
Services.cpmm.sendAsyncMessage("FormAutofill:InitStorage");
}
let formHandler = this.getFormHandler(element);
let formHandler = this._getFormHandler(element);
if (!formHandler) {
let formLike = FormLikeFactory.createFromField(element);
formHandler = new FormAutofillHandler(formLike);
@ -520,13 +551,12 @@ var FormAutofillContent = {
},
clearForm() {
let focusedInput = formFillController.focusedInput || ProfileAutocomplete._lastAutoCompleteFocusedInput;
let focusedInput = this.activeInput || ProfileAutocomplete._lastAutoCompleteFocusedInput;
if (!focusedInput) {
return;
}
let formHandler = this.getFormHandler(focusedInput);
formHandler.clearPopulatedForm(focusedInput);
this.activeSection.clearPopulatedForm();
autocompleteController.searchString = "";
},
@ -534,7 +564,7 @@ var FormAutofillContent = {
let docWin = doc.ownerGlobal;
let selectedIndex = ProfileAutocomplete._getSelectedIndex(docWin);
let lastAutoCompleteResult = ProfileAutocomplete.lastProfileAutoCompleteResult;
let focusedInput = formFillController.focusedInput;
let focusedInput = this.activeInput;
let mm = this._messageManagerFromWindow(docWin);
if (selectedIndex === -1 ||
@ -545,9 +575,9 @@ var FormAutofillContent = {
ProfileAutocomplete._clearProfilePreview();
} else {
let focusedInputDetails = this.getInputDetails(focusedInput);
let focusedInputDetails = this.activeFieldDetail;
let profile = JSON.parse(lastAutoCompleteResult.getCommentAt(selectedIndex));
let allFieldNames = FormAutofillContent.getAllFieldNames(focusedInput);
let allFieldNames = FormAutofillContent.activeSection.allFieldNames;
let profileFields = allFieldNames.filter(fieldName => !!profile[fieldName]);
let focusedCategory = FormAutofillUtils.getCategoryFromFieldName(focusedInputDetails.fieldName);
@ -585,7 +615,7 @@ var FormAutofillContent = {
_onKeyDown(e) {
let lastAutoCompleteResult = ProfileAutocomplete.lastProfileAutoCompleteResult;
let focusedInput = formFillController.focusedInput;
let focusedInput = FormAutofillContent.activeInput;
if (e.keyCode != Ci.nsIDOMKeyEvent.DOM_VK_RETURN || !lastAutoCompleteResult ||
!focusedInput || focusedInput != ProfileAutocomplete.lastProfileAutoCompleteFocusedInput) {

Просмотреть файл

@ -99,6 +99,10 @@ class FormAutofillSection {
return this._validDetails;
}
set focusedInput(element) {
this._focusedDetail = this.getFieldDetailByElement(element);
}
getFieldDetailByElement(element) {
return this._validDetails.find(
detail => detail.elementWeakRef.get() == element
@ -134,12 +138,12 @@ class FormAutofillSection {
return this._cacheValue.allFieldNames;
}
getFieldDetailByName(fieldName) {
_getFieldDetailByName(fieldName) {
return this._validDetails.find(detail => detail.fieldName == fieldName);
}
_getTargetSet(element) {
let fieldDetail = this.getFieldDetailByElement(element);
_getTargetSet() {
let fieldDetail = this._focusedDetail;
if (!fieldDetail) {
return null;
}
@ -152,13 +156,13 @@ class FormAutofillSection {
return null;
}
getFieldDetailsByElement(element) {
let targetSet = this._getTargetSet(element);
_getFieldDetails() {
let targetSet = this._getTargetSet();
return targetSet ? targetSet.fieldDetails : [];
}
getFilledRecordGUID(element) {
let targetSet = this._getTargetSet(element);
getFilledRecordGUID() {
let targetSet = this._getTargetSet();
return targetSet ? targetSet.filledRecordGUID : null;
}
@ -177,7 +181,7 @@ class FormAutofillSection {
// "-moz-street-address-one-line" is used by the labels in
// ProfileAutoCompleteResult.
profile["-moz-street-address-one-line"] = this._getOneLineStreetAddress(profile["street-address"]);
let streetAddressDetail = this.getFieldDetailByName("street-address");
let streetAddressDetail = this._getFieldDetailByName("street-address");
if (streetAddressDetail &&
(streetAddressDetail.elementWeakRef.get() instanceof Ci.nsIDOMHTMLInputElement)) {
profile["street-address"] = profile["-moz-street-address-one-line"];
@ -186,7 +190,7 @@ class FormAutofillSection {
let waitForConcat = [];
for (let f of ["address-line3", "address-line2", "address-line1"]) {
waitForConcat.unshift(profile[f]);
if (this.getFieldDetailByName(f)) {
if (this._getFieldDetailByName(f)) {
if (waitForConcat.length > 1) {
profile[f] = FormAutofillUtils.toOneLineAddress(waitForConcat);
}
@ -207,7 +211,7 @@ class FormAutofillSection {
return;
}
let detail = this.getFieldDetailByName("tel");
let detail = this._getFieldDetailByName("tel");
if (!detail) {
return;
}
@ -256,7 +260,7 @@ class FormAutofillSection {
}
for (let fieldName in profile) {
let fieldDetail = this.getFieldDetailByName(fieldName);
let fieldDetail = this._getFieldDetailByName(fieldName);
if (!fieldDetail) {
continue;
}
@ -293,7 +297,7 @@ class FormAutofillSection {
return;
}
let detail = this.getFieldDetailByName("cc-exp");
let detail = this._getFieldDetailByName("cc-exp");
if (!detail) {
return;
}
@ -326,7 +330,7 @@ class FormAutofillSection {
_adaptFieldMaxLength(profile) {
for (let key in profile) {
let detail = this.getFieldDetailByName(key);
let detail = this._getFieldDetailByName(key);
if (!detail) {
continue;
}
@ -366,16 +370,13 @@ class FormAutofillSection {
*
* @param {Object} profile
* A profile to be filled in.
* @param {HTMLElement} focusedInput
* A focused input element needed to determine the address or credit
* card field.
*/
async autofillFields(profile, focusedInput) {
let focusedDetail = this.getFieldDetailByElement(focusedInput);
async autofillFields(profile) {
let focusedDetail = this._focusedDetail;
if (!focusedDetail) {
throw new Error("No fieldDetail for the focused input.");
}
let targetSet = this._getTargetSet(focusedInput);
let targetSet = this._getTargetSet();
if (FormAutofillUtils.isCreditCardField(focusedDetail.fieldName)) {
// When Master Password is enabled by users, the decryption process
// should prompt Master Password dialog to get the decrypted credit
@ -415,10 +416,11 @@ class FormAutofillSection {
// anyway.
// For the others, the fields should be only filled when their values
// are empty.
let focusedInput = focusedDetail.elementWeakRef.get();
if (element == focusedInput ||
(element != focusedInput && !element.value)) {
element.setUserInput(value);
this.changeFieldState(fieldDetail, FIELD_STATES.AUTO_FILLED);
this._changeFieldState(fieldDetail, FIELD_STATES.AUTO_FILLED);
}
} else if (ChromeUtils.getClassName(element) === "HTMLSelectElement") {
let cache = this._cacheValue.matchingSelectOption.get(element) || {};
@ -434,7 +436,7 @@ class FormAutofillSection {
element.dispatchEvent(new element.ownerGlobal.Event("change", {bubbles: true}));
}
// Autofill highlight appears regardless if value is changed or not
this.changeFieldState(fieldDetail, FIELD_STATES.AUTO_FILLED);
this._changeFieldState(fieldDetail, FIELD_STATES.AUTO_FILLED);
}
if (fieldDetail.state == FIELD_STATES.AUTO_FILLED) {
element.addEventListener("input", this, {mozSystemGroup: true});
@ -447,10 +449,8 @@ class FormAutofillSection {
*
* @param {Object} profile
* A profile to be previewed with
* @param {HTMLElement} focusedInput
* A focused input element for determining credit card or address fields.
*/
previewFormFields(profile, focusedInput) {
previewFormFields(profile) {
log.debug("preview profile: ", profile);
// Always show the decrypted credit card number when Master Password is
@ -459,7 +459,7 @@ class FormAutofillSection {
profile["cc-number"] = profile["cc-number-decrypted"];
}
let fieldDetails = this.getFieldDetailsByElement(focusedInput);
let fieldDetails = this._getFieldDetails();
for (let fieldDetail of fieldDetails) {
let element = fieldDetail.elementWeakRef.get();
let value = profile[fieldDetail.fieldName] || "";
@ -486,20 +486,17 @@ class FormAutofillSection {
continue;
}
element.previewValue = value;
this.changeFieldState(fieldDetail, value ? FIELD_STATES.PREVIEW : FIELD_STATES.NORMAL);
this._changeFieldState(fieldDetail, value ? FIELD_STATES.PREVIEW : FIELD_STATES.NORMAL);
}
}
/**
* Clear preview text and background highlight of all fields.
*
* @param {HTMLElement} focusedInput
* A focused input element for determining credit card or address fields.
*/
clearPreviewedFormFields(focusedInput) {
clearPreviewedFormFields() {
log.debug("clear previewed fields in:", this.form);
let fieldDetails = this.getFieldDetailsByElement(focusedInput);
let fieldDetails = this._getFieldDetails();
for (let fieldDetail of fieldDetails) {
let element = fieldDetail.elementWeakRef.get();
if (!element) {
@ -515,18 +512,15 @@ class FormAutofillSection {
continue;
}
this.changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
this._changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
}
}
/**
* Clear value and highlight style of all filled fields.
*
* @param {Object} focusedInput
* A focused input element for determining credit card or address fields.
*/
clearPopulatedForm(focusedInput) {
let fieldDetails = this.getFieldDetailsByElement(focusedInput);
clearPopulatedForm() {
let fieldDetails = this._getFieldDetails();
for (let fieldDetail of fieldDetails) {
let element = fieldDetail.elementWeakRef.get();
if (!element) {
@ -551,7 +545,7 @@ class FormAutofillSection {
* @param {string} nextState
* Used to determine the next state
*/
changeFieldState(fieldDetail, nextState) {
_changeFieldState(fieldDetail, nextState) {
let element = fieldDetail.elementWeakRef.get();
if (!element) {
@ -584,7 +578,7 @@ class FormAutofillSection {
for (let fieldDetail of this._validDetails) {
const element = fieldDetail.elementWeakRef.get();
element.removeEventListener("input", this, {mozSystemGroup: true});
this.changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
this._changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
}
this.address.filledRecordGUID = null;
this.creditCard.filledRecordGUID = null;
@ -715,7 +709,7 @@ class FormAutofillSection {
// Normalize Country
if (address.record.country) {
let detail = this.getFieldDetailByName("country");
let detail = this._getFieldDetailByName("country");
// Try identifying country field aggressively if it doesn't come from
// @autocomplete.
if (detail._reason != "autocomplete") {
@ -771,7 +765,7 @@ class FormAutofillSection {
const target = event.target;
const fieldDetail = this.getFieldDetailByElement(target);
const targetSet = this._getTargetSet(target);
this.changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
this._changeFieldState(fieldDetail, FIELD_STATES.NORMAL);
if (!targetSet.fieldDetails.some(detail => detail.state == FIELD_STATES.AUTO_FILLED)) {
targetSet.filledRecordGUID = null;
@ -807,6 +801,26 @@ class FormAutofillHandler {
this.timeStartedFillingMS = null;
}
set focusedInput(element) {
let section = this._sectionCache.get(element);
if (!section) {
section = this.sections.find(
s => s.getFieldDetailByElement(element)
);
this._sectionCache.set(element, section);
}
this._focusedSection = section;
if (section) {
section.focusedInput = element;
}
}
get activeSection() {
return this._focusedSection;
}
/**
* Check the form is necessary to be updated. This function should be able to
* detect any changes including all control elements in the form.
@ -909,49 +923,7 @@ class FormAutofillHandler {
return allValidDetails;
}
getSectionByElement(element) {
let section = this._sectionCache.get(element);
if (!section) {
section = this.sections.find(
s => s.getFieldDetailByElement(element)
);
this._sectionCache.set(element, section);
}
return section;
}
getAllFieldNames(focusedInput) {
let section = this.getSectionByElement(focusedInput);
return section.allFieldNames;
}
previewFormFields(profile, focusedInput) {
let section = this.getSectionByElement(focusedInput);
section.previewFormFields(profile, focusedInput);
}
clearPreviewedFormFields(focusedInput) {
let section = this.getSectionByElement(focusedInput);
section.clearPreviewedFormFields(focusedInput);
}
clearPopulatedForm(focusedInput) {
let section = this.getSectionByElement(focusedInput);
section.clearPopulatedForm(focusedInput);
}
getFilledRecordGUID(focusedInput) {
let section = this.getSectionByElement(focusedInput);
return section.getFilledRecordGUID(focusedInput);
}
getAdaptedProfiles(originalProfiles, focusedInput) {
let section = this.getSectionByElement(focusedInput);
section.getAdaptedProfiles(originalProfiles);
return originalProfiles;
}
hasFilledSection() {
_hasFilledSection() {
return this.sections.some(section => section.isFilled());
}
@ -961,13 +933,10 @@ class FormAutofillHandler {
*
* @param {Object} profile
* A profile to be filled in.
* @param {HTMLElement} focusedInput
* A focused input element needed to determine the address or credit
* card field.
*/
async autofillFormFields(profile, focusedInput) {
let noFilledSectionsPreviously = !this.hasFilledSection();
await this.getSectionByElement(focusedInput).autofillFields(profile, focusedInput);
async autofillFormFields(profile) {
let noFilledSectionsPreviously = !this._hasFilledSection();
await this.activeSection.autofillFields(profile);
const onChangeHandler = e => {
if (!e.isTrusted) {
@ -979,7 +948,7 @@ class FormAutofillHandler {
}
}
// Unregister listeners once no field is in AUTO_FILLED state.
if (!this.hasFilledSection()) {
if (!this._hasFilledSection()) {
this.form.rootElement.removeEventListener("input", onChangeHandler, {mozSystemGroup: true});
this.form.rootElement.removeEventListener("reset", onChangeHandler, {mozSystemGroup: true});
}

Просмотреть файл

@ -39,6 +39,7 @@ var FormAutofillFrameScript = {
// This is for testing purpose only which sends a message to indicate that the
// form has been identified, and ready to open popup.
sendAsyncMessage("FormAutofill:FieldsIdentified");
FormAutofillContent.updateActiveInput();
});
},
@ -54,6 +55,7 @@ var FormAutofillFrameScript = {
if (!evt.isTrusted || !FormAutofillUtils.isAutofillEnabled) {
return;
}
FormAutofillContent.updateActiveInput();
let element = evt.target;
if (!FormAutofillUtils.isFieldEligibleForAutofill(element)) {

Просмотреть файл

@ -537,7 +537,8 @@ function do_test(testcases, testFn) {
});
let focusedInput = doc.getElementById(testcase.focusedInputId);
let [adaptedProfile] = handler.getAdaptedProfiles([testcase.profileData], focusedInput);
handler.focusedInput = focusedInput;
let [adaptedProfile] = handler.activeSection.getAdaptedProfiles([testcase.profileData]);
await handler.autofillFormFields(adaptedProfile, focusedInput);
Assert.equal(handlerInfo.filledRecordGUID, testcase.profileData.guid,
"Check if filledRecordGUID is set correctly");

Просмотреть файл

@ -934,8 +934,8 @@ for (let testcase of TESTCASES) {
let handler = new FormAutofillHandler(formLike);
handler.collectFormFields();
let focusedInput = form.elements[0];
let adaptedRecords = handler.getAdaptedProfiles(testcase.profileData, focusedInput);
handler.focusedInput = form.elements[0];
let adaptedRecords = handler.activeSection.getAdaptedProfiles(testcase.profileData);
Assert.deepEqual(adaptedRecords, testcase.expectedResult);
if (testcase.expectedOptionElements) {
@ -946,8 +946,7 @@ for (let testcase of TESTCASES) {
Assert.notEqual(expectedOption, null);
let value = testcase.profileData[i][field];
let section = handler.getSectionByElement(select);
let cache = section._cacheValue.matchingSelectOption.get(select);
let cache = handler.activeSection._cacheValue.matchingSelectOption.get(select);
let targetOption = cache[value] && cache[value].get();
Assert.notEqual(targetOption, null);

Просмотреть файл

@ -88,12 +88,13 @@ TESTCASES.forEach(testcase => {
for (let i in testcase.targetInput) {
let input = doc.getElementById(testcase.targetInput[i]);
FormAutofillContent.identifyAutofillFields(input);
FormAutofillContent.updateActiveInput(input);
// Put the input element reference to `element` to make sure the result of
// `getInputDetails` contains the same input element.
// `activeFieldDetail` contains the same input element.
testcase.expectedResult[i].input.elementWeakRef = Cu.getWeakReference(input);
inputDetailAssertion(FormAutofillContent.getInputDetails(input),
inputDetailAssertion(FormAutofillContent.activeFieldDetail,
testcase.expectedResult[i].input);
let formDetails = testcase.expectedResult[i].form;
@ -104,7 +105,7 @@ TESTCASES.forEach(testcase => {
formDetail.elementWeakRef = Cu.getWeakReference(doc.querySelector(queryString));
}
FormAutofillContent.getFormDetails(input).forEach((detail, index) => {
FormAutofillContent.activeFormDetails.forEach((detail, index) => {
inputDetailAssertion(detail, formDetails[index]);
});
}

Просмотреть файл

@ -3,6 +3,10 @@
padding-bottom: 0;
}
#pageActionActivatedActionPanel[actionID="pocket"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow {
fill: #fbfbfb;
}
#pocket-button {
list-style-image: url("chrome://pocket-shared/skin/pocket.svg");
}

Просмотреть файл

@ -15,7 +15,7 @@
You can set the column width to a value that makes the dialog look visually balanced,
or at half of the dialog width if unsure. -->
<!ENTITY sanitizePrefs2.inContent.dialog.width "34em">
<!ENTITY sanitizePrefs2.inContent.column.width "24em">
<!ENTITY sanitizePrefs2.inContent.column.width "17em">
<!ENTITY sanitizeDialog2.title "Clear Recent History">
<!-- LOCALIZATION NOTE (sanitizeDialog2.width): width of the Clear Recent History dialog -->

Просмотреть файл

@ -28,14 +28,6 @@ var TEST_CASES = [
nestedURL: "jar:http://some.site/file!/",
plainURL: "http://some.site/file",
},
{
nestedURL: "feed:http://some.site",
plainURL: "http://some.site",
},
{
nestedURL: "pcast:http://some.site",
plainURL: "http://some.site",
},
{
nestedURL: "view-source:http://some.site",
plainURL: "http://some.site",
@ -52,10 +44,6 @@ var TEST_CASES = [
nestedURL: "view-source:about:robots",
plainURL: "about:robots",
},
{
nestedURL: "view-source:feed:http://some.site",
plainURL: "http://some.site",
},
{
nestedURL: "view-source:pcast:http://some.site",
plainURL: "http://some.site",

Просмотреть файл

@ -13,10 +13,6 @@ prefwindow,
font-size: 1.18em;
}
caption {
font: message-box;
}
.prefWindow-dlgbuttons {
margin: 0;
}

Просмотреть файл

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
#include ../icon-colors.inc.svg
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<defs>
<mask id="mask-globe">
<circle fill="#fff" cx="12" cy="12" r="11"/>
@ -11,5 +9,5 @@
</mask>
</defs>
<rect width="24" height="24" mask="url(#mask-globe)" class="fieldtext"/>
<rect width="24" height="24" mask="url(#mask-globe)" fill="context-fill" fill-opacity="context-fill-opacity"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 62 KiB

После

Ширина:  |  Высота:  |  Размер: 62 KiB

Просмотреть файл

@ -78,6 +78,9 @@
background-repeat: no-repeat;
background-position: 1em 1em;
background-size: 24px auto;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: .6;
padding: 0.5em 0 1em;
/* .identity-popup-host depends on this width */
padding-inline-start: calc(2em + 24px);

Просмотреть файл

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg"
width="24" height="24" viewBox="0 0 24 24">
#include ../icon-colors.inc.svg
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<defs>
<mask id="mask-permissions">
<path fill="#fff" d="M2,1h20c1.1,0,2,0.9,2,2v18c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V3 C0,1.9,0.9,1,2,1z"/>
@ -15,6 +11,5 @@
<rect x="16.3" y="8.5" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 20.5355 32.5061)" fill="#fff" width="1.4" height="7.1"/>
</mask>
</defs>
<rect class="fieldtext" id="permissions" width="24" height="24" mask="url(#mask-permissions)"/>
<rect fill="context-fill" fill-opacity="context-fill-opacity" width="24" height="24" mask="url(#mask-permissions)"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="24" height="24" viewBox="0 0 24 24">
#include ../icon-colors.inc.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24">
<style>
g:not(:target) {
display: none;
@ -33,11 +30,11 @@
</defs>
<g id="enabled">
<use class="fieldtext" xlink:href="#shape-shield-outer" mask="url(#mask-shield-cutout)"/>
<use fill="context-fill" fill-opacity="context-fill-opacity" xlink:href="#shape-shield-outer" mask="url(#mask-shield-cutout)"/>
</g>
<g id="disabled">
<use class="fieldtext" xlink:href="#shape-shield-outer" mask="url(#mask-shield-cutout-disabled)"/>
<use fill="context-fill" fill-opacity="context-fill-opacity" xlink:href="#shape-shield-outer" mask="url(#mask-shield-cutout-disabled)"/>
<line x1="3" y1="22" x2="23" y2="1" stroke="#d92d21" stroke-width="3"/>
</g>
</svg>

До

Ширина:  |  Высота:  |  Размер: 2.0 KiB

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Просмотреть файл

@ -456,17 +456,16 @@ toolbarpaletteitem[place=toolbar] > toolbarspring {
#customization-panelWrapper > .panel-arrowbox > .panel-arrow[side="top"] {
%ifdef XP_MACOSX
list-style-image: var(--panel-arrow-image-vertical,
url("chrome://global/skin/arrow/panelarrow-vertical.png"));
/* The OS X image is 2px narrower than the windows/linux one.
* Add padding to compensate: */
padding: 0 1px;
/* specify width for hidpi image to fit correctly */
width: 20px;
%else
list-style-image: var(--panel-arrow-image-vertical,
url("chrome://global/skin/arrow/panelarrow-vertical-themed.svg"));
%endif
list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
-moz-context-properties: fill, stroke;
fill: var(--arrowpanel-background);
stroke: var(--arrowpanel-border-color);
/* The arrow needs to point to the overflow button. The numbers involved
* are:
* overflow button width: (16px + 2 * 2px padding
@ -486,15 +485,6 @@ toolbarpaletteitem[place=toolbar] > toolbarspring {
vertical-align: top;
}
%ifdef XP_MACOSX
@media (min-resolution: 2dppx) {
#customization-panelWrapper > .panel-arrowbox > .panel-arrow[side="top"] {
list-style-image: var(--panel-arrow-image-vertical,
url("chrome://global/skin/arrow/panelarrow-vertical@2x.png"));
}
}
%endif
#customization-panelDescription {
font-size: 1.1em;
padding: 2px 12px 10px;

Просмотреть файл

@ -907,6 +907,7 @@ panelview .toolbarbutton-1,
.subviewbutton[checked="true"] {
list-style-image: url(chrome://browser/skin/check.svg);
-moz-context-properties: fill;
fill: currentColor;
}

Просмотреть файл

@ -3,61 +3,59 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.9 156.5">
<style>
.st0{opacity:0.1;fill:#0C0C0D;} .st1{fill:#FFFFFF;} .st2{fill:url(#SVGID_1_);} .st3{fill:#F9F9FA;} .st4{fill:url(#SVGID_2_);} .st5{fill:url(#SVGID_3_);} .st6{fill:url(#SVGID_4_);} .st7{fill:url(#SVGID_5_);} .st8{fill:url(#SVGID_6_);} .st9{fill:url(#SVGID_7_);}
.st0{opacity:7.000000e-02}.st1{opacity:4.000000e-02}.st2{fill:#fff}
</style>
<path class="st0" d="M140.9 152h-69c-.6 0-1-.4-1-1s.4-1 1-1H141c.6 0 1 .4 1 1s-.5 1-1.1 1zm-9.3-5.1h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-15.7 9.6h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-20 0h-3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h3c.3 0 .5.2.5.5s-.2.5-.5.5zm-7 0h-1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h1c.3 0 .5.2.5.5s-.2.5-.5.5zm-10 0h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-20 0h-3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h3c.3 0 .5.2.5.5s-.2.5-.5.5zm-7 0h-1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h1c.3 0 .5.2.5.5s-.2.5-.5.5zm-10 0h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-20 0h-3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h3c.3 0 .5.2.5.5s-.2.5-.5.5zm-7 0h-1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h1c.3 0 .5.2.5.5s-.2.5-.5.5z"/>
<path class="st1" d="M85 20.4h21.3s-6.7-14.9 7.5-16.8c12.6-1.7 17.6 11.3 17.6 11.3s1.5-7.5 9-6.1 12.9 13.3 12.9 13.3h18.6"/>
<path class="st0" d="M172.2 18.6h-4c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h4c.3 0 .5.2.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1 3.4 2.8 6.1 6.2 6h60v3.2c0 4.1 3.3 7.4 7.4 7.4h25.6c4.1 0 7.4-3.3 7.4-7.4V84.7c.1-4.2-3.2-7.5-7.4-7.5z"/>
<path class="st1" d="M50.8 56.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.6 3.6H50.8c-2 0-3.5-1.6-3.5-3.6V60.1c0-2 1.6-3.6 3.5-3.6z"/>
<path class="st1" d="M52.7 62.5h57.7c1.2 0 2.1.9 2.1 2.1V99c0 1.2-.9 2.1-2.1 2.1H52.7c-1.2 0-2.1-.9-2.1-2.1V64.6c0-1.1 1-2.1 2.1-2.1z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="55.4468" y1="665.5432" x2="128.2768" y2="738.3832" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#CCFBFF"/>
<stop offset="1" stop-color="#C9E4FF"/>
<path class="st0" d="M140.9 152.1h-69c-.6 0-1-.4-1-1s.4-1 1-1H141c.6 0 1 .4 1 1s-.5 1-1.1 1zm-9.3-5.1h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-15.7 9.6h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-20 0h-3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h3c.3 0 .5.2.5.5s-.2.5-.5.5zm-7 0h-1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h1c.3 0 .5.2.5.5s-.2.5-.5.5zm-10 0h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5zm-20 0h-3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h3c.3 0 .5.2.5.5s-.2.5-.5.5zm-7 0h-1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h1c.3 0 .5.2.5.5s-.2.5-.5.5zm-10 0h-12c-.3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.3 0 .5.3.4.6 0 .1-.3.3-.6.3z"/>
<path class="st1" d="M49.8 37.8H38.4c-1-1.8-3.5-5.9-6.7-6.5-4.2-.8-5 3.4-5 3.4s-2.8-7.3-9.8-6.3c-7.9 1.1-4.2 9.4-4.2 9.4H.8 1c-.6 0-1 .4-1 1s.4 1 1 1h48.9c.5 0 .9-.4.9-1s-.4-1-1-1z"/>
<path class="st2" d="M135.4 77.3h-15.3V60.4c0-4.2-3.4-7.5-7.6-7.5H51.1c-4.2 0-7.5 3.4-7.5 7.5v40.7c0 1.3.4 2.6 1 3.7-.4.5-.8 1-1 1.6l-6.9 16.1c-.3.7-.5 1.5-.5 2.3v1.1c.1 3.4 2.8 6.1 6.2 6h60v3.2c0 4.1 3.3 7.4 7.4 7.4h25.6c4.1 0 7.4-3.3 7.4-7.4V84.8c.1-4.2-3.2-7.5-7.4-7.5z"/>
<path class="st2" d="M50.8 56.6h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.6 3.6H50.8c-2 0-3.5-1.6-3.5-3.6V60.2c0-2 1.6-3.6 3.5-3.6z"/>
<path class="st2" d="M52.7 62.6h57.7c1.2 0 2.1.9 2.1 2.1v34.4c0 1.2-.9 2.1-2.1 2.1H52.7c-1.2 0-2.1-.9-2.1-2.1V64.7c0-1.1 1-2.1 2.1-2.1z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="55.4468" y1="-507.6177" x2="128.2768" y2="-580.4576" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#ccfbff"/>
<stop offset="1" stop-color="#c9e4ff"/>
</linearGradient>
<path class="st2" d="M110.4 63.5c.6 0 1.1.5 1.1 1.1V99c0 .6-.5 1.1-1.1 1.1H52.7c-.6 0-1.1-.5-1.1-1.1V64.6c0-.6.5-1.1 1.1-1.1h57.7"/>
<path class="st3" d="M115.7 107.6c-.4-.8-1.2-1.3-2.1-1.2H49c-.9 0-1.7.5-2.1 1.3L40 123.8c-.1.2-.1.5-.1.7v1.1c.1 1.2 1 2.1 2.2 2H121c1.2.1 2.2-.8 2.2-2v-1c0-.3-.1-.5-.2-.7l-7.3-16.3z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-4.5021" y1="627.6644" x2="182.4979" y2="797.1644" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M110.4 63.6c.6 0 1.1.5 1.1 1.1v34.4c0 .6-.5 1.1-1.1 1.1H52.7c-.6 0-1.1-.5-1.1-1.1V64.7c0-.6.5-1.1 1.1-1.1h57.7" fill="url(#SVGID_1_)"/>
<path class="st1" d="M115.7 107.7c-.4-.8-1.2-1.3-2.1-1.2H49c-.9 0-1.7.5-2.1 1.3L40 123.9c-.1.2-.1.5-.1.7v1.1c.1 1.2 1 2.1 2.2 2H121c1.2.1 2.2-.8 2.2-2v-1c0-.3-.1-.5-.2-.7l-7.3-16.3z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-4.5021" y1="-469.7389" x2="182.4979" y2="-639.2389" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st4" d="M124.9 122.9l-7.3-16.1c-.3-.8-.9-1.4-1.6-1.8 1.2-1.1 1.9-2.6 1.9-4.2V60.1c0-3.1-2.5-5.5-5.6-5.5H50.9c-3.1 0-5.5 2.5-5.5 5.5v40.7c0 1.5.6 3 1.7 4-.9.4-1.6 1.1-2 2L38.2 123c-.2.5-.3 1-.3 1.5v1.1c.1 2.3 1.9 4.1 4.2 4H121c2.3.1 4.2-1.7 4.2-4v-1c0-.6-.1-1.2-.3-1.7zm-1.7 2.6c-.1 1.2-1 2.1-2.2 2H42.1c-1.2.1-2.2-.8-2.2-2v-1.1c0-.2 0-.5.1-.7l6.9-16.1c.4-.8 1.2-1.3 2.1-1.3h64.7c.9 0 1.7.5 2.1 1.2l7.3 16.1c.1.2.2.5.2.7l-.1 1.2zm-75.9-24.7V60.1c0-2 1.6-3.5 3.5-3.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.5 3.6H50.9c-2 0-3.6-1.6-3.6-3.6z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-51.3994" y1="590.94" x2="201.6006" y2="840.94" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M124.9 123l-7.3-16.1c-.3-.8-.9-1.4-1.6-1.8 1.2-1.1 1.9-2.6 1.9-4.2V60.2c0-3.1-2.5-5.5-5.6-5.5H50.9c-3.1 0-5.5 2.5-5.5 5.5v40.7c0 1.5.6 3 1.7 4-.9.4-1.6 1.1-2 2l-6.9 16.2c-.2.5-.3 1-.3 1.5v1.1c.1 2.3 1.9 4.1 4.2 4H121c2.3.1 4.2-1.7 4.2-4v-1c0-.6-.1-1.2-.3-1.7zm-1.7 2.6c-.1 1.2-1 2.1-2.2 2H42.1c-1.2.1-2.2-.8-2.2-2v-1.1c0-.2 0-.5.1-.7l6.9-16.1c.4-.8 1.2-1.3 2.1-1.3h64.7c.9 0 1.7.5 2.1 1.2l7.3 16.1c.1.2.2.5.2.7l-.1 1.2zm-75.9-24.7V60.2c0-2 1.6-3.5 3.5-3.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.5 3.6H50.9c-2 0-3.6-1.6-3.6-3.6z" fill="url(#SVGID_2_)"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-51.3994" y1="-433.0145" x2="201.6006" y2="-683.0145" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st5" d="M94.7 121.8H68.4c-.4 0-.8-.2-.8-.5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c0-.2-.3-.3-.6-.3h-3.7c-.5 0-1 .3-.9.6l.3 1.1c.1.2.3.3.6.3h3.6c.5-.1.9-.4.9-.6zm-48.1 2.4h-3.8c-.3 0-.6.1-.7.4-.2.4-.3.8-.4 1.2-.1.3.4.7.9.7h3.7c.3 0 .6-.2.6-.4.1-.4.2-.8.4-1.2.2-.5-.2-.8-.7-.7zm1.3-3.7h-3.5c-.2 0-.5.1-.6.3-.1.4-.2.7-.4 1.1-.1.3.2.6.7.6h3.5c.3 0 .5-.1.7-.3.2-.4.3-.7.5-1.1s-.4-.7-.9-.6zm50.9 4.1c.1.4.3.8.3 1.1 0 .2.3.3.6.3h3.7c.5 0 1-.3.9-.6-.1-.4-.2-.8-.3-1.1-.1-.2-.4-.4-.7-.3h-3.7c-.5-.1-.9.2-.8.6zm-1.1-3.7c.1.4.2.7.4 1.1.1.2.4.3.6.3h3.4c.5 0 .8-.3.8-.6-.1-.4-.2-.7-.3-1.1 0-.2-.2-.3-.6-.3H107c-.4 0-.9.3-.8.6z"/>
<g>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-22.6206" y1="563.3309" x2="225.3794" y2="813.3309" gradientTransform="translate(0 -610)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M94.7 121.9H68.4c-.4 0-.8-.2-.8-.5.3-1.7.5-2.6.8-4.4 0-.2.3-.4.7-.4l25.3-.2c.4 0 .7.2.7.4.2 1.5.4 3 .4 4.5.1.4-.3.6-.8.6zM64 112.5h-3.9c-.3 0-.6.2-.7.4-.1.5-.2.7-.3 1.2s.4.7.9.7h3.8c.3 0 .6-.1.7-.3.1-.5.2-.7.3-1.2s-.3-.8-.8-.8zm9.9 0h-4.1c-.4 0-.7.2-.7.4-.1.5-.1.7-.2 1.2-.1.3.4.6.9.6h3.9c.3 0 .6-.1.7-.4.1-.5.2-.7.3-1.2.1-.4-.3-.7-.8-.6zm20.5 1.4c-.1-.5-.1-.7-.2-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 0 .2.3.3.6.3h3.7c.5 0 1-.3.9-.6-.1-.4-.2-.8-.3-1.1-.1-.2-.4-.4-.7-.3h-3.7c-.5-.1-.9.2-.8.6zm-1.1-3.7c.1.4.2.7.4 1.1.1.2.4.3.6.3h3.4c.5 0 .8-.3.8-.6-.1-.4-.2-.7-.3-1.1 0-.2-.2-.3-.6-.3H107c-.4 0-.9.3-.8.6z" fill="url(#SVGID_3_)"/>
<g id="Layer_4">
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-22.6206" y1="-405.4053" x2="225.3794" y2="-655.4053" gradientTransform="matrix(1 0 0 -1 0 -452)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<circle class="st6" cx="82.6" cy="59.4" r="1.2"/>
<circle cx="82.6" cy="59.5" r="1.2" fill="url(#SVGID_4_)"/>
</g>
<path class="st1" d="M109.6 80h25.6c2.5 0 4.4 2 4.4 4.4v50.3c0 2.5-2 4.4-4.4 4.4h-25.6c-2.5 0-4.4-2-4.4-4.4V84.4c-.1-2.4 1.9-4.4 4.4-4.4z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-19.2553" y1="590.7758" x2="221.2447" y2="809.2758" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path class="st2" d="M109.6 80.1h25.6c2.5 0 4.4 2 4.4 4.4v50.3c0 2.5-2 4.4-4.4 4.4h-25.6c-2.5 0-4.4-2-4.4-4.4V84.5c-.1-2.4 1.9-4.4 4.4-4.4z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-19.2553" y1="-432.8503" x2="221.2447" y2="-651.3502" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st7" d="M135.1 81c1.9 0 3.4 1.5 3.4 3.4v50.3c0 1.9-1.5 3.4-3.4 3.4h-25.6c-1.9 0-3.4-1.5-3.4-3.4V84.4c0-1.9 1.5-3.4 3.4-3.4h25.6m0-2h-25.6c-3 0-5.4 2.4-5.4 5.4v50.3c0 3 2.4 5.4 5.4 5.4h25.6c3 0 5.4-2.4 5.4-5.4V84.4c.1-3-2.4-5.4-5.4-5.4z"/>
<g>
<path class="st1" d="M111.1 84.8h22.4c.9 0 1.7.8 1.7 1.7v41.9c0 .9-.8 1.7-1.7 1.7h-22.4c-.9 0-1.7-.8-1.7-1.7V86.5c0-.9.8-1.7 1.7-1.7z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="62.995" y1="657.995" x2="135.835" y2="730.835" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#CCFBFF"/>
<stop offset="1" stop-color="#C9E4FF"/>
<path d="M135.1 81.1c1.9 0 3.4 1.5 3.4 3.4v50.3c0 1.9-1.5 3.4-3.4 3.4h-25.6c-1.9 0-3.4-1.5-3.4-3.4V84.5c0-1.9 1.5-3.4 3.4-3.4h25.6m0-2h-25.6c-3 0-5.4 2.4-5.4 5.4v50.3c0 3 2.4 5.4 5.4 5.4h25.6c3 0 5.4-2.4 5.4-5.4V84.5c.1-3-2.4-5.4-5.4-5.4z" fill="url(#SVGID_5_)"/>
<g id="Layer_4-2">
<path class="st2" d="M111.1 84.9h22.4c.9 0 1.7.8 1.7 1.7v41.9c0 .9-.8 1.7-1.7 1.7h-22.4c-.9 0-1.7-.8-1.7-1.7V86.6c0-.9.8-1.7 1.7-1.7z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="62.995" y1="-500.0694" x2="135.835" y2="-572.9095" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#ccfbff"/>
<stop offset="1" stop-color="#c9e4ff"/>
</linearGradient>
<path class="st8" d="M133.5 85.8c.4 0 .7.3.7.7v41.9c0 .4-.3.7-.7.7h-22.4c-.4 0-.7-.3-.7-.7V86.5c0-.4.3-.7.7-.7h22.4"/>
<path d="M133.5 85.9c.4 0 .7.3.7.7v41.9c0 .4-.3.7-.7.7h-22.4c-.4 0-.7-.3-.7-.7V86.6c0-.4.3-.7.7-.7h22.4" fill="url(#SVGID_6_)"/>
</g>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-73.41" y1="701.6741" x2="262.92" y2="701.6741" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-73.41" y1="-543.7485" x2="262.92" y2="-543.7485" gradientTransform="matrix(1 0 0 -1 .02 -451.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st9" d="M82.9 97.8c-.6 0-1.1-.2-1.6-.6l-15-12.1c-1.5-1-2.7-2.2-3.7-3.7-3.3-5.1-2.6-11.7 1.7-16 5-5 13-5 17.9 0 .1.1.3.2.5.2s.4-.1.5-.2c5.1-4.8 13.1-4.6 18 .5s4.6 13.1-.5 18c-.5.4-1 .9-1.5 1.2L84.4 97.3c-.4.3-1 .5-1.5.5zm41 23.7l11-9c4.4-3 5.6-9 2.7-13.4-3-4.4-9-5.6-13.4-2.7-.5.3-1 .7-1.4 1.2 0 0-.1.1-.2.1s-.1 0-.2-.1c-3.8-3.8-9.9-3.8-13.7 0-3.2 3.2-3.8 8.3-1.3 12.2.7 1.1 1.7 2.1 2.8 2.8l11.1 9c.7.6 1.8.6 2.6-.1z"/>
<path class="st1" d="M73.3 62.8c3.1 0 6.1 1.2 8.3 3.4.3.3.7.5 1.2.5.4 0 .9-.2 1.2-.5 4.6-4.5 12-4.5 16.6.1 4.5 4.6 4.5 12-.1 16.6-.5.5-1.1 1-1.7 1.4l-15 12.2c-.3.2-.6.3-.9.3s-.7-.1-.9-.3L67 84.3c-1.4-.9-2.5-2-3.4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1-.6.4-.9l1.7-1.7-4-4c-.5-.5-.5-1.3 0-1.8l6.3-6.3-3.9-3.9c-.2-.2-.4-.6-.4-.9v-4.6c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v4.1l4.4 4.4c.5.5.5 1.3 0 1.8l-6.3 6.3 4 4c.5.5.5 1.3 0 1.8L84 91.3V97c0 .7-.6 1.3-1.3 1.3zm39.7 23.8c-.7 0-1.2-.6-1.2-1.2v-4.8c0-.3.1-.6.4-.9l1.1-1.1-2.9-2.9c-.2-.2-.4-.6-.4-.9s.1-.6.4-.9l4.6-4.6-2.7-2.7c-.2-.2-.4-.6-.4-.9v-3.5c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v3l3.2 3.2c.2.2.4.6.4.9s-.1.6-.4.9l-4.6 4.6 2.9 2.9c.5.5.5 1.3 0 1.8l-1.6 1.6v4.2c.1.8-.5 1.3-1.2 1.3z" id="Layer_3"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Просмотреть файл

@ -3,60 +3,58 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.9 156.5">
<style>
.st0{opacity:0.1;fill:#0C0C0D;} .st1{fill:#FFFFFF;} .st2{fill:url(#SVGID_1_);} .st3{fill:#F9F9FA;} .st4{fill:url(#SVGID_2_);} .st5{fill:url(#SVGID_3_);} .st6{fill:url(#SVGID_4_);} .st7{fill:url(#SVGID_5_);} .st8{fill:url(#SVGID_6_);} .st9{fill:url(#SVGID_7_);}
.st0,.st1{opacity:7.000000e-02}.st1{opacity:4.000000e-02}.st2{fill:#fff}
</style>
<path class="st0" d="M140.9 152h-69c-.6 0-1-.4-1-1s.4-1 1-1H141c.6 0 1 .4 1 1s-.5 1-1.1 1zm-9.3-5.1h-12c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5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 2.1H52.7c-1.2 0-2.1-.9-2.1-2.1V64.6c0-1.1 1-2.1 2.1-2.1z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="55.4468" y1="665.5432" x2="128.2768" y2="738.3832" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#CCFBFF"/>
<stop offset="1" stop-color="#C9E4FF"/>
<path class="st1" d="M49.8 37.7H38.4c-1-1.8-3.5-5.9-6.7-6.5-4.2-.8-5 3.4-5 3.4s-2.8-7.3-9.8-6.3c-7.9 1.1-4.2 9.4-4.2 9.4H.8 1c-.6 0-1 .4-1 1s.4 1 1 1h48.9c.5 0 .9-.4.9-1s-.4-1-1-1z"/>
<path class="st2" d="M135.4 77.2h-15.3V60.3c0-4.2-3.4-7.5-7.6-7.5H51.1c-4.2 0-7.5 3.4-7.5 7.5V101c0 1.3.4 2.6 1 3.7-.4.5-.8 1-1 1.6l-6.9 16.1c-.3.7-.5 1.5-.5 2.3v1.1c.1 3.4 2.8 6.1 6.2 6h60v3.2c0 4.1 3.3 7.4 7.4 7.4h25.6c4.1 0 7.4-3.3 7.4-7.4V84.7c.1-4.2-3.2-7.5-7.4-7.5z"/>
<path class="st2" d="M50.8 56.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.6 3.6H50.8c-2 0-3.5-1.6-3.5-3.6V60.1c0-2 1.6-3.6 3.5-3.6z"/>
<path class="st2" d="M52.7 62.5h57.7c1.2 0 2.1.9 2.1 2.1V99c0 1.2-.9 2.1-2.1 2.1H52.7c-1.2 0-2.1-.9-2.1-2.1V64.6c0-1.1 1-2.1 2.1-2.1z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="55.4468" y1="1275.5432" x2="128.2768" y2="1348.3832" gradientTransform="translate(.02 -1219.83)">
<stop offset="0" stop-color="#ccfbff"/>
<stop offset="1" stop-color="#c9e4ff"/>
</linearGradient>
<path class="st2" d="M110.4 63.5c.6 0 1.1.5 1.1 1.1V99c0 .6-.5 1.1-1.1 1.1H52.7c-.6 0-1.1-.5-1.1-1.1V64.6c0-.6.5-1.1 1.1-1.1h57.7"/>
<path class="st3" d="M115.7 107.6c-.4-.8-1.2-1.3-2.1-1.2H49c-.9 0-1.7.5-2.1 1.3L40 123.8c-.1.2-.1.5-.1.7v1.1c.1 1.2 1 2.1 2.2 2H121c1.2.1 2.2-.8 2.2-2v-1c0-.3-.1-.5-.2-.7l-7.3-16.3z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-4.5021" y1="627.6644" x2="182.4979" y2="797.1644" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M110.4 63.5c.6 0 1.1.5 1.1 1.1V99c0 .6-.5 1.1-1.1 1.1H52.7c-.6 0-1.1-.5-1.1-1.1V64.6c0-.6.5-1.1 1.1-1.1h57.7" fill="url(#SVGID_1_)"/>
<path class="st1" d="M115.7 107.6c-.4-.8-1.2-1.3-2.1-1.2H49c-.9 0-1.7.5-2.1 1.3L40 123.8c-.1.2-.1.5-.1.7v1.1c.1 1.2 1 2.1 2.2 2H121c1.2.1 2.2-.8 2.2-2v-1c0-.3-.1-.5-.2-.7l-7.3-16.3z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-4.5021" y1="1237.6644" x2="182.4979" y2="1407.1644" gradientTransform="translate(.02 -1219.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st4" d="M124.9 122.9l-7.3-16.1c-.3-.8-.9-1.4-1.6-1.8 1.2-1.1 1.9-2.6 1.9-4.2V60.1c0-3.1-2.5-5.5-5.6-5.5H50.9c-3.1 0-5.5 2.5-5.5 5.5v40.7c0 1.5.6 3 1.7 4-.9.4-1.6 1.1-2 2L38.2 123c-.2.5-.3 1-.3 1.5v1.1c.1 2.3 1.9 4.1 4.2 4H121c2.3.1 4.2-1.7 4.2-4v-1c0-.6-.1-1.2-.3-1.7zm-1.7 2.6c-.1 1.2-1 2.1-2.2 2H42.1c-1.2.1-2.2-.8-2.2-2v-1.1c0-.2 0-.5.1-.7l6.9-16.1c.4-.8 1.2-1.3 2.1-1.3h64.7c.9 0 1.7.5 2.1 1.2l7.3 16.1c.1.2.2.5.2.7l-.1 1.2zm-75.9-24.7V60.1c0-2 1.6-3.5 3.5-3.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.5 3.6H50.9c-2 0-3.6-1.6-3.6-3.6z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-51.3994" y1="590.94" x2="201.6006" y2="840.94" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M124.9 122.9l-7.3-16.1c-.3-.8-.9-1.4-1.6-1.8 1.2-1.1 1.9-2.6 1.9-4.2V60.1c0-3.1-2.5-5.5-5.6-5.5H50.9c-3.1 0-5.5 2.5-5.5 5.5v40.7c0 1.5.6 3 1.7 4-.9.4-1.6 1.1-2 2L38.2 123c-.2.5-.3 1-.3 1.5v1.1c.1 2.3 1.9 4.1 4.2 4H121c2.3.1 4.2-1.7 4.2-4v-1c0-.6-.1-1.2-.3-1.7zm-1.7 2.6c-.1 1.2-1 2.1-2.2 2H42.1c-1.2.1-2.2-.8-2.2-2v-1.1c0-.2 0-.5.1-.7l6.9-16.1c.4-.8 1.2-1.3 2.1-1.3h64.7c.9 0 1.7.5 2.1 1.2l7.3 16.1c.1.2.2.5.2.7l-.1 1.2zm-75.9-24.7V60.1c0-2 1.6-3.5 3.5-3.5h61.4c2 0 3.6 1.6 3.6 3.5v40.7c0 2-1.6 3.6-3.5 3.6H50.9c-2 0-3.6-1.6-3.6-3.6z" fill="url(#SVGID_2_)"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-51.3994" y1="1200.9401" x2="201.6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-.3.9-.6zm-9.5.1l-.2-1.1c0-.2-.3-.4-.7-.4H80c-.4 0-.7.2-.8.4-.1.4-.2.7-.3 1.1-.1.3.3.5.8.5h3.9c.5 0 .9-.3.9-.5zm18.7-.1l-.2-1.1c0-.2-.3-.3-.6-.3h-3.7c-.5 0-1 .3-.9.6l.3 1.1c.1.2.3.3.6.3h3.6c.5-.1.9-.4.9-.6zm-48.1 2.4h-3.8c-.3 0-.6.1-.7.4-.2.4-.3.8-.4 1.2-.1.3.4.7.9.7h3.7c.3 0 .6-.2.6-.4.1-.4.2-.8.4-1.2.2-.5-.2-.8-.7-.7zm1.3-3.7h-3.5c-.2 0-.5.1-.6.3-.1.4-.2.7-.4 1.1-.1.3.2.6.7.6h3.5c.3 0 .5-.1.7-.3.2-.4.3-.7.5-1.1s-.4-.7-.9-.6zm50.9 4.1c.1.4.3.8.3 1.1 0 .2.3.3.6.3h3.7c.5 0 1-.3.9-.6-.1-.4-.2-.8-.3-1.1-.1-.2-.4-.4-.7-.3h-3.7c-.5-.1-.9.2-.8.6zm-1.1-3.7c.1.4.2.7.4 1.1.1.2.4.3.6.3h3.4c.5 0 .8-.3.8-.6-.1-.4-.2-.7-.3-1.1 0-.2-.2-.3-.6-.3H107c-.4 0-.9.3-.8.6z"/>
<g>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-22.6206" y1="563.3309" x2="225.3794" y2="813.3309" gradientTransform="translate(0 -610)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path d="M94.7 121.8H68.4c-.4 0-.8-.2-.8-.5.3-1.7.5-2.6.8-4.4 0-.2.3-.4.7-.4l25.3-.2c.4 0 .7.2.7.4.2 1.5.4 3 .4 4.5.1.4-.3.6-.8.6zM64 112.4h-3.9c-.3 0-.6.2-.7.4-.1.5-.2.7-.3 1.2s.4.7.9.7h3.8c.3 0 .6-.1.7-.3.1-.5.2-.7.3-1.2s-.3-.8-.8-.8zm9.9 0h-4.1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7h-3.5c-.2 0-.5.1-.6.3-.1.4-.2.7-.4 1.1-.1.3.2.6.7.6h3.5c.3 0 .5-.1.7-.3.2-.4.3-.7.5-1.1s-.4-.7-.9-.6zm50.9 4.1c.1.4.3.8.3 1.1 0 .2.3.3.6.3h3.7c.5 0 1-.3.9-.6-.1-.4-.2-.8-.3-1.1-.1-.2-.4-.4-.7-.3h-3.7c-.5-.1-.9.2-.8.6zm-1.1-3.7c.1.4.2.7.4 1.1.1.2.4.3.6.3h3.4c.5 0 .8-.3.8-.6-.1-.4-.2-.7-.3-1.1 0-.2-.2-.3-.6-.3H107c-.4 0-.9.3-.8.6z" fill="url(#SVGID_3_)"/>
<g id="Layer_4">
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-22.6206" y1="1173.3309" x2="225.3794" y2="1423.3308" gradientTransform="translate(0 -1220)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<circle class="st6" cx="82.6" cy="59.4" r="1.2"/>
<circle cx="82.6" cy="59.4" r="1.2" fill="url(#SVGID_4_)"/>
</g>
<path class="st1" d="M109.6 80h25.6c2.5 0 4.4 2 4.4 4.4v50.3c0 2.5-2 4.4-4.4 4.4h-25.6c-2.5 0-4.4-2-4.4-4.4V84.4c-.1-2.4 1.9-4.4 4.4-4.4z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-19.2553" y1="590.7758" x2="221.2447" y2="809.2758" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<path class="st2" d="M109.6 80h25.6c2.5 0 4.4 2 4.4 4.4v50.3c0 2.5-2 4.4-4.4 4.4h-25.6c-2.5 0-4.4-2-4.4-4.4V84.4c-.1-2.4 1.9-4.4 4.4-4.4z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-19.2553" y1="1200.7758" x2="221.2447" y2="1419.2758" gradientTransform="translate(.02 -1219.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st7" d="M135.1 81c1.9 0 3.4 1.5 3.4 3.4v50.3c0 1.9-1.5 3.4-3.4 3.4h-25.6c-1.9 0-3.4-1.5-3.4-3.4V84.4c0-1.9 1.5-3.4 3.4-3.4h25.6m0-2h-25.6c-3 0-5.4 2.4-5.4 5.4v50.3c0 3 2.4 5.4 5.4 5.4h25.6c3 0 5.4-2.4 5.4-5.4V84.4c.1-3-2.4-5.4-5.4-5.4z"/>
<g>
<path class="st1" d="M111.1 84.8h22.4c.9 0 1.7.8 1.7 1.7v41.9c0 .9-.8 1.7-1.7 1.7h-22.4c-.9 0-1.7-.8-1.7-1.7V86.5c0-.9.8-1.7 1.7-1.7z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="62.995" y1="657.995" x2="135.835" y2="730.835" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#CCFBFF"/>
<stop offset="1" stop-color="#C9E4FF"/>
<path d="M135.1 81c1.9 0 3.4 1.5 3.4 3.4v50.3c0 1.9-1.5 3.4-3.4 3.4h-25.6c-1.9 0-3.4-1.5-3.4-3.4V84.4c0-1.9 1.5-3.4 3.4-3.4h25.6m0-2h-25.6c-3 0-5.4 2.4-5.4 5.4v50.3c0 3 2.4 5.4 5.4 5.4h25.6c3 0 5.4-2.4 5.4-5.4V84.4c.1-3-2.4-5.4-5.4-5.4z" fill="url(#SVGID_5_)"/>
<g id="Layer_4-2">
<path class="st2" d="M111.1 84.8h22.4c.9 0 1.7.8 1.7 1.7v41.9c0 .9-.8 1.7-1.7 1.7h-22.4c-.9 0-1.7-.8-1.7-1.7V86.5c0-.9.8-1.7 1.7-1.7z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="62.995" y1="1267.995" x2="135.835" y2="1340.835" gradientTransform="translate(.02 -1219.83)">
<stop offset="0" stop-color="#ccfbff"/>
<stop offset="1" stop-color="#c9e4ff"/>
</linearGradient>
<path class="st8" d="M133.5 85.8c.4 0 .7.3.7.7v41.9c0 .4-.3.7-.7.7h-22.4c-.4 0-.7-.3-.7-.7V86.5c0-.4.3-.7.7-.7h22.4"/>
<path d="M133.5 85.8c.4 0 .7.3.7.7v41.9c0 .4-.3.7-.7.7h-22.4c-.4 0-.7-.3-.7-.7V86.5c0-.4.3-.7.7-.7h22.4" fill="url(#SVGID_6_)"/>
</g>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-73.41" y1="701.6741" x2="262.92" y2="701.6741" gradientTransform="translate(.02 -609.83)">
<stop offset="0" stop-color="#00C8D7"/>
<stop offset="1" stop-color="#0A84FF"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-73.41" y1="1311.6741" x2="262.92" y2="1311.6741" gradientTransform="translate(.02 -1219.83)">
<stop offset="0" stop-color="#00c8d7"/>
<stop offset="1" stop-color="#0a84ff"/>
</linearGradient>
<path class="st9" d="M82.9 97.8c-.6 0-1.1-.2-1.6-.6l-15-12.1c-1.5-1-2.7-2.2-3.7-3.7-3.3-5.1-2.6-11.7 1.7-16 5-5 13-5 17.9 0 .1.1.3.2.5.2s.4-.1.5-.2c5.1-4.8 13.1-4.6 18 .5s4.6 13.1-.5 18c-.5.4-1 .9-1.5 1.2L84.4 97.3c-.4.3-1 .5-1.5.5zm41 23.7l11-9c4.4-3 5.6-9 2.7-13.4-3-4.4-9-5.6-13.4-2.7-.5.3-1 .7-1.4 1.2 0 0-.1.1-.2.1s-.1 0-.2-.1c-3.8-3.8-9.9-3.8-13.7 0-3.2 3.2-3.8 8.3-1.3 12.2.7 1.1 1.7 2.1 2.8 2.8l11.1 9c.7.6 1.8.6 2.6-.1z"/>
<path class="st1" d="M73.3 62.8c3.1 0 6.1 1.2 8.3 3.4.3.3.7.5 1.2.5.4 0 .9-.2 1.2-.5 4.6-4.5 12-4.5 16.6.1 4.5 4.6 4.5 12-.1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.6.2.2.5.4.9.4.3 0 .6-.1.9-.4 3.4-3.4 8.9-3.4 12.3 0 3.4 3.4 3.4 8.9 0 12.3-.4.4-.8.8-1.3 1.1l-11.1 9c-.2.2-.4.2-.7.2-.2 0-.5-.1-.7-.2l-11.1-9c-1-.7-1.9-1.5-2.5-2.5-2.2-3.4-1.7-8 1.1-10.9 1.6-1.7 3.8-2.6 6.1-2.6m0-2c-2.8 0-5.5 1.1-7.5 3.1-3.6 3.6-4.1 9.2-1.4 13.4.8 1.2 1.8 2.2 3 3l11 8.9c1.1.9 2.7.9 3.9 0l11-9c4.9-3.3 6.1-10 2.8-14.8-3.3-4.9-10-6.1-14.8-2.8-.3.2-.7.5-1 .7-2-1.6-4.5-2.6-7-2.5z"/>
<path class="st2" d="M110.3 105.7c-.9-.1-1.5-.8-1.4-1.6.2-2.8 2.2-5.2 5-5.8.8-.2 1.6.3 1.8 1.1.2.8-.3 1.6-1.1 1.8h-.1c-1.5.3-2.7 1.6-2.8 3.2-.1.7-.7 1.3-1.4 1.3z"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 11 KiB

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Просмотреть файл

@ -1,22 +0,0 @@
<style>
.fieldtext {
fill: fieldtext;
fill-opacity: .6;
}
.highlighttext {
fill: highlighttext;
}
.black {
fill: black;
fill-opacity: .6;
}
.white {
fill: white;
fill-opacity: .7;
}
</style>

Просмотреть файл

@ -20,12 +20,12 @@
skin/classic/browser/addons/addon-install-installed.svg (../shared/addons/addon-install-installed.svg)
skin/classic/browser/addons/addon-install-restart.svg (../shared/addons/addon-install-restart.svg)
skin/classic/browser/addons/addon-install-warning.svg (../shared/addons/addon-install-warning.svg)
* skin/classic/browser/controlcenter/conn-not-secure.svg (../shared/controlcenter/conn-not-secure.svg)
skin/classic/browser/controlcenter/conn-not-secure.svg (../shared/controlcenter/conn-not-secure.svg)
skin/classic/browser/controlcenter/connection.svg (../shared/controlcenter/connection.svg)
skin/classic/browser/controlcenter/mcb-disabled.svg (../shared/controlcenter/mcb-disabled.svg)
skin/classic/browser/controlcenter/extension.svg (../shared/controlcenter/extension.svg)
* skin/classic/browser/controlcenter/permissions.svg (../shared/controlcenter/permissions.svg)
* skin/classic/browser/controlcenter/tracking-protection.svg (../shared/controlcenter/tracking-protection.svg)
skin/classic/browser/controlcenter/permissions.svg (../shared/controlcenter/permissions.svg)
skin/classic/browser/controlcenter/tracking-protection.svg (../shared/controlcenter/tracking-protection.svg)
skin/classic/browser/controlcenter/warning-gray.svg (../shared/controlcenter/warning-gray.svg)
skin/classic/browser/controlcenter/warning-yellow.svg (../shared/controlcenter/warning-yellow.svg)
skin/classic/browser/customizableui/empty-overflow-panel.png (../shared/customizableui/empty-overflow-panel.png)

Просмотреть файл

@ -47,40 +47,12 @@ const URLs = new Map([
// - whether the URI can be created at all (some protocol handlers will
// refuse to create certain variants)
["http://www.example2.com", true, true, true],
["feed:http://www.example2.com", false, false, true],
["https://www.example2.com", true, true, true],
["moz-icon:file:///foo/bar/baz.exe", false, false, true],
["moz-icon://.exe", false, false, true],
["chrome://foo/content/bar.xul", false, false, true],
["feed:chrome://foo/content/bar.xul", false, false, false],
["view-source:http://www.example2.com", false, false, true],
["view-source:https://www.example2.com", false, false, true],
["view-source:feed:http://www.example2.com", false, false, true],
["feed:view-source:http://www.example2.com", false, false, false],
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
["about:test-content-linkable", true, true, true],
// Because this page doesn't have SAFE_FOR_UNTRUSTED, the web can't link to it:
["about:test-unknown-linkable", false, false, true],
]],
["feed:http://www.example.com", [
["http://www.example2.com", true, true, true],
["feed:http://www.example2.com", true, true, true],
["https://www.example2.com", true, true, true],
["moz-icon:file:///foo/bar/baz.exe", false, false, true],
["moz-icon://.exe", false, false, true],
["feed:https://www.example2.com", true, true, true],
["chrome://foo/content/bar.xul", false, false, true],
["feed:chrome://foo/content/bar.xul", false, false, false],
["view-source:http://www.example2.com", false, false, true],
["view-source:https://www.example2.com", false, false, true],
["view-source:feed:http://www.example2.com", false, false, true],
["feed:view-source:http://www.example2.com", false, false, false],
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
@ -94,17 +66,12 @@ const URLs = new Map([
]],
["view-source:http://www.example.com", [
["http://www.example2.com", true, true, true],
["feed:http://www.example2.com", false, false, true],
["https://www.example2.com", true, true, true],
["moz-icon:file:///foo/bar/baz.exe", false, false, true],
["moz-icon://.exe", false, false, true],
["feed:https://www.example2.com", false, false, true],
["chrome://foo/content/bar.xul", false, false, true],
["feed:chrome://foo/content/bar.xul", false, false, false],
["view-source:http://www.example2.com", true, true, true],
["view-source:https://www.example2.com", true, true, true],
["view-source:feed:http://www.example2.com", false, false, true],
["feed:view-source:http://www.example2.com", false, false, false],
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", true, false, true],
["javascript:alert('hi')", true, false, true],
@ -289,14 +256,6 @@ add_task(async function() {
baseFlags);
testURL(contentPrincipal, "view-source:" + contentBlobURI, false, false, true,
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
// Feed URIs for blobs can't be created, so need to pass false as the fourth param.
for (let prefix of ["feed:", "view-source:feed:", "feed:view-source:"]) {
testURL(contentPrincipal, prefix + contentBlobURI, false, false, false,
baseFlags);
testURL(contentPrincipal, prefix + contentBlobURI, false, false, false,
baseFlags | ssm.DISALLOW_INHERIT_PRINCIPAL);
}
}
);

Просмотреть файл

@ -421,23 +421,22 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow)
NS_ENSURE_SUCCESS(rv, rv);
}
int32_t count = document->GetNumberOfStyleSheets();
size_t count = document->SheetCount();
// Build an array of style sheets we need to reload.
nsTArray<RefPtr<StyleSheet>> oldSheets(count);
nsTArray<RefPtr<StyleSheet>> newSheets(count);
// Iterate over the style sheets.
for (int32_t i = 0; i < count; i++) {
for (size_t i = 0; i < count; i++) {
// Get the style sheet
StyleSheet* styleSheet = document->GetStyleSheetAt(i);
oldSheets.AppendElement(styleSheet);
oldSheets.AppendElement(document->SheetAt(i));
}
// Iterate over our old sheets and kick off a sync load of the new
// sheet if and only if it's a non-inline sheet with a chrome URL.
for (StyleSheet* sheet : oldSheets) {
MOZ_ASSERT(sheet, "GetStyleSheetAt shouldn't return nullptr for "
MOZ_ASSERT(sheet, "SheetAt shouldn't return nullptr for "
"in-range sheet indexes");
nsIURI* uri = sheet->GetSheetURI();

Просмотреть файл

@ -141,6 +141,14 @@
color: var(--string-color);
}
.network-monitor .tree-container .treeTable .treeValueCell input:focus {
color: var(--theme-selection-color) !important;
}
.network-monitor .tree-container .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover {
text-decoration: none;
}
/* Source editor in tab panels */
/* If there is a source editor shows up in the last row of TreeView,

Просмотреть файл

@ -1240,4 +1240,8 @@ body #output-container {
.sidebar-close-button::before {
background-image: var(--close-button-image);
}
.sidebar-contents .object-inspector {
min-width: 100%;
}

Просмотреть файл

@ -13,18 +13,15 @@ if (typeof define === "undefined") {
}
// React
const { createFactory } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const ObjectClient = require("devtools/shared/client/object-client");
const {
MESSAGE_TYPE,
JSTERM_COMMANDS,
} = require("../constants");
const { getObjectInspector } = require("devtools/client/webconsole/new-console-output/utils/object-inspector");
const reps = require("devtools/client/shared/components/reps/reps");
const { REPS, MODE } = reps;
const ObjectInspector = createFactory(reps.ObjectInspector);
const { Grip } = REPS;
const { MODE } = reps;
GripMessageBody.displayName = "GripMessageBody";
@ -65,46 +62,9 @@ function GripMessageBody(props) {
styleObject = cleanupStyle(userProvidedStyle, serviceContainer.createElement);
}
let onDOMNodeMouseOver;
let onDOMNodeMouseOut;
let onInspectIconClick;
if (serviceContainer) {
onDOMNodeMouseOver = serviceContainer.highlightDomElement
? (object) => serviceContainer.highlightDomElement(object)
: null;
onDOMNodeMouseOut = serviceContainer.unHighlightDomElement;
onInspectIconClick = serviceContainer.openNodeInInspector
? (object, e) => {
// Stop the event propagation so we don't trigger ObjectInspector expand/collapse.
e.stopPropagation();
serviceContainer.openNodeInInspector(object);
}
: null;
}
const objectInspectorProps = {
// Auto-expand the ObjectInspector when the message is a console.dir one.
let objectInspectorProps = {
autoExpandDepth: shouldAutoExpandObjectInspector(props) ? 1 : 0,
mode,
// TODO: we disable focus since it's not currently working well in ObjectInspector.
// Let's remove the property below when problem are fixed in OI.
disabledFocus: true,
roots: [{
path: (grip && grip.actor) || JSON.stringify(grip),
contents: {
value: grip
}
}],
createObjectClient: object =>
new ObjectClient(serviceContainer.hudProxy.client, object),
releaseActor: actor => {
if (!actor || !serviceContainer.hudProxy.releaseActor) {
return;
}
serviceContainer.hudProxy.releaseActor(actor);
},
onViewSourceInDebugger: serviceContainer.onViewSourceInDebugger,
openLink: serviceContainer.openLink,
};
if (typeof grip === "string" || (grip && grip.type === "longString")) {
@ -113,16 +73,9 @@ function GripMessageBody(props) {
escapeWhitespace,
style: styleObject
});
} else {
Object.assign(objectInspectorProps, {
onDOMNodeMouseOver,
onDOMNodeMouseOut,
onInspectIconClick,
defaultRep: Grip,
});
}
return ObjectInspector(objectInspectorProps);
return getObjectInspector(grip, serviceContainer, objectInspectorProps);
}
// Regular expression that matches the allowed CSS property names.

Просмотреть файл

@ -7,12 +7,17 @@ const { Component, createFactory } = require("devtools/client/shared/vendor/reac
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const { getObjectInspector } = require("devtools/client/webconsole/new-console-output/utils/object-inspector");
const actions = require("devtools/client/webconsole/new-console-output/actions/index");
const SplitBox = createFactory(require("devtools/client/shared/components/splitter/SplitBox"));
const reps = require("devtools/client/shared/components/reps/reps");
const { MODE } = reps;
class SideBar extends Component {
static get propTypes() {
return {
serviceContainer: PropTypes.object,
dispatch: PropTypes.func.isRequired,
sidebarVisible: PropTypes.bool,
grip: PropTypes.object,
@ -32,8 +37,14 @@ class SideBar extends Component {
let {
sidebarVisible,
grip,
serviceContainer,
} = this.props;
let objectInspector = getObjectInspector(grip, serviceContainer, {
autoExpandDepth: 1,
mode: MODE.SHORT,
});
let endPanel = dom.aside({
className: "sidebar-wrapper"
},
@ -47,7 +58,7 @@ class SideBar extends Component {
),
dom.aside({
className: "sidebar-contents"
}, JSON.stringify(grip, null, 2))
}, objectInspector)
);
return (

Просмотреть файл

@ -349,6 +349,7 @@ skip-if = true # Bug 1405636
[browser_webconsole_nodes_select.js]
[browser_webconsole_notifications.js]
skip-if = true # Bug 1405637
[browser_webconsole_object_in_sidebar.js]
[browser_webconsole_object_inspector.js]
[browser_webconsole_object_inspector_entries.js]
[browser_webconsole_observer_notifications.js]

Просмотреть файл

@ -30,8 +30,18 @@ add_task(async function () {
info("Showing sidebar for {a:1}");
await showSidebarWithContextMenu(hud, objectA, true);
let sidebarContents = hud.ui.document.querySelector(".sidebar-contents");
let objectInspector = sidebarContents.querySelector(".object-inspector");
let oiNodes = objectInspector.querySelectorAll(".node");
if (oiNodes.length === 1) {
// If this is the case, we wait for the properties to be fetched and displayed.
await waitForNodeMutation(objectInspector, {
childList: true
});
}
let sidebarText = hud.ui.document.querySelector(".sidebar-contents").textContent;
ok(sidebarText.includes('"a":'), "Sidebar is shown for {a:1}");
ok(sidebarText.includes("a: 1"), "Sidebar is shown for {a:1}");
info("Showing sidebar for {a:1} again");
await showSidebarWithContextMenu(hud, objectA, false);
@ -42,10 +52,22 @@ add_task(async function () {
info("Showing sidebar for {b:1}");
await showSidebarWithContextMenu(hud, objectB, false);
sidebarContents = hud.ui.document.querySelector(".sidebar-contents");
objectInspector = sidebarContents.querySelector(".object-inspector");
oiNodes = objectInspector.querySelectorAll(".node");
if (oiNodes.length === 1) {
// If this is the case, we wait for the properties to be fetched and displayed.
await waitForNodeMutation(objectInspector, {
childList: true
});
}
isnot(hud.ui.document.querySelector(".sidebar-contents").textContent, sidebarText,
"Sidebar is updated for {b:1}");
sidebarText = hud.ui.document.querySelector(".sidebar-contents").textContent;
ok(sidebarText.includes('"b":'), "Sidebar contents shown for {b:1}");
ok(sidebarText.includes("b: 1"), "Sidebar contents shown for {b:1}");
info("Checking context menu entry is disabled for number");
let numberContextMenuEnabled = await isContextMenuEntryEnabled(hud, number);

Просмотреть файл

@ -0,0 +1,57 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that the ObjectInspector is rendered correctly in the sidebar.
"use strict";
const TEST_URI =
"data:text/html;charset=utf8," +
"<script>console.log({a:1,b:2,c:3});</script>";
add_task(async function () {
// Should be removed when sidebar work is complete
await pushPref("devtools.webconsole.sidebarToggle", true);
let hud = await openNewTabAndConsole(TEST_URI);
let message = findMessage(hud, "Object");
let object = message.querySelector(".object-inspector .objectBox-object");
await showSidebarWithContextMenu(hud, object, true);
let sidebarContents = hud.ui.document.querySelector(".sidebar-contents");
let objectInspectors = [...sidebarContents.querySelectorAll(".tree")];
is(objectInspectors.length, 1, "There is the expected number of object inspectors");
let [objectInspector] = objectInspectors;
let oiNodes = objectInspector.querySelectorAll(".node");
if (oiNodes.length === 1) {
// If this is the case, we wait for the properties to be fetched and displayed.
await waitForNodeMutation(objectInspector, {
childList: true
});
oiNodes = objectInspector.querySelectorAll(".node");
}
// There are 5 nodes: the root, a, b, c, and proto.
is(oiNodes.length, 5, "There is the expected number of nodes in the tree");
let propertiesNodes = [...objectInspector.querySelectorAll(".object-label")]
.map(el => el.textContent);
const arrayPropertiesNames = ["a", "b", "c", "__proto__"];
is(JSON.stringify(propertiesNodes), JSON.stringify(arrayPropertiesNames));
});
async function showSidebarWithContextMenu(hud, node, expectMutation) {
let wrapper = hud.ui.document.querySelector(".webconsole-output-wrapper");
let onSidebarShown = waitForNodeMutation(wrapper, { childList: true });
let contextMenu = await openContextMenu(hud, node);
let openInSidebar = contextMenu.querySelector("#console-menu-open-sidebar");
openInSidebar.click();
if (expectMutation) {
await onSidebarShown;
}
await hideContextMenu(hud);
}

Просмотреть файл

@ -6,8 +6,7 @@
const expect = require("expect");
const actions = require("devtools/client/webconsole/new-console-output/actions/index");
const { setupStore } = require("devtools/client/webconsole/new-console-output/test/helpers");
const { getAllMessagesById } = require("devtools/client/webconsole/new-console-output/selectors/messages");
const { setupStore, getFirstMessage, getLastMessage } = require("devtools/client/webconsole/new-console-output/test/helpers");
const { stubPackets, stubPreparedMessages } = require("devtools/client/webconsole/new-console-output/test/fixtures/stubs/index");
describe("Testing UI", () => {
@ -43,9 +42,8 @@ describe("Testing UI", () => {
const message = stubPreparedMessages.get("inspect({a: 1})");
store.dispatch(actions.messageAdd(packet));
const messages = getAllMessagesById(store.getState());
const actorId = message.parameters[0].actor;
const messageId = messages.first().id;
const messageId = getFirstMessage(store.getState()).id;
store.dispatch(actions.showObjectInSidebar(actorId, messageId));
expect(store.getState().ui.sidebarVisible).toEqual(true);
@ -57,9 +55,8 @@ describe("Testing UI", () => {
const message = stubPreparedMessages.get("inspect({a: 1})");
store.dispatch(actions.messageAdd(packet));
const messages = getAllMessagesById(store.getState());
const actorId = message.parameters[0].actor;
const messageId = messages.first().id;
const messageId = getFirstMessage(store.getState()).id;
store.dispatch(actions.showObjectInSidebar(actorId, messageId));
expect(store.getState().ui.sidebarVisible).toEqual(true);
@ -75,9 +72,8 @@ describe("Testing UI", () => {
const message = stubPreparedMessages.get("inspect({a: 1})");
store.dispatch(actions.messageAdd(packet));
const messages = getAllMessagesById(store.getState());
const actorId = message.parameters[0].actor;
const messageId = messages.first().id;
const messageId = getFirstMessage(store.getState()).id;
store.dispatch(actions.showObjectInSidebar(actorId, messageId));
expect(store.getState().ui.sidebarVisible).toEqual(true);
@ -87,9 +83,8 @@ describe("Testing UI", () => {
const newMessage = stubPreparedMessages.get("new Date(0)");
store.dispatch(actions.messageAdd(newPacket));
const newMessages = getAllMessagesById(store.getState());
const newActorId = newMessage.parameters[0].actor;
const newMessageId = newMessages.last().id;
const newMessageId = getLastMessage(store.getState()).id;
store.dispatch(actions.showObjectInSidebar(newActorId, newMessageId));
expect(store.getState().ui.sidebarVisible).toEqual(true);

Просмотреть файл

@ -7,4 +7,5 @@ DevToolsModules(
'context-menu.js',
'id-generator.js',
'messages.js',
'object-inspector.js',
)

Просмотреть файл

@ -0,0 +1,82 @@
/* 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 { createFactory } = require("devtools/client/shared/vendor/react");
const ObjectClient = require("devtools/shared/client/object-client");
const reps = require("devtools/client/shared/components/reps/reps");
const { REPS, MODE } = reps;
const ObjectInspector = createFactory(reps.ObjectInspector);
const { Grip } = REPS;
/**
* Create and return an ObjectInspector for the given grip.
*
* @param {Object} grip
* The object grip to create an ObjectInspector for.
* @param {Object} serviceContainer
* Object containing various utility functions
* @param {Object} override
* Object containing props that should override the default props passed to
* ObjectInspector.
* @returns {ObjectInspector}
* An ObjectInspector for the given grip.
*/
function getObjectInspector(grip, serviceContainer, override) {
let onDOMNodeMouseOver;
let onDOMNodeMouseOut;
let onInspectIconClick;
if (serviceContainer) {
onDOMNodeMouseOver = serviceContainer.highlightDomElement
? (object) => serviceContainer.highlightDomElement(object)
: null;
onDOMNodeMouseOut = serviceContainer.unHighlightDomElement;
onInspectIconClick = serviceContainer.openNodeInInspector
? (object, e) => {
// Stop the event propagation so we don't trigger ObjectInspector expand/collapse.
e.stopPropagation();
serviceContainer.openNodeInInspector(object);
}
: null;
}
const objectInspectorProps = {
autoExpandDepth: 0,
mode: MODE.LONG,
// TODO: we disable focus since it's not currently working well in ObjectInspector.
// Let's remove the property below when problem are fixed in OI.
disabledFocus: true,
roots: [{
path: (grip && grip.actor) || JSON.stringify(grip),
contents: {
value: grip
}
}],
createObjectClient: object =>
new ObjectClient(serviceContainer.hudProxy.client, object),
releaseActor: actor => {
if (!actor || !serviceContainer.hudProxy.releaseActor) {
return;
}
serviceContainer.hudProxy.releaseActor(actor);
},
onViewSourceInDebugger: serviceContainer.onViewSourceInDebugger,
openLink: serviceContainer.openLink,
};
if (!(typeof grip === "string" || (grip && grip.type === "longString"))) {
Object.assign(objectInspectorProps, {
onDOMNodeMouseOver,
onDOMNodeMouseOut,
onInspectIconClick,
defaultRep: Grip,
});
}
return ObjectInspector({...objectInspectorProps, ...override});
}
exports.getObjectInspector = getObjectInspector;

Просмотреть файл

@ -132,34 +132,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=624883
expectedProtocolList: "view-source, http"
},
{
desc: "Test 2: feed:view-source should not be allowed in an iframe",
protocols: "feed:view-source:http",
expectedProtocolList: "feed, view-source, http"
},
{
desc: "Test 3: jar:view-source should not be allowed in an iframe",
desc: "Test 2: jar:view-source should not be allowed in an iframe",
protocols: "jar:view-source:http",
expectedProtocolList: "jar, view-source, http"
},
{
desc: "Test 4: pcast:view-source should not be allowed in an iframe",
protocols: "pcast:view-source:http",
expectedProtocolList: "pcast, view-source, http"
},
{
desc: "Test 5: pcast:feed:view-source should not be allowed in an iframe",
protocols: "pcast:feed:view-source:http",
expectedProtocolList: "pcast, feed, view-source, http"
},
{
desc: "Test 6: if invalid protocol first should report before view-source",
desc: "Test 3: if invalid protocol first should report before view-source",
protocols: "wibble:view-source:http",
// Nothing after the invalid protocol gets set as a proper nested URI,
// so the list stops there.
expectedProtocolList: "wibble"
},
{
desc: "Test 7: if view-source first should report before invalid protocol",
desc: "Test 4: if view-source first should report before invalid protocol",
protocols: "view-source:wibble:http",
expectedProtocolList: "view-source, wibble"
}

Просмотреть файл

@ -27,7 +27,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(ShadowRoot)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ShadowRoot,
DocumentFragment)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheetList)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDOMStyleSheets)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAssociatedBinding)
for (auto iter = tmp->mIdentifierMap.ConstIter(); !iter.Done();
iter.Next()) {
@ -39,7 +39,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ShadowRoot)
if (tmp->GetHost()) {
tmp->GetHost()->RemoveMutationObserver(tmp);
}
NS_IMPL_CYCLE_COLLECTION_UNLINK(mStyleSheetList)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDOMStyleSheets)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mAssociatedBinding)
tmp->mIdentifierMap.Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DocumentFragment)
@ -210,21 +210,37 @@ ShadowRoot::InsertSheet(StyleSheet* aSheet,
{
nsCOMPtr<nsIStyleSheetLinkingElement>
linkingElement = do_QueryInterface(aLinkingContent);
// FIXME(emilio, bug 1410578): <link> should probably also be allowed here.
MOZ_ASSERT(linkingElement, "The only styles in a ShadowRoot should come "
"from <style>.");
linkingElement->SetStyleSheet(aSheet); // This sets the ownerNode on the sheet
MOZ_DIAGNOSTIC_ASSERT(mProtoBinding->SheetCount() == StyleScope::SheetCount());
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
// FIXME(emilio, bug 1425759): For now we keep them duplicated, the proto
// binding will disappear soon (tm).
{
size_t i = 0;
for (RefPtr<StyleSheet>& sheet : mStyleSheets) {
MOZ_DIAGNOSTIC_ASSERT(sheet.get() == mProtoBinding->StyleSheetAt(i++));
}
}
#endif
// Find the correct position to insert into the style sheet list (must
// be in tree order).
for (size_t i = 0; i <= mProtoBinding->SheetCount(); i++) {
if (i == mProtoBinding->SheetCount()) {
for (size_t i = 0; i <= SheetCount(); i++) {
if (i == SheetCount()) {
AppendStyleSheet(*aSheet);
mProtoBinding->AppendStyleSheet(aSheet);
break;
}
nsINode* sheetOwningNode = mProtoBinding->StyleSheetAt(i)->GetOwnerNode();
nsINode* sheetOwningNode = SheetAt(i)->GetOwnerNode();
if (nsContentUtils::PositionIsBefore(aLinkingContent, sheetOwningNode)) {
InsertSheetAt(i, *aSheet);
mProtoBinding->InsertStyleSheetAt(i, aSheet);
break;
}
@ -239,6 +255,7 @@ void
ShadowRoot::RemoveSheet(StyleSheet* aSheet)
{
mProtoBinding->RemoveStyleSheet(aSheet);
StyleScope::RemoveSheet(*aSheet);
if (aSheet->IsApplicable()) {
StyleSheetChanged();
@ -493,16 +510,6 @@ ShadowRoot::SetApplyAuthorStyles(bool aApplyAuthorStyles)
}
}
StyleSheetList*
ShadowRoot::StyleSheets()
{
if (!mStyleSheetList) {
mStyleSheetList = new ShadowRootStyleSheetList(this);
}
return mStyleSheetList;
}
/**
* Returns whether the web components pool population algorithm
* on the host would contain |aContent|. This function ignores
@ -620,38 +627,3 @@ ShadowRoot::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
*aResult = nullptr;
return NS_ERROR_DOM_DATA_CLONE_ERR;
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(ShadowRootStyleSheetList, StyleSheetList,
mShadowRoot)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ShadowRootStyleSheetList)
NS_INTERFACE_MAP_END_INHERITING(StyleSheetList)
NS_IMPL_ADDREF_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
NS_IMPL_RELEASE_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
ShadowRootStyleSheetList::ShadowRootStyleSheetList(ShadowRoot* aShadowRoot)
: mShadowRoot(aShadowRoot)
{
}
ShadowRootStyleSheetList::~ShadowRootStyleSheetList()
{
}
StyleSheet*
ShadowRootStyleSheetList::IndexedGetter(uint32_t aIndex, bool& aFound)
{
aFound = aIndex < mShadowRoot->mProtoBinding->SheetCount();
if (!aFound) {
return nullptr;
}
return mShadowRoot->mProtoBinding->StyleSheetAt(aIndex);
}
uint32_t
ShadowRootStyleSheetList::Length()
{
return mShadowRoot->mProtoBinding->SheetCount();
}

Просмотреть файл

@ -8,8 +8,7 @@
#define mozilla_dom_shadowroot_h__
#include "mozilla/dom/DocumentFragment.h"
#include "mozilla/dom/StyleSheetList.h"
#include "mozilla/StyleSheet.h"
#include "mozilla/dom/StyleScope.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIContentInlines.h"
@ -27,12 +26,11 @@ class EventChainPreVisitor;
namespace dom {
class Element;
class ShadowRootStyleSheetList;
class ShadowRoot final : public DocumentFragment,
public StyleScope,
public nsStubMutationObserver
{
friend class ShadowRootStyleSheetList;
public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ShadowRoot,
DocumentFragment)
@ -49,15 +47,21 @@ public:
// Shadow DOM v1
Element* Host();
ShadowRootMode Mode()
ShadowRootMode Mode() const
{
return mMode;
}
bool IsClosed()
bool IsClosed() const
{
return mMode == ShadowRootMode::Closed;
}
// StyleScope.
nsINode& AsNode() final
{
return *this;
}
// [deprecated] Shadow DOM v0
void AddToIdTable(Element* aElement, nsAtom* aId);
void RemoveFromIdTable(Element* aElement, nsAtom* aId);
@ -65,7 +69,10 @@ public:
void RemoveSheet(StyleSheet* aSheet);
bool ApplyAuthorStyles();
void SetApplyAuthorStyles(bool aApplyAuthorStyles);
StyleSheetList* StyleSheets();
StyleSheetList* StyleSheets()
{
return &StyleScope::EnsureDOMStyleSheets();
}
/**
* Distributes all the explicit children of the pool host to the content
@ -155,8 +162,6 @@ protected:
// owns |mProtoBinding|.
RefPtr<nsXBLBinding> mAssociatedBinding;
RefPtr<ShadowRootStyleSheetList> mStyleSheetList;
// A boolean that indicates that an insertion point was added or removed
// from this ShadowRoot and that the nodes need to be redistributed into
// the insertion points. After this flag is set, nodes will be distributed
@ -173,28 +178,6 @@ protected:
bool aPreallocateChildren) const override;
};
class ShadowRootStyleSheetList : public StyleSheetList
{
public:
explicit ShadowRootStyleSheetList(ShadowRoot* aShadowRoot);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
virtual nsINode* GetParentObject() const override
{
return mShadowRoot;
}
uint32_t Length() override;
StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) override;
protected:
virtual ~ShadowRootStyleSheetList();
RefPtr<ShadowRoot> mShadowRoot;
};
} // namespace dom
} // namespace mozilla

27
dom/base/StyleScope.cpp Normal file
Просмотреть файл

@ -0,0 +1,27 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#include "StyleScope.h"
#include "mozilla/dom/StyleSheetList.h"
namespace mozilla {
namespace dom {
StyleScope::~StyleScope()
{
}
StyleSheetList&
StyleScope::EnsureDOMStyleSheets()
{
if (!mDOMStyleSheets) {
mDOMStyleSheets = new StyleSheetList(*this);
}
return *mDOMStyleSheets;
}
}
}

81
dom/base/StyleScope.h Normal file
Просмотреть файл

@ -0,0 +1,81 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef mozilla_dom_StyleScope_h__
#define mozilla_dom_StyleScope_h__
#include "nsTArray.h"
class nsINode;
namespace mozilla {
class StyleSheet;
namespace dom {
class StyleSheetList;
/**
* A class meant to be shared by ShadowRoot and Document, that holds a list of
* stylesheets.
*
* TODO(emilio, bug 1418159): In the future this should hold most of the
* relevant style state, this should allow us to fix bug 548397.
*/
class StyleScope
{
public:
virtual nsINode& AsNode() = 0;
const nsINode& AsNode() const
{
return const_cast<StyleScope&>(*this).AsNode();
}
StyleSheet* SheetAt(size_t aIndex) const
{
return mStyleSheets.SafeElementAt(aIndex);
}
size_t SheetCount() const
{
return mStyleSheets.Length();
}
int32_t IndexOfSheet(const StyleSheet& aSheet) const
{
return mStyleSheets.IndexOf(&aSheet);
}
void InsertSheetAt(size_t aIndex, StyleSheet& aSheet)
{
mStyleSheets.InsertElementAt(aIndex, &aSheet);
}
void RemoveSheet(StyleSheet& aSheet)
{
mStyleSheets.RemoveElement(&aSheet);
}
void AppendStyleSheet(StyleSheet& aSheet)
{
mStyleSheets.AppendElement(&aSheet);
}
StyleSheetList& EnsureDOMStyleSheets();
~StyleScope();
protected:
nsTArray<RefPtr<mozilla::StyleSheet>> mStyleSheets;
RefPtr<mozilla::dom::StyleSheetList> mDOMStyleSheets;
};
}
}
#endif

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/CSSStyleSheet.h"
#include "mozilla/dom/StyleSheetListBinding.h"
#include "nsStubDocumentObserver.h"
namespace mozilla {
namespace dom {
@ -17,7 +18,8 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(StyleSheetList)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(StyleSheetList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsIDOMStyleSheetList)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStyleSheetList)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(StyleSheetList)
@ -43,5 +45,24 @@ StyleSheetList::SlowItem(uint32_t aIndex, nsIDOMStyleSheet** aItem)
return NS_OK;
}
void
StyleSheetList::NodeWillBeDestroyed(const nsINode* aNode)
{
mStyleScope = nullptr;
}
StyleSheetList::StyleSheetList(StyleScope& aScope)
: mStyleScope(&aScope)
{
mStyleScope->AsNode().AddMutationObserver(this);
}
StyleSheetList::~StyleSheetList()
{
if (mStyleScope) {
mStyleScope->AsNode().RemoveMutationObserver(this);
}
}
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -7,8 +7,10 @@
#ifndef mozilla_dom_StyleSheetList_h
#define mozilla_dom_StyleSheetList_h
#include "mozilla/dom/StyleScope.h"
#include "nsIDOMStyleSheetList.h"
#include "nsWrapperCache.h"
#include "nsStubDocumentObserver.h"
class nsINode;
@ -17,28 +19,54 @@ class StyleSheet;
namespace dom {
class StyleSheetList : public nsIDOMStyleSheetList
, public nsWrapperCache
class StyleSheetList final : public nsIDOMStyleSheetList
, public nsWrapperCache
, public nsStubDocumentObserver
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(StyleSheetList, nsIDOMStyleSheetList)
NS_DECL_NSIDOMSTYLESHEETLIST
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
explicit StyleSheetList(StyleScope& aScope);
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
virtual nsINode* GetParentObject() const = 0;
nsINode* GetParentObject() const
{
return mStyleScope ? &mStyleScope->AsNode() : nullptr;
}
virtual uint32_t Length() = 0;
virtual StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
StyleSheet* Item(uint32_t aIndex)
uint32_t Length() const
{
return mStyleScope ? mStyleScope->SheetCount() : 0;
}
StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) const
{
if (!mStyleScope) {
aFound = false;
return nullptr;
}
StyleSheet* sheet = mStyleScope->SheetAt(aIndex);
aFound = !!sheet;
return sheet;
}
StyleSheet* Item(uint32_t aIndex) const
{
bool dummy = false;
return IndexedGetter(aIndex, dummy);
}
protected:
virtual ~StyleSheetList() {}
virtual ~StyleSheetList();
StyleScope* mStyleScope; // Weak, cleared on "NodeWillBeDestroyed".
};
} // namespace dom

Просмотреть файл

@ -207,6 +207,7 @@ EXPORTS.mozilla.dom += [
'StructuredCloneBlob.h',
'StructuredCloneHolder.h',
'StructuredCloneTags.h',
'StyleScope.h',
'StyleSheetList.h',
'SubtleCrypto.h',
'TabGroup.h',
@ -350,6 +351,7 @@ UNIFIED_SOURCES += [
'ShadowRoot.cpp',
'StructuredCloneBlob.cpp',
'StructuredCloneHolder.cpp',
'StyleScope.cpp',
'StyleSheetList.cpp',
'SubtleCrypto.cpp',
'TabGroup.cpp',

Просмотреть файл

@ -732,78 +732,6 @@ struct nsRadioGroupStruct
bool mGroupSuffersFromValueMissing;
};
nsDOMStyleSheetList::nsDOMStyleSheetList(nsIDocument *aDocument)
{
mLength = -1;
// Not reference counted to avoid circular references.
// The document will tell us when its going away.
mDocument = aDocument;
mDocument->AddObserver(this);
}
nsDOMStyleSheetList::~nsDOMStyleSheetList()
{
if (mDocument) {
mDocument->RemoveObserver(this);
}
}
NS_IMPL_ISUPPORTS_INHERITED(nsDOMStyleSheetList, StyleSheetList,
nsIDocumentObserver,
nsIMutationObserver)
uint32_t
nsDOMStyleSheetList::Length()
{
if (!mDocument) {
return 0;
}
// XXX Find the number and then cache it. We'll use the
// observer notification to figure out if new ones have
// been added or removed.
if (-1 == mLength) {
mLength = mDocument->GetNumberOfStyleSheets();
}
return mLength;
}
StyleSheet*
nsDOMStyleSheetList::IndexedGetter(uint32_t aIndex, bool& aFound)
{
if (!mDocument || aIndex >= (uint32_t)mDocument->GetNumberOfStyleSheets()) {
aFound = false;
return nullptr;
}
aFound = true;
return mDocument->GetStyleSheetAt(aIndex);
}
void
nsDOMStyleSheetList::NodeWillBeDestroyed(const nsINode *aNode)
{
mDocument = nullptr;
}
void
nsDOMStyleSheetList::StyleSheetAdded(StyleSheet* aStyleSheet,
bool aDocumentSheet)
{
if (aDocumentSheet && -1 != mLength) {
mLength++;
}
}
void
nsDOMStyleSheetList::StyleSheetRemoved(StyleSheet* aStyleSheet,
bool aDocumentSheet)
{
if (aDocumentSheet && -1 != mLength) {
mLength--;
}
}
// nsOnloadBlocker implementation
NS_IMPL_ISUPPORTS(nsOnloadBlocker, nsIRequest)
@ -1360,10 +1288,10 @@ nsDOMStyleSheetSetList::EnsureFresh()
// no document, for sure
}
int32_t count = mDocument->GetNumberOfStyleSheets();
size_t count = mDocument->SheetCount();
nsAutoString title;
for (int32_t index = 0; index < count; index++) {
StyleSheet* sheet = mDocument->GetStyleSheetAt(index);
for (size_t index = 0; index < count; index++) {
StyleSheet* sheet = mDocument->SheetAt(index);
NS_ASSERTION(sheet, "Null sheet in sheet list!");
sheet->GetTitle(title);
if (!title.IsEmpty() && !mNames.Contains(title) && !Add(title)) {
@ -4586,24 +4514,6 @@ nsDocument::AddOnDemandBuiltInUASheet(StyleSheet* aSheet)
NotifyStyleSheetAdded(aSheet, false);
}
int32_t
nsDocument::GetNumberOfStyleSheets() const
{
return mStyleSheets.Length();
}
StyleSheet*
nsDocument::GetStyleSheetAt(int32_t aIndex) const
{
return mStyleSheets.SafeElementAt(aIndex, nullptr);
}
int32_t
nsDocument::GetIndexOfStyleSheet(const StyleSheet* aSheet) const
{
return mStyleSheets.IndexOf(aSheet);
}
void
nsDocument::AddStyleSheetToStyleSets(StyleSheet* aSheet)
{
@ -4743,11 +4653,13 @@ nsDocument::UpdateStyleSheets(nsTArray<RefPtr<StyleSheet>>& aOldSheets,
}
void
nsDocument::InsertStyleSheetAt(StyleSheet* aSheet, int32_t aIndex)
nsDocument::InsertStyleSheetAt(StyleSheet* aSheet, size_t aIndex)
{
NS_PRECONDITION(aSheet, "null ptr");
MOZ_ASSERT(aSheet);
MOZ_DIAGNOSTIC_ASSERT(aSheet->IsServo() == IsStyledByServo());
// FIXME(emilio): Stop touching StyleScope's members directly, and use an
// accessor.
mStyleSheets.InsertElementAt(aIndex, aSheet);
aSheet->SetAssociatedDocument(this, StyleSheet::OwnedByDocument);
@ -6458,15 +6370,6 @@ nsDocument::GetStyleSheets(nsIDOMStyleSheetList** aStyleSheets)
return NS_OK;
}
StyleSheetList*
nsDocument::StyleSheets()
{
if (!mDOMStyleSheets) {
mDOMStyleSheets = new nsDOMStyleSheetList(this);
}
return mDOMStyleSheets;
}
NS_IMETHODIMP
nsDocument::GetMozSelectedStyleSheetSet(nsAString& aSheetSet)
{
@ -6480,10 +6383,10 @@ nsIDocument::GetSelectedStyleSheetSet(nsAString& aSheetSet)
aSheetSet.Truncate();
// Look through our sheets, find the selected set title
int32_t count = GetNumberOfStyleSheets();
size_t count = SheetCount();
nsAutoString title;
for (int32_t index = 0; index < count; index++) {
StyleSheet* sheet = GetStyleSheetAt(index);
for (size_t index = 0; index < count; index++) {
StyleSheet* sheet = SheetAt(index);
NS_ASSERTION(sheet, "Null sheet in sheet list!");
if (sheet->Disabled()) {
@ -6592,10 +6495,10 @@ nsDocument::EnableStyleSheetsForSetInternal(const nsAString& aSheetSet,
bool aUpdateCSSLoader)
{
BeginUpdate(UPDATE_STYLE);
int32_t count = GetNumberOfStyleSheets();
size_t count = SheetCount();
nsAutoString title;
for (int32_t index = 0; index < count; index++) {
StyleSheet* sheet = GetStyleSheetAt(index);
for (size_t index = 0; index < count; index++) {
StyleSheet* sheet = SheetAt(index);
NS_ASSERTION(sheet, "Null sheet in sheet list!");
sheet->GetTitle(title);
@ -10287,9 +10190,9 @@ nsIDocument::CreateStaticClone(nsIDocShell* aCloneContainer)
clonedDoc->mOriginalDocument->mStaticCloneCount++;
MOZ_ASSERT(GetStyleBackendType() == clonedDoc->GetStyleBackendType());
int32_t sheetsCount = GetNumberOfStyleSheets();
for (int32_t i = 0; i < sheetsCount; ++i) {
RefPtr<StyleSheet> sheet = GetStyleSheetAt(i);
size_t sheetsCount = SheetCount();
for (size_t i = 0; i < sheetsCount; ++i) {
RefPtr<StyleSheet> sheet = SheetAt(i);
if (sheet) {
if (sheet->IsApplicable()) {
RefPtr<StyleSheet> clonedSheet =

Просмотреть файл

@ -149,36 +149,6 @@ public:
nsDocHeaderData* mNext;
};
class nsDOMStyleSheetList : public mozilla::dom::StyleSheetList,
public nsStubDocumentObserver
{
public:
explicit nsDOMStyleSheetList(nsIDocument* aDocument);
NS_DECL_ISUPPORTS_INHERITED
// nsIDocumentObserver
NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETADDED
NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETREMOVED
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
virtual nsINode* GetParentObject() const override
{
return mDocument;
}
uint32_t Length() override;
mozilla::StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) override;
protected:
virtual ~nsDOMStyleSheetList();
int32_t mLength;
nsIDocument* mDocument;
};
class nsOnloadBlocker final : public nsIRequest
{
public:
@ -478,14 +448,6 @@ public:
virtual void EnsureOnDemandBuiltInUASheet(mozilla::StyleSheet* aSheet) override;
/**
* Get the (document) style sheets owned by this document.
* These are ordered, highest priority last
*/
virtual int32_t GetNumberOfStyleSheets() const override;
virtual mozilla::StyleSheet* GetStyleSheetAt(int32_t aIndex) const override;
virtual int32_t GetIndexOfStyleSheet(
const mozilla::StyleSheet* aSheet) const override;
virtual void AddStyleSheet(mozilla::StyleSheet* aSheet) override;
virtual void RemoveStyleSheet(mozilla::StyleSheet* aSheet) override;
@ -496,7 +458,7 @@ public:
virtual void RemoveStyleSheetFromStyleSets(mozilla::StyleSheet* aSheet);
virtual void InsertStyleSheetAt(mozilla::StyleSheet* aSheet,
int32_t aIndex) override;
size_t aIndex) override;
virtual void SetStyleSheetApplicableState(mozilla::StyleSheet* aSheet,
bool aApplicable) override;
@ -988,7 +950,7 @@ public:
// WebIDL bits
virtual mozilla::dom::DOMImplementation*
GetImplementation(mozilla::ErrorResult& rv) override;
virtual mozilla::dom::StyleSheetList* StyleSheets() override;
virtual void SetSelectedStyleSheetSet(const nsAString& aSheetSet) override;
virtual void GetLastStyleSheetSet(nsString& aSheetSet) override;
virtual mozilla::dom::DOMStringList* StyleSheetSets() override;
@ -1142,7 +1104,6 @@ protected:
// EndLoad() has already happened.
nsWeakPtr mWeakSink;
nsTArray<RefPtr<mozilla::StyleSheet>> mStyleSheets;
nsTArray<RefPtr<mozilla::StyleSheet>> mOnDemandBuiltInUASheets;
nsTArray<RefPtr<mozilla::StyleSheet>> mAdditionalSheets[AdditionalSheetTypeCount];
@ -1179,7 +1140,6 @@ protected:
public:
RefPtr<mozilla::EventListenerManager> mListenerManager;
RefPtr<mozilla::dom::StyleSheetList> mDOMStyleSheets;
RefPtr<nsDOMStyleSheetSetList> mStyleSheetSetList;
RefPtr<mozilla::dom::ScriptLoader> mScriptLoader;
nsDocHeaderData* mHeaderData;

Просмотреть файл

@ -34,6 +34,7 @@
#include "nsClassHashtable.h"
#include "mozilla/CORSMode.h"
#include "mozilla/dom/DispatcherTrait.h"
#include "mozilla/dom/StyleScope.h"
#include "mozilla/LinkedList.h"
#include "mozilla/NotNull.h"
#include "mozilla/SegmentedVector.h"
@ -212,6 +213,7 @@ class nsContentList;
// Document interface. This is implemented by all document objects in
// Gecko.
class nsIDocument : public nsINode,
public mozilla::dom::StyleScope,
public mozilla::dom::DispatcherTrait
{
typedef mozilla::dom::GlobalObject GlobalObject;
@ -1322,40 +1324,25 @@ public:
*/
virtual void EnsureOnDemandBuiltInUASheet(mozilla::StyleSheet* aSheet) = 0;
/**
* Get the number of (document) stylesheets
*
* @return the number of stylesheets
* @throws no exceptions
*/
virtual int32_t GetNumberOfStyleSheets() const = 0;
nsINode& AsNode() final
{
return *this;
}
/**
* Get a particular stylesheet
* @param aIndex the index the stylesheet lives at. This is zero-based
* @return the stylesheet at aIndex. Null if aIndex is out of range.
* @throws no exceptions
*/
virtual mozilla::StyleSheet* GetStyleSheetAt(int32_t aIndex) const = 0;
mozilla::dom::StyleSheetList* StyleSheets()
{
return &StyleScope::EnsureDOMStyleSheets();
}
/**
* Insert a sheet at a particular spot in the stylesheet list (zero-based)
* @param aSheet the sheet to insert
* @param aIndex the index to insert at. This index will be
* adjusted for the "special" sheets.
* @param aIndex the index to insert at.
* @throws no exceptions
*/
virtual void InsertStyleSheetAt(mozilla::StyleSheet* aSheet,
int32_t aIndex) = 0;
size_t aIndex) = 0;
/**
* Get the index of a particular stylesheet. This will _always_
* consider the "special" sheets as part of the sheet list.
* @param aSheet the sheet to get the index of
* @return aIndex the index of the sheet in the full list
*/
virtual int32_t GetIndexOfStyleSheet(
const mozilla::StyleSheet* aSheet) const = 0;
/**
* Replace the stylesheets in aOldSheets with the stylesheets in
@ -1412,7 +1399,7 @@ public:
*/
template<typename T>
size_t FindDocStyleSheetInsertionPoint(const nsTArray<T>& aDocSheets,
mozilla::StyleSheet* aSheet);
const mozilla::StyleSheet& aSheet);
/**
* Get this document's CSSLoader. This is guaranteed to not return null.
@ -2984,7 +2971,6 @@ public:
return mVisibilityState;
}
#endif
virtual mozilla::dom::StyleSheetList* StyleSheets() = 0;
void GetSelectedStyleSheetSet(nsAString& aSheetSet);
virtual void SetSelectedStyleSheetSet(const nsAString& aSheetSet) = 0;
virtual void GetLastStyleSheetSet(nsString& aSheetSet) = 0;

Просмотреть файл

@ -21,19 +21,19 @@ template<typename T>
size_t
nsIDocument::FindDocStyleSheetInsertionPoint(
const nsTArray<T>& aDocSheets,
mozilla::StyleSheet* aSheet)
const mozilla::StyleSheet& aSheet)
{
nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
// lowest index first
int32_t newDocIndex = GetIndexOfStyleSheet(aSheet);
int32_t newDocIndex = IndexOfSheet(aSheet);
int32_t count = aDocSheets.Length();
int32_t index;
for (index = 0; index < count; index++) {
mozilla::StyleSheet* sheet = static_cast<mozilla::StyleSheet*>(
aDocSheets[index]);
int32_t sheetDocIndex = GetIndexOfStyleSheet(sheet);
size_t count = aDocSheets.Length();
size_t index = 0;
for (; index < count; index++) {
auto* sheet = static_cast<mozilla::StyleSheet*>(aDocSheets[index]);
MOZ_ASSERT(sheet);
int32_t sheetDocIndex = IndexOfSheet(*sheet);
if (sheetDocIndex > newDocIndex)
break;

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef NSLINEBREAKER_H_
#define NSLINEBREAKER_H_
#include "mozilla/intl/LineBreaker.h"
#include "nsString.h"
#include "nsTArray.h"

Просмотреть файл

@ -62,8 +62,12 @@ ReaderProxy::OnAudioDataRequestCompleted(RefPtr<AudioData> aAudio)
int64_t offset =
StartTime().ToMicroseconds() - mLoopingOffset.ToMicroseconds();
aAudio->AdjustForStartTime(offset);
mLastAudioEndTime = aAudio->mTime;
return AudioDataPromise::CreateAndResolve(aAudio.forget(), __func__);
if (aAudio->mTime.IsValid()) {
mLastAudioEndTime = aAudio->mTime;
return AudioDataPromise::CreateAndResolve(aAudio.forget(), __func__);
}
return AudioDataPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_OVERFLOW_ERR,
__func__);
}
RefPtr<ReaderProxy::AudioDataPromise>
@ -149,8 +153,11 @@ ReaderProxy::RequestVideoData(const media::TimeUnit& aTimeThreshold)
__func__,
[startTime](RefPtr<VideoData> aVideo) {
aVideo->AdjustForStartTime(startTime);
return VideoDataPromise::CreateAndResolve(aVideo.forget(),
__func__);
return aVideo->mTime.IsValid()
? VideoDataPromise::CreateAndResolve(aVideo.forget(),
__func__)
: VideoDataPromise::CreateAndReject(
NS_ERROR_DOM_MEDIA_OVERFLOW_ERR, __func__);
},
[](const MediaResult& aError) {
return VideoDataPromise::CreateAndReject(aError, __func__);

Просмотреть файл

@ -21,16 +21,20 @@ class AutoTaskQueue : public AbstractThread
public:
explicit AutoTaskQueue(already_AddRefed<nsIEventTarget> aPool,
bool aSupportsTailDispatch = false)
: AbstractThread(aSupportsTailDispatch)
, mTaskQueue(new TaskQueue(Move(aPool), aSupportsTailDispatch))
{}
: AbstractThread(aSupportsTailDispatch)
, mTaskQueue(new TaskQueue(Move(aPool), aSupportsTailDispatch))
, mMonitor("AutoTaskQueue")
{
}
AutoTaskQueue(already_AddRefed<nsIEventTarget> aPool,
const char* aName,
bool aSupportsTailDispatch = false)
: AbstractThread(aSupportsTailDispatch)
, mTaskQueue(new TaskQueue(Move(aPool), aName, aSupportsTailDispatch))
{}
: AbstractThread(aSupportsTailDispatch)
, mTaskQueue(new TaskQueue(Move(aPool), aName, aSupportsTailDispatch))
, mMonitor("AutoTaskQueue")
{
}
TaskDispatcher& TailDispatcher() override
{
@ -56,9 +60,12 @@ public:
// the task queue.
bool IsCurrentThreadIn() override { return mTaskQueue->IsCurrentThreadIn(); }
mozilla::Monitor& Monitor() { return mMonitor; }
private:
~AutoTaskQueue() { mTaskQueue->BeginShutdown(); }
RefPtr<TaskQueue> mTaskQueue;
mozilla::Monitor mMonitor;
};
} // namespace mozilla

Просмотреть файл

@ -424,6 +424,8 @@ private:
* provided by the monitor.
* For now Await can only be used with an exclusive MozPromise if passed a
* Resolve/Reject function.
* Await() can *NOT* be called from a task queue/nsISerialEventTarget used for
* resolving/rejecting aPromise, otherwise things will deadlock.
*/
template<typename ResolveValueType,
typename RejectValueType,
@ -436,9 +438,10 @@ Await(
ResolveFunction&& aResolveFunction,
RejectFunction&& aRejectFunction)
{
Monitor mon(__func__);
RefPtr<AutoTaskQueue> taskQueue =
new AutoTaskQueue(Move(aPool), "MozPromiseAwait");
// We can't use a Monitor allocated on the stack (see bug 1426067)
Monitor& mon = taskQueue->Monitor();
bool done = false;
aPromise->Then(taskQueue,
@ -468,9 +471,10 @@ typename MozPromise<ResolveValueType, RejectValueType, Excl>::
Await(already_AddRefed<nsIEventTarget> aPool,
RefPtr<MozPromise<ResolveValueType, RejectValueType, Excl>> aPromise)
{
Monitor mon(__func__);
RefPtr<AutoTaskQueue> taskQueue =
new AutoTaskQueue(Move(aPool), "MozPromiseAwait");
// We can't use a Monitor allocated on the stack (see bug 1426067)
Monitor& mon = taskQueue->Monitor();
bool done = false;
typename MozPromise<ResolveValueType, RejectValueType, Excl>::ResolveOrRejectValue val;

Просмотреть файл

@ -175,4 +175,4 @@ Troubleshooting tips:
-------------------------------------------------------------------------------
The version of WebRender currently in the tree is:
f9bc4a5c263e707e3498bea47d3ec9096cc3d099
1142dfc557c319119a5117450718c5b67a93cb9f

Просмотреть файл

@ -259,7 +259,7 @@ impl Example for App {
if false {
// draw text?
let font_key = api.generate_font_key();
let font_bytes = load_file("../wrench/reftest/text/FreeSans.ttf");
let font_bytes = load_file("../wrench/reftests/text/FreeSans.ttf");
resources.add_raw_font(font_key, font_bytes, 0);
let font_instance_key = api.generate_font_instance_key();

Просмотреть файл

@ -84,9 +84,11 @@ float clip_against_ellipse_if_needed(
return current_distance;
}
return distance_to_ellipse(pos - ellipse_center_radius.xy,
ellipse_center_radius.zw,
aa_range);
float distance = distance_to_ellipse(pos - ellipse_center_radius.xy,
ellipse_center_radius.zw,
aa_range);
return max(distance, current_distance);
}
float rounded_rect(vec2 pos,

Просмотреть файл

@ -670,12 +670,13 @@ VertexInfo write_transform_vertex(RectWithSize local_segment_rect,
// Convert the world positions to device pixel space.
vec2 device_pos = world_pos.xy / world_pos.w * uDevicePixelRatio;
vec2 task_offset = task.common_data.task_rect.p0 - task.content_origin;
// We want the world space coords to be perspective divided by W.
// We also want that to apply to any interpolators. However, we
// want a constant Z across the primitive, since we're using it
// for draw ordering - so scale by the W coord to ensure this.
vec4 final_pos = vec4(world_pos.xy + task.common_data.task_rect.p0 - task.content_origin,
vec4 final_pos = vec4(world_pos.xy * uDevicePixelRatio + task_offset,
z * world_pos.w,
world_pos.w);
gl_Position = uTransform * final_pos;
@ -720,6 +721,7 @@ struct ImageResource {
};
ImageResource fetch_image_resource(int address) {
//Note: number of blocks has to match `renderer::BLOCKS_PER_UV_RECT`
vec4 data[2] = fetch_from_resource_cache_2(address);
return ImageResource(data[0], data[1].x);
}

Просмотреть файл

@ -7,6 +7,7 @@
flat varying vec4 vColor;
varying vec3 vUv;
flat varying vec4 vUvBorder;
flat varying vec2 vMaskSwizzle;
#ifdef WR_FEATURE_GLYPH_TRANSFORM
varying vec4 vUvClip;
@ -125,27 +126,29 @@ void main(void) {
write_clip(vi.screen_pos, prim.clip_area);
#ifdef WR_FEATURE_SUBPX_BG_PASS1
vColor = vec4(text.color.a) * text.bg_color;
#else
switch (uMode) {
case MODE_ALPHA:
case MODE_BITMAP:
vMaskSwizzle = vec2(0.0, 1.0);
vColor = text.color;
break;
case MODE_SUBPX_PASS1:
case MODE_SUBPX_BG_PASS2:
case MODE_BITMAP:
vMaskSwizzle = vec2(1.0, 0.0);
vColor = text.color;
break;
case MODE_SUBPX_CONST_COLOR:
case MODE_SUBPX_PASS0:
case MODE_SUBPX_BG_PASS0:
case MODE_COLOR_BITMAP:
vMaskSwizzle = vec2(1.0, 0.0);
vColor = vec4(text.color.a);
break;
case MODE_SUBPX_BG_PASS1:
// This should never be reached.
vMaskSwizzle = vec2(-1.0, 1.0);
vColor = vec4(text.color.a) * text.bg_color;
break;
}
#endif
vec2 texture_size = vec2(textureSize(sColor0, 0));
vec2 st0 = res.uv_rect.xy / texture_size;
@ -160,16 +163,13 @@ void main(void) {
void main(void) {
vec3 tc = vec3(clamp(vUv.xy, vUvBorder.xy, vUvBorder.zw), vUv.z);
vec4 mask = texture(sColor0, tc);
mask.rgb = mask.rgb * vMaskSwizzle.x + mask.aaa * vMaskSwizzle.y;
float alpha = do_clip();
#ifdef WR_FEATURE_GLYPH_TRANSFORM
alpha *= float(all(greaterThanEqual(vUvClip, vec4(0.0))));
#endif
#ifdef WR_FEATURE_SUBPX_BG_PASS1
mask.rgb = vec3(mask.a) - mask.rgb;
#endif
oFragColor = vColor * mask * alpha;
}
#endif

Просмотреть файл

@ -227,7 +227,10 @@ impl NormalBorderHelpers for NormalBorder {
}
}
fn ensure_no_corner_overlap(radius: &mut BorderRadius, info: &LayerPrimitiveInfo) {
pub fn ensure_no_corner_overlap(
radius: &mut BorderRadius,
rect: &LayerRect,
) {
let mut ratio = 1.0;
let top_left_radius = &mut radius.top_left;
let top_right_radius = &mut radius.top_right;
@ -235,23 +238,23 @@ fn ensure_no_corner_overlap(radius: &mut BorderRadius, info: &LayerPrimitiveInfo
let bottom_left_radius = &mut radius.bottom_left;
let sum = top_left_radius.width + bottom_left_radius.width;
if info.rect.size.width < sum {
ratio = f32::min(ratio, info.rect.size.width / sum);
if rect.size.width < sum {
ratio = f32::min(ratio, rect.size.width / sum);
}
let sum = top_right_radius.width + bottom_right_radius.width;
if info.rect.size.width < sum {
ratio = f32::min(ratio, info.rect.size.width / sum);
if rect.size.width < sum {
ratio = f32::min(ratio, rect.size.width / sum);
}
let sum = top_left_radius.height + bottom_left_radius.height;
if info.rect.size.height < sum {
ratio = f32::min(ratio, info.rect.size.height / sum);
if rect.size.height < sum {
ratio = f32::min(ratio, rect.size.height / sum);
}
let sum = top_right_radius.height + bottom_right_radius.height;
if info.rect.size.height < sum {
ratio = f32::min(ratio, info.rect.size.height / sum);
if rect.size.height < sum {
ratio = f32::min(ratio, rect.size.height / sum);
}
if ratio < 1. {
@ -353,7 +356,7 @@ impl FrameBuilder {
// threads being run on CI at once).
let mut border = *border;
ensure_no_corner_overlap(&mut border.radius, &info);
ensure_no_corner_overlap(&mut border.radius, &info.rect);
let radius = &border.radius;
let left = &border.left;

Просмотреть файл

@ -2,13 +2,14 @@
* 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 api::{BorderRadiusKind, ColorF, LayerPoint, LayerRect, LayerSize, LayerVector2D};
use api::{ColorF, LayerPoint, LayerRect, LayerSize, LayerVector2D};
use api::{BorderRadius, BoxShadowClipMode, LayoutSize, LayerPrimitiveInfo};
use api::{ClipMode, ClipAndScrollInfo, ComplexClipRegion, LocalClip};
use api::{PipelineId};
use app_units::Au;
use clip::ClipSource;
use frame_builder::FrameBuilder;
use gpu_types::BrushImageKind;
use prim_store::{BrushAntiAliasMode, PrimitiveContainer};
use prim_store::{BrushMaskKind, BrushKind, BrushPrimitive};
use picture::PicturePrimitive;
@ -87,7 +88,7 @@ impl FrameBuilder {
let fast_info = match clip_mode {
BoxShadowClipMode::Outset => {
// TODO(gw): Add a fast path for ClipOut + zero border radius!
clips.push(ClipSource::RoundedRectangle(
clips.push(ClipSource::new_rounded_rect(
prim_info.rect,
border_radius,
ClipMode::ClipOut
@ -106,7 +107,7 @@ impl FrameBuilder {
)
}
BoxShadowClipMode::Inset => {
clips.push(ClipSource::RoundedRectangle(
clips.push(ClipSource::new_rounded_rect(
shadow_rect,
shadow_radius,
ClipMode::ClipOut
@ -163,11 +164,11 @@ impl FrameBuilder {
match clip_mode {
BoxShadowClipMode::Outset => {
let width;
let height;
let mut width;
let mut height;
let brush_prim;
let corner_size = shadow_radius.is_uniform_size();
let radii_kind;
let mut image_kind;
if !shadow_rect.is_well_formed_and_nonempty() {
return;
@ -177,7 +178,7 @@ impl FrameBuilder {
// just blur the top left corner, and stretch / mirror that
// across the primitive.
if let Some(corner_size) = corner_size {
radii_kind = BorderRadiusKind::Uniform;
image_kind = BrushImageKind::Mirror;
width = MASK_CORNER_PADDING + corner_size.width.max(BLUR_SAMPLE_SCALE * blur_radius);
height = MASK_CORNER_PADDING + corner_size.height.max(BLUR_SAMPLE_SCALE * blur_radius);
@ -194,7 +195,7 @@ impl FrameBuilder {
// case, we ensure the size of each corner is the same,
// to simplify the shader logic that stretches the blurred
// result across the primitive.
radii_kind = BorderRadiusKind::NonUniform;
image_kind = BrushImageKind::NinePatch;
let max_width = shadow_radius.top_left.width
.max(shadow_radius.bottom_left.width)
.max(shadow_radius.top_right.width)
@ -207,6 +208,15 @@ impl FrameBuilder {
width = 2.0 * max_width + BLUR_SAMPLE_SCALE * blur_radius;
height = 2.0 * max_height + BLUR_SAMPLE_SCALE * blur_radius;
// If the width or height ends up being bigger than the original
// primitive shadow rect, just blur the entire rect and draw that
// as a simple blit.
if width > prim_info.rect.size.width || height > prim_info.rect.size.height {
image_kind = BrushImageKind::Simple;
width = prim_info.rect.size.width;
height = prim_info.rect.size.height;
}
let clip_rect = LayerRect::new(LayerPoint::zero(),
LayerSize::new(width, height));
@ -237,7 +247,7 @@ impl FrameBuilder {
*color,
Vec::new(),
clip_mode,
radii_kind,
image_kind,
cache_key,
pipeline_id,
);
@ -252,7 +262,7 @@ impl FrameBuilder {
// segment logic, by avoiding drawing
// most of the pixels inside and just
// clipping out along the edges.
extra_clips.push(ClipSource::RoundedRectangle(
extra_clips.push(ClipSource::new_rounded_rect(
prim_info.rect,
border_radius,
ClipMode::ClipOut,
@ -318,7 +328,7 @@ impl FrameBuilder {
Vec::new(),
BoxShadowClipMode::Inset,
// TODO(gw): Make use of optimization for inset.
BorderRadiusKind::NonUniform,
BrushImageKind::NinePatch,
cache_key,
pipeline_id,
);
@ -340,7 +350,7 @@ impl FrameBuilder {
// Add a normal clip to ensure nothing gets drawn
// outside the primitive rect.
if !border_radius.is_zero() {
extra_clips.push(ClipSource::RoundedRectangle(
extra_clips.push(ClipSource::new_rounded_rect(
prim_info.rect,
border_radius,
ClipMode::Clip,

Просмотреть файл

@ -4,7 +4,7 @@
use api::{BorderRadius, ClipMode, ComplexClipRegion, DeviceIntRect, ImageMask, ImageRendering};
use api::{LayerPoint, LayerRect, LayerToWorldTransform, LayoutPoint, LayoutVector2D, LocalClip};
use border::BorderCornerClipSource;
use border::{BorderCornerClipSource, ensure_no_corner_overlap};
use ellipse::Ellipse;
use freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
use gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
@ -87,7 +87,7 @@ impl From<ClipRegion> for ClipSources {
clips.push(ClipSource::Rectangle(region.main));
for complex in region.complex_clips {
clips.push(ClipSource::RoundedRectangle(
clips.push(ClipSource::new_rounded_rect(
complex.rect,
complex.radii,
complex.mode,
@ -99,6 +99,19 @@ impl From<ClipRegion> for ClipSources {
}
impl ClipSource {
pub fn new_rounded_rect(
rect: LayerRect,
mut radii: BorderRadius,
clip_mode: ClipMode
) -> ClipSource {
ensure_no_corner_overlap(&mut radii, &rect);
ClipSource::RoundedRectangle(
rect,
radii,
clip_mode,
)
}
pub fn contains(&self, point: &LayerPoint) -> bool {
// We currently do not handle all BorderCorners, because they aren't used for
// ClipScrollNodes and this method is only used during hit testing.

Просмотреть файл

@ -659,9 +659,10 @@ impl ClipScrollNode {
state.parent_reference_frame_transform = self.world_viewport_transform;
state.parent_combined_viewport_rect = combined_local_viewport_rect;
state.parent_accumulated_scroll_offset = LayerVector2D::zero();
let translation = -info.origin_in_parent_reference_frame;
state.nearest_scrolling_ancestor_viewport =
state.nearest_scrolling_ancestor_viewport
.translate(&info.origin_in_parent_reference_frame);
.translate(&translation);
}
NodeType::Clip(..) => {
state.parent_combined_viewport_rect = combined_local_viewport_rect;

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use api::{BorderDetails, BorderDisplayItem, BuiltDisplayList};
use api::{ClipAndScrollInfo, ClipId, ColorF, PropertyBinding};
use api::{ClipAndScrollInfo, ClipId, ColorF, ColorU, PropertyBinding};
use api::{DeviceUintPoint, DeviceUintRect, DeviceUintSize};
use api::{DocumentLayer, ExtendMode, FontRenderMode, LayoutTransform};
use api::{GlyphInstance, GlyphOptions, GradientStop, HitTestFlags, HitTestItem, HitTestResult};
@ -202,7 +202,8 @@ impl FrameBuilder {
) -> PrimitiveIndex {
if let &LocalClip::RoundedRect(main, region) = &info.local_clip {
clip_sources.push(ClipSource::Rectangle(main));
clip_sources.push(ClipSource::RoundedRectangle(
clip_sources.push(ClipSource::new_rounded_rect(
region.rect,
region.radii,
region.mode,
@ -1345,6 +1346,7 @@ impl FrameBuilder {
glyph_gpu_blocks: Vec::new(),
glyph_keys: Vec::new(),
offset: run_offset,
shadow_color: ColorU::new(0, 0, 0, 0),
};
// Text shadows that have a blur radius of 0 need to be rendered as normal
@ -1362,7 +1364,7 @@ impl FrameBuilder {
match picture_prim.kind {
PictureKind::TextShadow { offset, color, blur_radius, .. } if blur_radius == 0.0 => {
let mut text_prim = prim.clone();
text_prim.font.color = color.into();
text_prim.shadow_color = color.into();
text_prim.offset += offset;
fast_shadow_prims.push((idx, text_prim));
}

Просмотреть файл

@ -221,6 +221,17 @@ pub enum GlyphFormat {
ColorBitmap,
}
impl GlyphFormat {
pub fn ignore_color(self) -> Self {
match self {
GlyphFormat::Subpixel => GlyphFormat::Alpha,
GlyphFormat::TransformedSubpixel => GlyphFormat::TransformedAlpha,
GlyphFormat::ColorBitmap => GlyphFormat::Bitmap,
_ => self,
}
}
}
pub struct RasterizedGlyph {
pub top: f32,
pub left: f32,

Просмотреть файл

@ -32,6 +32,7 @@ use renderer::MAX_VERTEX_TEXTURE_WIDTH;
use std::{mem, u16, u32};
use std::ops::Add;
pub const GPU_CACHE_INITIAL_HEIGHT: u32 = 512;
const FRAMES_BEFORE_EVICTION: usize = 10;
const NEW_ROWS_PER_RESIZE: u32 = 512;

Просмотреть файл

@ -180,6 +180,7 @@ impl From<BrushInstance> for PrimitiveInstance {
// In the future, we may draw with segments for each portion
// of the primitive, in which case this will be redundant.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub enum BrushImageKind {
Simple = 0, // A normal rect
NinePatch = 1, // A nine-patch image (stretch inside segments)

Просмотреть файл

@ -2,13 +2,14 @@
* 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 api::{BorderRadiusKind, ColorF, ClipAndScrollInfo, FilterOp, MixBlendMode};
use api::{ColorF, ClipAndScrollInfo, FilterOp, MixBlendMode};
use api::{device_length, DeviceIntRect, DeviceIntSize, PipelineId};
use api::{BoxShadowClipMode, LayerPoint, LayerRect, LayerSize, LayerVector2D, Shadow};
use api::{ClipId, PremultipliedColorF};
use box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowCacheKey};
use frame_builder::PrimitiveContext;
use gpu_cache::GpuDataRequest;
use gpu_types::BrushImageKind;
use prim_store::{PrimitiveIndex, PrimitiveRun, PrimitiveRunLocalRect};
use render_task::{ClearMode, RenderTask, RenderTaskId, RenderTaskTree};
use scene::{FilterOpHelpers, SceneProperties};
@ -59,7 +60,7 @@ pub enum PictureKind {
color: ColorF,
blur_regions: Vec<LayerRect>,
clip_mode: BoxShadowClipMode,
radii_kind: BorderRadiusKind,
image_kind: BrushImageKind,
content_rect: LayerRect,
cache_key: BoxShadowCacheKey,
},
@ -156,7 +157,7 @@ impl PicturePrimitive {
color: ColorF,
blur_regions: Vec<LayerRect>,
clip_mode: BoxShadowClipMode,
radii_kind: BorderRadiusKind,
image_kind: BrushImageKind,
cache_key: BoxShadowCacheKey,
pipeline_id: PipelineId,
) -> Self {
@ -168,7 +169,7 @@ impl PicturePrimitive {
color,
blur_regions,
clip_mode,
radii_kind,
image_kind,
content_rect: LayerRect::zero(),
cache_key,
},
@ -259,7 +260,7 @@ impl PicturePrimitive {
content_rect.translate(&offset)
}
PictureKind::BoxShadow { blur_radius, clip_mode, radii_kind, ref mut content_rect, .. } => {
PictureKind::BoxShadow { blur_radius, clip_mode, image_kind, ref mut content_rect, .. } => {
// We need to inflate the content rect if outset.
match clip_mode {
BoxShadowClipMode::Outset => {
@ -269,8 +270,8 @@ impl PicturePrimitive {
// left corner and mirror it across the primitive. In
// this case, shift the content rect to leave room
// for the blur to take effect.
match radii_kind {
BorderRadiusKind::Uniform => {
match image_kind {
BrushImageKind::Mirror => {
let origin = LayerPoint::new(
local_content_rect.origin.x - blur_offset,
local_content_rect.origin.y - blur_offset,
@ -281,7 +282,7 @@ impl PicturePrimitive {
);
*content_rect = LayerRect::new(origin, size);
}
BorderRadiusKind::NonUniform => {
BrushImageKind::NinePatch | BrushImageKind::Simple => {
// For a non-uniform radii, we need to expand
// the content rect on all sides for the blur.
*content_rect = local_content_rect.inflate(

Просмотреть файл

@ -2,7 +2,7 @@
* 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 api::{BorderRadius, BuiltDisplayList, ClipAndScrollInfo, ClipId, ClipMode, ColorF};
use api::{BorderRadius, BuiltDisplayList, ClipAndScrollInfo, ClipId, ClipMode, ColorF, ColorU};
use api::{ComplexClipRegion, DeviceIntRect, DevicePoint, ExtendMode, FontRenderMode};
use api::{GlyphInstance, GlyphKey, GradientStop, ImageKey, ImageRendering, ItemRange, ItemTag};
use api::{LayerPoint, LayerRect, LayerSize, LayerToWorldTransform, LayerVector2D, LineOrientation};
@ -21,7 +21,7 @@ use picture::{PictureKind, PicturePrimitive, RasterizationSpace};
use profiler::FrameProfileCounters;
use render_task::{ClipChain, ClipChainNode, ClipChainNodeIter, ClipWorkItem, RenderTask};
use render_task::{RenderTaskId, RenderTaskTree};
use renderer::MAX_VERTEX_TEXTURE_WIDTH;
use renderer::{BLOCKS_PER_UV_RECT, MAX_VERTEX_TEXTURE_WIDTH};
use resource_cache::{ImageProperties, ResourceCache};
use scene::{ScenePipeline, SceneProperties};
use std::{mem, u16, usize};
@ -29,6 +29,7 @@ use std::rc::Rc;
use util::{MatrixHelpers, calculate_screen_bounding_rect, extract_inner_rect_safe, pack_as_float};
use util::recycle_vec;
const MIN_BRUSH_SPLIT_AREA: f32 = 128.0 * 128.0;
#[derive(Debug)]
@ -448,7 +449,7 @@ pub struct ImagePrimitiveCpu {
pub tile_offset: Option<TileOffset>,
pub tile_spacing: LayerSize,
// TODO(gw): Build on demand
pub gpu_blocks: [GpuBlockData; 2],
pub gpu_blocks: [GpuBlockData; BLOCKS_PER_UV_RECT],
}
impl ToGpuBlocks for ImagePrimitiveCpu {
@ -739,9 +740,9 @@ pub struct TextRunPrimitiveCpu {
pub glyph_count: usize,
pub glyph_keys: Vec<GlyphKey>,
pub glyph_gpu_blocks: Vec<GpuBlockData>,
pub shadow_color: ColorU,
}
impl TextRunPrimitiveCpu {
pub fn get_font(
&self,
@ -761,6 +762,10 @@ impl TextRunPrimitiveCpu {
font
}
pub fn is_shadow(&self) -> bool {
self.shadow_color.a != 0
}
fn prepare_for_render(
&mut self,
resource_cache: &mut ResourceCache,
@ -812,7 +817,12 @@ impl TextRunPrimitiveCpu {
fn write_gpu_blocks(&self, request: &mut GpuDataRequest) {
let bg_color = ColorF::from(self.font.bg_color);
request.push(ColorF::from(self.font.color).premultiplied());
let color = ColorF::from(if self.is_shadow() {
self.shadow_color
} else {
self.font.color
});
request.push(color.premultiplied());
// this is the only case where we need to provide plain color to GPU
request.extend_from_slice(&[
GpuBlockData { data: [bg_color.r, bg_color.g, bg_color.b, 1.0] }

Просмотреть файл

@ -76,6 +76,9 @@ pub const MAX_VERTEX_TEXTURE_WIDTH: usize = 1024;
/// is performed correctly.
const GPU_CACHE_RESIZE_TEST: bool = false;
/// Number of GPU blocks per UV rectangle provided for an image.
pub const BLOCKS_PER_UV_RECT: usize = 2;
const GPU_TAG_BRUSH_SOLID: GpuProfileTag = GpuProfileTag {
label: "B_Solid",
color: debug_colors::RED,
@ -1594,7 +1597,6 @@ pub struct Renderer {
// output, and the cache_image shader blits the results of
// a cache shader (e.g. blur) to the screen.
ps_text_run: TextShader,
ps_text_run_subpx_bg_pass1: TextShader,
ps_image: Vec<Option<PrimitiveShader>>,
ps_yuv_image: Vec<Option<PrimitiveShader>>,
ps_border_corner: PrimitiveShader,
@ -1860,13 +1862,6 @@ impl Renderer {
options.precache_shaders)
};
let ps_text_run_subpx_bg_pass1 = try!{
TextShader::new("ps_text_run",
&mut device,
&["SUBPX_BG_PASS1"],
options.precache_shaders)
};
// All image configuration.
let mut image_features = Vec::new();
let mut ps_image: Vec<Option<PrimitiveShader>> = Vec::new();
@ -2241,7 +2236,6 @@ impl Renderer {
cs_clip_border,
cs_clip_image,
ps_text_run,
ps_text_run_subpx_bg_pass1,
ps_image,
ps_yuv_image,
ps_border_corner,
@ -3558,7 +3552,7 @@ impl Renderer {
self.device.set_blend_mode_subpixel_with_bg_color_pass1();
self.ps_text_run_subpx_bg_pass1.bind(
self.ps_text_run.bind(
&mut self.device,
glyph_format,
transform_kind,
@ -3923,7 +3917,7 @@ impl Renderer {
list.updates.push(GpuCacheUpdate::Copy {
block_index: list.blocks.len(),
block_count: 2,
block_count: BLOCKS_PER_UV_RECT,
address: deferred_resolve.address,
});
list.blocks.push([image.u0, image.v0, image.u1, image.v1].into());
@ -4434,7 +4428,6 @@ impl Renderer {
self.cs_clip_image.deinit(&mut self.device);
self.cs_clip_border.deinit(&mut self.device);
self.ps_text_run.deinit(&mut self.device);
self.ps_text_run_subpx_bg_pass1.deinit(&mut self.device);
for shader in self.ps_image {
if let Some(shader) = shader {
shader.deinit(&mut self.device);

Просмотреть файл

@ -2,7 +2,7 @@
* 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 api::{BorderRadiusKind, ClipId, ColorF, DeviceIntPoint, ImageKey};
use api::{ClipId, ColorF, DeviceIntPoint, ImageKey};
use api::{DeviceIntRect, DeviceIntSize, device_length, DeviceUintPoint, DeviceUintRect, DeviceUintSize};
use api::{DocumentLayer, ExternalImageType, FilterOp};
use api::{ImageFormat, ImageRendering};
@ -29,8 +29,8 @@ use profiler::FrameProfileCounters;
use render_task::{ClipWorkItem};
use render_task::{RenderTaskAddress, RenderTaskId, RenderTaskKey, RenderTaskKind};
use render_task::{BlurTask, ClearMode, RenderTaskLocation, RenderTaskTree};
use renderer::BlendMode;
use renderer::ImageBufferKind;
use renderer::{BlendMode, ImageBufferKind};
use renderer::BLOCKS_PER_UV_RECT;
use resource_cache::{GlyphFetchResult, ResourceCache};
use std::{cmp, usize, f32, i32};
use std::collections::hash_map::Entry;
@ -570,7 +570,7 @@ fn add_to_batch(
&text_cpu.glyph_keys,
glyph_fetch_buffer,
gpu_cache,
|texture_id, glyph_format, glyphs| {
|texture_id, mut glyph_format, glyphs| {
debug_assert_ne!(texture_id, SourceTexture::Invalid);
let textures = BatchTextures {
@ -581,6 +581,11 @@ fn add_to_batch(
],
};
// Ignore color and only sample alpha when shadowing.
if text_cpu.is_shadow() {
glyph_format = glyph_format.ignore_color();
}
let kind = BatchKind::Transformable(
transform_kind,
TransformBatchKind::TextRun(glyph_format),
@ -650,7 +655,7 @@ fn add_to_batch(
};
batch.push(PrimitiveInstance::from(instance));
}
PictureKind::BoxShadow { radii_kind, .. } => {
PictureKind::BoxShadow { image_kind, .. } => {
let kind = BatchKind::Brush(
BrushBatchKind::Image(
BrushImageSourceKind::from_render_target_kind(picture.target_kind())),
@ -658,15 +663,6 @@ fn add_to_batch(
let key = BatchKey::new(kind, blend_mode, textures);
let batch = batch_list.get_suitable_batch(key, item_bounding_rect);
let image_kind = match radii_kind {
BorderRadiusKind::Uniform => {
BrushImageKind::Mirror
}
BorderRadiusKind::NonUniform => {
BrushImageKind::NinePatch
}
};
let instance = BrushInstance {
picture_address: task_address,
prim_address: prim_cache_address,
@ -2112,7 +2108,7 @@ fn resolve_image(
// This is an external texture - we will add it to
// the deferred resolves list to be patched by
// the render thread...
let cache_handle = gpu_cache.push_deferred_per_frame_blocks(2);
let cache_handle = gpu_cache.push_deferred_per_frame_blocks(BLOCKS_PER_UV_RECT);
deferred_resolves.push(DeferredResolve {
image_properties,
address: gpu_cache.get_address(&cache_handle),

Просмотреть файл

@ -0,0 +1,6 @@
<!doctype html>
<a id="link" href=""></a>
<script>
document.body.offsetTop;
link.appendChild(document.createElement("fieldset"));
</script>

Просмотреть файл

@ -516,3 +516,4 @@ load 1409088.html
load 1409147.html
load 1411138.html
load 1419762.html
load 1425893.html

Просмотреть файл

@ -113,8 +113,8 @@ inDOMUtils::GetAllStyleSheets(nsIDOMDocument *aDocument, uint32_t *aLength,
}
// Get the document sheets.
for (int32_t i = 0; i < document->GetNumberOfStyleSheets(); i++) {
sheets.AppendElement(document->GetStyleSheetAt(i));
for (size_t i = 0; i < document->SheetCount(); i++) {
sheets.AppendElement(document->SheetAt(i));
}
nsISupports** ret = static_cast<nsISupports**>(moz_xmalloc(sheets.Length() *

Просмотреть файл

@ -11,7 +11,7 @@ random != boxshadow-blur-2.html boxshadow-blur-2-notref.html # fixedpoint divisi
== boxshadow-rounding.html boxshadow-rounding-ref.html
# One uses old path, one uses WR box shadow.
fails-if(Android) == boxshadow-button.html boxshadow-button-ref.html
fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,908) fuzzy-if(webrender,70-70,1320-1320) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,908) fuzzy-if(webrender,68-68,1440-1440) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
fails-if(Android) == boxshadow-fileupload.html boxshadow-fileupload-ref.html
fuzzy-if(skiaContent,13,28) fuzzy-if(webrender,25,48) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg

Просмотреть файл

@ -1190,7 +1190,7 @@ Loader::InsertSheetInDoc(StyleSheet* aSheet,
// XXX Need to cancel pending sheet loads for this element, if any
int32_t sheetCount = aDocument->GetNumberOfStyleSheets();
int32_t sheetCount = aDocument->SheetCount();
/*
* Start the walk at the _end_ of the list, since in the typical
@ -1202,7 +1202,7 @@ Loader::InsertSheetInDoc(StyleSheet* aSheet,
*/
int32_t insertionPoint;
for (insertionPoint = sheetCount - 1; insertionPoint >= 0; --insertionPoint) {
StyleSheet* curSheet = aDocument->GetStyleSheetAt(insertionPoint);
StyleSheet* curSheet = aDocument->SheetAt(insertionPoint);
NS_ASSERTION(curSheet, "There must be a sheet here!");
nsCOMPtr<nsINode> sheetOwner = curSheet->GetOwnerNode();
if (sheetOwner && !aLinkingContent) {

Просмотреть файл

@ -837,7 +837,7 @@ ServoStyleSet::AddDocStyleSheet(ServoStyleSheet* aSheet,
RemoveSheetOfType(SheetType::Doc, aSheet);
size_t index =
aDocument->FindDocStyleSheetInsertionPoint(mSheets[SheetType::Doc], aSheet);
aDocument->FindDocStyleSheetInsertionPoint(mSheets[SheetType::Doc], *aSheet);
if (index < mSheets[SheetType::Doc].Length()) {
// This case is insert before.

Просмотреть файл

@ -726,7 +726,7 @@ nsStyleSet::AddDocStyleSheet(CSSStyleSheet* aSheet, nsIDocument* aDocument)
bool present = sheets.RemoveElement(aSheet);
size_t index = aDocument->FindDocStyleSheetInsertionPoint(sheets, aSheet);
size_t index = aDocument->FindDocStyleSheetInsertionPoint(sheets, *aSheet);
sheets.InsertElementAt(index, aSheet);
if (!present) {

Просмотреть файл

@ -27,10 +27,9 @@ There are no thread locks. It is the responsibility of the caller to
arrange that any given TransportLayer/TransportFlow is only
manipulated in one thread at once. One good way to do this is to run
everything on the STS thread. Many of the existing layer implementations
(TransportLayerPrsock, TransportLayerIce, TransportLayerLoopback)
already run on STS so in those cases you must run on STS, though
you can do setup on the main thread and then activate them on the
STS.
(TransportLayerIce, TransportLayerLoopback) already run on STS so in those
cases you must run on STS, though you can do setup on the main thread and
then activate them on the STS.
EXISTING TRANSPORT LAYERS
@ -38,22 +37,9 @@ The following transport layers are currently implemented:
* DTLS -- a wrapper around NSS's DTLS [RFC 6347] stack
* ICE -- a wrapper around the nICEr ICE [RFC 5245] stack.
* Prsock -- a wrapper around NSPR sockets
* Loopback -- a loopback IO mechanism
* Logging -- a passthrough that just logs its data
The last three are primarily for debugging.
The last two are primarily for debugging.

Просмотреть файл

@ -24,7 +24,6 @@ EXPORTS.mtransport += [
'../transportlayerice.h',
'../transportlayerlog.h',
'../transportlayerloopback.h',
'../transportlayerprsock.h',
]
include('../common.build')

Просмотреть файл

@ -25,7 +25,6 @@ mtransport_lcppsrcs = [
'transportlayerice.cpp',
'transportlayerlog.cpp',
'transportlayerloopback.cpp',
'transportlayerprsock.cpp',
]
mtransport_cppsrcs = [

Просмотреть файл

@ -1,116 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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/. */
// Original author: ekr@rtfm.com
#include "logging.h"
#include "nspr.h"
#include "prerror.h"
#include "prio.h"
#include "nsCOMPtr.h"
#include "nsASocketHandler.h"
#include "nsISocketTransportService.h"
#include "nsNetCID.h"
#include "nsServiceManagerUtils.h"
#include "nsXPCOM.h"
#include "transportflow.h"
#include "transportlayerprsock.h"
namespace mozilla {
MOZ_MTLOG_MODULE("mtransport")
nsresult TransportLayerPrsock::InitInternal() {
// Get the transport service as a transport service
nsresult rv;
stservice_ = do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
if (!NS_SUCCEEDED(rv)) {
MOZ_MTLOG(ML_ERROR, "Couldn't get socket transport service");
return rv;
}
return NS_OK;
}
void TransportLayerPrsock::Import(PRFileDesc *fd, nsresult *result) {
if (state_ != TS_INIT) {
*result = NS_ERROR_NOT_INITIALIZED;
return;
}
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Importing()");
fd_ = fd;
handler_ = new SocketHandler(this, fd);
nsresult rv = stservice_->AttachSocket(fd_, handler_);
if (!NS_SUCCEEDED(rv)) {
*result = rv;
return;
}
TL_SET_STATE(TS_OPEN);
*result = NS_OK;
}
int TransportLayerPrsock::SendPacket(const unsigned char *data, size_t len) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "SendPacket(" << len << ")");
if (state_ != TS_OPEN) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Can't send packet on closed interface");
return TE_INTERNAL;
}
int32_t status;
status = PR_Write(fd_, data, len);
if (status >= 0) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Wrote " << len << " bytes");
return status;
}
PRErrorCode err = PR_GetError();
if (err == PR_WOULD_BLOCK_ERROR) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Write blocked");
return TE_WOULDBLOCK;
}
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Write error; channel closed");
TL_SET_STATE(TS_ERROR);
return TE_ERROR;
}
void TransportLayerPrsock::OnSocketReady(PRFileDesc *fd, int16_t outflags) {
if (!(outflags & PR_POLL_READ)) {
return;
}
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "OnSocketReady(flags=" << outflags << ")");
unsigned char buf[1600];
int32_t rv = PR_Read(fd, buf, sizeof(buf));
if (rv > 0) {
// Successful read
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Read " << rv << " bytes");
SignalPacketReceived(this, buf, rv);
} else if (rv == 0) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Read 0 bytes; channel closed");
TL_SET_STATE(TS_CLOSED);
} else {
PRErrorCode err = PR_GetError();
if (err != PR_WOULD_BLOCK_ERROR) {
MOZ_MTLOG(ML_DEBUG, LAYER_INFO << "Read error; channel closed");
TL_SET_STATE(TS_ERROR);
}
}
}
NS_IMPL_ISUPPORTS0(TransportLayerPrsock::SocketHandler)
} // close namespace

Просмотреть файл

@ -1,120 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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/. */
// Original author: ekr@rtfm.com
#ifndef transportlayerprsock_h__
#define transportlayerprsock_h__
#include "nspr.h"
#include "prio.h"
#include "nsASocketHandler.h"
#include "nsCOMPtr.h"
#include "nsISocketTransportService.h"
#include "nsXPCOM.h"
#include "m_cpp_utils.h"
#include "transportflow.h"
#include "transportlayer.h"
namespace mozilla {
class TransportLayerPrsock : public TransportLayer {
public:
TransportLayerPrsock() : fd_(nullptr), handler_() {}
virtual ~TransportLayerPrsock() {
Detach();
}
// Internal initializer
nsresult InitInternal() override;
void Import(PRFileDesc *fd, nsresult *result);
void Detach() {
handler_->Detach();
}
// Implement TransportLayer
TransportResult SendPacket(const unsigned char *data, size_t len) override;
TRANSPORT_LAYER_ID("prsock")
private:
DISALLOW_COPY_ASSIGN(TransportLayerPrsock);
// Inner class
class SocketHandler : public nsASocketHandler {
public:
SocketHandler(TransportLayerPrsock *prsock, PRFileDesc *fd) :
prsock_(prsock), fd_(fd) {
mPollFlags = PR_POLL_READ;
}
void Detach() {
mCondition = NS_BASE_STREAM_CLOSED;
prsock_ = nullptr;
}
// Implement nsASocket
virtual void OnSocketReady(PRFileDesc *fd, int16_t outflags) override {
if (prsock_) {
prsock_->OnSocketReady(fd, outflags);
}
}
virtual void OnSocketDetached(PRFileDesc *fd) override {
if (prsock_) {
prsock_->OnSocketDetached(fd);
}
PR_Close(fd_);
}
virtual void IsLocal(bool *aIsLocal) override {
// TODO(jesup): better check? Does it matter? (likely no)
*aIsLocal = false;
}
virtual uint64_t ByteCountSent() override { return 0; }
virtual uint64_t ByteCountReceived() override { return 0; }
// nsISupports methods
NS_DECL_THREADSAFE_ISUPPORTS
private:
TransportLayerPrsock *prsock_;
PRFileDesc *fd_;
private:
DISALLOW_COPY_ASSIGN(SocketHandler);
virtual ~SocketHandler() {}
};
// Allow SocketHandler to talk to our APIs
friend class SocketHandler;
// Functions to be called by SocketHandler
void OnSocketReady(PRFileDesc *fd, int16_t outflags);
void OnSocketDetached(PRFileDesc *fd) {
TL_SET_STATE(TS_CLOSED);
}
void IsLocal(bool *aIsLocal) {
// TODO(jesup): better check? Does it matter? (likely no)
*aIsLocal = false;
}
PRFileDesc *fd_;
RefPtr<SocketHandler> handler_;
nsCOMPtr<nsISocketTransportService> stservice_;
};
} // close namespace
#endif

Просмотреть файл

@ -2336,8 +2336,8 @@ PeerConnectionImpl::RemoveTrack(MediaStreamTrack& aTrack) {
if (transceiver->HasSendTrack(&aTrack)) {
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
for (size_t i = 0; i < mDTMFStates.Length(); ++i) {
if (mDTMFStates[i].mTransceiver.get() == transceiver.get()) {
mDTMFStates[i].mSendTimer->Cancel();
if (mDTMFStates[i]->mTransceiver.get() == transceiver.get()) {
mDTMFStates[i]->mSendTimer->Cancel();
mDTMFStates.RemoveElementAt(i);
break;
}
@ -2439,17 +2439,17 @@ PeerConnectionImpl::InsertDTMF(TransceiverImpl& transceiver,
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
// Attempt to locate state for the DTMFSender
DTMFState* state = nullptr;
RefPtr<DTMFState> state;
for (auto& dtmfState : mDTMFStates) {
if (dtmfState.mTransceiver.get() == &transceiver) {
state = &dtmfState;
if (dtmfState->mTransceiver.get() == &transceiver) {
state = dtmfState;
break;
}
}
// No state yet, create a new one
if (!state) {
state = mDTMFStates.AppendElement();
state = *mDTMFStates.AppendElement(new DTMFState);
state->mPCObserver = mPCObserver;
state->mTransceiver = &transceiver;
state->mSendTimer = NS_NewTimer();
@ -2460,9 +2460,7 @@ PeerConnectionImpl::InsertDTMF(TransceiverImpl& transceiver,
state->mDuration = duration;
state->mInterToneGap = interToneGap;
if (!state->mTones.IsEmpty()) {
state->mSendTimer->InitWithNamedFuncCallback(DTMFSendTimerCallback_m, state, 0,
nsITimer::TYPE_ONE_SHOT,
"DTMFSendTimerCallback_m");
state->mSendTimer->InitWithCallback(state, 0, nsITimer::TYPE_ONE_SHOT);
}
return NS_OK;
}
@ -2485,8 +2483,8 @@ PeerConnectionImpl::GetDTMFToneBuffer(mozilla::dom::RTCRtpSender& sender,
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
// Attempt to locate state for the DTMFSender
for (auto& dtmfState : mDTMFStates) {
if (dtmfState.mTransceiver->HasSendTrack(mst)) {
outToneBuffer = dtmfState.mTones;
if (dtmfState->mTransceiver->HasSendTrack(mst)) {
outToneBuffer = dtmfState->mTones;
break;
}
}
@ -2514,8 +2512,8 @@ PeerConnectionImpl::ReplaceTrackNoRenegotiation(TransceiverImpl& aTransceiver,
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
for (size_t i = 0; i < mDTMFStates.Length(); ++i) {
if (mDTMFStates[i].mTransceiver.get() == &aTransceiver) {
mDTMFStates[i].mSendTimer->Cancel();
if (mDTMFStates[i]->mTransceiver.get() == &aTransceiver) {
mDTMFStates[i]->mSendTimer->Cancel();
mDTMFStates.RemoveElementAt(i);
break;
}
@ -2804,7 +2802,7 @@ PeerConnectionImpl::CloseInt()
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
for (auto& dtmfState : mDTMFStates) {
dtmfState.mSendTimer->Cancel();
dtmfState->mSendTimer->Cancel();
}
// We do this at the end of the call because we want to make sure we've waited
@ -3798,55 +3796,53 @@ PeerConnectionImpl::startCallTelem() {
Telemetry::Accumulate(Telemetry::WEBRTC_CALL_COUNT_2, 1);
}
void
PeerConnectionImpl::DTMFSendTimerCallback_m(nsITimer* timer, void* closure)
nsresult
PeerConnectionImpl::DTMFState::Notify(nsITimer* timer)
{
MOZ_ASSERT(NS_IsMainThread());
auto state = static_cast<DTMFState*>(closure);
nsString eventTone;
if (!state->mTones.IsEmpty()) {
uint16_t toneChar = state->mTones.CharAt(0);
if (!mTones.IsEmpty()) {
uint16_t toneChar = mTones.CharAt(0);
int tone = GetDTMFToneCode(toneChar);
eventTone.Assign(toneChar);
state->mTones.Cut(0, 1);
mTones.Cut(0, 1);
if (tone == -1) {
state->mSendTimer->InitWithNamedFuncCallback(DTMFSendTimerCallback_m, state,
2000, nsITimer::TYPE_ONE_SHOT,
"DTMFSendTimerCallback_m");
mSendTimer->InitWithCallback(this, 2000, nsITimer::TYPE_ONE_SHOT);
} else {
// Reset delay if necessary
state->mSendTimer->InitWithNamedFuncCallback(DTMFSendTimerCallback_m, state,
state->mDuration + state->mInterToneGap,
nsITimer::TYPE_ONE_SHOT,
"DTMFSendTimerCallback_m");
mSendTimer->InitWithCallback(this,
mDuration + mInterToneGap,
nsITimer::TYPE_ONE_SHOT);
state->mTransceiver->InsertDTMFTone(tone, state->mDuration);
mTransceiver->InsertDTMFTone(tone, mDuration);
}
} else {
state->mSendTimer->Cancel();
mSendTimer->Cancel();
}
RefPtr<PeerConnectionObserver> pco = do_QueryObjectReferent(state->mPCObserver);
RefPtr<PeerConnectionObserver> pco = do_QueryObjectReferent(mPCObserver);
if (!pco) {
NS_WARNING("Failed to dispatch the RTCDTMFToneChange event!");
return;
return NS_OK; // Return is ignored anyhow
}
JSErrorResult jrv;
pco->OnDTMFToneChange(*state->mTransceiver->GetSendTrack(), eventTone, jrv);
pco->OnDTMFToneChange(*mTransceiver->GetSendTrack(), eventTone, jrv);
if (jrv.Failed()) {
NS_WARNING("Failed to dispatch the RTCDTMFToneChange event!");
return;
}
return NS_OK;
}
PeerConnectionImpl::DTMFState::DTMFState() = default;
PeerConnectionImpl::DTMFState::~DTMFState() = default;
NS_IMPL_ISUPPORTS(PeerConnectionImpl::DTMFState, nsITimerCallback)
} // end mozilla namespace

Просмотреть файл

@ -827,22 +827,24 @@ private:
uint16_t mMaxSending[SdpMediaSection::kMediaTypes];
// DTMF
struct DTMFState {
DTMFState();
~DTMFState();
nsWeakPtr mPCObserver;
RefPtr<TransceiverImpl> mTransceiver;
nsCOMPtr<nsITimer> mSendTimer;
nsString mTones;
uint32_t mDuration;
uint32_t mInterToneGap;
class DTMFState : public nsITimerCallback {
virtual ~DTMFState();
public:
DTMFState();
NS_DECL_NSITIMERCALLBACK
NS_DECL_THREADSAFE_ISUPPORTS
nsWeakPtr mPCObserver;
RefPtr<TransceiverImpl> mTransceiver;
nsCOMPtr<nsITimer> mSendTimer;
nsString mTones;
uint32_t mDuration;
uint32_t mInterToneGap;
};
static void
DTMFSendTimerCallback_m(nsITimer* timer, void*);
// TODO(bug 1401983): Move DTMF stuff to TransceiverImpl
nsTArray<DTMFState> mDTMFStates;
nsTArray<RefPtr<DTMFState>> mDTMFStates;
std::vector<unsigned> mSendPacketDumpFlags;
std::vector<unsigned> mRecvPacketDumpFlags;

Просмотреть файл

@ -30,7 +30,6 @@
#include "mtransport/transportflow.h"
#include "mtransport/transportlayer.h"
#include "mtransport/transportlayerdtls.h"
#include "mtransport/transportlayerprsock.h"
#endif
#ifndef DATACHANNEL_LOG

Просмотреть файл

@ -22,7 +22,7 @@
#define WEBRTC_DATACHANNEL_PORT_DEFAULT 5000
// TODO: Bug 1381146, change once we resolve the nsCString limitation
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_LOCAL 1073741823
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_REMOTE_DEFAULT 65535
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_REMOTE_DEFAULT 65536
// TODO: Bug 1382779, once resolved, can be increased to min(Uint8ArrayMaxSize, UINT32_MAX)
// TODO: Bug 1381146, once resolved, can be increased to whatever we support then (hopefully
// SIZE_MAX) or be removed

Просмотреть файл

@ -1159,4 +1159,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522004117350000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522175596241000);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -8,11 +8,12 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1524423305162000);
const PRTime gPreloadListExpirationTime = INT64_C(1524594783507000);
%%
0-1.party, 1
0.me.uk, 1
0005pay.com, 1
0010100.net, 1
00220022.net, 1
007-preisvergleich.de, 1
00881919.com, 1
@ -1224,6 +1225,7 @@ alecpapierniak.com, 1
alecrust.com, 1
aleksejjocic.tk, 1
aleksib.fi, 1
alela.fr, 1
aleph.land, 1
alertaenlinea.gov, 1
alertboxx.com, 1
@ -1675,7 +1677,6 @@ andybrett.com, 1
andycrockett.io, 1
andymoore.info, 1
andyt.eu, 1
andyuk.org, 1
andzia.art.pl, 1
anecuni-club.com, 1
anecuni-rec.com, 1
@ -1694,7 +1695,6 @@ angelinahair.com, 1
angeloventuri.com, 1
anginf.de, 1
anglertanke.de, 1
anglesya.win, 1
anglictina-sojcak.cz, 1
anglictinasojcak.cz, 1
anglingactive.co.uk, 1
@ -2466,7 +2466,6 @@ augustiner-kantorei-erfurt.de, 1
augustiner-kantorei.de, 1
aukaraoke.su, 1
aulaschrank.gq, 1
aulo.in, 0
aunali1.com, 1
auntie-eileens.com.au, 1
auplidespages.fr, 1
@ -2664,7 +2663,6 @@ azun.pl, 1
azuxul.fr, 1
azzag.co.uk, 1
azzorti.com, 1
b-b-law.com, 1
b-boom.nl, 1
b-cyclesshop.ch, 1
b-entropy.com, 1
@ -3783,7 +3781,6 @@ blockmetry.com, 1
blockstream.com, 1
blockxit.de, 1
bloemendal.me, 1
blog-grupom2.es, 1
blog.gov.uk, 1
blog.gparent.org, 1
blog.linode.com, 0
@ -4317,7 +4314,6 @@ brentacampbell.com, 1
brentnewbury.com, 1
bressier.fr, 1
bretcarmichael.com, 1
brettabel.com, 1
brettcornwall.com, 1
brettelliff.com, 1
bretz-hufer.de, 1
@ -4460,7 +4456,6 @@ btcarmory.com, 1
btcgo.nl, 1
btcontract.com, 1
btcpop.co, 1
btcpot.ltd, 1
btcycle.org, 1
btio.pw, 1
btku.org, 1
@ -4631,7 +4626,6 @@ buypapercheap.net, 1
buyseo.store, 1
buyshoe.org, 1
buytheway.co.za, 1
buzz.tools, 1
buzzconf.io, 1
buzzdeck.com, 1
buzzprint.it, 1
@ -4885,6 +4879,7 @@ capacent.is, 1
capachitos.cl, 1
capacitacionyautoempleo.com, 1
capekeen.com, 1
capellidipremoli.com, 1
caphane.com, 1
capimlimaoflores.com.br, 1
capitainebaggy.ch, 1
@ -6937,6 +6932,7 @@ cy.technology, 1
cybbh.space, 1
cyber-computer.club, 1
cyber-perikarp.eu, 1
cyber.cafe, 1
cybercloud.cc, 1
cyberdos.de, 1
cyberduck.io, 1
@ -7192,6 +7188,7 @@ darkdestiny.ch, 1
darkengine.io, 1
darkengine.net, 1
darkeststar.org, 1
darkfire.ch, 1
darkishgreen.com, 1
darknode.in, 1
darkserver.fedoraproject.org, 1
@ -7205,6 +7202,7 @@ darkx.me, 1
darlo.co.uk, 0
darom.jp, 1
darookee.net, 1
daropia.org, 1
darrenm.net, 1
darrienworth.com, 1
darshnam.com, 1
@ -7338,7 +7336,7 @@ dawson-floridavilla.co.uk, 1
day-peak.com, 1
day.vip, 1
daylightpirates.org, 1
dayman.net, 0
dayman.net, 1
days.one, 1
daysoftheyear.com, 1
db-sanity.com, 1
@ -7850,6 +7848,7 @@ dicionarioetimologico.com.br, 1
dick.red, 1
dickieslife.com, 1
dickpics.ru, 1
dicoding.com, 1
didacte.com, 1
didche.net, 1
diddens.de, 1
@ -7869,7 +7868,7 @@ diegelernten.de, 1
diegerbers.de, 1
diegogelin.com, 1
diegorbaquero.com, 1
diejanssens.net, 1
diehl.io, 1
diemattels.at, 1
diemogebhardt.com, 1
dienchaninstitute.com, 1
@ -7970,10 +7969,8 @@ dime.io, 1
dimeponline.com.br, 1
dimes.com.tr, 1
dimez.ru, 1
dimitrisotiropoulosbooks.com, 1
dimonb.com, 1
din-hkd.jp, 1
din-tools.com, 1
dineachook.com.au, 1
dinepont.fr, 1
dinge.xyz, 1
@ -8026,7 +8023,7 @@ disconformity.net, 1
discord-chan.net, 1
discordapp.com, 1
discordghost.space, 1
discotek.club, 0
discotek.club, 1
discount24.de, 1
discountmania.eu, 1
discountmetaux.fr, 1
@ -8410,7 +8407,7 @@ drabben.be, 1
drabbin.com, 1
drabim.org, 1
dracisvet.cz, 1
dracon.es, 0
dracon.es, 1
dracox.com, 1
draftguru.com.au, 1
drafton.com, 1
@ -8650,6 +8647,7 @@ dustygroove.com, 1
dustyspokesbnb.ca, 1
dutch.desi, 1
dutch1.nl, 1
dutchessuganda.com, 1
dutchrank.nl, 1
dutchwanderers.nl, 1
dutchweballiance.nl, 1
@ -9461,7 +9459,7 @@ epiteugma.com, 1
epizentrum.work, 1
epizentrum.works, 1
epmcentroitalia.it, 1
epoch.com, 1
epoch.com, 0
epolitiker.com, 1
epos-distributor.co.uk, 1
eposbirmingham.co.uk, 1
@ -9630,6 +9628,7 @@ esolcourses.com, 1
esono.de, 1
esoterik.link, 1
esoterikerforum.de, 1
esp-berlin.de, 1
esp.community, 1
espace-caen.fr, 1
espace-gestion.fr, 1
@ -10112,7 +10111,6 @@ fallenangeldrinks.eu, 1
fallenangelspirits.co.uk, 1
fallenangelspirits.com, 1
fallenspirits.co.uk, 1
fallofthecitadel.com, 1
falsum.net, 1
fam-kreibich.de, 1
fam-stemmer.de, 1
@ -10269,7 +10267,6 @@ feastr.io, 1
featherweightlabs.com, 1
featuredmen.com, 1
fecik.sk, 1
fed51.com, 1
federalinvestments.gov, 1
federaljobs.gov, 1
federalreserve.gov, 1
@ -11152,6 +11149,7 @@ fruchthof24.de, 1
fruchtikus.net, 1
frugalfamilyhome.com, 1
frugalmechanic.com, 1
frugro.be, 0
fruition.co.jp, 1
frusky.de, 1
frusky.net, 1
@ -11319,7 +11317,6 @@ fxpig-ib.com, 1
fxtalk.cn, 1
fxthai.com, 1
fxtrade-lab.com, 1
fyfywka.com, 0
fyn.nl, 1
fyol.pw, 1
fysesbjerg.dk, 1
@ -11535,6 +11532,8 @@ gdoce.es, 0
gdutnic.com, 1
gdv.me, 1
gdz-otvety.com, 1
gdz-spishy.com, 1
gdz.tv, 1
ge1.me, 0
ge3k.net, 0
gear-acquisition-syndrome.community, 1
@ -11712,7 +11711,6 @@ get4x.com, 1
geta.pub, 1
getbox.me, 1
getbutterfly.com, 1
getcleartouch.com, 1
getcloak.com, 0
getcolq.com, 1
getdash.io, 1
@ -12153,6 +12151,7 @@ gplintegratedit.com, 1
gprs.uk.com, 1
gps.com.br, 1
gpsarena.ro, 1
gpsfix.cz, 1
gpsolarpanels.com, 1
gpsvideocanada.com, 1
gpws.ovh, 1
@ -12346,7 +12345,7 @@ group4layers.net, 1
groupe-neurologique-nord.lu, 1
groupebaillargeon.com, 1
groupghistelinck-cars.be, 1
grouphomes.com.au, 1
grouphomes.com.au, 0
groupme.com, 1
groups.google.com, 1
growingmetrics.com, 1
@ -12829,6 +12828,7 @@ hdc.cz, 1
hdcenter.cc, 1
hdeaves.uk, 1
hdf.world, 1
hdfgroup.org, 1
hdguru.com, 1
hdhoang.space, 1
hdm.io, 1
@ -12972,6 +12972,7 @@ helppresta.com, 1
helpstarloja.com.br, 1
helsingfors.guide, 1
helsinki.dating, 1
helup.com, 1
helvella.de, 1
hematoonkologia.pl, 1
hemdal.se, 1
@ -13622,7 +13623,6 @@ humblebee.us, 1
humblebeeshop.ca, 1
humblebeeshop.com.au, 1
hummy.tv, 1
hump.dk, 1
humpen.se, 1
hund.io, 1
hundeformel.de, 1
@ -14411,7 +14411,6 @@ internetpro.me, 1
internetradiocharts.de, 1
internetstaff.com, 1
internetzentrale.net, 1
internshipandwork.com, 1
internshipandwork.ru, 1
interociter-enterprises.com, 1
interracial.dating, 1
@ -14725,7 +14724,6 @@ iteke.tk, 1
iteli.eu, 1
iterader.com, 1
iterror.co, 1
itfaq.nl, 1
itfensi.net, 1
itfh.eu, 1
itfix.cz, 1
@ -14796,6 +14794,7 @@ ivi.net.br, 1
ivi.pt, 1
ivinet.cl, 1
ivitalia.it, 1
ivo.co.za, 1
ivor.io, 1
ivor.is, 1
ivorvanhese.com, 1
@ -15445,7 +15444,6 @@ jovani.com, 0
joviam.com, 1
jovic.hamburg, 1
joworld.net, 1
joyceclerkx.com, 1
joyful.house, 1
joyfulexpressions.gallery, 1
joyofcookingandbaking.com, 1
@ -15521,6 +15519,7 @@ juhakoho.com, 1
juice.codes, 1
juiced.gs, 1
juku-info.top, 1
juku-wing.jp, 1
julegoerke.de, 1
julenlanda.com, 1
julian-weigle.de, 1
@ -15529,7 +15528,6 @@ julianickel.de, 1
julianmeyer.de, 1
juliansimioni.com, 1
julianskitchen.ch, 1
julianvmodesto.com, 1
julianwallmeroth.de, 1
julianweigle.de, 1
julianxhokaxhiu.com, 1
@ -15627,7 +15625,7 @@ juzgalo.com, 1
jva-wuerzburg.de, 1
jvanerp.nl, 1
jvbouncycastlehire.co.uk, 1
jvn.com, 1
jvn.com, 0
jvphotoboothhire.co.uk, 1
jvwdev.nl, 1
jwatt.org, 1
@ -16029,6 +16027,7 @@ kf7joz.com, 1
kfv-kiel.de, 1
kfz-hantschel.de, 1
kgb.us, 1
kgm-irm.be, 0
kgnk.ru, 1
khanovaskola.cz, 1
khas.co.uk, 1
@ -16090,6 +16089,7 @@ kilerd.me, 1
kilianvalkhof.com, 1
kill-paff.com, 1
killaraapartments.com.au, 1
killerit.in, 1
killerrobots.com, 1
killymoonbouncycastles.com, 1
kilobyte22.de, 1
@ -16453,7 +16453,7 @@ koyaanis.com, 1
kozmik.co, 1
kozuch.biz, 1
kpebetka.net, 1
kpfanworld.com, 0
kpfanworld.com, 1
kpinvest.eu, 1
kplasticsurgery.com, 1
kplnet.net, 1
@ -16608,7 +16608,6 @@ kurofuku.me, 1
kuroisalva.xyz, 0
kurona.ga, 1
kuronekogaro.com, 1
kurrietv.nl, 1
kurschies.de, 1
kursprogramisty.pl, 1
kurswahl-online.de, 1
@ -17596,7 +17595,6 @@ lmcm.io, 1
lmddgtfy.net, 1
lmerza.com, 1
lmintlcx.com, 1
lmkts.com, 1
lmmtfy.io, 1
lmsptfy.com, 1
lmtm.eu, 1
@ -17631,7 +17629,7 @@ locapos.com, 1
locatorplus.gov, 1
locauxrama.fr, 1
locchat.com, 1
locker.email, 0
locker.email, 1
locker3.com, 1
lockify.com, 1
lockpick.nl, 1
@ -18189,6 +18187,7 @@ mail4you.in, 1
mailbox.mg, 1
mailbox.org, 1
mailer-dot.de, 1
mailfence.com, 1
mailflank.com, 1
mailinabox.email, 1
mailjet.tech, 1
@ -18322,7 +18321,6 @@ manneguiden.no, 1
mannford.com, 1
mannheimbloggt.tk, 1
manns-solutions.co.uk, 1
manns-solutions.com, 1
manns-solutions.ru, 1
mannschafft.ch, 1
mannsolutions.co.uk, 1
@ -18842,7 +18840,6 @@ mediatorzy.waw.pl, 1
mediawiki.org, 1
mediawin.pl, 1
medic-world.com, 1
medicalcountermeasures.gov, 1
medicinesfast.com, 0
medicinia.com.br, 1
medicinskavranje.edu.rs, 1
@ -19769,7 +19766,7 @@ motorring.ru, 1
motorsplus.com, 1
motoryachtclub-radolfzell.de, 1
motosikletevi.com, 1
motostorie.blog, 1
motostorie.blog, 0
motransportinfo.com, 1
mottomortgage.com, 1
moube.fr, 1
@ -19808,8 +19805,6 @@ moy.cat, 1
moyer.pub, 1
moylen.eu, 1
moyoo.net, 1
mozart-game.cz, 0
mozartgame.cz, 0
mozilla.cz, 1
mozillians.org, 1
mozzez.de, 1
@ -19830,7 +19825,7 @@ mplusm.eu, 1
mpn.poker, 1
mpnpokertour.com, 1
mpodraza.pl, 1
mpreserver.com, 1
mpreserver.com, 0
mpserver12.org, 1
mpsgarage.com.au, 1
mpsoundcraft.com, 1
@ -20362,7 +20357,6 @@ nakanishi-paint.com, 1
nakedalarmclock.me, 1
nakedfacts.co.uk, 0
nakedtruthbeauty.com, 1
nakhonidc.com, 1
nakliyatsirketi.biz.tr, 1
nako.no, 1
nalao-company.com, 1
@ -20442,6 +20436,7 @@ natenom.de, 1
natenom.name, 1
nathaliebaron.ch, 1
nathaliebaroncoaching.ch, 1
nathan.io, 1
nathankonopinski.com, 1
nathansmetana.com, 1
nathumarket.com.br, 1
@ -20672,7 +20667,6 @@ nerdtime.de, 1
nerdydev.net, 1
nerfroute.com, 1
nerot.eu, 1
nerpa-club.ru, 1
nerull7.info, 1
nerven.se, 0
nesantuoka.lt, 1
@ -21127,6 +21121,7 @@ noop.ch, 1
noordsee.de, 1
noorsolidarity.com, 1
nootropic.com, 1
nootropicsource.com, 1
noovell.com, 1
nopaste.xyz, 1
nopaynocure.com, 1
@ -21592,7 +21587,6 @@ olliespage.uk, 1
ollning.com, 1
olmari.fi, 1
olmsted.io, 1
ols.io, 1
olygazoo.com, 1
olymp-arts.world, 1
olympe-transport.fr, 1
@ -21664,6 +21658,7 @@ onestopcastles.co.uk, 1
onetech.it, 1
onetime.info, 1
oneway.ga, 1
onewaymail.com, 1
oneweb.hu, 1
onewebdev.info, 1
onfarma.it, 1
@ -22628,7 +22623,6 @@ peterfolta.net, 1
peterhuetz.at, 1
peterhuetz.com, 1
peterjohnson.io, 1
peterlew.is, 1
peternagy.ie, 1
petersontoscano.com, 1
pethelpers.org, 1
@ -23476,7 +23470,6 @@ primotilesandbathrooms.co.uk, 1
prinbanat.ngo, 1
princeagency.com, 1
princeofwhales.com, 1
princesparktouch.com, 1
princessbackpack.de, 1
princessmargaretlotto.com, 1
principalstest.com, 1
@ -23640,6 +23633,7 @@ promoterms.com.au, 1
promotiongeeks.com, 0
pronto-intervento.net, 1
proobec.cz, 1
proofwiki.org, 1
proos.nl, 1
proovn.com, 1
propagandablog.de, 1
@ -23757,6 +23751,7 @@ psychedelics.org, 1
psychiatrie-betreuung.ch, 1
psychic-healer-mariya-i-petrova-boyankinska-b-borovan-bg.com, 1
psychintervention.com, 1
psycho-lobby.com, 1
psycho.space, 1
psychoactive.com, 1
psychoco.net, 1
@ -23951,7 +23946,6 @@ qrforex.com, 1
qrlfinancial.com, 1
qrpth.eu, 1
qscloud.de, 1
qswoo.org, 1
qtl.me, 1
qto.com, 1
qto.net, 1
@ -24277,7 +24271,6 @@ readityourself.net, 1
readonly.de, 1
readouble.com, 0
readtldr.com, 1
readydok.com, 1
readysell.net, 1
readytongue.com, 1
readytowear.es, 1
@ -24339,6 +24332,7 @@ rechat.com, 1
rechenknaecht.de, 1
rechenwerk.net, 1
recht-freundlich.de, 1
rechtenliteratuurleiden.nl, 1
rechtsanwaeltin-vollmer.de, 1
rechtsanwalt-koeppen-feucht.de, 1
rechtschreibpruefung24.de, 1
@ -24688,7 +24682,6 @@ rezultant.ru, 1
rezun.cloud, 1
rf.tn, 1
rfeif.org, 1
rgavmf.ru, 1
rgbinnovation.com, 1
rgcomportement.fr, 1
rgservers.com, 1
@ -24785,7 +24778,6 @@ rio-weimar.de, 1
rioshop.com.br, 1
rip-sport.cz, 1
ripmixmake.org, 1
ripple.com, 1
ris.fi, 1
risada.nl, 1
risaphuketproperty.com, 1
@ -25305,7 +25297,6 @@ sabahattin-gucukoglu.com, 1
sabatek.pl, 1
sabine-forschbach.de, 1
sabineforschbach.de, 1
sabrinajoiasprontaentrega.com.br, 1
sacaentradas.com, 1
saccani.net, 1
sackers.com, 1
@ -25518,7 +25509,6 @@ saorsat.ie, 1
saorview.com, 1
saorviewconnect.ie, 1
saorviewconnected.ie, 1
saotn.org, 1
sapac.es, 1
sapereaude.com.pl, 1
sapien-ci.com, 1
@ -26182,7 +26172,6 @@ serverlog.net, 1
serveroffline.net, 0
serverpedia.de, 1
servers4all.co.uk, 1
serversftw.com, 1
serverstuff.info, 1
serversuit.com, 1
servertastic.com, 1
@ -26702,7 +26691,6 @@ simpte.com, 1
simpul.nl, 1
sims4hub.ga, 1
simsnieuws.nl, 1
simtin-net.de, 1
simukti.net, 1
simumiehet.com, 1
simus.fr, 1
@ -27078,6 +27066,7 @@ snelbv.nl, 1
snelshops.nl, 1
snelwebshop.nl, 1
snelxboxlivegold.nl, 1
snerith.com, 1
snfdata.com, 0
sniderman.eu.org, 1
sniderman.pro, 1
@ -27087,7 +27076,7 @@ sniep.net, 1
snight.co, 1
snille.com, 1
snip.run, 1
snl.no, 0
snl.no, 1
snod.land, 1
snote.io, 1
snoupon.com, 1
@ -27197,7 +27186,6 @@ solar-ec.com, 1
solariiknight.org, 1
solariilacheie.ro, 1
solarplan-berlin.de, 1
soldbygold.net, 1
soldecom.com, 1
soldout-app.com, 1
sole-erdwaermetauscher.de, 1
@ -27721,7 +27709,6 @@ stayme.cz, 1
stb-schefczyk.de, 1
stb-strzyzewski.de, 1
stbennett.org, 1
stcable.net, 1
stcu.org, 1
std-home-test.com, 1
stderr.cc, 0
@ -27889,6 +27876,7 @@ stonewuu.com, 1
stony.com, 1
stonystratford.org, 1
stopakwardhandshakes.org, 1
stopbreakupnow.org, 1
stopbullying.gov, 1
stopfraud.gov, 1
stopthethyroidmadness.com, 1
@ -27924,6 +27912,7 @@ strauser.com, 1
stravers.shoes, 1
stream-ing.xyz, 1
streamchan.org, 1
streamdesk.ca, 1
streamer.tips, 1
streamingeverywhere.com, 1
streamlineautogroup.com, 1
@ -28456,6 +28445,7 @@ takkaaaaa.com, 1
takusan.ru, 1
takuto.de, 1
takuyaphotos.com, 1
talado.gr, 0
talentcast.nl, 0
talenthero.io, 1
talentos.pt, 1
@ -28778,6 +28768,7 @@ tempus-aquilae.de, 1
tenable.com.au, 1
tenberg.com, 1
tenbos.ch, 1
tendermaster.com.ua, 1
tenderstem.co.uk, 1
tendomag.com, 1
tendoryu-aikido.org, 1
@ -29320,7 +29311,6 @@ tianshili.me, 1
tianxicaipiao.com, 1
tianxicaipiao.win, 1
tianxicp.com, 1
tibbitshall.ca, 1
tibipg.com, 1
tibovanheule.site, 1
ticfleet.com, 1
@ -30393,6 +30383,7 @@ uli-eckhardt.de, 1
ullah.se, 1
ulmer-schneesport.de, 0
ulrik.moe, 1
ultieme.be, 0
ultima-ratio.at, 1
ultimateanu.com, 1
ultimatemafia.net, 1
@ -30470,6 +30461,7 @@ unicreditbank.rs, 1
unicreditbank.ru, 0
unieducar.org.br, 1
uniekglas.nl, 1
uniform-agri.com, 1
uniformebateriasheliar.com.br, 1
uniformehope.com.br, 1
uniformespousoalegre.com.br, 1
@ -30592,6 +30584,7 @@ urbanietz-immobilien.de, 1
urbanmelbourne.info, 1
urbannewsservice.com, 1
urbansparrow.in, 1
urbanstylestaging.com, 1
urbanwildlifealliance.org, 1
urbexdk.nl, 1
urcentral.com, 1
@ -31044,6 +31037,7 @@ vietnamhost.vn, 0
vietnamwomenveterans.org, 1
vieux.pro, 1
viewbook.com, 1
viewmyrecords.com, 1
viga.me, 1
vigenebio.com, 1
vigilantnow.com, 1
@ -31211,10 +31205,12 @@ vlogge.com, 1
vlovgr.se, 1
vlsk.eu, 1
vlsm.se, 1
vlvvl.com, 1
vm-0.com, 1
vm-co.ch, 1
vmc.co.id, 1
vmem.jp, 0
vmgirls.com, 1
vmhydro.ru, 1
vmis.nl, 1
vmoagents.com, 0
@ -31235,7 +31231,6 @@ voeux.io, 0
vogler.name, 1
vogt.tech, 1
voice-of-design.com, 1
voicesuk.co.uk, 1
voicu.ch, 1
void-it.nl, 1
void-zero.com, 1
@ -31254,6 +31249,7 @@ volcain.io, 1
volcanconcretos.com, 1
volga.us, 1
volgavibes.ru, 1
voliere-info.nl, 0
volker-gropp.de, 1
volkergropp.de, 1
volkerwesselstransfer.nl, 1
@ -31476,7 +31472,6 @@ warr.ath.cx, 1
warringtonkidsbouncycastles.co.uk, 1
warschild.org, 1
wartorngalaxy.com, 1
warumsuchen.at, 1
wasatchconstables.com, 1
waschpark-hantschel.de, 1
wasema.com, 1
@ -32390,6 +32385,7 @@ wtfismyip.com, 1
wth.in, 1
wtpmj.com, 1
wtw.io, 1
wubify.com, 1
wuchipc.com, 1
wuerfel.wf, 1
wuerfelmail.de, 1
@ -32629,6 +32625,7 @@ xmenrevolution.com, 1
xmerak.com, 1
xmiui.com, 1
xmlbeam.org, 1
xmonk.org, 0
xmpp.dk, 1
xmppwocky.net, 1
xmr.to, 1
@ -32763,7 +32760,6 @@ xo.tc, 1
xolphin.nl, 1
xombitgames.com, 1
xombitmusic.com, 1
xombra.com, 1
xonn.de, 1
xotika.tv, 1
xp2.de, 1
@ -33048,7 +33044,6 @@ yourciso.com, 1
yourcopywriter.it, 1
yourdaddy.dk, 1
yourforex.org, 1
yourgame.co.il, 1
yourgames.tv, 1
yoursbookstore.jp, 1
yourself.today, 1

Просмотреть файл

@ -69,6 +69,10 @@ HistoryEngine.prototype = {
}
},
shouldSyncURL(url) {
return !url.startsWith("file:");
},
async pullNewChanges() {
let modifiedGUIDs = Object.keys(this._tracker.changedIDs);
if (!modifiedGUIDs.length) {
@ -174,6 +178,9 @@ HistoryStore.prototype = {
let urlsByGUID = {};
for (let url of urls) {
if (!this.engine.shouldSyncURL(url)) {
continue;
}
let guid = await this.GUIDForUri(url, true);
urlsByGUID[guid] = url;
}
@ -294,7 +301,8 @@ HistoryStore.prototype = {
}
record.guid = record.id;
if (!this._canAddURI(record.uri)) {
if (!this._canAddURI(record.uri) ||
!this.engine.shouldSyncURL(record.uri.spec)) {
this._log.trace("Ignoring record " + record.id + " with URI "
+ record.uri.spec + ": can't add this URI.");
return false;
@ -314,7 +322,11 @@ HistoryStore.prototype = {
let i, k;
for (i = 0; i < curVisitsAsArray.length; i++) {
curVisits.add(curVisitsAsArray[i].date + "," + curVisitsAsArray[i].type);
// Same logic as used in the loop below to generate visitKey.
let {date, type} = curVisitsAsArray[i];
let dateObj = PlacesUtils.toDate(date);
let millis = PlacesSyncUtils.history.clampVisitDate(dateObj).getTime();
curVisits.add(`${millis},${type}`);
}
// Walk through the visits, make sure we have sound data, and eliminate
@ -340,8 +352,7 @@ HistoryStore.prototype = {
let originalVisitDate = PlacesUtils.toDate(Math.round(visit.date));
visit.date = PlacesSyncUtils.history.clampVisitDate(originalVisitDate);
let visitDateAsPRTime = PlacesUtils.toPRTime(visit.date);
let visitKey = visitDateAsPRTime + "," + visit.type;
let visitKey = `${visit.date.getTime()},${visit.type}`;
if (curVisits.has(visitKey)) {
// Visit is a dupe, don't increment 'k' so the element will be
// overwritten.
@ -455,7 +466,7 @@ HistoryTracker.prototype = {
}
this._log.trace("onVisit: " + uri.spec);
if (this.addChangedID(guid)) {
if (this.engine.shouldSyncURL(uri.spec) && this.addChangedID(guid)) {
this.score += SCORE_INCREMENT_SMALL;
}
},

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше