Skip to content

Commit

Permalink
Merge inbound to central, a=merge
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: EEMZdLCheAm
  • Loading branch information
KWierso committed Feb 22, 2017
2 parents aa292f2 + 7b865b5 commit 13e1ccc
Show file tree
Hide file tree
Showing 175 changed files with 1,916 additions and 950 deletions.
7 changes: 6 additions & 1 deletion accessible/ipc/DocAccessibleParent.cpp
Expand Up @@ -411,8 +411,13 @@ DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
// We do not use GetAccessible here because we want to be sure to not get the
// document it self.
ProxyEntry* e = mAccessibles.GetEntry(aParentID);
if (!e)
if (!e) {
#ifdef DEBUG
return IPC_FAIL(this, "binding to nonexistant proxy!");
#else
return IPC_OK();
#endif
}

ProxyAccessible* outerDoc = e->mProxy;
MOZ_ASSERT(outerDoc);
Expand Down
7 changes: 3 additions & 4 deletions browser/components/sessionstore/test/browser_crashedTabs.js
Expand Up @@ -13,7 +13,6 @@ const PAGE_2 = "data:text/html,<html><body>Another%20regular,%20everyday,%20norm
add_task(function* test_initialize() {
yield SpecialPowers.pushPrefEnv({
set: [
[ "dom.ipc.processCount", 1 ],
[ "browser.tabs.animate", false]
] });
});
Expand Down Expand Up @@ -241,7 +240,7 @@ add_task(function* test_revive_tab_from_session_store() {
browser.loadURI(PAGE_1);
yield promiseBrowserLoaded(browser);

let newTab2 = gBrowser.addTab();
let newTab2 = gBrowser.addTab("about:blank", { sameProcessAsFrameLoader: browser.frameLoader });
let browser2 = newTab2.linkedBrowser;
ok(browser2.isRemoteBrowser, "Should be a remote browser");
yield promiseBrowserLoaded(browser2);
Expand Down Expand Up @@ -298,7 +297,7 @@ add_task(function* test_revive_all_tabs_from_session_store() {
// a second window, since only selected tabs will show
// about:tabcrashed.
let win2 = yield BrowserTestUtils.openNewBrowserWindow();
let newTab2 = win2.gBrowser.addTab(PAGE_1);
let newTab2 = win2.gBrowser.addTab(PAGE_1, { sameProcessAsFrameLoader: browser.frameLoader });
win2.gBrowser.selectedTab = newTab2;
let browser2 = newTab2.linkedBrowser;
ok(browser2.isRemoteBrowser, "Should be a remote browser");
Expand Down Expand Up @@ -405,7 +404,7 @@ add_task(function* test_hide_restore_all_button() {
// Load up a second window so we can get another tab to show
// about:tabcrashed
let win2 = yield BrowserTestUtils.openNewBrowserWindow();
let newTab3 = win2.gBrowser.addTab(PAGE_2);
let newTab3 = win2.gBrowser.addTab(PAGE_2, { sameProcessAsFrameLoader: browser.frameLoader });
win2.gBrowser.selectedTab = newTab3;
let otherWinBrowser = newTab3.linkedBrowser;
yield promiseBrowserLoaded(otherWinBrowser);
Expand Down
1 change: 1 addition & 0 deletions browser/locales/jar.mn
Expand Up @@ -94,6 +94,7 @@
locale/browser/searchplugins/list.json (.deps/generated_@AB_CD@/list.json)
#endif
locale/browser/searchplugins/images/wikipedia.ico (searchplugins/images/wikipedia.ico)
locale/browser/searchplugins/images/yandex-en.ico (searchplugins/images/yandex-en.ico)
% locale browser-region @AB_CD@ %locale/browser-region/
locale/browser-region/region.properties (%chrome/browser-region/region.properties)
# the following files are browser-specific overrides
Expand Down
7 changes: 6 additions & 1 deletion browser/locales/search/list.json
Expand Up @@ -45,7 +45,7 @@
},
"experimental-hidden": {
"visibleDefaultEngines": [
"yahoo-en-CA"
"yahoo-en-CA", "yandex-en"
]
}
},
Expand Down Expand Up @@ -194,6 +194,11 @@
"visibleDefaultEngines": [
"google", "yahoo-en-GB", "bing", "amazon-en-GB", "chambers-en-GB", "ddg", "twitter", "wikipedia"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"yandex-en"
]
}
},
"en-ZA": {
Expand Down
Binary file not shown.
17 changes: 17 additions & 0 deletions browser/locales/searchplugins/yandex-en.xml
@@ -0,0 +1,17 @@
<!-- 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/. -->

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Yandex</ShortName>
<Description>Use Yandex to search the Internet.</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">resource://search-plugins/images/yandex-en.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://suggest.yandex.com/suggest-ff.cgi">
<Param name="part" value="{searchTerms}"/>
</Url>
<Url type="text/html" method="GET" template="https://www.yandex.com/search">
<Param name="text" value="{searchTerms}"/>
</Url>
<SearchForm>https://www.yandex.com/</SearchForm>
</SearchPlugin>
31 changes: 31 additions & 0 deletions build/moz.configure/toolchain.configure
Expand Up @@ -831,6 +831,7 @@ host_cxx_compiler = compiler('C++', host, c_compiler=host_c_compiler,
other_c_compiler=c_compiler)

# Generic compiler-based conditions.
building_with_msvc = depends(c_compiler)(lambda info: info.type == 'msvc')
non_msvc_compiler = depends(c_compiler)(lambda info: info.type != 'msvc')
building_with_gcc = depends(c_compiler)(lambda info: info.type == 'gcc')

Expand Down Expand Up @@ -967,6 +968,36 @@ set_define('HAVE_VISIBILITY_ATTRIBUTE',
set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
set_config('VISIBILITY_FLAGS', visibility_flags)

@depends(c_compiler, using_sccache)
def depend_cflags(c_compiler, using_sccache):
if c_compiler.type in ('gcc', 'clang'):
return '-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
elif c_compiler.type == 'msvc' and using_sccache:
# sccache supports a special flag to create depfiles
# by parsing MSVC's -showIncludes output.
return '-deps$(MDDEPDIR)/$(@F).pp'

set_config('_DEPEND_CFLAGS', depend_cflags)

@depends(c_compiler, when=building_with_msvc)
@imports(_from='re', _import='compile', _as='re_compile')
def msvc_showincludes_prefix(c_compiler):
pattern = re_compile(r'^([^:]*:.*[ :] )(.*\\stdio.h)$')
output = try_invoke_compiler([c_compiler.compiler], 'C', '#include <stdio.h>\n',
['-nologo', '-c', '-Fonul', '-showIncludes'])
for line in output.splitlines():
if line.endswith('\\stdio.h'):
m = pattern.match(line)
if m:
if not m.group(2):
die("Unable to parse cl -showIncludes prefix. " +
"This compiler's locale has an unsupported formatting.")
return m.group(1)
# We should have found the prefix and returned earlier
die('Cannot find cl -showIncludes prefix.')

set_config('CL_INCLUDES_PREFIX', msvc_showincludes_prefix)

@depends(target)
def is_windows(target):
return target.kernel == 'WINNT'
Expand Down
20 changes: 0 additions & 20 deletions build/mozconfig.cache
Expand Up @@ -113,31 +113,11 @@ else
exit 1
fi
mk_add_options "export SCCACHE_BUCKET=$bucket"
case "$master" in
*us[ew][12].mozilla.com*|*euc1.mozilla.com*)
mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
;;
esac
ac_add_options "--with-ccache=$topsrcdir/sccache2/sccache${suffix}"
export SCCACHE_VERBOSE_STATS=1
mk_add_options MOZ_PREFLIGHT_ALL+=build/sccache.mk
mk_add_options MOZ_POSTFLIGHT_ALL+=build/sccache.mk
mk_add_options "UPLOAD_EXTRA_FILES+=sccache.log.gz"
case "$platform" in
win*)
# sccache supports a special flag to create depfiles.
#TODO: bug 1318370 - move this all into toolchain.configure
export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
# Windows builds have a default wrapper that needs to be overridden
mk_add_options "export CC_WRAPPER="
mk_add_options "export CXX_WRAPPER="
# For now, sccache doesn't support separate PDBs so force debug info to be
# in object files.
mk_add_options "export COMPILE_PDB_FLAG="
mk_add_options "export HOST_PDB_FLAG="
mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"
;;
esac
fi

fi
6 changes: 2 additions & 4 deletions config/config.mk
Expand Up @@ -120,8 +120,10 @@ CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
AUTOCONF_TOOLS = $(MOZILLA_DIR)/build/autoconf

ifdef _MSC_VER
ifndef MOZ_USING_SCCACHE
CC_WRAPPER ?= $(call py_action,cl)
CXX_WRAPPER ?= $(call py_action,cl)
endif
endif # _MSC_VER

CC := $(CC_WRAPPER) $(CC)
Expand Down Expand Up @@ -623,7 +625,3 @@ endif
PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply

export CL_INCLUDES_PREFIX
# Make sure that the build system can handle non-ASCII characters
# in environment variables to prevent it from breking silently on
# non-English systems.
export NONASCII
12 changes: 12 additions & 0 deletions config/rules.mk
Expand Up @@ -156,6 +156,10 @@ ifndef GNU_CC
COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
ifdef MOZ_USING_SCCACHE
# We remove the PDB file before compilation so that sccache knows it's safe to cache.
RM_PDB_FILE = -$(RM) $(basename $(@F)).pdb
endif

LINK_PDBFILE ?= $(basename $(@F)).pdb
ifdef MOZ_DEBUG
Expand Down Expand Up @@ -850,23 +854,28 @@ $(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
# Rules for building native targets must come first because of the host_ prefix
$(HOST_COBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)

$(HOST_CPPOBJS):
$(REPORT_BUILD_VERBOSE)
$(call BUILDSTATUS,OBJECT_FILE $@)
$(RM_PDB_FILE)
$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)

$(HOST_CMOBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)

$(HOST_CMMOBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)

$(COBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)

# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
Expand Down Expand Up @@ -998,14 +1007,17 @@ $(SOBJS):
$(CPPOBJS):
$(REPORT_BUILD_VERBOSE)
$(call BUILDSTATUS,OBJECT_FILE $@)
$(RM_PDB_FILE)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)

$(CMMOBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)

$(CMOBJS):
$(REPORT_BUILD_VERBOSE)
$(RM_PDB_FILE)
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $(_VPATH_SRCS)

$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
Expand Down
1 change: 1 addition & 0 deletions config/system-headers
Expand Up @@ -1231,6 +1231,7 @@ X11/extensions/Xrender.h
X11/extensions/Xfixes.h
X11/extensions/Xdamage.h
X11/extensions/Xcomposite.h
X11/ImUtil.h
X11/Intrinsic.h
X11/keysymdef.h
X11/keysym.h
Expand Down
4 changes: 2 additions & 2 deletions devtools/client/locales/en-US/netmonitor.properties
Expand Up @@ -147,12 +147,12 @@ networkMenu.sortedDesc=Sorted descending
# in the network table footer when there are no requests available.
networkMenu.empty=No requests

# LOCALIZATION NOTE (networkMenu.summary2): Semi-colon list of plural forms.
# LOCALIZATION NOTE (networkMenu.summary3): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# This label is displayed in the network table footer providing concise
# information about all requests. Parameters: #1 is the number of requests,
# #2 is the size, #3 is the transferred size, #4 is the number of seconds.
networkMenu.summary2=One request, #2 KB (transferred: #3 KB), #4 s;#1 requests, #2 KB (transferred: #3 KB), #4 s
networkMenu.summary3=One request, #2 (transferred: #3), #4;#1 requests, #2 (transferred: #3), #4

# LOCALIZATION NOTE (networkMenu.sizeB): This is the label displayed
# in the network menu specifying the size of a request (in bytes).
Expand Down
12 changes: 6 additions & 6 deletions devtools/client/netmonitor/components/toolbar.js
Expand Up @@ -21,8 +21,8 @@ const {
isNetworkDetailsToggleButtonDisabled,
} = require("../selectors/index");
const {
getSizeWithDecimals,
getTimeWithDecimals,
getFormattedSize,
getFormattedTime
} = require("../utils/format-utils");
const { FILTER_SEARCH_DELAY } = require("../constants");

Expand Down Expand Up @@ -89,11 +89,11 @@ const Toolbar = createClass({

let { count, contentSize, transferredSize, millis } = summary;
let text = (count === 0) ? L10N.getStr("networkMenu.empty") :
PluralForm.get(count, L10N.getStr("networkMenu.summary2"))
PluralForm.get(count, L10N.getStr("networkMenu.summary3"))
.replace("#1", count)
.replace("#2", getSizeWithDecimals(contentSize / 1024))
.replace("#3", getSizeWithDecimals(transferredSize / 1024))
.replace("#4", getTimeWithDecimals(millis / 1000));
.replace("#2", getFormattedSize(contentSize))
.replace("#3", getFormattedSize(transferredSize))
.replace("#4", getFormattedTime(millis));

let buttons = requestFilterTypes.map(([type, checked]) => {
let classList = ["devtools-button"];
Expand Down
13 changes: 9 additions & 4 deletions devtools/client/netmonitor/test/browser_net_footer-summary.js
Expand Up @@ -8,6 +8,11 @@
*/

add_task(function* () {
const {
getFormattedSize,
getFormattedTime
} = require("devtools/client/netmonitor/utils/format-utils");

requestLongerTimeout(2);

let { tab, monitor } = yield initNetMonitor(FILTERING_URL);
Expand Down Expand Up @@ -61,11 +66,11 @@ add_task(function* () {
info(`Computed total bytes: ${requestsSummary.bytes}`);
info(`Computed total millis: ${requestsSummary.millis}`);

is(value, PluralForm.get(requestsSummary.count, L10N.getStr("networkMenu.summary2"))
is(value, PluralForm.get(requestsSummary.count, L10N.getStr("networkMenu.summary3"))
.replace("#1", requestsSummary.count)
.replace("#2", L10N.numberWithDecimals(requestsSummary.contentSize / 1024, 2))
.replace("#3", L10N.numberWithDecimals(requestsSummary.transferredSize / 1024, 2))
.replace("#4", L10N.numberWithDecimals(requestsSummary.millis / 1000, 2))
.replace("#2", getFormattedSize(requestsSummary.contentSize))
.replace("#3", getFormattedSize(requestsSummary.transferredSize))
.replace("#4", getFormattedTime(requestsSummary.millis))
, "The current summary text is correct.");
}
});

0 comments on commit 13e1ccc

Please sign in to comment.