gecko/layout/style
Cameron McCormack 5edbefbd77 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 13:09:40 +11:00
..
crashtests Bug 945048 - Correctly check for the CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE flag when parsing pseudo-classes after pseudo-elements. r=bz 2013-12-02 13:06:20 +11:00
test Bug 946895 - Add missing values of list-style-type for property_database.js 2013-12-11 12:55:43 -08:00
xbl-marquee Bug 911864 - Annotate the members of marquee that correspond to properties in HTMLMarqueeElement per HTML5. r=smaug 2013-11-01 15:31:57 +01:00
AnimationCommon.cpp Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
AnimationCommon.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
arrow.gif
arrowd.gif
contenteditable.css
CSS.cpp Bug 903772: Part 3 - Refactor GlobalObject. r=peterv 2013-08-22 22:17:08 -07:00
CSS.h
CSSCalc.h
CSSValue.h
CSSVariableDeclarations.cpp Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
CSSVariableDeclarations.h Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
Declaration.cpp Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
Declaration.h Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
designmode.css
ErrorReporter.cpp
ErrorReporter.h
forms.css Bug 947728 part 2 - Make |-moz-appearance:number-input| the UA style sheet default for <input type=number>, and make the value 'textfield' hide the spinner. r=roc 2013-12-08 23:26:07 +00:00
full-screen-override.css
generate-stylestructlist.py Bug 873368 - Automatically generate nsStyleStructList.h. r=dbaron,ted 2013-07-16 14:32:25 +10:00
GroupRule.h Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
html.css Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz 2013-06-10 08:30:00 -07:00
ImageDocument.css Bug 879131 - Use prefix-less zoom-in and zoom-out CSS property values. r=ms2ger 2013-06-04 17:41:31 -04:00
ImageLoader.cpp Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc 2013-10-01 17:00:38 -04:00
ImageLoader.h Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
ImportRule.h Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn. 2013-06-23 14:03:39 +02:00
jar.mn
Loader.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
Loader.h Bug 923251 - Part b: Make Loader::PrepareSheet return void; r=heycam 2013-11-11 08:57:53 +01:00
Makefile.in Bug 937224 - Part e: Move LOCAL_INCLUDES to moz.build in layout/; r=mshal 2013-11-28 15:23:10 +01:00
moz.build Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
NameSpaceRule.h Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn. 2013-06-23 14:03:39 +02:00
nsAnimationManager.cpp Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
nsAnimationManager.h Backed out changeset 87ee0a1865e4 (bug 914847) 2013-10-22 16:55:14 -04:00
nsComputedDOMStyle.cpp Bug 874919 - Added a check to DoGetWidth/Height so the width/height properties of getComputedStyle now return correct values on inline SVG elements. r=bz 2013-12-11 14:13:48 -05:00
nsComputedDOMStyle.h Bug 702508 part 2: Support parsing/computing the CSS property "align-content". r=dbaron 2013-12-05 10:57:50 -08:00
nsComputedDOMStylePropertyList.h Bug 702508 part 2: Support parsing/computing the CSS property "align-content". r=dbaron 2013-12-05 10:57:50 -08:00
nsCSSAnonBoxes.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSAnonBoxes.h
nsCSSAnonBoxList.h Bug 874507 - Make clip-path, filter, mask and opacity work on <marker> elements. r=longsonr 2013-09-16 15:06:29 +10:00
nsCSSDataBlock.cpp Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
nsCSSDataBlock.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsCSSFontDescList.h
nsCSSKeywordList.h Bug 947728 part 1 - Introduce a new 'number-input' value for -moz-appearance that behaves exactly as 'textfield' does. r=roc 2013-12-08 23:23:28 +00:00
nsCSSKeywords.cpp Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
nsCSSKeywords.h
nsCSSParser.cpp Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
nsCSSParser.h Bug 923251 - Part a: Make ParseMediaList return void; r=heycam 2013-11-11 08:57:34 +01:00
nsCSSPropAliasList.h
nsCSSProperty.h Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
nsCSSPropertySet.h Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSPropList.h Bug 939905: Add support for CSS "flex-flow" shorthand property. r=heycam 2013-12-05 10:57:51 -08:00
nsCSSProps.cpp Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
nsCSSProps.h Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron 2013-12-12 13:09:40 +11:00
nsCSSPseudoClasses.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSPseudoClasses.h Bug 922669 - Part 1: Parse selectors with user action pseudo-classes after pseudo-elements. r=bz 2013-11-28 17:46:38 +11:00
nsCSSPseudoClassList.h Bug 913440 - Implement a pseudo class to highlight element easily. r=bz 2013-09-07 11:39:50 +02:00
nsCSSPseudoElementList.h Bug 930020 - Part 2: Use flag to hide <input type=number> pseudo-elements from content. r=bz 2013-11-28 18:03:16 +11:00
nsCSSPseudoElements.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSPseudoElements.h Bug 938334 - Use PseudoElementSupportsStyleAttribute(Type) when it makes sense to do so and remove now unnecessary nsCSSPseudoElements functions. r=dbaron 2013-12-02 22:38:45 +01:00
nsCSSRuleProcessor.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSRuleProcessor.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsCSSRules.cpp Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
nsCSSRules.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsCSSScanner.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsCSSScanner.h Bug 914072 - Have nsCSSScanner store any implied characters at EOF needed for correct serialization. r=dbaron 2013-12-07 12:25:07 +11:00
nsCSSStyleSheet.cpp Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
nsCSSStyleSheet.h Bug 921718 - Part b: Move MediaList to WebIDL; r=bz 2013-11-11 09:03:17 +01:00
nsCSSValue.cpp Bug 913264 - add none value to font-variant-ligatures. r=dbaron 2013-11-19 13:30:25 +09:00
nsCSSValue.h Bug 921731 - Part 1: Add new eCSSUnit_Unset unit for nsCSSValues. r=bzbarsky 2013-10-04 04:49:17 +10:00
nsDOMCSSAttrDeclaration.cpp Backout changeset 3fb9ea77d858 for bug 876321 due to test failures (CLOSED TREE) 2013-11-03 23:14:26 -08:00
nsDOMCSSAttrDeclaration.h Back out 0a88dee3b92b:dc5cc7d7b84d (bug 911889) for beaucoup unexpected assertions 2013-10-28 23:38:02 -07:00
nsDOMCSSDeclaration.cpp Bug 913619 - Minimize the #includes in image/src; r=jrmuizel 2013-09-07 09:01:08 -04:00
nsDOMCSSDeclaration.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsDOMCSSRect.cpp Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
nsDOMCSSRect.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsDOMCSSRGBColor.cpp Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
nsDOMCSSRGBColor.h
nsDOMCSSValueList.cpp Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
nsDOMCSSValueList.h
nsDOMMediaQueryList.cpp Bug 881323 - Re-implement CycleCollectorParticipant with actual vtables, with constexpr to avoid static initializers. r=mccr8 2013-08-02 10:29:05 +09:00
nsDOMMediaQueryList.h
nsFontFaceLoader.cpp bug 939049 - get rid of useless QIs r=smaug 2013-11-15 11:32:12 -05:00
nsFontFaceLoader.h Bug 906852 - Make layout/style/nsFontFaceLoader.* pointer notation follow layout code style. r=mats 2013-09-25 09:48:20 -04:00
nsHTMLCSSStyleSheet.cpp Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsHTMLCSSStyleSheet.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsHTMLStyleSheet.cpp Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsHTMLStyleSheet.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsICSSDeclaration.h Bug 887533: Remove even more includes from dom/bindings. r=bz 2013-08-22 22:17:11 -07:00
nsICSSLoaderObserver.h
nsICSSPseudoComparator.h
nsICSSRuleList.h Bug 892489 - Implement the WebIDL API for CSSRuleList; r=bz 2013-07-24 09:27:17 +02:00
nsICSSStyleRuleDOMWrapper.h
nsIMediaList.h Bug 921718 - Part b: Move MediaList to WebIDL; r=bz 2013-11-11 09:03:17 +01:00
nsIStyleRule.h
nsIStyleRuleProcessor.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsIStyleSheet.h Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn. 2013-06-23 14:03:39 +02:00
nsLayoutStylesheetCache.cpp Backed out 9 changesets (bug 943660, bug 936964) because of ASAN use-after-free crashes on browser-chrome and mochitest-other 2013-11-27 20:05:00 -05:00
nsLayoutStylesheetCache.h Backed out 9 changesets (bug 943660, bug 936964) because of ASAN use-after-free crashes on browser-chrome and mochitest-other 2013-11-27 20:05:00 -05:00
nsMediaFeatures.cpp Bug 936628: Add media query to check for whether we have a color picker backend available. r=jimm 2013-11-10 19:07:59 -08:00
nsMediaFeatures.h
nsNthIndexCache.cpp Bug 940033 - js::HashMapEntry::{key,value} fields should be private, with accessors, and the former should expose a const reference. r=jimb 2013-11-25 17:35:09 -08:00
nsNthIndexCache.h Bug 908576 part 7. Move the various DOMProxyHandler classes into the binding implementation files. r=smaug 2013-08-23 22:42:42 -04:00
nsROCSSPrimitiveValue.cpp Bug 932102 - Fix rooting hazard in nsStyleUtil::AppendAngleValue r=dbaron 2013-11-21 01:00:57 +00:00
nsROCSSPrimitiveValue.h Bug 897392 - Implement parsing of filter:hue-rotate(). r=heycam 2013-07-26 16:02:33 +10:00
nsRuleData.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
nsRuleData.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsRuleNode.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsRuleNode.h Bug 945580 - Add nsRuleNode::IsInherited helper function. r=dbaron 2013-12-03 14:42:09 +11:00
nsRuleProcessorData.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsRuleWalker.h
nsStyleAnimation.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsStyleAnimation.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsStyleConsts.h Bug 702508 part 2: Support parsing/computing the CSS property "align-content". r=dbaron 2013-12-05 10:57:50 -08:00
nsStyleContext.cpp Comment typo fix; no bug. (DONTBUILD) 2013-11-07 15:33:26 +11:00
nsStyleContext.h
nsStyleCoord.cpp Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
nsStyleCoord.h
nsStyleSet.cpp Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo 2013-12-08 21:52:54 -05:00
nsStyleSet.h Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
nsStyleStruct.cpp Bug 947728 part 2 - Make |-moz-appearance:number-input| the UA style sheet default for <input type=number>, and make the value 'textfield' hide the spinner. r=roc 2013-12-08 23:26:07 +00:00
nsStyleStruct.h Bug 702508 part 2: Support parsing/computing the CSS property "align-content". r=dbaron 2013-12-05 10:57:50 -08:00
nsStyleStructFwd.h
nsStyleStructInlines.h Bug 908778 - Don't #include nsIContent.h in nsIFrame.h; r=mats 2013-08-23 18:15:45 -04:00
nsStyleTransformMatrix.cpp Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
nsStyleTransformMatrix.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
nsStyleUtil.cpp Bug 932102 - Fix rooting hazard in nsStyleUtil::AppendAngleValue r=dbaron 2013-11-21 01:00:57 +00:00
nsStyleUtil.h Bug 942137 - Fix non-unified build after bug 932102; r=dbaron 2013-11-22 23:08:35 +09:00
nsTransitionManager.cpp Bug 936864 - Fix logic error in async animation code. r=roc 2013-11-13 17:21:39 -05:00
nsTransitionManager.h Backed out changeset 87ee0a1865e4 (bug 914847) 2013-10-22 16:55:14 -04:00
plaintext.css
quirk.css
Rule.h Bug 784739 - Switch from NULL to nullptr in layout/; r=ehsan 2013-10-08 14:47:21 -04:00
StyleRule.cpp Bug 922669 - Part 2: Use a different operator to represent the element -> pseudo-element relationship in selectors. r=bz 2013-11-28 17:46:38 +11:00
StyleRule.h Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
TopLevelImageDocument.css Bug 298619 - Use EXIF image orientation in top-level image documents. r=dolske 2013-08-29 17:16:30 -07:00
TopLevelVideoDocument.css
ua.css Bug 948654: Uncomment lines to make 'align-content' and 'flex-wrap' inherit through scroll frames to scrolled flex containers. r=mats 2013-12-10 22:31:38 -08:00
viewsource.css Remove superseded workaround, bug 870794, r=roc 2013-06-21 09:26:59 +03:00