Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
Merge inbound to mozilla-central. a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
raulgurzau committed Nov 6, 2018
2 parents ca0dc06 + baad3cc commit 8ea5d6d
Show file tree
Hide file tree
Showing 127 changed files with 1,363 additions and 692 deletions.
1 change: 1 addition & 0 deletions accessible/tests/browser/e10s/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ skip-if = e10s && os == 'win' && debug # Bug 1338034, leaks
[browser_treeupdate_ariadialog.js]
[browser_treeupdate_ariaowns.js]
[browser_treeupdate_canvas.js]
skip-if = (os == 'win' && os_version == '10.0' && bits == 64 && !debug) #Bug 1462638 - Disabled on Win10 opt/pgo for frequent failures
[browser_treeupdate_cssoverflow.js]
[browser_treeupdate_doc.js]
skip-if = e10s && os == 'win' # Bug 1288839
Expand Down
3 changes: 1 addition & 2 deletions browser/components/translation/TranslationContentHandler.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ TranslationContentHandler.prototype = {
return;

// Grab a 60k sample of text from the page.
let encoder = Cc["@mozilla.org/layout/documentEncoder;1?type=text/plain"]
.createInstance(Ci.nsIDocumentEncoder);
let encoder = Cu.createDocumentEncoder("text/plain");
encoder.init(content.document, "text/plain", encoder.SkipInvisibleContent);
let string = encoder.encodeToStringWithMaxLength(60 * 1024);

Expand Down
22 changes: 0 additions & 22 deletions chrome/nsChromeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,28 +605,6 @@ nsChromeRegistry::GetDirectionForLocale(const nsACString& aLocale)
return uloc_isRightToLeft(locale.get());
}

NS_IMETHODIMP_(bool)
nsChromeRegistry::WrappersEnabled(nsIURI *aURI)
{
nsCOMPtr<nsIURL> chromeURL (do_QueryInterface(aURI));
if (!chromeURL)
return false;

bool isChrome = false;
nsresult rv = chromeURL->SchemeIs("chrome", &isChrome);
if (NS_FAILED(rv) || !isChrome)
return false;

nsAutoCString package;
rv = chromeURL->GetHostPort(package);
if (NS_FAILED(rv))
return false;

uint32_t flags;
rv = GetFlagsFromPackage(package, &flags);
return NS_SUCCEEDED(rv) && (flags & XPCNATIVEWRAPPERS);
}

already_AddRefed<nsChromeRegistry>
nsChromeRegistry::GetSingleton()
{
Expand Down
2 changes: 0 additions & 2 deletions chrome/nsChromeRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ class nsChromeRegistry : public nsIToolkitChromeRegistry,
NS_IMETHOD MustLoadURLRemotely(nsIURI* url,
bool* _retval) override;

// nsIChromeRegistry methods:
NS_IMETHOD_(bool) WrappersEnabled(nsIURI *aURI) override;
NS_IMETHOD ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult) override;

// nsChromeRegistry methods:
Expand Down
5 changes: 0 additions & 5 deletions chrome/nsIChromeRegistry.idl
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ interface nsIChromeRegistry : nsISupports
* refresh the chrome list at runtime, looking for new packages/etc
*/
void checkForNewChrome();

/**
* returns whether XPCNativeWrappers are enabled for aURI.
*/
[notxpcom] boolean wrappersEnabled(in nsIURI aURI);
};

[scriptable, uuid(93251ddf-5e85-4172-ac2a-31780562974f)]
Expand Down
1 change: 1 addition & 0 deletions devtools/client/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ devtools.jar:
content/netmonitor/src/assets/styles/httpi.css (netmonitor/src/assets/styles/httpi.css)
content/netmonitor/src/assets/styles/netmonitor.css (netmonitor/src/assets/styles/netmonitor.css)
content/netmonitor/src/assets/styles/NetworkDetailsPanel.css (netmonitor/src/assets/styles/NetworkDetailsPanel.css)
content/netmonitor/src/assets/styles/CustomRequestPanel.css (netmonitor/src/assets/styles/CustomRequestPanel.css)
content/netmonitor/src/assets/styles/RequestList.css (netmonitor/src/assets/styles/RequestList.css)
content/netmonitor/src/assets/styles/StatisticsPanel.css (netmonitor/src/assets/styles/StatisticsPanel.css)
content/netmonitor/src/assets/styles/StatusBar.css (netmonitor/src/assets/styles/StatusBar.css)
Expand Down
14 changes: 11 additions & 3 deletions devtools/client/locales/en-US/netmonitor.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1057,17 +1057,25 @@ netmonitor.context.perfTools.accesskey=A
# as the title of the new custom request form
netmonitor.custom.newRequest=New Request

# LOCALIZATION NOTE (netmonitor.custom.newRequestMethodLabel): This is the label displayed
# above the method text input field of the new custom request form
netmonitor.custom.newRequestMethodLabel=Method

# LOCALIZATION NOTE (netmonitor.custom.newRequestUrlLabel): This is the label displayed
# above the url text input field of the new custom request form
netmonitor.custom.newRequestUrlLabel=URL

# LOCALIZATION NOTE (netmonitor.custom.query): This is the label displayed
# above the query string entry in the custom request form
netmonitor.custom.query=Query String:
netmonitor.custom.query=Query String

# LOCALIZATION NOTE (netmonitor.custom.headers): This is the label displayed
# above the request headers entry in the custom request form
netmonitor.custom.headers=Request Headers:
netmonitor.custom.headers=Request Headers

# LOCALIZATION NOTE (netmonitor.custom.postData): This is the label displayed
# above the request body entry in the custom request form
netmonitor.custom.postData=Request Body:
netmonitor.custom.postData=Request Body

# LOCALIZATION NOTE (netmonitor.custom.send): This is the label displayed
# on the button which sends the custom request
Expand Down
138 changes: 138 additions & 0 deletions devtools/client/netmonitor/src/assets/styles/CustomRequestPanel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
/* vim:set ts=2 sw=2 sts=2 et: */
/* 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/. */

.network-monitor .custom-method-and-url .custom-method-value-label {
grid-column: 1 / 1;
grid-row: 1 / 1;
}

.network-monitor .custom-method-and-url .custom-url-value{
grid-column: 2 / 2;
grid-row: 2 / 2;
}

.network-monitor .custom-method-and-url .custom-method-value {
grid-column: 1 / 1;
grid-row: 2 / 2;
}


.network-monitor .custom-method-and-url .custom-url-value-label {
grid-column: 2 / 2;
grid-row: 1 / 1 ;
margin-left: 12px;
}

.network-monitor .tabpanel-summary-container.custom-method-and-url {
display: grid;
grid-template-columns: auto 1fr;
}

.network-monitor .custom-method-and-url input {
font-weight: 400;
margin-top: 4px;
padding: 2px 3px;
}

.network-monitor .custom-request-panel textarea {
font-weight: 400;
margin-top: 4px;
padding: 8px;
}

.network-monitor .custom-method-and-url .custom-url-value {
margin-left: 12px;
}

.network-monitor .custom-request-panel {
padding-left: 0;
padding-right: 0;
}

.network-monitor .custom-request-panel > div:not(.custom-request) {
margin-bottom: 12px;
padding-left: 16px;
padding-right: 16px;
}

.network-monitor .custom-request {
flex-direction: row-reverse;
flex-wrap: wrap;
padding: 0;
}

.network-monitor .custom-request-panel .custom-request-label {
font-weight: 400;
}

.network-monitor .custom-request button {
align-self: flex-end;
height: 24px;
padding-left: 8px;
padding-right: 8px;
width: auto;
}

.network-monitor .custom-request #custom-request-send-button {
background-color: var(--blue-60);
color: white;
margin-left: 4px;
margin-right: 16px;
}

.network-monitor .custom-request .custom-header {
border-bottom-width: 1px;
border-style: solid;
border-width: 0;
flex: 1 0 100%;
height: 24px;
margin-bottom: 16px;
padding: 4px 16px;
}

:root.theme-dark .network-details-panel .custom-request-panel {
background-color: var(--grey-85);
}

:root.theme-dark .network-monitor #custom-request-close-button {
background-color: var(--toolbarbutton-background);
border: 1px solid var(--theme-splitter-color);
}

:root.theme-dark .network-monitor .custom-request-label.custom-header {
background-color: var(--grey-80);
border-bottom: 1px solid var(--theme-splitter-color);
}

:root.theme-dark .network-details-panel .custom-request-panel input,
:root.theme-dark .network-details-panel .custom-request-panel textarea {
background-color: var(--grey-70);
border: 1px solid var(--grey-85);
color: white;
}

:root.theme-dark .network-monitor .custom-request-label {
color: var(--grey-40);
}

:root.theme-light .network-details-panel .custom-request-label.custom-header {
background-color: var(--grey-10);
border-bottom: 1px solid var(--grey-25);
}

:root.theme-light .network-monitor #custom-request-close-button {
background-color: var(--grey-20);
}

:root.theme-light .network-details-panel .custom-request-panel input,
:root.theme-light .network-details-panel .custom-request-panel textarea {
background-color: white;
border: 1px solid var(--grey-25);
color: var(--grey-90);
}

:root.theme-light .network-monitor .custom-request-label {
color: var(--grey-60);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@import "chrome://devtools/content/netmonitor/src/assets/styles/RequestList.css";
@import "chrome://devtools/content/netmonitor/src/assets/styles/NetworkDetailsPanel.css";
@import "chrome://devtools/content/netmonitor/src/assets/styles/StatisticsPanel.css";
@import "chrome://devtools/content/netmonitor/src/assets/styles/CustomRequestPanel.css";
@import "chrome://devtools/content/netmonitor/src/assets/styles/StatusCode.css";

/* General */
Expand Down
32 changes: 29 additions & 3 deletions devtools/client/netmonitor/src/components/CustomRequestPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ const {
button,
div,
input,
label,
textarea,
} = dom;

const CUSTOM_CANCEL = L10N.getStr("netmonitor.custom.cancel");
const CUSTOM_HEADERS = L10N.getStr("netmonitor.custom.headers");
const CUSTOM_NEW_REQUEST = L10N.getStr("netmonitor.custom.newRequest");
const CUSTOM_NEW_REQUEST_METHOD_LABEL =
L10N.getStr("netmonitor.custom.newRequestMethodLabel");
const CUSTOM_NEW_REQUEST_URL_LABEL =
L10N.getStr("netmonitor.custom.newRequestUrlLabel");
const CUSTOM_POSTDATA = L10N.getStr("netmonitor.custom.postData");
const CUSTOM_QUERY = L10N.getStr("netmonitor.custom.query");
const CUSTOM_SEND = L10N.getStr("netmonitor.custom.send");
Expand Down Expand Up @@ -212,6 +217,12 @@ class CustomRequestPanel extends Component {
className: "tabpanel-summary-container custom-method-and-url",
id: "custom-method-and-url",
},
label({
className: "custom-method-value-label custom-request-label",
htmlFor: "custom-method-value",
},
CUSTOM_NEW_REQUEST_METHOD_LABEL,
),
input({
className: "custom-method-value",
id: "custom-method-value",
Expand All @@ -221,6 +232,12 @@ class CustomRequestPanel extends Component {
this.updateCustomRequestFields(evt, request, updateRequest),
value: method,
}),
label({
className: "custom-url-value-label custom-request-label",
htmlFor: "custom-url-value",
},
CUSTOM_NEW_REQUEST_URL_LABEL,
),
input({
className: "custom-url-value",
id: "custom-url-value",
Expand All @@ -234,7 +251,10 @@ class CustomRequestPanel extends Component {
className: "tabpanel-summary-container custom-section",
id: "custom-query",
},
div({ className: "custom-request-label" }, CUSTOM_QUERY),
label({
className: "custom-request-label",
htmlFor: "custom-query-value",
}, CUSTOM_QUERY),
textarea({
className: "tabpanel-summary-input",
id: "custom-query-value",
Expand All @@ -249,7 +269,10 @@ class CustomRequestPanel extends Component {
id: "custom-headers",
className: "tabpanel-summary-container custom-section",
},
div({ className: "custom-request-label" }, CUSTOM_HEADERS),
label({
className: "custom-request-label",
htmlFor: "custom-headers-value",
}, CUSTOM_HEADERS),
textarea({
className: "tabpanel-summary-input",
id: "custom-headers-value",
Expand All @@ -264,7 +287,10 @@ class CustomRequestPanel extends Component {
id: "custom-postdata",
className: "tabpanel-summary-container custom-section",
},
div({ className: "custom-request-label" }, CUSTOM_POSTDATA),
label({
className: "custom-request-label",
htmlFor: "custom-postdata-value",
}, CUSTOM_POSTDATA),
textarea({
className: "tabpanel-summary-input",
id: "custom-postdata-value",
Expand Down
7 changes: 1 addition & 6 deletions devtools/client/shared/components/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ class Frame extends Component {
frame = this.props.frame;
}

// If the resource was loaded by browser-loader.js, `frame.source` looks like:
// resource://devtools/shared/base-loader.js -> resource://devtools/path/to/file.js .
// What's needed is only the last part after " -> ".
const source = frame.source
? String(frame.source).split(" -> ").pop()
: "";
const source = frame.source || "";
const line = frame.line != void 0 ? Number(frame.line) : null;
const column = frame.column != void 0 ? Number(frame.column) : null;

Expand Down
2 changes: 1 addition & 1 deletion devtools/client/shared/components/StackTrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class StackTrace extends Component {
}), "\n");
}

const source = s.filename.split(" -> ").pop();
const source = s.filename;
frames.push("\t", Frame({
key: `${i}-frame`,
frame: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{
asyncCause: "because",
functionName: "loadFunc",
filename: "http://myfile.com/loader.js -> http://myfile.com/loadee.js",
filename: "http://myfile.com/loadee.js",
lineNumber: 10,
},
];
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/webconsole/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ skip-if = true # Bug 1404382
[browser_webconsole_network_attach.js]
[browser_webconsole_network_exceptions.js]
[browser_webconsole_network_messages_expand.js]
skip-if = (os == 'linux') || (os == 'win' && os_version == '10.0' && debug && bits == 64) # Bug 1429361, disabled on Linux/Win for frequent failures
skip-if = true # Bug 1438979
[browser_webconsole_network_messages_openinnet.js]
[browser_webconsole_network_messages_status_code.js]
[browser_webconsole_network_requests_from_chrome.js]
Expand Down
5 changes: 2 additions & 3 deletions dom/base/FragmentOrElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2188,16 +2188,15 @@ FragmentOrElement::GetMarkup(bool aIncludeSelf, nsAString& aMarkup)
nsCOMPtr<nsIDocumentEncoder> docEncoder = doc->GetCachedEncoder();
if (!docEncoder) {
docEncoder =
do_CreateInstance(PromiseFlatCString(
nsDependentCString(NS_DOC_ENCODER_CONTRACTID_BASE) +
do_createDocumentEncoder(PromiseFlatCString(
NS_ConvertUTF16toUTF8(contentType)
).get());
}
if (!docEncoder) {
// This could be some type for which we create a synthetic document. Try
// again as XML
contentType.AssignLiteral("application/xml");
docEncoder = do_CreateInstance(NS_DOC_ENCODER_CONTRACTID_BASE "application/xml");
docEncoder = do_createDocumentEncoder("application/xml");
// Don't try to cache the encoder since it would point to a different
// contentType once it has been reinitialized.
tryToCacheEncoder = false;
Expand Down
Loading

0 comments on commit 8ea5d6d

Please sign in to comment.