mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge latest PGO-green changeset from inbound to central.
This commit is contained in:
commit
437f4d6ea7
@ -14,6 +14,9 @@ package-compare:
|
||||
stage-package:
|
||||
@$(MAKE) -C browser/installer stage-package
|
||||
|
||||
sdk:
|
||||
@$(MAKE) -C browser/installer make-sdk
|
||||
|
||||
install::
|
||||
@$(MAKE) -C browser/installer install
|
||||
|
||||
|
@ -8,8 +8,9 @@ import os
|
||||
import subprocess
|
||||
|
||||
from mach.decorators import (
|
||||
CommandProvider,
|
||||
Command,
|
||||
CommandArgument,
|
||||
CommandProvider,
|
||||
)
|
||||
from mozbuild.base import (
|
||||
MachCommandBase,
|
||||
@ -34,7 +35,12 @@ class MachCommands(MachCommandBase):
|
||||
@Command('valgrind-test', category='testing',
|
||||
conditions=[conditions.is_firefox, is_valgrind_build],
|
||||
description='Run the Valgrind test job.')
|
||||
def valgrind_test(self):
|
||||
@CommandArgument('--suppressions', default=[], action='append',
|
||||
metavar='FILENAME',
|
||||
help='Specify a suppression file for Valgrind to use. Use '
|
||||
'--suppression multiple times to specify multiple suppression '
|
||||
'files.')
|
||||
def valgrind_test(self, suppressions):
|
||||
import json
|
||||
import sys
|
||||
import tempfile
|
||||
@ -101,6 +107,9 @@ class MachCommands(MachCommandBase):
|
||||
'--track-origins=yes'
|
||||
]
|
||||
|
||||
for s in suppressions:
|
||||
valgrind_args.append('--suppressions=' + s)
|
||||
|
||||
supps_dir = os.path.join(build_dir, 'valgrind')
|
||||
supps_file1 = os.path.join(supps_dir, 'cross-architecture.sup')
|
||||
valgrind_args.append('--suppressions=' + supps_file1)
|
||||
|
@ -1,3 +1,7 @@
|
||||
# This file is normally included by autoconf.mk, but it is also used
|
||||
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
|
||||
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
|
||||
# whether a normal build is happening or whether the check is running.
|
||||
includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
@ -34,9 +38,11 @@ ifneq (4.0-,$(firstword $(sort 4.0- $(MAKE_VERSION))))
|
||||
$(error Make version too old. Only versions strictly greater than 4.0 are supported.)
|
||||
endif
|
||||
endif
|
||||
ifdef INCLUDED_AUTOCONF_MK
|
||||
ifeq (a,$(firstword a$(subst /, ,$(srcdir))))
|
||||
$(error MSYS-style srcdir are not supported for Windows builds.)
|
||||
endif
|
||||
endif
|
||||
endif # WINNT
|
||||
|
||||
ifdef .PYMAKE
|
||||
@ -44,3 +50,7 @@ include_deps = $(eval $(if $(2),,-)includedeps $(1))
|
||||
else
|
||||
include_deps = $(eval $(if $(2),,-)include $(1))
|
||||
endif
|
||||
|
||||
ifndef INCLUDED_AUTOCONF_MK
|
||||
default::
|
||||
endif
|
||||
|
@ -67,7 +67,8 @@ endif
|
||||
# Get all directories traversed for all subtiers in the current tier, or use
|
||||
# directly the $(*_dirs) variables available in root.mk when there is no
|
||||
# TIERS (like for js/src).
|
||||
CURRENT_DIRS := $(or $($(CURRENT_TIER)_dirs),$(foreach subtier,$(CURRENT_SUBTIERS),$($(CURRENT_TIER)_subtier_$(subtier))))
|
||||
TIER_DIRS = $(or $($(1)_dirs),$(foreach subtier,$($(1)_subtiers),$($(1)_subtier_$(subtier))))
|
||||
CURRENT_DIRS := $(call TIER_DIRS,$(CURRENT_TIER))
|
||||
|
||||
ifneq (,$(filter binaries libs,$(CURRENT_TIER)))
|
||||
WANT_STAMPS = 1
|
||||
@ -144,9 +145,8 @@ endif
|
||||
|
||||
else
|
||||
|
||||
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but
|
||||
# still recurse for externally managed make files (gyp-generated ones).
|
||||
ifeq ($(EXTERNALLY_MANAGED_MAKE_FILE)_$(NO_RECURSE_MAKELEVEL),_$(MAKELEVEL))
|
||||
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above
|
||||
ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
|
||||
|
||||
compile binaries libs export tools::
|
||||
|
||||
@ -193,20 +193,18 @@ tools export:: $(SUBMAKEFILES)
|
||||
|
||||
endif # ifdef TIERS
|
||||
|
||||
endif # ifeq ($(EXTERNALLY_MANAGED_MAKE_FILE)_$(NO_RECURSE_MAKELEVEL),_$(MAKELEVEL))
|
||||
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
|
||||
|
||||
endif # ifeq (1_.,$(MOZ_PSEUDO_DERECURSE)_$(DEPTH))
|
||||
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
ifdef EXTERNALLY_MANAGED_MAKE_FILE
|
||||
# gyp-managed directories
|
||||
recurse_targets := $(addsuffix /binaries,$(DIRS) $(PARALLEL_DIRS))
|
||||
else
|
||||
ifeq (.,$(DEPTH))
|
||||
# top-level directories
|
||||
recurse_targets := $(addsuffix /binaries,$(binaries_dirs))
|
||||
ifdef recurse_targets
|
||||
# only js/src has binaries_dirs, and we want to adjust paths for it.
|
||||
ifdef BUILDING_JS
|
||||
ifndef JS_STANDALONE
|
||||
# Only define recurse_targets for js, when it is built as part of gecko.
|
||||
recurse_targets := $(addsuffix /binaries,$(call TIER_DIRS,binaries))
|
||||
# we want to adjust paths for js/src.
|
||||
want_abspaths = 1
|
||||
endif
|
||||
endif
|
||||
|
@ -8461,13 +8461,13 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
|
||||
|
||||
# For extensions and langpacks, we require a max version that is compatible
|
||||
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
|
||||
# 10.0a1 and 10.0a2 aren't affected
|
||||
# 10.0 becomes 10.0.*
|
||||
# 10.0.1 becomes 10.0.*
|
||||
# 24.0a1 and 24.0a2 aren't affected
|
||||
# 24.0 becomes 24.*
|
||||
# 24.1.1 becomes 24.*
|
||||
IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
|
||||
if test -z "$IS_ALPHA"; then
|
||||
changequote(,)
|
||||
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*.[0-9]*\).*|\1|"`.*
|
||||
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\).*|\1|"`.*
|
||||
changequote([,])
|
||||
else
|
||||
MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
|
||||
|
@ -110,9 +110,7 @@ OrientedImage::GetFrame(uint32_t aWhichFrame,
|
||||
// Create a surface to draw into.
|
||||
mozilla::RefPtr<mozilla::gfx::DrawTarget> target;
|
||||
target = gfxPlatform::GetPlatform()->
|
||||
CreateOffscreenCanvasDrawTarget(gfx::IntSize(width, height), surfaceFormat);
|
||||
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()->
|
||||
GetThebesSurfaceForDrawTarget(target);
|
||||
CreateOffscreenContentDrawTarget(gfx::IntSize(width, height), surfaceFormat);
|
||||
|
||||
// Create our drawable.
|
||||
nsRefPtr<gfxASurface> innerSurface =
|
||||
@ -122,11 +120,14 @@ OrientedImage::GetFrame(uint32_t aWhichFrame,
|
||||
new gfxSurfaceDrawable(innerSurface, gfxIntSize(width, height));
|
||||
|
||||
// Draw.
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(surface);
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(target);
|
||||
gfxRect imageRect(0, 0, width, height);
|
||||
gfxUtils::DrawPixelSnapped(ctx, drawable, OrientationMatrix(nsIntSize(width, height)),
|
||||
imageRect, imageRect, imageRect, imageRect,
|
||||
imageFormat, GraphicsFilter::FILTER_FAST);
|
||||
|
||||
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()->
|
||||
GetThebesSurfaceForDrawTarget(target);
|
||||
|
||||
return surface.forget();
|
||||
}
|
||||
|
81
intl/icu/Makefile.in
Normal file
81
intl/icu/Makefile.in
Normal file
@ -0,0 +1,81 @@
|
||||
# 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/.
|
||||
|
||||
STANDALONE_MAKEFILE = 1
|
||||
SUPPRESS_DEFAULT_RULES = 1
|
||||
|
||||
# Ensure that this happens before including rules.mk
|
||||
ifdef ENABLE_INTL_API
|
||||
ifndef MOZ_NATIVE_ICU
|
||||
# Library names: On Windows, ICU uses modified library names for static
|
||||
# and debug libraries.
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef MOZ_DEBUG
|
||||
ICU_LIB_SUFFIX=d
|
||||
endif
|
||||
endif # WINNT
|
||||
ifdef MOZ_SHARED_ICU
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(ICU_LIB_SUFFIX)$(MOZ_ICU_VERSION).dll)
|
||||
endif
|
||||
else # ! WINNT
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
|
||||
endif
|
||||
else # ! Darwin
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))
|
||||
endif
|
||||
endif
|
||||
endif # WINNT
|
||||
ifdef ICU_FILES
|
||||
ICU_DEST := $(DIST)/bin
|
||||
INSTALL_TARGETS += ICU
|
||||
$(ICU_FILES): buildicu
|
||||
ICU_TARGET := default
|
||||
endif
|
||||
else # !MOZ_SHARED_ICU
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
|
||||
cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(ICU_LIB_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname).lib;)
|
||||
endif
|
||||
endif # MOZ_SHARED_ICU
|
||||
endif # !MOZ_NATIVE_ICU
|
||||
endif # ENABLE_INTL_API
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef ENABLE_INTL_API
|
||||
ifndef MOZ_NATIVE_ICU
|
||||
ifdef .PYMAKE
|
||||
ICU_MAKE = $(GMAKE)
|
||||
else
|
||||
ICU_MAKE = $(MAKE)
|
||||
endif
|
||||
|
||||
default:: buildicu
|
||||
|
||||
# - ICU requires GNU make according to its readme.html. pymake can't be used
|
||||
# because it doesn't support order only dependencies.
|
||||
# - Force ICU to use the standard suffix for object files because expandlibs
|
||||
# will discard all files with a non-standard suffix (bug 857450).
|
||||
# - Options for genrb: -k strict parsing; -R omit collation tailoring rules.
|
||||
buildicu::
|
||||
# ICU's build system is full of races, so force non-parallel build.
|
||||
ifdef CROSS_COMPILE
|
||||
+$(ICU_MAKE) -j1 -C host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R -C'
|
||||
endif
|
||||
+$(ICU_MAKE) -j1 -C target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R'
|
||||
$(ICU_LIB_RENAME)
|
||||
|
||||
distclean clean::
|
||||
ifdef CROSS_COMPILE
|
||||
+$(ICU_MAKE) -C host $@ STATIC_O=$(OBJ_SUFFIX)
|
||||
endif
|
||||
+$(ICU_MAKE) -C target $@ STATIC_O=$(OBJ_SUFFIX)
|
||||
|
||||
endif
|
||||
endif
|
@ -22,6 +22,10 @@ LIBS = $(NSPR_LIBS)
|
||||
|
||||
DIST_INSTALL = 1
|
||||
|
||||
ifdef JS_STANDALONE
|
||||
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
|
||||
endif
|
||||
|
||||
ifdef JS_HAS_CTYPES
|
||||
ifdef MOZ_NATIVE_FFI
|
||||
LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
|
||||
@ -94,67 +98,8 @@ jsconfig_FILES = $(export_files)
|
||||
jsconfig_DEST = $(DIST)/include
|
||||
jsconfig_TARGET := export
|
||||
|
||||
# Ensure that this happens before using $(MOZ_PSEUDO_DERECURSE)
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
# Ensure that this happens before including rules.mk
|
||||
ifdef ENABLE_INTL_API
|
||||
ifndef MOZ_NATIVE_ICU
|
||||
# Library names: On Windows, ICU uses modified library names for static
|
||||
# and debug libraries.
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef MOZ_DEBUG
|
||||
ICU_LIB_SUFFIX=d
|
||||
endif
|
||||
endif # WINNT
|
||||
ifdef MOZ_SHARED_ICU
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(ICU_LIB_SUFFIX)$(MOZ_ICU_VERSION).dll)
|
||||
endif
|
||||
else # ! WINNT
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
|
||||
endif
|
||||
else # ! Darwin
|
||||
ifdef JS_SHARED_LIBRARY
|
||||
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))
|
||||
endif
|
||||
endif
|
||||
endif # WINNT
|
||||
ifdef ICU_FILES
|
||||
ICU_DEST := $(DIST)/bin
|
||||
INSTALL_TARGETS += ICU
|
||||
$(ICU_FILES): buildicu
|
||||
ICU_TARGET := $(if $(MOZ_PSEUDO_DERECURSE),compile,export)
|
||||
endif
|
||||
else # !MOZ_SHARED_ICU
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
|
||||
cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(ICU_LIB_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname).lib;)
|
||||
endif
|
||||
endif # MOZ_SHARED_ICU
|
||||
endif # !MOZ_NATIVE_ICU
|
||||
endif # ENABLE_INTL_API
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
.PHONY: buildffi buildicu
|
||||
buildffi buildicu:
|
||||
$(if $(MOZ_PSEUDO_DERECURSE),compile,export):: buildffi buildicu
|
||||
|
||||
ifdef JS_HAS_CTYPES
|
||||
ifndef MOZ_NATIVE_FFI
|
||||
buildffi:
|
||||
$(call SUBMAKE,,ctypes/libffi)
|
||||
|
||||
distclean clean::
|
||||
$(call SUBMAKE,$@,ctypes/libffi)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#############################################
|
||||
# BEGIN ECMAScript Internationalization API
|
||||
#
|
||||
@ -193,31 +138,6 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef .PYMAKE
|
||||
ICU_MAKE = $(GMAKE)
|
||||
else
|
||||
ICU_MAKE = $(MAKE)
|
||||
endif
|
||||
|
||||
# - ICU requires GNU make according to its readme.html. pymake can't be used
|
||||
# because it doesn't support order only dependencies.
|
||||
# - Force ICU to use the standard suffix for object files because expandlibs
|
||||
# will discard all files with a non-standard suffix (bug 857450).
|
||||
# - Options for genrb: -k strict parsing; -R omit collation tailoring rules.
|
||||
buildicu:
|
||||
# ICU's build system is full of races, so force non-parallel build.
|
||||
ifdef CROSS_COMPILE
|
||||
+$(ICU_MAKE) -j1 -C $(DEPTH)/intl/icu/host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R -C'
|
||||
endif
|
||||
+$(ICU_MAKE) -j1 -C $(DEPTH)/intl/icu/target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R'
|
||||
$(ICU_LIB_RENAME)
|
||||
|
||||
distclean clean::
|
||||
ifdef CROSS_COMPILE
|
||||
$(call SUBMAKE,$@,$(DEPTH)/intl/icu/host)
|
||||
endif
|
||||
$(call SUBMAKE,$@,$(DEPTH)/intl/icu/target)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -220,9 +220,10 @@ struct BufferSliceTail : public BufferSlice<SliceSize> {
|
||||
isBranch[idx >> 3] |= 1 << (idx & 0x7);
|
||||
}
|
||||
bool isNextBranch() {
|
||||
if (this->nodeSize == InstBaseSize)
|
||||
unsigned int size = this->nodeSize;
|
||||
if (size == InstBaseSize || size >= SliceSize)
|
||||
return false;
|
||||
int idx = this->nodeSize / InstBaseSize;
|
||||
int idx = size / InstBaseSize;
|
||||
return (isBranch[idx >> 3] >> (idx & 0x7)) & 1;
|
||||
}
|
||||
};
|
||||
|
@ -16,15 +16,10 @@ if not CONFIG['JS_DISABLE_SHELL']:
|
||||
|
||||
TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
|
||||
|
||||
mfbt_root = '../../mfbt'
|
||||
LOCAL_INCLUDES += ['%s/double-conversion' % mfbt_root]
|
||||
LOCAL_INCLUDES += ['../../mfbt/double-conversion']
|
||||
|
||||
if CONFIG['JS_STANDALONE']:
|
||||
LIBRARY_NAME = 'mozjs-%s' % CONFIG['MOZILLA_SYMBOLVERSION']
|
||||
|
||||
# When building standalone, we need to include mfbt sources, and to declare
|
||||
# "exported" mfbt symbols on its behalf when we use its headers.
|
||||
include('%s/common.mozbuild' % mfbt_root)
|
||||
else:
|
||||
LIBRARY_NAME = 'mozjs'
|
||||
|
||||
|
@ -1865,8 +1865,8 @@ ContainerState::PopThebesLayerData()
|
||||
|
||||
uint32_t flags = 0;
|
||||
nsIWidget* widget = mContainerReferenceFrame->PresContext()->GetRootWidget();
|
||||
// Disable subpixelAA on hidpi
|
||||
bool hidpi = widget && widget->GetDefaultScale().scale >= 2;
|
||||
// See bug 941095. Not quite ready to disable this.
|
||||
bool hidpi = false && widget && widget->GetDefaultScale().scale >= 2;
|
||||
if (hidpi) {
|
||||
flags |= Layer::CONTENT_DISABLE_SUBPIXEL_AA;
|
||||
}
|
||||
|
@ -2833,6 +2833,21 @@ ElementRestyler::SendAccessibilityNotifications()
|
||||
#endif
|
||||
}
|
||||
|
||||
inline nsIFrame*
|
||||
GetNextBlockInInlineSibling(FramePropertyTable* aPropTable, nsIFrame* aFrame)
|
||||
{
|
||||
NS_ASSERTION(!aFrame->GetPrevContinuation(),
|
||||
"must start with the first continuation");
|
||||
// Might we have special siblings?
|
||||
if (!(aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL)) {
|
||||
// nothing more to do here
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return static_cast<nsIFrame*>
|
||||
(aPropTable->Get(aFrame, nsIFrame::IBSplitSpecialSibling()));
|
||||
}
|
||||
|
||||
void
|
||||
RestyleManager::ComputeStyleChangeFor(nsIFrame* aFrame,
|
||||
nsStyleChangeList* aChangeList,
|
||||
@ -2847,17 +2862,19 @@ RestyleManager::ComputeStyleChangeFor(nsIFrame* aFrame,
|
||||
aChangeList->AppendChange(aFrame, content, aMinChange);
|
||||
}
|
||||
|
||||
nsIFrame* frame = aFrame;
|
||||
NS_ASSERTION(!aFrame->GetPrevContinuation(),
|
||||
"must start with the first continuation");
|
||||
|
||||
NS_ASSERTION(!frame->GetPrevContinuation(), "must start with the first in flow");
|
||||
|
||||
// We need to handle aFrame and all of its continuations and special
|
||||
// siblings and their continuations. ReResolveStyleContext loops over
|
||||
// the continuations, and also loops over the similar-type sequences
|
||||
// in block-in-inline splits (i.e., either all the blocks or all the
|
||||
// inlines), so here we only have to advance one step to the other set
|
||||
// of special siblings (i.e., switch from blocks to inlines, or
|
||||
// vice-versa).
|
||||
// We want to start with this frame and walk all its next-in-flows,
|
||||
// as well as all its special siblings and their next-in-flows,
|
||||
// reresolving style on all the frames we encounter in this walk that
|
||||
// we didn't reach already. In the normal case, this will mean only
|
||||
// restyling the first two block-in-inline splits and no
|
||||
// continuations, and skipping everything else. However, when we have
|
||||
// a style change targeted at an element inside a context where styles
|
||||
// vary between continuations (e.g., a style change on an element that
|
||||
// extends from inside a styled ::first-line to outside of that first
|
||||
// line), we might restyle more than that.
|
||||
|
||||
FramePropertyTable* propTable = mPresContext->PropertyTable();
|
||||
|
||||
@ -2869,34 +2886,32 @@ RestyleManager::ComputeStyleChangeFor(nsIFrame* aFrame,
|
||||
parent && parent->IsElement() ? parent->AsElement() : nullptr;
|
||||
treeMatchContext.InitAncestors(parentElement);
|
||||
nsTArray<nsIContent*> visibleKidsOfHiddenElement;
|
||||
for (int ibSet = 0; ibSet < 2; ++ibSet) {
|
||||
// loop over the two sets (blocks, inlines) of special siblings
|
||||
ElementRestyler restyler(mPresContext, frame, aChangeList,
|
||||
aMinChange, aRestyleTracker,
|
||||
treeMatchContext,
|
||||
visibleKidsOfHiddenElement);
|
||||
for (nsIFrame* ibSibling = aFrame; ibSibling;
|
||||
ibSibling = GetNextBlockInInlineSibling(propTable, ibSibling)) {
|
||||
// Outer loop over special siblings
|
||||
for (nsIFrame* cont = ibSibling; cont; cont = cont->GetNextContinuation()) {
|
||||
if (GetPrevContinuationWithSameStyle(cont)) {
|
||||
// We already handled this element when dealing with its earlier
|
||||
// continuation.
|
||||
continue;
|
||||
}
|
||||
|
||||
restyler.Restyle(aRestyleDescendants ? eRestyle_Subtree : eRestyle_Self);
|
||||
// Inner loop over next-in-flows of the current frame
|
||||
ElementRestyler restyler(mPresContext, cont, aChangeList,
|
||||
aMinChange, aRestyleTracker,
|
||||
treeMatchContext,
|
||||
visibleKidsOfHiddenElement);
|
||||
|
||||
if (restyler.HintsHandledForFrame() & nsChangeHint_ReconstructFrame) {
|
||||
// If it's going to cause a framechange, then don't bother
|
||||
// with the continuations or special siblings since they'll be
|
||||
// clobbered by the frame reconstruct anyway.
|
||||
NS_ASSERTION(!frame->GetPrevContinuation(),
|
||||
"continuing frame had more severe impact than first-in-flow");
|
||||
return;
|
||||
}
|
||||
restyler.Restyle(aRestyleDescendants ? eRestyle_Subtree : eRestyle_Self);
|
||||
|
||||
// Might we have special siblings?
|
||||
if (!(frame->GetStateBits() & NS_FRAME_IS_SPECIAL)) {
|
||||
// nothing more to do here
|
||||
return;
|
||||
}
|
||||
|
||||
frame = static_cast<nsIFrame*>
|
||||
(propTable->Get(frame, nsIFrame::IBSplitSpecialSibling()));
|
||||
if (!frame) {
|
||||
return;
|
||||
if (restyler.HintsHandledForFrame() & nsChangeHint_ReconstructFrame) {
|
||||
// If it's going to cause a framechange, then don't bother
|
||||
// with the continuations or special siblings since they'll be
|
||||
// clobbered by the frame reconstruct anyway.
|
||||
NS_ASSERTION(!cont->GetPrevContinuation(),
|
||||
"continuing frame had more severe impact than first-in-flow");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4408,7 +4408,7 @@ bool nsDisplayTransform::ComputeVisibility(nsDisplayListBuilder *aBuilder,
|
||||
* think that it's painting in its original rectangular coordinate space.
|
||||
* If we can't untransform, take the entire overflow rect */
|
||||
nsRect untransformedVisibleRect;
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
if (ShouldPrerenderTransformedContent(aBuilder, mFrame) ||
|
||||
!UntransformRectMatrix(mVisibleRect,
|
||||
GetTransform(factor),
|
||||
@ -4442,7 +4442,7 @@ void nsDisplayTransform::HitTest(nsDisplayListBuilder *aBuilder,
|
||||
* 3. Use it to transform the rect into the correct space.
|
||||
* 4. Pass that rect down through to the list's version of HitTest.
|
||||
*/
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
gfx3DMatrix matrix = GetTransform(factor);
|
||||
|
||||
if (!IsFrameVisible(mFrame, matrix)) {
|
||||
@ -4501,7 +4501,7 @@ void nsDisplayTransform::HitTest(nsDisplayListBuilder *aBuilder,
|
||||
float
|
||||
nsDisplayTransform::GetHitDepthAtPoint(const nsPoint& aPoint)
|
||||
{
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
gfx3DMatrix matrix = GetTransform(factor);
|
||||
|
||||
NS_ASSERTION(IsFrameVisible(mFrame, matrix), "We can't have hit a frame that isn't visible!");
|
||||
@ -4524,7 +4524,7 @@ nsRect nsDisplayTransform::GetBounds(nsDisplayListBuilder *aBuilder, bool* aSnap
|
||||
mFrame->GetVisualOverflowRectRelativeToSelf() :
|
||||
mStoredList.GetBounds(aBuilder, aSnap);
|
||||
*aSnap = false;
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
return nsLayoutUtils::MatrixTransformRect(untransformedBounds,
|
||||
GetTransform(factor),
|
||||
factor);
|
||||
@ -4551,7 +4551,7 @@ nsRegion nsDisplayTransform::GetOpaqueRegion(nsDisplayListBuilder *aBuilder,
|
||||
{
|
||||
*aSnap = false;
|
||||
nsRect untransformedVisible;
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
// If we're going to prerender all our content, pretend like we
|
||||
// don't have opqaue content so that everything under us is rendered
|
||||
// as well. That will increase graphics memory usage if our frame
|
||||
@ -4563,7 +4563,7 @@ nsRegion nsDisplayTransform::GetOpaqueRegion(nsDisplayListBuilder *aBuilder,
|
||||
return nsRegion();
|
||||
}
|
||||
|
||||
const gfx3DMatrix& matrix = GetTransform(nsPresContext::AppUnitsPerCSSPixel());
|
||||
const gfx3DMatrix& matrix = GetTransform(factor);
|
||||
|
||||
nsRegion result;
|
||||
gfxMatrix matrix2d;
|
||||
@ -4583,11 +4583,11 @@ nsRegion nsDisplayTransform::GetOpaqueRegion(nsDisplayListBuilder *aBuilder,
|
||||
bool nsDisplayTransform::IsUniform(nsDisplayListBuilder *aBuilder, nscolor* aColor)
|
||||
{
|
||||
nsRect untransformedVisible;
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = mFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
if (!UntransformRectMatrix(mVisibleRect, GetTransform(factor), factor, &untransformedVisible)) {
|
||||
return false;
|
||||
}
|
||||
const gfx3DMatrix& matrix = GetTransform(nsPresContext::AppUnitsPerCSSPixel());
|
||||
const gfx3DMatrix& matrix = GetTransform(factor);
|
||||
|
||||
gfxMatrix matrix2d;
|
||||
return matrix.Is2D(&matrix2d) &&
|
||||
@ -4659,7 +4659,7 @@ nsRect nsDisplayTransform::TransformRect(const nsRect &aUntransformedBounds,
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "Can't take the transform based on a null frame!");
|
||||
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
return nsLayoutUtils::MatrixTransformRect
|
||||
(aUntransformedBounds,
|
||||
GetResultingTransformMatrix(aFrame, aOrigin, factor, aBoundsOverride),
|
||||
@ -4673,7 +4673,7 @@ nsRect nsDisplayTransform::TransformRectOut(const nsRect &aUntransformedBounds,
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "Can't take the transform based on a null frame!");
|
||||
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
return nsLayoutUtils::MatrixTransformRectOut
|
||||
(aUntransformedBounds,
|
||||
GetResultingTransformMatrix(aFrame, aOrigin, factor, aBoundsOverride),
|
||||
@ -4711,7 +4711,7 @@ bool nsDisplayTransform::UntransformRect(const nsRect &aUntransformedBounds,
|
||||
/* Grab the matrix. If the transform is degenerate, just hand back the
|
||||
* empty rect.
|
||||
*/
|
||||
float factor = nsPresContext::AppUnitsPerCSSPixel();
|
||||
float factor = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
gfx3DMatrix matrix = GetResultingTransformMatrix(aFrame, aOrigin, factor);
|
||||
|
||||
return UntransformRectMatrix(aUntransformedBounds, matrix, factor, aOutRect);
|
||||
|
@ -31,3 +31,5 @@ load stress-10.html # crash test
|
||||
== 403177-1.html 403177-1-ref.html
|
||||
== 469227-2.html 469227-2-ref.html
|
||||
== 469227-3.html 469227-3-ref.html
|
||||
|
||||
== restyle-inside-first-line.html restyle-inside-first-line-ref.html
|
||||
|
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Test for bug 945105: direct restyling of element inside of a ::first-line that extends to the next line</title>
|
||||
<style>
|
||||
body { background-color: white; color: black; width: 400px; height: 400px; }
|
||||
</style>
|
||||
<div style="width: 0"><span style="color: purple">This</span> <span>is some text</span></div>
|
11
layout/reftests/first-line/restyle-inside-first-line.html
Normal file
11
layout/reftests/first-line/restyle-inside-first-line.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Test for bug 945105: direct restyling of element inside of a ::first-line that extends to the next line</title>
|
||||
<style>
|
||||
body { background-color: white; color: black; width: 400px; height: 400px; }
|
||||
div::first-line { color: purple; }
|
||||
</style>
|
||||
<div style="width: 0"><span id="x" style="visibility: hidden">This is some text</span></div>
|
||||
<script>
|
||||
document.body.firstChild.offsetWidth;
|
||||
document.getElementById("x").style.visibility = "visible";
|
||||
</script>
|
@ -1,90 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file defines the headers exported by and the sources build for mfbt.
|
||||
# It is included by mfbt itself and by the JS engine, which, when built
|
||||
# standalone, must install mfbt's exported headers and build mfbt sources
|
||||
# itself. It expects that mfbt_root is set to the relative path to mfbt
|
||||
# before this file in included.
|
||||
|
||||
mfbt_headers = [
|
||||
'Alignment.h',
|
||||
'AllocPolicy.h',
|
||||
'Array.h',
|
||||
'ArrayUtils.h',
|
||||
'Assertions.h',
|
||||
'Atomics.h',
|
||||
'Attributes.h',
|
||||
'BloomFilter.h',
|
||||
'Casting.h',
|
||||
'Char16.h',
|
||||
'CheckedInt.h',
|
||||
'Compiler.h',
|
||||
'Compression.h',
|
||||
'Constants.h',
|
||||
'DebugOnly.h',
|
||||
'decimal/Decimal.h',
|
||||
'Endian.h',
|
||||
'EnumSet.h',
|
||||
'FloatingPoint.h',
|
||||
'GuardObjects.h',
|
||||
'HashFunctions.h',
|
||||
'IntegerPrintfMacros.h',
|
||||
'Likely.h',
|
||||
'LinkedList.h',
|
||||
'MathAlgorithms.h',
|
||||
'Maybe.h',
|
||||
'MemoryChecking.h',
|
||||
'MemoryReporting.h',
|
||||
'Move.h',
|
||||
'MSIntTypes.h',
|
||||
'NullPtr.h',
|
||||
'NumericLimits.h',
|
||||
'PodOperations.h',
|
||||
'Poison.h',
|
||||
'Range.h',
|
||||
'RangedPtr.h',
|
||||
'ReentrancyGuard.h',
|
||||
'RefPtr.h',
|
||||
'RollingMean.h',
|
||||
'Scoped.h',
|
||||
'SHA1.h',
|
||||
'SplayTree.h',
|
||||
'TemplateLib.h',
|
||||
'ThreadLocal.h',
|
||||
'TypedEnum.h',
|
||||
'Types.h',
|
||||
'TypeTraits.h',
|
||||
'Vector.h',
|
||||
'WeakPtr.h',
|
||||
]
|
||||
|
||||
mfbt_sources = [
|
||||
'double-conversion/bignum-dtoa.cc',
|
||||
'double-conversion/bignum.cc',
|
||||
'double-conversion/cached-powers.cc',
|
||||
'double-conversion/diy-fp.cc',
|
||||
'double-conversion/double-conversion.cc',
|
||||
'double-conversion/fast-dtoa.cc',
|
||||
'double-conversion/fixed-dtoa.cc',
|
||||
'double-conversion/strtod.cc',
|
||||
'FloatingPoint.cpp',
|
||||
'HashFunctions.cpp',
|
||||
'Poison.cpp',
|
||||
'SHA1.cpp',
|
||||
]
|
||||
|
||||
DEFINES['IMPL_MFBT'] = True
|
||||
|
||||
EXPORTS.mozilla += ['%s/%s' % (mfbt_root, header) for header in mfbt_headers]
|
||||
UNIFIED_SOURCES += ['%s/%s' % (mfbt_root, src) for src in mfbt_sources]
|
||||
|
||||
# Compression.cpp cannot be built in unified mode because it pulls in Windows system headers.
|
||||
# Decimal.cpp doesn't build in unified mode with gcc.
|
||||
SOURCES += [
|
||||
mfbt_root + '/Compression.cpp',
|
||||
mfbt_root + '/decimal/Decimal.cpp',
|
||||
]
|
@ -8,7 +8,78 @@ TEST_DIRS += ['tests']
|
||||
|
||||
LIBRARY_NAME = 'mfbt'
|
||||
|
||||
mfbt_root = '.'
|
||||
include('common.mozbuild')
|
||||
EXPORTS.mozilla = [
|
||||
'Alignment.h',
|
||||
'AllocPolicy.h',
|
||||
'Array.h',
|
||||
'ArrayUtils.h',
|
||||
'Assertions.h',
|
||||
'Atomics.h',
|
||||
'Attributes.h',
|
||||
'BloomFilter.h',
|
||||
'Casting.h',
|
||||
'Char16.h',
|
||||
'CheckedInt.h',
|
||||
'Compiler.h',
|
||||
'Compression.h',
|
||||
'Constants.h',
|
||||
'DebugOnly.h',
|
||||
'decimal/Decimal.h',
|
||||
'Endian.h',
|
||||
'EnumSet.h',
|
||||
'FloatingPoint.h',
|
||||
'GuardObjects.h',
|
||||
'HashFunctions.h',
|
||||
'IntegerPrintfMacros.h',
|
||||
'Likely.h',
|
||||
'LinkedList.h',
|
||||
'MathAlgorithms.h',
|
||||
'Maybe.h',
|
||||
'MemoryChecking.h',
|
||||
'MemoryReporting.h',
|
||||
'Move.h',
|
||||
'MSIntTypes.h',
|
||||
'NullPtr.h',
|
||||
'NumericLimits.h',
|
||||
'PodOperations.h',
|
||||
'Poison.h',
|
||||
'Range.h',
|
||||
'RangedPtr.h',
|
||||
'ReentrancyGuard.h',
|
||||
'RefPtr.h',
|
||||
'RollingMean.h',
|
||||
'Scoped.h',
|
||||
'SHA1.h',
|
||||
'SplayTree.h',
|
||||
'TemplateLib.h',
|
||||
'ThreadLocal.h',
|
||||
'TypedEnum.h',
|
||||
'Types.h',
|
||||
'TypeTraits.h',
|
||||
'Vector.h',
|
||||
'WeakPtr.h',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mozglue'
|
||||
UNIFIED_SOURCES = [
|
||||
'double-conversion/bignum-dtoa.cc',
|
||||
'double-conversion/bignum.cc',
|
||||
'double-conversion/cached-powers.cc',
|
||||
'double-conversion/diy-fp.cc',
|
||||
'double-conversion/double-conversion.cc',
|
||||
'double-conversion/fast-dtoa.cc',
|
||||
'double-conversion/fixed-dtoa.cc',
|
||||
'double-conversion/strtod.cc',
|
||||
'FloatingPoint.cpp',
|
||||
'HashFunctions.cpp',
|
||||
'Poison.cpp',
|
||||
'SHA1.cpp',
|
||||
]
|
||||
|
||||
DEFINES['IMPL_MFBT'] = True
|
||||
|
||||
# Compression.cpp cannot be built in unified mode because it pulls in Windows system headers.
|
||||
# Decimal.cpp doesn't build in unified mode with gcc.
|
||||
SOURCES += [
|
||||
'Compression.cpp',
|
||||
'decimal/Decimal.cpp',
|
||||
]
|
||||
|
@ -9,7 +9,7 @@
|
||||
Apps screen, which we only want when testing. -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
@ -33,9 +33,6 @@
|
||||
android:icon="@drawable/fxaccount_icon"
|
||||
android:name="org.mozilla.gecko.fxa.activities.FxAccountCreateAccountActivity"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
@ -43,9 +40,6 @@
|
||||
android:icon="@drawable/fxaccount_icon"
|
||||
android:name="org.mozilla.gecko.fxa.activities.FxAccountCreateSuccessActivity"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
@ -53,9 +47,6 @@
|
||||
android:icon="@drawable/fxaccount_icon"
|
||||
android:name="org.mozilla.gecko.fxa.activities.FxAccountSignInActivity"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
@ -63,7 +54,4 @@
|
||||
android:icon="@drawable/fxaccount_icon"
|
||||
android:name="org.mozilla.gecko.fxa.activities.FxAccountUpdateCredentialsActivity"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
@ -11,8 +11,12 @@ CONFIGURE_SUBST_FILES += [
|
||||
|
||||
if CONFIG['BUILDING_JS']:
|
||||
if CONFIG['JS_STANDALONE']:
|
||||
DIRS += ['config']
|
||||
DIRS += ['js/src']
|
||||
add_tier_dir('base', ['config', 'mfbt'])
|
||||
if CONFIG['JS_HAS_CTYPES'] and not CONFIG['MOZ_NATIVE_FFI']:
|
||||
add_tier_dir('js', ['js/src/ctypes/libffi'], static=True)
|
||||
add_tier_dir('js', ['intl/icu'], static=True)
|
||||
CONFIGURE_SUBST_FILES += ['intl/icu/Makefile']
|
||||
add_tier_dir('js', ['js/src'])
|
||||
else:
|
||||
CONFIGURE_SUBST_FILES += [
|
||||
'mozilla-config.h',
|
||||
|
@ -24,6 +24,8 @@ endif
|
||||
|
||||
MOZ_GLUE_LDFLAGS = # Don't link against ourselves
|
||||
|
||||
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
|
||||
|
||||
ifneq (,$(ZLIB_IN_MOZGLUE)$(MOZ_LINKER))
|
||||
ifdef MOZ_NATIVE_ZLIB
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
|
||||
|
@ -468,6 +468,20 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
|
||||
def _make_path(self, force_pymake=False):
|
||||
if self._is_windows() and not force_pymake:
|
||||
# Use gnumake if it's available and we can verify it's a working
|
||||
# version.
|
||||
baseconfig = os.path.join(self.topsrcdir, 'config', 'baseconfig.mk')
|
||||
if os.path.exists(baseconfig):
|
||||
try:
|
||||
make = which.which('gnumake')
|
||||
subprocess.check_call([make, '-f', baseconfig, 'HOST_OS_ARCH=WINNT'],
|
||||
stdout=open(os.devnull, 'wb'), stderr=subprocess.STDOUT)
|
||||
return [make]
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
except which.WhichError:
|
||||
pass
|
||||
|
||||
# Use mozmake if it's available.
|
||||
try:
|
||||
return [which.which('mozmake')]
|
||||
|
@ -1049,7 +1049,7 @@ AccumulateNonECCKeySize(Telemetry::ID probe, uint32_t bits)
|
||||
unsigned int value = bits < 512 ? 1 : bits == 512 ? 2
|
||||
: bits < 768 ? 3 : bits == 768 ? 4
|
||||
: bits < 1024 ? 5 : bits == 1024 ? 6
|
||||
: bits < 1024 ? 7 : bits == 1024 ? 8
|
||||
: bits < 1280 ? 7 : bits == 1280 ? 8
|
||||
: bits < 1536 ? 9 : bits == 1536 ? 10
|
||||
: bits < 2048 ? 11 : bits == 2048 ? 12
|
||||
: bits < 3072 ? 13 : bits == 3072 ? 14
|
||||
@ -1067,7 +1067,7 @@ AccumulateNonECCKeySize(Telemetry::ID probe, uint32_t bits)
|
||||
// named curves for a given size (e.g. secp256k1 vs. secp256r1). We punt on
|
||||
// that for now. See also NSS bug 323674.
|
||||
static void
|
||||
AccummulateECCCurve(Telemetry::ID probe, uint32_t bits)
|
||||
AccumulateECCCurve(Telemetry::ID probe, uint32_t bits)
|
||||
{
|
||||
unsigned int value = bits == 256 ? 23 // P-256
|
||||
: bits == 384 ? 24 // P-384
|
||||
@ -1091,6 +1091,7 @@ AccumulateCipherSuite(Telemetry::ID probe, const SSLChannelInfo& channelInfo)
|
||||
case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: value = 7; break;
|
||||
case TLS_ECDHE_RSA_WITH_RC4_128_SHA: value = 8; break;
|
||||
case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: value = 9; break;
|
||||
case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: value = 10; break;
|
||||
// DHE key exchange
|
||||
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA: value = 21; break;
|
||||
case TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA: value = 22; break;
|
||||
@ -1101,6 +1102,7 @@ AccumulateCipherSuite(Telemetry::ID probe, const SSLChannelInfo& channelInfo)
|
||||
case TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA: value = 27; break;
|
||||
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA: value = 28; break;
|
||||
case TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA: value = 29; break;
|
||||
case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA: value = 30; break;
|
||||
// ECDH key exchange
|
||||
case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: value = 41; break;
|
||||
case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: value = 42; break;
|
||||
@ -1122,10 +1124,10 @@ AccumulateCipherSuite(Telemetry::ID probe, const SSLChannelInfo& channelInfo)
|
||||
case SSL_RSA_WITH_RC4_128_MD5: value = 69; break;
|
||||
// unknown
|
||||
default:
|
||||
MOZ_CRASH("impossible cipher suite");
|
||||
value = 0;
|
||||
break;
|
||||
}
|
||||
MOZ_ASSERT(value != 0);
|
||||
Telemetry::Accumulate(probe, value);
|
||||
}
|
||||
|
||||
@ -1271,8 +1273,8 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) {
|
||||
channelInfo.keaKeyBits);
|
||||
break;
|
||||
case ssl_kea_ecdh:
|
||||
AccummulateECCCurve(Telemetry::SSL_KEA_ECDHE_CURVE_FULL,
|
||||
channelInfo.keaKeyBits);
|
||||
AccumulateECCCurve(Telemetry::SSL_KEA_ECDHE_CURVE_FULL,
|
||||
channelInfo.keaKeyBits);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("impossible KEA");
|
||||
@ -1294,8 +1296,8 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) {
|
||||
channelInfo.authKeyBits);
|
||||
break;
|
||||
case ssl_auth_ecdsa:
|
||||
AccummulateECCCurve(Telemetry::SSL_AUTH_ECDSA_CURVE_FULL,
|
||||
channelInfo.authKeyBits);
|
||||
AccumulateECCCurve(Telemetry::SSL_AUTH_ECDSA_CURVE_FULL,
|
||||
channelInfo.authKeyBits);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("impossible auth algorithm");
|
||||
|
Loading…
Reference in New Issue
Block a user