2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +04:00
|
|
|
# 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/.
|
|
|
|
|
2015-03-04 04:03:19 +03:00
|
|
|
with Files('**'):
|
|
|
|
BUG_COMPONENT = ('Core', 'CSS Parsing and Computation')
|
|
|
|
|
|
|
|
with Files('nsComputedDOMStyle.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
|
|
|
|
|
|
|
|
with Files('nsROCSSPrimitiveValue.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
|
|
|
|
|
|
|
|
with Files('CSSRuleList.*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
|
|
|
|
|
|
|
|
with Files('nsDOM*'):
|
|
|
|
BUG_COMPONENT = ('Core', 'DOM: CSS Object Model')
|
|
|
|
|
2013-02-26 00:47:22 +04:00
|
|
|
DIRS += ['xbl-marquee']
|
2014-07-29 03:55:55 +04:00
|
|
|
TEST_DIRS += ['test']
|
2013-03-19 22:47:00 +04:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2018-04-18 12:39:51 +03:00
|
|
|
'!nsCSSPropertyID.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'AnimationCommon.h',
|
2014-06-12 05:12:00 +04:00
|
|
|
'CounterStyleManager.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsAnimationManager.h',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsComputedDOMStylePropertyList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSAnonBoxes.h',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsCSSAnonBoxList.h',
|
2014-06-12 05:10:00 +04:00
|
|
|
'nsCSSCounterDescList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSFontDescList.h',
|
|
|
|
'nsCSSKeywordList.h',
|
|
|
|
'nsCSSKeywords.h',
|
2016-08-17 04:46:58 +03:00
|
|
|
'nsCSSPropertyIDSet.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSProps.h',
|
|
|
|
'nsCSSPseudoElementList.h',
|
|
|
|
'nsCSSPseudoElements.h',
|
2013-12-12 06:09:41 +04:00
|
|
|
'nsCSSScanner.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsCSSValue.h',
|
|
|
|
'nsDOMCSSAttrDeclaration.h',
|
|
|
|
'nsDOMCSSDeclaration.h',
|
|
|
|
'nsDOMCSSRGBColor.h',
|
|
|
|
'nsICSSDeclaration.h',
|
|
|
|
'nsICSSLoaderObserver.h',
|
|
|
|
'nsLayoutStylesheetCache.h',
|
2017-01-14 18:16:47 +03:00
|
|
|
'nsMediaFeatures.h',
|
2017-03-10 05:53:17 +03:00
|
|
|
'nsStyleAutoArray.h',
|
2013-07-31 04:36:09 +04:00
|
|
|
'nsStyleConsts.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsStyleCoord.h',
|
|
|
|
'nsStyleStruct.h',
|
|
|
|
'nsStyleStructFwd.h',
|
|
|
|
'nsStyleStructInlines.h',
|
2018-03-26 12:09:17 +03:00
|
|
|
'nsStyleStructList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'nsStyleTransformMatrix.h',
|
|
|
|
'nsStyleUtil.h',
|
2018-03-08 12:22:45 +03:00
|
|
|
'nsTimingFunction.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
EXPORTS.mozilla += [
|
2018-04-16 07:08:20 +03:00
|
|
|
'!ServoCSSPropList.h',
|
2016-02-24 10:08:20 +03:00
|
|
|
'AnimationCollection.h',
|
2017-01-13 18:41:03 +03:00
|
|
|
'BindingStyleRule.h',
|
2018-01-10 21:57:12 +03:00
|
|
|
'CachedInheritingStyles.h',
|
2018-03-22 21:20:41 +03:00
|
|
|
'ComputedStyle.h',
|
|
|
|
'ComputedStyleInlines.h',
|
2016-05-10 11:44:05 +03:00
|
|
|
'CSSEnabledState.h',
|
2018-04-26 08:00:50 +03:00
|
|
|
'CSSPropFlags.h',
|
2016-10-18 07:29:03 +03:00
|
|
|
'DeclarationBlock.h',
|
2016-10-18 07:29:03 +03:00
|
|
|
'DeclarationBlockInlines.h',
|
2016-12-02 11:55:40 +03:00
|
|
|
'DocumentStyleRootIterator.h',
|
2017-01-27 00:39:13 +03:00
|
|
|
'GenericSpecifiedValues.h',
|
2017-01-27 03:51:01 +03:00
|
|
|
'GenericSpecifiedValuesInlines.h',
|
2015-09-03 23:59:00 +03:00
|
|
|
'LayerAnimationInfo.h',
|
2018-02-06 14:51:32 +03:00
|
|
|
'MediaFeatureChange.h',
|
2017-04-30 09:45:32 +03:00
|
|
|
'PostTraversalTask.h',
|
2017-01-05 10:32:22 +03:00
|
|
|
'PreloadedStyleSheet.h',
|
2016-11-23 03:35:55 +03:00
|
|
|
'ServoArcTypeList.h',
|
2016-08-19 14:44:43 +03:00
|
|
|
'ServoBindingList.h',
|
2015-11-25 04:14:39 +03:00
|
|
|
'ServoBindings.h',
|
2016-10-24 12:16:46 +03:00
|
|
|
'ServoBindingTypes.h',
|
2018-04-05 01:41:28 +03:00
|
|
|
'ServoCounterStyleRule.h',
|
2017-10-16 03:54:47 +03:00
|
|
|
'ServoCSSParser.h',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoCSSRuleList.h',
|
2016-10-18 07:29:03 +03:00
|
|
|
'ServoDeclarationBlock.h',
|
2017-05-11 15:11:16 +03:00
|
|
|
'ServoDocumentRule.h',
|
2016-07-19 04:02:55 +03:00
|
|
|
'ServoElementSnapshot.h',
|
2017-05-07 17:36:47 +03:00
|
|
|
'ServoElementSnapshotTable.h',
|
Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio
This patch does the following things:
* Create a new class ServoFontFaceRule for CSSOM of @font-face rule
which mostly follows how nsCSSFontFaceRule was implemented.
* Remove the old nsCSSFontFaceRule and binding code to create it.
* Have FontFace backed by Servo data via making mRule and mDescriptors
of the class hold RawServoFontFaceRule like ServoFontFaceRule.
To keep this patch small, it effectively just delays the conversion
from Servo data to nsCSSValue from parsing to using. This may cause
worse performance if the font set is flushed repeatedly. Supposing we
don't flush font set very frequently, it may not be a big deal.
We may still want to remove the intermediate nsCSSValue conversion at
some point, and have everything converted to their final form directly
when used, but that can happen in followups.
There are some unfortunate bits from this change:
* We lose style sheet for logging in FontFaceSet. This is probably not
all that worse, because we wouldn't have that before either if the
page doesn't use CSSOM to visit it. But we should figure out some
approach to fix it anyway.
* InspectorFontFace no longer shares the same rule object as CSSOM.
This isn't really a problem if the @font-face rule isn't very mutable.
Unless we want to make the rule returned from InspectorFontFace to be
mutable (i.e. via inspector), not using the same object probably isn't
too bad.
This patch switches the code we use to serialize stuff in FontFace and
CSSFontFaceRule, which leads to some failures in tests. Specifically,
the expected changes including:
* Value of font-family now can be serialized to identifier sequence like
font-family property. The old code always serializes it to string,
but it doesn't seem to have different requirement than the property.
Blink can serialize to identifier as well.
* Family name inside local() is also changed to use the same way as
family names elsewhere (i.e. can be identifier sequence). Blink has
the same behavior as the old code, but I don't think it's a big deal.
* The order of descriptors serialized gets changed. I don't think it
matters at all.
* Empty string as font-family via using string syntax is no longer
considered invalid for FontFace. I don't find it is mentioned anywhere
that it should be specifically treated invalid.
MozReview-Commit-ID: 32Fk3Fi9uTs
--HG--
extra : rebase_source : 6221ec8fc56de357b06dd27e770fb175348a2f77
2018-04-04 01:42:10 +03:00
|
|
|
'ServoFontFaceRule.h',
|
2017-07-26 04:30:15 +03:00
|
|
|
'ServoFontFeatureValuesRule.h',
|
2017-05-30 04:10:25 +03:00
|
|
|
'ServoImportRule.h',
|
2017-05-19 09:12:34 +03:00
|
|
|
'ServoKeyframeRule.h',
|
|
|
|
'ServoKeyframesRule.h',
|
2017-03-09 09:37:45 +03:00
|
|
|
'ServoMediaRule.h',
|
2017-03-14 10:51:59 +03:00
|
|
|
'ServoNamespaceRule.h',
|
2017-04-01 00:13:12 +03:00
|
|
|
'ServoPageRule.h',
|
2017-02-13 03:02:29 +03:00
|
|
|
'ServoSpecifiedValues.h',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoStyleRule.h',
|
2016-02-24 10:01:10 +03:00
|
|
|
'ServoStyleSet.h',
|
2018-03-29 14:15:46 +03:00
|
|
|
'ServoStyleSetInlines.h',
|
2017-04-26 10:59:29 +03:00
|
|
|
'ServoSupportsRule.h',
|
2018-03-15 03:59:22 +03:00
|
|
|
'ServoTraversalStatistics.h',
|
2016-09-22 01:42:45 +03:00
|
|
|
'ServoTypes.h',
|
2016-10-13 15:45:03 +03:00
|
|
|
'ServoUtils.h',
|
2015-10-20 02:16:20 +03:00
|
|
|
'SheetType.h',
|
2014-06-24 10:29:54 +04:00
|
|
|
'StyleAnimationValue.h',
|
2016-09-02 07:58:10 +03:00
|
|
|
'StyleComplexColor.h',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheet.h',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheetInfo.h',
|
2016-03-02 01:38:13 +03:00
|
|
|
'StyleSheetInlines.h',
|
2017-04-04 03:04:13 +03:00
|
|
|
'URLExtraData.h',
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS.mozilla.dom += [
|
|
|
|
'CSS.h',
|
2017-07-25 02:12:57 +03:00
|
|
|
'CSSFontFeatureValuesRule.h',
|
2017-05-30 04:10:25 +03:00
|
|
|
'CSSImportRule.h',
|
2017-05-19 09:12:34 +03:00
|
|
|
'CSSKeyframeRule.h',
|
|
|
|
'CSSKeyframesRule.h',
|
2015-05-04 17:28:00 +03:00
|
|
|
'CSSLexer.h',
|
2017-03-09 09:37:38 +03:00
|
|
|
'CSSMediaRule.h',
|
2017-05-11 15:11:15 +03:00
|
|
|
'CSSMozDocumentRule.h',
|
2017-03-14 10:50:28 +03:00
|
|
|
'CSSNamespaceRule.h',
|
2017-04-01 03:14:49 +03:00
|
|
|
'CSSPageRule.h',
|
2014-06-10 06:11:00 +04:00
|
|
|
'CSSRuleList.h',
|
2017-04-26 11:55:36 +03:00
|
|
|
'CSSSupportsRule.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'CSSValue.h',
|
2014-10-02 06:32:05 +04:00
|
|
|
'FontFace.h',
|
|
|
|
'FontFaceSet.h',
|
2015-03-31 06:05:33 +03:00
|
|
|
'FontFaceSetIterator.h',
|
2016-11-09 09:28:24 +03:00
|
|
|
'MediaList.h',
|
2013-12-16 18:03:19 +04:00
|
|
|
'MediaQueryList.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla.css += [
|
|
|
|
'ErrorReporter.h',
|
|
|
|
'GroupRule.h',
|
|
|
|
'ImageLoader.h',
|
|
|
|
'Loader.h',
|
|
|
|
'Rule.h',
|
2017-08-29 16:01:42 +03:00
|
|
|
'SheetLoadData.h',
|
2016-02-24 10:01:11 +03:00
|
|
|
'SheetParsingMode.h',
|
2017-08-29 16:01:42 +03:00
|
|
|
'StreamLoader.h',
|
2017-04-18 19:59:43 +03:00
|
|
|
'URLMatchingFunction.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
2013-11-15 06:42:57 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2016-02-24 10:08:20 +03:00
|
|
|
'AnimationCollection.cpp',
|
2017-02-21 14:27:58 +03:00
|
|
|
'BindingStyleRule.cpp',
|
2018-01-10 21:57:12 +03:00
|
|
|
'CachedInheritingStyles.cpp',
|
2018-03-22 21:20:41 +03:00
|
|
|
'ComputedStyle.cpp',
|
2014-06-12 05:11:00 +04:00
|
|
|
'CounterStyleManager.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'CSS.cpp',
|
2017-07-25 02:12:57 +03:00
|
|
|
'CSSFontFeatureValuesRule.cpp',
|
2017-05-30 04:10:25 +03:00
|
|
|
'CSSImportRule.cpp',
|
2017-05-19 09:12:34 +03:00
|
|
|
'CSSKeyframeRule.cpp',
|
|
|
|
'CSSKeyframesRule.cpp',
|
2015-05-04 17:28:00 +03:00
|
|
|
'CSSLexer.cpp',
|
2017-03-09 09:37:38 +03:00
|
|
|
'CSSMediaRule.cpp',
|
2017-05-11 15:11:15 +03:00
|
|
|
'CSSMozDocumentRule.cpp',
|
2017-04-01 03:14:49 +03:00
|
|
|
'CSSPageRule.cpp',
|
2014-06-10 06:11:00 +04:00
|
|
|
'CSSRuleList.cpp',
|
2017-04-26 11:55:36 +03:00
|
|
|
'CSSSupportsRule.cpp',
|
2016-12-02 11:55:40 +03:00
|
|
|
'DocumentStyleRootIterator.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ErrorReporter.cpp',
|
2014-10-02 06:32:05 +04:00
|
|
|
'FontFace.cpp',
|
2015-07-02 01:45:00 +03:00
|
|
|
'FontFaceSet.cpp',
|
2015-03-31 06:05:33 +03:00
|
|
|
'FontFaceSetIterator.cpp',
|
2017-03-07 07:19:03 +03:00
|
|
|
'GroupRule.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ImageLoader.cpp',
|
2015-09-03 23:59:00 +03:00
|
|
|
'LayerAnimationInfo.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'Loader.cpp',
|
2016-11-09 09:28:24 +03:00
|
|
|
'MediaList.cpp',
|
2013-12-16 18:03:19 +04:00
|
|
|
'MediaQueryList.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsAnimationManager.cpp',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsComputedDOMStyle.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsCSSKeywords.cpp',
|
|
|
|
'nsCSSProps.cpp',
|
|
|
|
'nsCSSScanner.cpp',
|
|
|
|
'nsCSSValue.cpp',
|
|
|
|
'nsDOMCSSAttrDeclaration.cpp',
|
|
|
|
'nsDOMCSSDeclaration.cpp',
|
|
|
|
'nsDOMCSSRect.cpp',
|
2013-10-24 03:05:43 +04:00
|
|
|
'nsDOMCSSRGBColor.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsDOMCSSValueList.cpp',
|
2014-10-09 00:19:14 +04:00
|
|
|
'nsFontFaceLoader.cpp',
|
2015-03-06 11:44:23 +03:00
|
|
|
'nsFontFaceUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsHTMLCSSStyleSheet.cpp',
|
|
|
|
'nsHTMLStyleSheet.cpp',
|
2018-01-30 22:48:26 +03:00
|
|
|
'nsICSSDeclaration.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'nsMediaFeatures.cpp',
|
|
|
|
'nsROCSSPrimitiveValue.cpp',
|
|
|
|
'nsStyleCoord.cpp',
|
|
|
|
'nsStyleStruct.cpp',
|
|
|
|
'nsStyleTransformMatrix.cpp',
|
|
|
|
'nsStyleUtil.cpp',
|
|
|
|
'nsTransitionManager.cpp',
|
2017-04-30 09:45:32 +03:00
|
|
|
'PostTraversalTask.cpp',
|
2017-01-05 10:32:22 +03:00
|
|
|
'PreloadedStyleSheet.cpp',
|
2017-11-24 13:01:47 +03:00
|
|
|
'Rule.cpp',
|
2015-11-25 04:14:39 +03:00
|
|
|
'ServoBindings.cpp',
|
2018-04-05 01:41:28 +03:00
|
|
|
'ServoCounterStyleRule.cpp',
|
2017-10-16 03:54:47 +03:00
|
|
|
'ServoCSSParser.cpp',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoCSSRuleList.cpp',
|
2016-10-18 07:29:03 +03:00
|
|
|
'ServoDeclarationBlock.cpp',
|
2017-05-11 15:11:16 +03:00
|
|
|
'ServoDocumentRule.cpp',
|
2016-07-19 04:02:55 +03:00
|
|
|
'ServoElementSnapshot.cpp',
|
Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio
This patch does the following things:
* Create a new class ServoFontFaceRule for CSSOM of @font-face rule
which mostly follows how nsCSSFontFaceRule was implemented.
* Remove the old nsCSSFontFaceRule and binding code to create it.
* Have FontFace backed by Servo data via making mRule and mDescriptors
of the class hold RawServoFontFaceRule like ServoFontFaceRule.
To keep this patch small, it effectively just delays the conversion
from Servo data to nsCSSValue from parsing to using. This may cause
worse performance if the font set is flushed repeatedly. Supposing we
don't flush font set very frequently, it may not be a big deal.
We may still want to remove the intermediate nsCSSValue conversion at
some point, and have everything converted to their final form directly
when used, but that can happen in followups.
There are some unfortunate bits from this change:
* We lose style sheet for logging in FontFaceSet. This is probably not
all that worse, because we wouldn't have that before either if the
page doesn't use CSSOM to visit it. But we should figure out some
approach to fix it anyway.
* InspectorFontFace no longer shares the same rule object as CSSOM.
This isn't really a problem if the @font-face rule isn't very mutable.
Unless we want to make the rule returned from InspectorFontFace to be
mutable (i.e. via inspector), not using the same object probably isn't
too bad.
This patch switches the code we use to serialize stuff in FontFace and
CSSFontFaceRule, which leads to some failures in tests. Specifically,
the expected changes including:
* Value of font-family now can be serialized to identifier sequence like
font-family property. The old code always serializes it to string,
but it doesn't seem to have different requirement than the property.
Blink can serialize to identifier as well.
* Family name inside local() is also changed to use the same way as
family names elsewhere (i.e. can be identifier sequence). Blink has
the same behavior as the old code, but I don't think it's a big deal.
* The order of descriptors serialized gets changed. I don't think it
matters at all.
* Empty string as font-family via using string syntax is no longer
considered invalid for FontFace. I don't find it is mentioned anywhere
that it should be specifically treated invalid.
MozReview-Commit-ID: 32Fk3Fi9uTs
--HG--
extra : rebase_source : 6221ec8fc56de357b06dd27e770fb175348a2f77
2018-04-04 01:42:10 +03:00
|
|
|
'ServoFontFaceRule.cpp',
|
2017-07-26 04:30:15 +03:00
|
|
|
'ServoFontFeatureValuesRule.cpp',
|
2017-05-30 04:10:25 +03:00
|
|
|
'ServoImportRule.cpp',
|
2017-05-19 09:12:34 +03:00
|
|
|
'ServoKeyframeRule.cpp',
|
|
|
|
'ServoKeyframesRule.cpp',
|
2017-03-09 09:37:45 +03:00
|
|
|
'ServoMediaRule.cpp',
|
2017-03-14 10:51:59 +03:00
|
|
|
'ServoNamespaceRule.cpp',
|
2017-04-01 00:13:12 +03:00
|
|
|
'ServoPageRule.cpp',
|
2017-02-21 14:27:58 +03:00
|
|
|
'ServoSpecifiedValues.cpp',
|
2016-11-23 02:26:20 +03:00
|
|
|
'ServoStyleRule.cpp',
|
2016-02-24 10:01:10 +03:00
|
|
|
'ServoStyleSet.cpp',
|
2017-04-26 10:59:29 +03:00
|
|
|
'ServoSupportsRule.cpp',
|
2017-08-29 16:01:42 +03:00
|
|
|
'StreamLoader.cpp',
|
2014-06-24 10:29:54 +04:00
|
|
|
'StyleAnimationValue.cpp',
|
2016-02-26 04:51:01 +03:00
|
|
|
'StyleSheet.cpp',
|
2017-04-04 03:04:13 +03:00
|
|
|
'URLExtraData.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2013-11-15 06:42:57 +04:00
|
|
|
SOURCES += [
|
Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
2018-03-08 04:59:11 +03:00
|
|
|
'nsCSSAnonBoxes.cpp',
|
2017-10-22 00:50:25 +03:00
|
|
|
'nsCSSPseudoElements.cpp',
|
|
|
|
# nsLayoutStylesheetCache.cpp uses nsExceptionHandler.h, which includes
|
|
|
|
# windows.h.
|
2016-02-25 03:09:34 +03:00
|
|
|
'nsLayoutStylesheetCache.cpp',
|
2013-11-15 06:42:57 +04:00
|
|
|
]
|
Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
2018-03-08 04:59:11 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'msvc':
|
|
|
|
# Needed for gCSSAnonBoxAtoms.
|
|
|
|
SOURCES['nsCSSAnonBoxes.cpp'].flags += ['-Zc:externConstexpr']
|
|
|
|
# Needed for gCSSPseudoElementAtoms.
|
|
|
|
SOURCES['nsCSSPseudoElements.cpp'].flags += ['-Zc:externConstexpr']
|
2013-11-15 06:42:57 +04:00
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-07-23 03:37:51 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-28 18:23:10 +04:00
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../base',
|
|
|
|
'../generic',
|
2015-03-06 11:44:32 +03:00
|
|
|
'../svg',
|
2013-12-04 05:06:16 +04:00
|
|
|
'../xul',
|
2013-11-28 18:23:10 +04:00
|
|
|
'/dom/base',
|
2014-10-25 21:24:55 +04:00
|
|
|
'/dom/html',
|
2014-01-10 07:03:25 +04:00
|
|
|
'/dom/xbl',
|
2014-10-25 21:21:03 +04:00
|
|
|
'/dom/xul',
|
2015-03-17 22:25:35 +03:00
|
|
|
'/image',
|
2013-11-28 18:23:10 +04:00
|
|
|
]
|
2013-12-10 11:18:11 +04:00
|
|
|
|
2014-01-10 07:03:25 +04:00
|
|
|
JAR_MANIFESTS += ['jar.mn']
|
2013-11-05 22:37:54 +04:00
|
|
|
|
|
|
|
RESOURCE_FILES += [
|
|
|
|
'contenteditable.css',
|
|
|
|
'designmode.css',
|
2017-06-08 12:52:46 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
CONTENT_ACCESSIBLE_FILES += [
|
2013-11-05 22:37:54 +04:00
|
|
|
'ImageDocument.css',
|
2017-08-31 12:06:22 +03:00
|
|
|
'res/plaintext.css',
|
2017-06-08 12:52:46 +03:00
|
|
|
'res/viewsource.css',
|
2013-11-05 22:37:54 +04:00
|
|
|
'TopLevelImageDocument.css',
|
|
|
|
'TopLevelVideoDocument.css',
|
|
|
|
]
|
2014-07-28 19:26:16 +04:00
|
|
|
|
2018-04-16 07:08:20 +03:00
|
|
|
GENERATED_FILES += [
|
2018-04-18 12:39:51 +03:00
|
|
|
'nsCSSPropertyID.h',
|
2018-04-16 07:08:20 +03:00
|
|
|
'ServoCSSPropList.h',
|
|
|
|
'ServoCSSPropList.py',
|
|
|
|
]
|
|
|
|
|
2018-04-18 12:39:51 +03:00
|
|
|
prop_id = GENERATED_FILES['nsCSSPropertyID.h']
|
|
|
|
prop_id.script = 'GenerateCSSPropertyID.py:generate'
|
|
|
|
prop_id.inputs = [
|
|
|
|
'nsCSSPropertyID.h.in',
|
2018-04-19 14:08:09 +03:00
|
|
|
'!ServoCSSPropList.py',
|
2018-04-18 12:39:51 +03:00
|
|
|
]
|
|
|
|
|
2018-04-16 07:08:20 +03:00
|
|
|
servo_props = GENERATED_FILES['ServoCSSPropList.h']
|
|
|
|
servo_props.script = 'GenerateServoCSSPropList.py:generate_header'
|
|
|
|
servo_props.inputs = [
|
|
|
|
'!ServoCSSPropList.py',
|
|
|
|
]
|
|
|
|
|
|
|
|
servo_props = GENERATED_FILES['ServoCSSPropList.py']
|
|
|
|
servo_props.script = 'GenerateServoCSSPropList.py:generate_data'
|
|
|
|
servo_props.inputs = [
|
|
|
|
'ServoCSSPropList.mako.py',
|
|
|
|
]
|
|
|
|
|
2016-05-11 00:35:56 +03:00
|
|
|
if CONFIG['COMPILE_ENVIRONMENT']:
|
|
|
|
GENERATED_FILES += [
|
|
|
|
'nsCSSPropsGenerated.inc',
|
|
|
|
]
|
2018-04-16 07:08:20 +03:00
|
|
|
|
2016-05-11 00:35:56 +03:00
|
|
|
css_props = GENERATED_FILES['nsCSSPropsGenerated.inc']
|
|
|
|
css_props.script = 'GenerateCSSPropsGenerated.py:generate'
|
|
|
|
css_props.inputs = [
|
2018-04-17 07:40:12 +03:00
|
|
|
'!ServoCSSPropList.py',
|
2016-05-11 00:35:56 +03:00
|
|
|
]
|
2017-07-06 21:34:03 +03:00
|
|
|
|
|
|
|
CONFIGURE_SUBST_FILES += [
|
|
|
|
'bindgen.toml',
|
|
|
|
]
|