Граф коммитов

1227 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 553f82a116 Bug 1203142 - Insert /**/ separate between two adjacent '-' symbols when serializing token streams. r=simon.sapin 2015-09-17 11:34:04 +10:00
Michael Layzell 0097c41e01 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Xidorn Quan 08d16d982c Bug 1202908 part 2 - Remove CSS_PROPERTY_ALWAYS_ENABLED_IN_CHROME_OR_CERTIFIED_APP. r=dbaron
--HG--
extra : source : df99e17db72d36a9e7b085c35818b4b4ca8a410d
2015-09-11 16:00:10 +10:00
Jonathan Kew 3129f0ce22 Bug 1057680 - Add support for font-stretch values in the font shorthand. r=jdaggett
* * *
Bug 1057680 - pt 1 - Add a font-stretch keyword to the valid values for the font shorthand in property_database.js. r=jdaggett
* * *
Bug 1057680 - pt 2.1 - Fix up existing tests that depend on the shorthand not handling font-stretch values. r=jdaggett
2015-09-07 09:09:48 +01:00
Wes Kocher 53368e989a Backed out 2 changesets (bug 1035091)
a=backout

Backed out changeset 1fc07bdd9aa8 (bug 1035091)
Backed out changeset f6e98029d1cb (bug 1035091)

--HG--
rename : layout/style/test/chrome/test_moz_document_matching.html => layout/style/test/chrome/test_moz_document_rules.html
rename : layout/style/test/chrome/test_moz_document_nesting.html => layout/style/test/test_bug511909.html
rename : layout/style/test/chrome/test_moz_document_serialization.html => layout/style/test/test_rule_serialization.html
2015-09-03 11:41:39 -07:00
Zack Weinberg 7912db5bd1 Bug 1035091 part 2: disable @-moz-document in author sheets. r=heycam
--HG--
rename : layout/style/test/test_condition_text.html => layout/style/test/chrome/moz_document_condition_text.css
rename : layout/style/test/test_rule_serialization.html => layout/style/test/chrome/moz_document_serialization.css
rename : layout/style/test/test_condition_text.html => layout/style/test/chrome/test_moz_document_condition_text.html
rename : layout/style/test/chrome/test_moz_document_rules.html => layout/style/test/chrome/test_moz_document_matching.html
rename : layout/style/test/test_bug511909.html => layout/style/test/chrome/test_moz_document_nesting.html
rename : layout/style/test/test_rule_serialization.html => layout/style/test/chrome/test_moz_document_serialization.html
extra : rebase_source : 9d97f4cfe5e5e3bbda1d1b7910db44faf33d14c1
2015-09-02 13:54:30 -04:00
Zack Weinberg a48ac7cfae Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam
--HG--
extra : rebase_source : 2d860f8493e328dec364a00282fcf1257a1c4d23
2015-09-02 13:52:49 -04:00
Benoit Girard 1498226863 Bug 1195884 - Reject CSS 'will-change: will-change' for spec compliance. r=dholbert
--HG--
extra : commitid : 9nZkbbC8zQe
extra : rebase_source : ff05ba0e7fe0ab6ca574c525d3505bed5f341184
2015-08-18 16:07:01 -04:00
Cameron McCormack 81c7895606 Bug 968923 - part 3d - record use counter information from the CSS parser; r=dbaron 2015-06-03 15:21:24 -04:00
Mike Taylor 6d25721506 Bug 1189922. Add a preference to enable global whitelisting of the CSSUnprefixingService. r=dholbert
This is a temporary preference to allow for testing-in-the-wild by a larger
audience, for nightly builds. When 1177263 is fixed this can be removed.
---
 layout/style/nsCSSParser.cpp | 14 ++++++++++++++
 modules/libpref/init/all.js  |  6 ++++++
 2 files changed, 20 insertions(+)
2015-08-02 10:27:44 -07:00
Masatoshi Kimura f75c7dfbe8 Bug 1186636 - Add a pref to configure -moz prefixed gradients support. r=dholbert 2015-07-24 20:29:52 +09:00
L. David Baron 11bdbcb3e6 Bug 1184452 - Correctly reject @font-face descriptors that have garbage after them. r=heycam
I confirmed that the patch fixes the original testcase (attachment
8634600).  I also confirmed that with the whole patch,
layout/style/test/test_descriptor_syntax_errors.html passes, but with
the new tests but not the code change, it reports 12 failures.

--HG--
extra : transplant_source : %C4%11l%E2%A0a%C0%EB%BAe%F1%C7%F0%D2d%A7%0B%03%3D%8C
2015-07-21 07:55:42 -07:00
Masatoshi Kimura 52428897a6 Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Masatoshi Kimura 6c8654865c Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Cameron McCormack 6170b6835d Bug 1099448 - Don't accept box properties with invalid calc() or rgb() etc. function values. r=dbaron 2015-07-08 16:28:03 +10:00
Cameron McCormack 0cfecb2513 Bug 1118103 - Swap the aliasing direction of -moz-margin-start <-> margin-inline-start etc. r=dbaron 2015-07-03 12:22:56 +10:00
Cameron McCormack e5fd8052c4 Bug 1179078 - Recover from parse errors inside image values in border-image properly. r=dholbert 2015-07-01 16:42:31 +10:00
Kyle Zentner 95a87c9836 Bug 1170173 - Parse CSS 'contain' property. r=dholbert
--HG--
extra : rebase_source : 73e15a3049f7e69fdecd7b45157df25fca949b0c
2015-06-04 16:38:00 +02:00
Michael Layzell 6fd724199e Bug 1168156 - Remove unused nsCSSValueTokenStream::mSheet. r=heycam 2015-05-28 09:02:00 -04:00
David Major b0aca35272 Bug 1167189: Cleanup NS_RUNTIMEABORT("OOM") in layout/. r=dbaron
--HG--
extra : rebase_source : 6fab38c5b192978f0a7cbfe88f865d15b6065a42
2015-05-26 17:04:24 -04:00
Daniel Holbert 1596e3c937 Bug 1167311: When we unprefix 'display:-webkit-box' on a whitelisted site, only set flag to unprefix '-moz-box' if we're parsing a series of declarations. r=dbaron 2015-05-22 12:47:01 -07:00
Kyle Zentner c02e8d6ecf Bug 1164953 - Update CSS grid <line-names> to use brackets instead of parens. r=dholbert
--HG--
extra : rebase_source : 97b67ed32a193d376ac6bd7f652c98b8576293a7
2015-05-19 15:20:00 -04:00
Daniel Holbert 07645d8b7d Bug 1132748 part 1: Add CSSUnprefixingService API for handling prefixed gradient expressions, with stub JS implementation. r=dbaron 2015-05-07 09:04:42 -07:00
Tom Tromey 8e26488934 Bug 1152033 - Expose CSS lexer to js. r=heycam, r=bz
--HG--
extra : rebase_source : 1eaabcb6629c185f2e18f27b8c09d9a11611869a
2015-05-04 10:28:00 -04:00
Tom Tromey fb09be63fd Bug 1112014 - Avoid false negatives in CssPropertySupportsType. r=heycam
IGNORE IDL

--HG--
extra : rebase_source : 97bfb3d5faadf2969a317510a909656c809c33ed
2015-05-04 07:39:00 -04:00
Mats Palmgren 167c7e473b Bug 1151201 - [css-grid] Update parsing of 'auto' in track-sizing functions to latest version of the spec. r=simon.sapin 2015-04-30 18:42:50 +00:00
Kevin Wern e47e3405b8 Bug 1148694 patch 1 - Stop creating a CharsetRule object when parsing @charset rules. r=dbaron 2015-04-21 01:26:11 -07:00
Makoto Kato e9c2da8c5f Bug 723197 - Remove a workaround of VS2010 PGO bug. r=dbaron 2015-04-10 17:09:11 +09:00
Cameron McCormack 44a6617223 Bug 1148711 - Remove nsresult return values from nsCSSParser::Parse{Property,Variable}. r=dholbert 2015-03-29 22:57:04 +11:00
Xidorn Quan 19909f89a5 Bug 1144607 part 2 - Support string value for list-style-tyle. r=dbaron
--HG--
extra : source : 6beebea539fc3fbd9427965dcd8ef6b39eb3ff00
2015-03-27 09:48:10 +11:00
Kearwood (Kip) Gilbert 4100987cc3 Bug 1140623 - Correct mochitest failures that occur when the layout.css.scroll-snap.enabled preference is enabled (V3 Patch). r=cam
- CSS scroll snapping related attributes are now sorted correctly
- Now passes mochitests with CSS scroll snapping enabled:
  - layout/style/test/test_bug657143.html
  - layout/style/test/test_compute_data_with_start_struct.html
  - layout/style/test/test_property_syntax_errors.html
  - layout/style/test/test_style_struct_copy_constructors.html
  - layout/style/test/test_value_computation.html

--HG--
extra : rebase_source : fe217c528da6806b245c935597855022b3ea2d4b
2015-03-13 18:00:00 +01:00
Daniel Holbert 908a699328 Bug 1132743: Only allow CSS Unprefixing Service to be activated for hosts on a small, hardcoded whitelist. r=dbaron f=bz
--HG--
rename : layout/style/test/test_unprefixing_service.html => layout/style/test/unprefixing_service_iframe.html
2015-03-13 13:15:09 -07:00
Wes Kocher bbd726bf8c Backed out 2 changesets (bug 1132743) for asan mochitest-e10s-1 bustage CLOSED TREE
Backed out changeset 4e00f10f5a2d (bug 1132743)
Backed out changeset 720842726906 (bug 1132743)
2015-03-13 15:16:33 -07:00
Daniel Holbert aff7407e30 Bug 1132743: Only allow CSS Unprefixing Service to be activated for hosts on a small, hardcoded whitelist. r=dbaron f=bz
--HG--
rename : layout/style/test/test_unprefixing_service.html => layout/style/test/unprefixing_service_iframe.html
2015-03-13 13:15:09 -07:00
Carsten "Tomcat" Book 2d961b94ee Backed out changeset ef3881f8d1a3 (bug 1140623) for causing perma m20 failures on b2g
--HG--
extra : rebase_source : 95c46b1f74ba2a7852d2c1648af170c3ca8c9276
2015-03-13 16:32:50 +01:00
Kearwood (Kip) Gilbert c25ae95f1b Bug 1140623 - Correct mochitest failures that occur when the layout.css.scroll-snap.enabled preference is enabled (V2 Patch). r=heycam
- CSS scroll snapping related attributes are now sorted correctly
- Now passes mochitests with CSS scroll snapping enabled:
  - layout/style/test/test_bug657143.html
  - layout/style/test/test_compute_data_with_start_struct.html
  - layout/style/test/test_property_syntax_errors.html
  - layout/style/test/test_style_struct_copy_constructors.html
  - layout/style/test/test_value_computation.html
2015-03-12 11:22:00 +01:00
Kearwood Gilbert c9e0efb870 Bug 945584: Part 1 - Style support for scroll snapping attributes, r=cam
- Implemented style support for new attributes:
  - scroll-snap-type
  - scroll-snap-type-x
  - scroll-snap-type-y
  - scroll-snap-points-x
  - scroll-snap-points-y
  - scroll-snap-destination
  - scroll-snap-coordinate

--HG--
extra : rebase_source : 0a9a79c7d139a3c752f55395c697f23004d6ef34
2014-02-04 14:54:22 +13:00
Cameron McCormack 7c9ab125c2 Bug 1138788 - Allow CSSParserImpl::SetURLValue assertion to succeed when under IsValueValidForProperty, even with no sheet principal. r=dholbert 2015-03-04 18:00:09 +11:00
Boris Zbarsky edd402d841 Bug 1137984. When parsing attribute selectors, treat EOF as ']' any place ']' is allowed. r=dbaron 2015-03-03 07:12:00 -05:00
Daniel Holbert 9bd3f234d9 Bug 1107378 - Part 3: In cases where we're unprefixing, treat "display:-webkit-box" as "display: flex" (& same for "-moz-box" if we previously saw "-webkit-box"). r=dbaron 2015-02-26 12:07:07 -08:00
Daniel Holbert 2e3b8890c2 Bug 1107378 - Part 2: Make the CSS Parser call out to the unprefixing service, when it detects a vendor-prefixed property name (if pref is enabled). r=dbaron 2015-02-26 12:07:06 -08:00
Wes Kocher cc0d195b68 Backed out 4 changesets (bug 1107378) as a last grasped straw to figure out the m-dt bustage on a CLOSED TREE
Backed out changeset 44144b892414 (bug 1107378)
Backed out changeset 5a8d5e8ff524 (bug 1107378)
Backed out changeset 960037d0fc98 (bug 1107378)
Backed out changeset 23fb39cb0f97 (bug 1107378)
2015-02-26 23:35:25 -08:00
Daniel Holbert 3685d087a3 Bug 1107378 part 3: In cases where we're unprefixing, treat "display:-webkit-box" as "display: flex" (& same for "-moz-box" if we previously saw "-webkit-box"). r=dbaron 2015-02-26 12:07:07 -08:00
Daniel Holbert 6e8f218fc4 Bug 1107378 part 2: Make the CSS Parser call out to the unprefixing service, when it detects a vendor-prefixed property name (if pref is enabled). r=dbaron 2015-02-26 12:07:06 -08:00
Daniel Holbert 7bbef2cd90 Bug 1135200: Hook up nsCSSParser's pref-backed bool variables in a startup method. r=heycam 2015-02-26 09:02:19 -08:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Masatoshi Kimura be535304d8 Bug 1111290 - Part 1: Remove MOZ_(BEGIN|END)_ENUM_CLASS. r=waldo 2015-01-26 07:22:07 +09:00
Xidorn Quan a9545c0e64 Bug 1123917 part 2 - Make ruby-position only accept [over|under] instead of compound values. r=dholbert
--HG--
extra : rebase_source : fe13f96fe7bc771dfd899bd7ac391f565899d26d
extra : source : 480c409240940afd5e4e6ce4cf995e5e1a26e640
2015-01-22 14:04:55 +11:00
Cameron McCormack 633dc9fccf Bug 1121768 - Part 4: Store token stream values in all subproperties of a shorthand with a variable reference. r=dbaron
This will make UA style sheet-only properties with a variable reference
work.  (It's probably unlikely that we'll ever have such properties,
though.)
2015-01-17 15:55:07 +11:00
Cameron McCormack 0c9d4ac32b Bug 1121768 - Part 3: Look at all subproperties (not just content-visible ones) in nsCSSExpandedDataBlock methods. r=dbaron
We need to ensure we transfer (or clear) all subproperties of a
shorthand that is only enabled in UA style sheets or in certified apps.
Otherwise, the shorthand will parse correctly and get stored on the
nsCSSExpandedDataBlock but the transfer (or clear) method will skip
all of the subproperties.
2015-01-17 15:55:07 +11:00
Cameron McCormack b6fbc240b2 Bug 1121768 - Part 2: Give CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES an nsCSSProps::EnabledState argument. r=dbaron 2015-01-17 15:55:07 +11:00
Cameron McCormack 7ab98884f5 Bug 1083134 - Part 8: Add border-block-{start,end} logical shorthands. r=dbaron 2015-01-17 15:22:52 +11:00
Cameron McCormack 5440e0199a Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2015-01-17 15:16:02 +11:00
Cameron McCormack 4492448c51 Bug 649142 - Part 5: Convert logical border properties. r=dbaron 2015-01-17 15:16:02 +11:00
Cameron McCormack 8184e4e1ed Bug 649142 - Part 4: Convert logical margin properties. r=dbaron 2015-01-17 15:16:02 +11:00
Cameron McCormack ef9c6fb6bd Bug 649142 - Part 3: Convert logical padding properties. r=dbaron
Here we convert the logical padding properties into their new resolved-at-
cascade-time implementations.  This involves:

* converting -moz-padding-{start,end} into logical longhand properties
* adding padding-inline-{start,end} aliases for -moz-padding-{start,end}
* converting padding-{left,right} into longhand properties
* removing padding-{left,right}-value and
  padding-{left,right}-{ltr,rtl}-source internal properties

The CSS parser and various tests are simplified a bit as a result.
2015-01-17 15:16:02 +11:00
Cameron McCormack ddf87d6cf6 Bug 649142 - Part 1: Add macros and flags for defining logical properties and don't allocate storage for them in nsRuleData. r=dbaron
We define a new flag CSS_PROPERTY_LOGICAL to be used for logical longhand
properties and a new CSS_PROP_LOGICAL macro in nsCSSPropList.h to
define them.

When using CSS_PROP to capture all properties, includers must now
explicitly indicate whether logical properties are included or not,
by defining CSS_PROP_LIST_EXCLUDE_LOGICAL (to exclude them),
CSS_PROP_LIST_INCLUDE_LOGICAL (to include them), or CSS_PROP_LOGICAL
(to capture them separately from other properties).
2015-01-17 15:16:01 +11:00
Mats Palmgren a7ff0f7462 Bug 1117538 part 2 - [css-grid] Accept 'grid-auto-flow: dense' which now implies 'row dense'. r=simon.sapin 2015-01-05 22:20:56 +00:00
Mats Palmgren 0c2e9247ec Bug 1117538 part 1 - [css-grid] Remove 'grid-auto-flow: stack'. r=dholbert
Because it has been removed from the spec per:
http://lists.w3.org/Archives/Public/www-style/2014Dec/0321.html
2015-01-05 22:20:56 +00:00
Phil Ringnalda 41cdae473a Back out 9 changesets (bug 649142)
Backed out changeset 936703c75200 (bug 649142)
Backed out changeset b0252d2620d8 (bug 649142)
Backed out changeset 69ddb2036c50 (bug 649142)
Backed out changeset 67748675e669 (bug 649142)
Backed out changeset 15ed55c61f4e (bug 649142)
Backed out changeset 35c42cd138e1 (bug 649142)
Backed out changeset 1335630cf287 (bug 649142)
Backed out changeset b5725cd39a31 (bug 649142)
Backed out changeset b0eb691d6695 (bug 649142)
2014-12-30 20:04:20 -08:00
Cameron McCormack c501eb9fff Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2014-12-31 12:18:16 +11:00
Cameron McCormack 324837a87d Bug 649142 - Part 5: Convert logical border properties. r=dbaron 2014-12-31 12:18:15 +11:00
Cameron McCormack 246dccd863 Bug 649142 - Part 4: Convert logical margin properties. r=dbaron 2014-12-31 12:18:14 +11:00
Cameron McCormack c1366ac48c Bug 649142 - Part 3: Convert logical padding properties. r=dbaron
Here we convert the logical padding properties into their new resolved-at-
cascade-time implementations.  This involves:

* converting -moz-padding-{start,end} into logical longhand properties
* adding padding-inline-{start,end} aliases for -moz-padding-{start,end}
* converting padding-{left,right} into longhand properties
* removing padding-{left,right}-value and
  padding-{left,right}-{ltr,rtl}-source internal properties

The CSS parser and various tests are simplified a bit as a result.
2014-12-31 12:18:14 +11:00
Cameron McCormack 6cceecc24a Bug 649142 - Part 1: Add macros and flags for defining logical properties and don't allocate storage for them in nsRuleData. r=dbaron
We define a new flag CSS_PROPERTY_LOGICAL to be used for logical longhand
properties and a new CSS_PROP_LOGICAL macro in nsCSSPropList.h to
define them.

When using CSS_PROP to capture all properties, includers must now
explicitly indicate whether logical properties are included or not,
by defining CSS_PROP_LIST_EXCLUDE_LOGICAL (to exclude them),
CSS_PROP_LIST_INCLUDE_LOGICAL (to include them), or CSS_PROP_LOGICAL
(to capture them separately from other properties).
2014-12-31 12:18:12 +11:00
Xidorn Quan d04c336024 Bug 1055665 part 1 - Add support for parsing & computing CSS property "ruby-position". r=dholbert
--HG--
extra : source : 2fd75789fe00d972d78a5b189f1ac50f6b2a385f
2014-12-09 17:47:18 +11:00
Daniel Holbert 19a6f2a9df Bug 1113811: Remove unnecessary null-check of infallible 'new', in ParseDeclarationBlock. r=heycam 2014-12-22 18:21:45 -08:00
Wes Kocher 5014637e84 Backed out changeset f6a3f2525323 (bug 1113811) for breaking lots of things on a CLOSED TREE 2014-12-22 17:03:11 -08:00
Daniel Holbert bc842894b3 Bug 1113811: Remove unnecessary null-check of infallible 'new', in ParseDeclarationBlock. r=heycam 2014-12-22 16:05:05 -08:00
Mats Palmgren 809b15f283 Bug 1105938 - Don't use nsCSSProps::PropHasFlags(eCSSPropertyExtra_variable, ...). r=heycam 2014-12-01 15:55:16 +00:00
L. David Baron 014bfdd4eb Bug 1102650 - Make the :-moz-dir() and :-moz-locale-dir() selectors be valid selectors (matching nothing) with arguments other than rtl and ltr, rather than invalid. r=heycam 2014-11-26 22:29:45 -08:00
Daniel Holbert 6f9dea011b Bug 1093316 part 2: Backout changeset af2a4fb980ad (i.e. backout bug 1032922 part 1), to reflect CSSWG removing "flex-basis: main-size" from the flexbox spec.
Landing on a CLOSED TREE with a=kwierso
2014-11-25 15:40:24 -08:00
Daniel Holbert a03d3e37d5 Bug 1093316 part 1: Backout changeset aece7f9f944c (i.e. backout bug 1032922 part 2), to reflect CSSWG removing "flex-basis: main-size" from the flexbox spec. 2014-11-25 11:28:15 -08:00
Dirk Schulze 123849abdb Bug 1074528 - Implement parsing/computing of inset(). r=dbaron 2014-11-22 05:28:00 +01:00
Tooru Fujisawa edefbef191 Bug 1039488 - Turn text-decoration into a shorthand. r=dbaron 2014-11-18 19:23:09 +09:00
L. David Baron 89d590da2b Bug 1082899 patch 4 - Rename existing flag for pseudo-elements to better match what it is (UA sheets, not chrome sheets, although EditorOverride is included). r=birtles 2014-10-23 12:57:28 -04:00
L. David Baron 7bc897c97c Bug 1082899 patch 3 - Add flag for marking pseudo-classes as UA-sheet only. r=birtles 2014-10-23 12:57:28 -04:00
Rik Cabanier 85aa244222 Bug 1074056 - Part 1 - Add support for interpolation hints to CSS gradients. r=dbaron 2014-10-22 14:24:00 +02:00
Dirk Schulze 62628a69a2 Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze 1d1b7d9234 Bug 1077388 - Fix parsing/computing issue with polygon(). r=dbaron 2014-10-10 02:10:00 -04:00
Dirk Schulze a028173cff Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Xidorn Quan f69d6b2935 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-25 02:19:00 +02:00
Carsten "Tomcat" Book 84fa1ee595 Backed out changeset d53b25dcf2d7 (bug 966168) for causing bustage 2014-09-25 09:40:40 +02:00
Xidorn Quan e94396781f Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-24 15:32:00 +02:00
Cameron McCormack be83e5638c Bug 1070260 - Add public nsCSSParser function for parsing @font-face descriptors. r=jdaggett 2014-09-24 15:49:02 +10:00
Daniel Holbert c6d3b18b7d Bug 1055285 part 2: Implement CSS parsing & computation (but not animation) for 'object-position' property. r=heycam 2014-09-09 18:09:32 -07:00
Daniel Holbert edab2d2a41 Bug 1060090 part 1: Rename ParseBackgroundPositionValues to ParsePositionValue. r=heycam 2014-09-09 11:40:10 -07:00
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Max Vujovic 0318c98055 Bug 1057674 - Unget the token when parsing the filter property expects a function but doesn't find one. r=dbaron 2014-08-25 13:25:08 -07:00
Daniel Holbert d00099acbd Bug 1056864: In ParseGridLine, use Maybe<int32_t> instead of separate bool & integer. r=SimonSapin 2014-08-21 15:56:40 -07:00
Daniel Holbert 098b729147 Bug 1041951 followup: Fix broken comparison against NS_FONT_VARIANT_CAPS_SMALLCAPS, to use != instead of negation. r=dbaron 2014-08-20 11:07:26 -07:00
John Daggett 0e566c376b Bug 975744 - remove font features pref and enable features by default. r=dbaron 2014-08-20 16:54:35 +09:00
John Daggett 5ab27c310b Bug 1041951 - parse font-variant as a shorthand for font feature subproperties. r=dbaron 2014-08-20 16:54:25 +09:00
Daniel Holbert abbc77f1fc Bug 1032922 part 2: Rename flex-basis's "auto" keyword to "main-size" (but retain "flex:auto" as shorthand for "1 1 main-size"). r=heycam 2014-08-07 22:11:48 -07:00
Daniel Holbert cb313ca766 Bug 1032922 part 1: Give "flex-basis" its own keyword table, instead of having it co-opt kWidthKTable. r=heycam 2014-08-07 22:11:47 -07:00
Jonathan Kew 2f49b70d25 bug 1028136 - Remove dangerous public destructor of FontFamilyList. r=jdaggett 2014-07-30 09:15:00 +01:00
Alexandros Chronopoulos 29aaf180d6 Bug 751939 - make url( followed by EOF valid. r=dbaron 2014-07-23 00:14:16 +03:00
Michael Ratcliffe 5191e86267 Bug 1035106 - Add new APIs to DOMUtils: colorToRGBA, isValidCSSColor & cssPropertyIsValid r=bz 2014-07-17 15:08:07 +01:00
Brian Birtles f06a4c0c17 Bug 1037314 - Include animation-play-state in animation shorthand; r=dbaron
This patch is basically a reversal of attachment 530792 from bug 654890.
2014-07-17 10:04:56 +09:00
Gabriel Luong 9d0c3f489e Bug 591303 - Part 3: Set line and column number for all rules in nsCSSParser. r=bz 2014-07-14 15:57:54 -07:00
Gabriel Luong c0ea3ed948 Bug 591303 - Part 1: Move mLineNumber, mColumnNumber, and mWasMatched from StyleRule to Rule. r=bz
Also, pass the line/column number through the constructor rather than through a separate function.
2014-07-14 15:57:02 -07:00
John Schoenick 38d3a3deea Bug 870022 - Part 2 - Add ParseSourceSizeList to CSS parser for <picture sizes> grammar. r=bz 2014-06-25 11:47:46 -07:00
Ms2ger bad4ca4d29 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Ms2ger 451c7edf83 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger 9fb7f507f0 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Xidorn Quan c011970f03 Bug 966166 - Part 3: Link to other parts. r=dbaron 2014-06-11 21:12:00 -04:00
Xidorn Quan 96a68ed4e1 Bug 966166 - Part 1: Parse @counter-style rule. r=dbaron, r=bz 2014-06-11 21:10:00 -04:00
John Daggett 861e272110 Bug 280443 p2 - parse font family lists into fontlist structs. r=heycam 2014-06-06 15:09:23 +09:00
Daniel Holbert 3737ca9d91 Bug 864005: Remove mentions of & checks for 'layout.css.supports-rule.enabled' pref. r=heycam r=khuey 2014-06-04 21:07:07 -07:00
Trevor Saunders 42ad93c2a2 bug 1004746 - part 1 - Remove a bunch of usage of nsAutoPtr's copy ctor r=froydnj 2014-05-07 18:05:37 -04:00
Mats Palmgren 34134aa78b Bug 1005567 - Remove the obsolete 'grid-auto-position' property. r=simon.sapin 2014-05-06 09:45:13 +00:00
Mats Palmgren 5cd647db72 Bug 994592 - Make 'row' the initial value for 'grid-auto-flow' and remove 'none' as a valid value. And add the 'stack' variants. r=simon.sapin 2014-05-06 09:45:13 +00:00
Mats Palmgren 0cea549f22 Bug 1002607 - Increment the number of columns, 'column', only after we have seen a new token. r=simon.sapin 2014-05-03 13:42:32 +00:00
Maksim Lebedev 8d457861b8 Bug 979345 - Implement "touch-action: manipulation" CSS value for Pointer Events. r=kats,botond,dbaron,mbrubeck 2014-04-23 09:56:46 -04:00
Ehsan Akhgari bb80dc5c38 Bug 998995 - Reserve stack space for 16 arguments when parsing a CSS function; r=dbaron 2014-04-21 20:44:33 -04:00
John Daggett 89d63e9b46 Bug 997006 - rename text-combine-horizontal to text-combine-upright. r=dholbert 2014-04-17 09:15:18 +09:00
Simon Sapin e717247ca9 Bug 988780 - Refactor ParseGridTemplateAfterString() to not use CheckEndProperty() (layout/style/nsCSSParser.cpp). r=dbaron 2014-03-27 02:24:00 +01:00
Cameron McCormack 281ddc537e Bug 985838 - Change custom property name prefix from "var-" to "--" and allow identifiers to begin with "--". r=dbaron 2014-04-02 14:32:16 +11:00
L. David Baron ff4104e646 Bug 989560 patch 4 - Remove most uses of CheckEndProperty()/ExpectEndProperty(). r=heycam 2014-04-01 11:53:32 -07:00
L. David Baron 7326cdf75a Bug 989560 patch 3 - Add one more ExpectEndProperty() call that is needed for variables. r=heycam
This adds a check that is currently present in most but not all
codepaths leading to this point, but which patch 4 will remove from many
of those codepaths.
2014-04-01 11:53:32 -07:00
L. David Baron 664bcb2295 Bug 989560 patch 2 - Don't accept an empty value for font-variant-alternates. r=heycam
Had patch 3 not been present, this would be needed to prevent a test
failure with patch 4 (which removes the ExpectEndProperty check from the
CSS_PROPERTY_PARSE_VALUE case in
CSSParserImpl::ParseProperty(nsCSSProperty) since its callers handle
checking for appropriate endings), since the way this function returns
success for empty values leads var() functions alone inside
font-variant-alternates to be rejected, since
CSSParserImpl::ParseProperty(nsCSSProperty) won't try reparsing with
variables.
2014-04-01 11:53:32 -07:00
L. David Baron 7a44e4a78b Bug 989560 patch 1 - Make it an error to have an empty item within an animation or transition shorthand. r=heycam
This is needed to make the test in the next patch (which tests that we
reject entirely-empty properties) pass.
2014-04-01 11:53:31 -07:00
L. David Baron 901acf6951 Bug 988702 patch 3 - Fix missing UngetToken() calls in ParseCounterData(), and avoid evil CheckEndProperty() calls while I'm there. r=heycam
I tested that test_property_syntax_errors.html gives a failure on the
new test without the patch, and that the failure is not present with the
patch.
2014-04-01 11:53:31 -07:00
Simon Sapin 006fadfc0c Bug 978478 part 2: Add support for repeat() in <track-list> (CSS Grid) r=dholbert 2014-03-31 22:49:51 -07:00
Simon Sapin ccb817744a Bug 978478 part 1: Add support for repeat() in <line-name-list> (CSS Grid) r=dholbert 2014-03-31 22:49:45 -07:00
Simon Sapin 40a44c4767 Bug 983175 - Part 2: Add style system support for 'subgrid' in the grid-template* properties. r=dholbert
http://dev.w3.org/csswg/css-grid/#subgrids
2014-03-27 11:54:40 -04:00
Simon Sapin 8c545f7857 Bug 983175 - Part 1: Refactor ParseGridLineNames (CSS Grid). r=dholbert
Return a CSSParseResult rather than a bool to distinguish between
an empty list of names '()' and the lack of a list.
2014-03-27 11:54:40 -04:00
Simon Sapin c53d0ea1d0 Bug 983175 - Part 0: Rename nsParsingStatus to CSSParseResult. r=dbaron 2014-03-27 11:54:40 -04:00
Simon Sapin 20769aaaa3 Bug 984728 - Refactor grid-auto-flow parsing to use ParseBitmaskValues; r=dholbert 2014-03-24 14:26:04 +01:00
Simon Sapin 6f19092d3e Bug 984760 part 2: Use GridTemplateAreasValue though nsRefPtr pointers. r=dholbert 2014-03-21 23:06:16 +08:00
Simon Sapin 98db16b1af Bug 984760 part 1: Rename nsCSSValueGridTemplateAreas to css::GridTemplateAreasValue. r=dholbert 2014-03-21 23:06:13 +08:00
Simon Sapin 58006b1242 Bug 981752 part 3: Add the grid shorthand. r=dholbert 2014-03-21 23:06:12 +08:00
Simon Sapin 9034f0f8ec Bug 981752 part 2c: Add the grid-template shorthand. r=dholbert 2014-03-21 23:06:12 +08:00
Simon Sapin 2a8908079a Bug 981752 part 2b: Refactor grid-template-{columns,rows} parsing, preparing for the grid-template shorthand. r=dholbert
... and a bit of grid-auto-flow, for the grid shorthand.

* Avoid using CheckEndProperty() when possible
* Distinguish between "error" and "not a <track-size>"
* Split out parsing of a <track-list>, given its initial [<line-names>?]
2014-03-21 23:06:12 +08:00
Simon Sapin 8d091ccef4 Bug 981752 part 1: Add the grid-column, grid-row and grid-area shorthands. r=dholbert 2014-03-21 23:06:12 +08:00
Simon Sapin b2b7f42b87 Bug 984241: Refactor/optimize grid-template-areas, store number of columns. r=dholbert
In the parsing code for grid-template-areas:

* Move some of the processing into the helper function,
  so that the grid-template will not have to duplicate it.

* Store the number of parsed columns (and rows),
  as they will affect the size of the "explicit grid".

* Use a hash table instead of a linear scan to avoid O(n²)-ish complexity.
2014-03-18 22:05:49 +08:00
Benoit Jacob f9d8543c89 Bug 977757 - 2/3 - add nsCSSProps::eEnabledInChromeOrCertifiedApp bit, and use it for will-change - r=dbaron,bz 2014-03-07 12:14:25 -05:00
Benoit Jacob 56cf1149be Bug 977757 - 1/3 - make nsCSSProps::EnabledState a bitfield - r=dbaron,bz 2014-03-07 12:14:23 -05:00
Peter Chang a96dd5a386 backout of rev 45253e02bde3, fd02f1217e4c, 75217485ce5a b=981804 2014-03-12 15:16:20 +08:00
Simon Sapin 948f9516ef Bug 976787 part 5: Add grid-{column,row}-{start,end} and grid-auto-position to the style system. r=dholbert 2014-03-10 15:54:17 -07:00
Simon Sapin 96600c54b0 Bug 976787 part 4: Add the grid-auto-flow property to the style system. r=dholbert 2014-03-10 15:54:16 -07:00
Simon Sapin 9483298edf Bug 976787 part 3: Add the grid-auto-{columns,rows} properties to the style system. r=dholbert 2014-03-10 15:54:15 -07:00
Simon Sapin 27ad62a36d Bug 976787 part 2: Add the grid-template-areas property to the style system. r=dholbert 2014-03-10 15:54:14 -07:00
Simon Sapin 12935dcb17 Bug 976787 part 1: Add the grid-template-{columns,rows} properties to the style system. r=dholbert 2014-03-10 15:54:13 -07:00
Benoit Jacob 8d7a70a2bf Bug 977757 - 2/3 - add nsCSSProps::eEnabledInChromeOrCertifiedApp bit, and use it for will-change - r=dbaron,bz 2014-03-07 12:14:25 -05:00
Benoit Jacob 8c5d632a24 Bug 977757 - 1/3 - make nsCSSProps::EnabledState a bitfield - r=dbaron,bz 2014-03-07 12:14:23 -05:00
Ryan VanderMeulen a05a9b8736 Backed out changesets d65a803d2b9a, 9456495d6121, and 73c710ddf3d8 (bug 977757) for Gaia UI test failures.
CLOSED TREE
2014-03-06 13:10:20 -05:00
Benoit Jacob 9abee5303e Bug 977757 - 2/3 - add nsCSSProps::eEnabledInChromeOrCertifiedApp bit, and use it for will-change - r=dbaron,bz 2014-03-06 11:38:19 -05:00
Benoit Jacob 52d36cb055 Bug 977757 - 1/3 - make nsCSSProps::EnabledState a bitfield - r=dbaron,bz 2014-03-06 11:38:17 -05:00
L. David Baron 2b83b4d126 Bug 978903: Fix some uninitialized variable warnings in the CSS parser. r=heycam
The first provides a reasonable default (failure to parse) for the case
of an unknown value type (which should never happen).

The second reorders two failure checks so that the one that returns
early when units is uninitialized happens before the one that looks at
units.
2014-03-04 20:13:20 -08:00
Reuben Morais bde629dd63 Bug 458300 - Rename nsINameSpaceManager.h to nsNameSpaceManager.h. r=jst r=hsivonen
--HG--
rename : content/base/public/nsINameSpaceManager.h => content/base/public/nsNameSpaceManager.h
2014-02-27 20:04:46 -03:00
Mats Palmgren e7e19416f4 Bug 966992 - Add a CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS bit for properties that are enabled by a pref but that are always enabled in UA sheets. r=cam 2014-02-22 01:18:23 +00:00
Ehsan Akhgari 7a3201ec26 Backed out 5 changesets (bug 966992, bug 965237) because of a PGO only build failure on Linux, landed on a CLOSED TREE
Backed out changeset f11cad93ceee (bug 966992)
Backed out changeset c84d530c9a51 (bug 965237)
Backed out changeset 740b13866bac (bug 966992)
Backed out changeset 8c3420cc77d8 (bug 966992)
Backed out changeset 7ddfc587edda (bug 966992)
2014-02-19 13:28:33 -05:00
Mats Palmgren 3c71ab792b Bug 966992 - Add a CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS bit for properties that are enabled by a pref but that are always enabled in UA sheets. r=cam 2014-02-19 14:14:52 +00:00
Robert O'Callahan 1b8d891c71 Bug 968118. Make nsCSSProps keyword tables be int16_t instead of int32_t for a small space win. r=heycam
--HG--
extra : rebase_source : 94cf09d0d96dd3c8e2a9528f5d242e36e85fcf75
2014-02-06 00:10:44 +13:00
Nicholas Cameron 7c3fa1f471 Bug 700926. border-image-source css parsing. r=roc 2014-01-31 16:36:42 +13:00
Birunthan Mohanathas 02d0812720 Bug 828300 - Replace NS_ARRAY_LENGTH with mozilla::ArrayLength/MOZ_ARRAY_LENGTH. r=ehsan 2014-01-30 13:26:54 -05:00
Benoit Girard ext:(%20and%20Benoit%20Jacob%20%3Cbjacob%40mozilla.com%3E) d46862615a Bug 940842 - 1/3 - Add will-change CSS property - r=dbaron
The current spec draft is at:
http://tabatkins.github.io/specs/css-will-change/

This CSS property is disabled by default and can be enabled by toggling:
  layout.css.will-change.enabled
2013-11-22 11:48:27 -05:00
Nick Lebedev 8f48b7bbc6 Bug 795567 - Part 1: Add touch-action css property to the style system. r=dbaron 2014-01-15 10:03:15 -05:00
Frédéric Wang 3feaa3f08b Bug 838506 - Part 1: Add a -moz-math-display property. r=heycam 2014-01-14 09:39:50 -05:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Cameron McCormack 99dadb832c Bug 731271 - Part 3: Store parsed CSS color values in their original syntactic form. r=dbaron 2013-09-16 09:35:48 +10:00
Cameron McCormack b3b6726cef Bug 731271 - Part 2: Add new nsCSSValue units to store colors in their original syntactic form. r=dbaron 2013-09-16 09:35:48 +10:00
Cameron McCormack e93885019c Bug 731271 - Part 1: Rename eCSSUnit_Color to eCSSUnit_RGBAColor. r=dbaron 2013-09-16 09:35:48 +10:00
Masatoshi Kimura b83c984db1 Bug 941300 - Make circle radial-gradient invalid if two radii values are given. r=dbaron 2013-12-14 13:22:48 +09:00
Cameron McCormack 9587a15ea9 Bug 773296 - Part 27: Support 'unset' in CSS variables. r=dbaron 2013-12-12 13:09:47 +11:00
Cameron McCormack e47788ff1e Bug 773296 - Part 25: Parse variable declarations in @supports conditions. r=dbaron
Since we cannot parse and discard a white space token after the ':' in a
custom property declaration, we instead explicitly skip over it when
parsing a non-custom property's value.
2013-12-12 13:09:46 +11:00
Cameron McCormack 56b65e99dd Bug 773296 - Part 24: Recognize variables in CSS.supports("var-blah", "whatever") calls. r=dbaron 2013-12-12 13:09:46 +11:00
Cameron McCormack 5e31fc11d0 Bug 773296 - Part 23: Support variables in CSSStyleDelcaration methods. r=dbaron
This adds support for custom properties on the remainder of the
CSSStyleDeclaration methods.

A shorthand that was specified using a variable reference is serialized
to its originally specified value, rather than by concatenating the
serializations of its longhand components.

A shorthand that was not specified using a variable references but which
has a component longhand that was is serialized to the empty string.
2013-12-12 13:09:46 +11:00
Cameron McCormack 3a3a7216b5 Bug 773296 - Part 18: Add error reporting for invalid variable references. r=dbaron
This adds CSS parser error reporting for parsing of custom properties
and normal properties that have variable references.

When re-parsing a normal property that had a variable reference, we
report any parse error to be at the beginning of the property value.
This is because it is difficult to keep track of where exactly each
variable substitution came from to point to the particular value
that would have caused the parse error.  For example, with this:

  :root {
    var-a: 1px 2px;
    var-b: 3px var(a);
  }
  p {
    margin: var(a) var(b);
  }

we would end up resolving the value of 'margin' to:

  "  1px 2px  3px  1px 2px"

In this string, the parse error occurs when we encounter the final
"2px", but by this point we don't know where that value came from.
So instead we just point to the line on which 'margin' was declared.

We extend ErrorReporter with an OutputError overload that takes the
specific line and column number to use in the error report to get this
right, and we store the line and column number for each token stream
we parse on the nsCSSValueTokenStream object.
2013-12-12 13:09:44 +11:00
Cameron McCormack 7eb5d97a49 Bug 773296 - Part 17: Resolve property values that have variable references at computed value time. r=dbaron
This re-parses property values at computed value time if
they had a specified value that was a token stream.  We add
a function nsRuleNode::ResolveVariableReferences that looks
at all the values in the nsRuleData and calls in to a new
nsCSSParser::ParsePropertyWithVariableReferences function if they have a
token stream value.

We add a nsCSSExpandedDataBlock::MapRuleInfoInto function that will
take the re-parsed property value and copy it back into the nsRuleData.

nsRuleNode::ResolveVariableReferences returns whether any variables
were attempted to be resolved, so that nsRuleNode::WalkRuleTree wil
recompute the rule detail in case any became 'inherit'.
2013-12-12 13:09:44 +11:00
Cameron McCormack ae655160b2 Bug 773296 - Part 16: Add a ref-counted list nsCSSValue unit and use it for tranform lists; hold a strong reference to one on nsStyleDisplay. r=dbaron
This adds a new eCSSUnit_SharedList type for nsCSSValue, which is a
reference counted object that contains an nsCSSValueList.  We need this
so that nsStyleDisplay::mSpecifiedTransform can hold a strong reference
to a specified transform list value.  When 'transform' is specified
using a variable reference, the resulting nsCSSValue does not stick
around in the Declaration object, so we wouldn't be guaranteed that
it lives long enough for nsStyleDisplay to keep referencing it.
2013-12-12 13:09:44 +11:00
Cameron McCormack 2177a3812e Bug 773296 - Part 13: Parse properties that use variable references and store them as eCSSUnit_TokenStream values. r=dbaron
This adds functionality to nsCSSParser to recognise properties with
variable references and store their recorded token stream as an
eCSSUnit_TokenStream nsCSSValue.
2013-12-12 13:09:43 +11:00
Cameron McCormack 15a018329f Bug 773296 - Part 12: Record whether we are parsing an @supports condition. r=dbaron
This stores on the nsCSSParser whether we are somewhere in the middle
of parsing an @supports condition.  Because @supports condition parsing
uses the scanner recording function (to save its conditionText), and
variable reference containing values also need it, we can't do both at
once.  Luckily, if we're parsing an @supports condition, we don't really
need to store the token stream text; we only need to know if it was
valid, and we don't need its actual value later.  So we use this flag
later to see if we can skip turning on scanner recording while parsing
variable reference containing values.
2013-12-12 13:09:42 +11:00
Cameron McCormack 85a6f5c521 Bug 773296 - Part 11: Give nsCSSParser and nsCSSScanner the ability to save/restore their current input state. r=dbaron
This adds functions to nsCSSParser and nsCSSScanner that let us save the
current input position (and corresponding information like line/column
number) and parser pushback, and be able to restore it later.  We'll use
this when rewinding the scanner after we first encounter a property with
a variable reference and go back to reparse it as a token stream.
2013-12-12 13:09:42 +11:00
Cameron McCormack c42a6189e5 Bug 773296 - Part 8: Resolve and compute CSS variables. r=dbaron
We add a new class CSSVariableResolver whose job is to take the
inherited computed variables and the specified variable declarations and
to perform cycle removal and resolution of the variables, storing the
result in the CSSVariableValues object on an nsStyleVariables.  We use
CSSVariableResolver in nsRuleNode::ComputeVariablesData.

The variable resolver does this:

  1. Asks the CSSVariableValues and CSSVariableDeclarations objects
     to add their variables to it.
  2. Calls in to a new nsCSSParser function
     EnumerateVariableReferences that informs the resolver which
     other variables a given variable references, and by doing so,
     builds a graph of variable dependencies.
  3. Removes variables involved in cyclic references using Tarjan's
     strongly connected component algorithm, setting those variables
     to have an invalid value.
  4. Calls in to a new nsCSSParser function ResolveVariableValue
     to resolve the remaining valid variables by substituting variable
     references.

We extend nsCSSParser::ParseValueWithVariables to take a callback
function to be invoked when encountering a variable reference.  This
lets EnumerateVariableReferences re-use ParseValueWithVariables.

CSSParserImpl::ResolveValueWithVariableReferences needs different
error handling behaviour from ParseValueWithVariables, so we don't
re-use it.

CSSParserImpl::AppendImpliedEOFCharacters is used to take the
value returned from nsCSSScanner::GetImpliedEOFCharacters while
resolving variable references that were declared using custom
properties that encountered EOF before being closed properly.

The SeparatorRequiredBetweenTokens helper function in nsCSSParser.cpp
implements the serialization rules in CSS Syntax Module Level 3:

https://dvcs.w3.org/hg/csswg/raw-file/3479cdefc59a/css-syntax/Overview.html#serialization
2013-12-12 13:09:41 +11:00
Cameron McCormack a8cf86e4b7 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
Gijs Kruitbosch e95041d4a0 Bug 943217 - fix moz-document error message, r=dbaron 2013-11-26 10:36:52 +01:00
Cameron McCormack 6a26926804 Bug 925626 - Parse general_enclosed in @supports conditions properly. r=dbaron 2013-12-06 19:13:26 +11:00
Daniel Holbert a84ea6e027 Bug 939905: Add support for CSS "flex-flow" shorthand property. r=heycam 2013-12-05 10:57:51 -08:00
Cameron McCormack c568af0049 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
Cameron McCormack b5a8e4c2eb Bug 944493 - Rename PEPseudoSelTrailing because of a string change. r=flod 2013-11-30 12:17:51 +11:00
Cameron McCormack 422b24f3ea 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
Cameron McCormack 1c6e168631 Bug 930020 - Part 1: Add a flag to pseudo-elements to say whether they are exposed to content. r=bz 2013-11-28 18:03:13 +11:00
Cameron McCormack 836792bdcf 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
Cameron McCormack 417805594e Bug 922669 - Part 1: Parse selectors with user action pseudo-classes after pseudo-elements. r=bz 2013-11-28 17:46:38 +11:00
Jonathan Watt bf596e7eef Bug 930010 - Hide the CSS pseudo-elements for <input type=number>'s anonymous content tree from content. r=bz 2013-11-22 13:24:55 +00:00
John Daggett d7f090b746 Bug 940778 - disallow counter names named none, default or other css-wide keywords. r=dholbert 2013-11-20 17:14:13 +09:00
John Daggett 1c72ffaa67 Bug 913264 - add none value to font-variant-ligatures. r=dbaron 2013-11-19 13:30:25 +09:00
Ms2ger fac17af973 Bug 921718 - Part a: Rename nsMediaList::Count to Length and make it return uint32_t; r=bz 2013-11-11 09:01:01 +01:00
Ms2ger 5f81e1fd5c Bug 923251 - Part a: Make ParseMediaList return void; r=heycam 2013-11-11 08:57:34 +01:00
Mats Palmgren 4d866337f3 Bug 929991 - Put 'text-align: true X' support behind a preference (disabled by default). r=heycam 2013-10-27 20:56:32 +00:00
Mats Palmgren 241ee3a30d Bug 929991 - Style system implementation of 'text-align: true X'. r=heycam 2013-10-27 20:56:32 +00:00
L. David Baron a0ebdacdf3 Adjust comment that should have been adjusted in the original patch for bug 835007. No review. 2013-10-24 14:45:59 +02:00
Birunthan Mohanathas e3709383ec Bug 784739 - Switch from NULL to nullptr in layout/; r=ehsan
--HG--
extra : rebase_source : 0d0d9e11be9d39e4457bddd0bac7e19a50b91b0b
2013-10-08 14:47:21 -04:00
Cameron McCormack fb248cc0a3 Bug 842329 - Part 2: Parse the "all" shorthand property. r=bzbarsky 2013-10-04 04:49:19 +10:00
Cameron McCormack 837c085515 Bug 921731 - Part 2: Parse "unset" in property values whereever "inherit" and "initial" are allowed. r=bzbarsky 2013-10-04 04:49:17 +10:00
L. David Baron abaca9e65e Bug 915053: Remove quirk allowing {} around style attribute. r=heycam
The tests pass with the patch; without the patch
test_style_attribute_quirks.html fails 2 tests.
2013-09-17 04:44:15 -07:00
Cameron McCormack f6af37ece9 Bug 893319 - Remove -moz-rgba() and -moz-hsla(). r=bz 2013-09-16 10:43:56 +10:00
Ehsan Akhgari 6ada2899b2 Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
Jonathan Kew 90fcad5f64 Bug 798843 - Rename -moz-objectFill, -moz-objectStroke, -moz-objectValue to context-fill, context-stroke, context-value r=dbaron
* * *
bug 798843 - recompile svg.woff font to pick up the updated glyph definitions
* * *
bug 798843 - update property_database.js to match the new property names
2013-05-16 14:35:15 +12:00
Ryan VanderMeulen f6f2b44c8f Backed out changesets 6c097bdfc079, 51f5d900cd27, 9fdf99c07466, and b322938b37ef (bug 798843) due to intermittent Windows test failures. 2013-09-13 11:15:54 -04:00
Jonathan Kew fd01c609d8 Bug 798843 - Rename -moz-objectFill, -moz-objectStroke, -moz-objectValue to context-fill, context-stroke, context-value r=dbaron
* * *
bug 798843 - recompile svg.woff font to pick up the updated glyph definitions
* * *
bug 798843 - update property_database.js to match the new property names
2013-05-16 14:35:15 +12:00
Seth Fowler 9af1f57738 Bug 825771 (Part 1) - Add CSS support for the image-orientation property. r=dbaron 2013-08-28 15:39:06 -07:00
John Daggett 03504b2684 Bug 875250 - implement CSS parsing of text-orientation, text-combine-horizontal properties. r=dholbert 2013-08-19 19:26:44 +09:00
John Daggett 7b4b662576 Bug 904263 - check pref settings more efficiently. r=dbaron 2013-08-19 13:49:49 +09:00
John Daggett 54d60f72ae Bug 904263 - don't set disabled subproperties within font shorthand parsing. r=dbaron 2013-08-15 09:37:57 +09:00
Masayuki Nakano 38ea6c4763 Bug 812995 Support 'blink' value at -moz-text-decoration-line and drop -moz-text-blink r=dbaron 2013-08-06 23:02:34 +09:00
Ms2ger cf3acdc148 Backout changeset f2ac3d57b445 for insufficient review. 2013-08-08 19:37:47 +02:00
Masayuki Nakano 16dc1c6dc2 Bug 812995 Support 'blink' value at -moz-text-decoration-line and drop -moz-text-blink r=dbaron 2013-08-06 23:02:34 +09:00
Dirk Schulze 27731f2af6 Bug 898361 - Implement parsing for drop-shadow. r=heycam 2013-08-05 17:02:27 +10:00
Ms2ger 32cf0a6f16 Backout changeset a58abd7408bf for mochitest and crashtest crashes. 2013-08-04 12:21:17 +02:00
Dirk Schulze ea188a5971 Bug 898361 - Implement drop-shadow parsing for the filter property. r=heycam 2013-08-04 18:58:28 +10:00
Max Vujovic ba787de1f1 Bug 897094 - Mismatched parenthesis in some CSS functions do not prevent parsing of subsequent CSS properties. r=heycam 2013-07-30 15:38:01 -04:00
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Dirk Schulze 569ef7a7ef Bug 897392 - Implement parsing of filter:hue-rotate(). r=heycam 2013-07-26 16:02:33 +10:00
Simon Sapin 3e8f5c2eec Bug 887741 - Allow CSS at-rules in declaration lists. r=dbaron 2013-07-25 09:43:29 -04:00
Max Vujovic 0bd2b965c3 Bug 895182 - [CSS Filters] Implement parsing for blur, brightness, contrast, grayscale, invert, opacity, saturate, sepia. Co-authored with Dirk Schulze (krit). r=heycam 2013-07-22 15:08:33 -07:00
Ed Morley ef5715c092 Backed out changeset f24d81b85929 (bug 895182) for Windows build failures on a CLOSED TREE 2013-07-23 16:36:45 +01:00
Max Vujovic 0117d6e2f8 Bug 895182 - [CSS Filters] Implement parsing for blur, brightness, contrast, grayscale, invert, opacity, saturate, sepia. Co-authored with Dirk Schulze (krit). r=heycam 2013-07-23 10:47:16 -04:00
Mina Almasry 28e4959faf Bug 877690 - Implement an API for getting CSS property values to be used in auto-completion. r=bz 2013-07-15 17:28:49 -04:00
Ed Morley 6133103162 Backed out changeset 9897835271b5 (bug 877690) for crashes on a CLOSED TREE 2013-07-15 16:36:17 +01:00
Mina Almasry 92ecc361b2 Bug 877690 - Implement an API for getting CSS property values to be used in auto-completion. r=bz 2013-07-15 09:59:57 -04:00
Birunthan Mohanathas 201a6fca70 Bug 571635 - Make nsCSSStyleSheet::GetStyleRuleAt return a css::Rule*. r=dbaron 2013-07-07 16:23:13 -04:00
Corey Ford 44dbcc4d6c Bug 883987 - Don't allow BAD_STRING or BAD_URL tokens in @supports conditions. r=dbaron 2013-06-27 17:03:33 -07:00
David Zbarsky 68e5aca4a0 Bug 881121: Remove the 3d-transforms-enabled pref because it is always enabled and has been for a while r=dbaron 2013-06-22 13:35:09 -07:00
L. David Baron 410072b2b2 Bug 807184 patch 2: Remove support for prefixed -moz-initial (in favor of unprefixed initial). r=dholbert 2013-06-20 18:31:27 -07:00
L. David Baron 4cb93c7005 Bug 757554: Reject uses of reserved 'not', 'only', 'and', and 'or' as a media type. r=heycam 2013-06-17 14:26:08 -07:00
Simon Sapin dd86ae8ef1 Bug 875287 - font-family: Do not require whitespace between unquoted idents. r=dbaron
When 'font-family' is secified with unquoted identifiers rather than a quoted string, a single space should be inserted between identifier tokens, even if they are separated by a comment rather than a whitespace token.
2013-05-30 08:10:02 -04:00
L. David Baron 31b31e68d0 Bug 876570: Add missing UngetToken() call in an+b microsyntax parsing. r=bzbarsky 2013-05-29 14:36:39 +08:00
Thomasy 508bd028e5 Bug 750388: In an+b microsyntax in :nth-child() etc., allow starting with +n and allow comments at all token boundaries rather than requiring the strange tokens that result from lack of comments or spaces. r=dbaron 2013-05-28 12:12:06 +08:00
Daniel Holbert 45060ddc8d Bug 585185: Parse font-sizes as non-negative, in 'font' shorthand. r=dbaron 2013-05-24 09:39:03 +08:00
L. David Baron 41eb1ebd96 Bug 511803 patch 2: Convert all eCSSUnit_Function storage to use nsCSSKeyword. This leads to one behavior change, which is case canonicalization for font-variant-alternates function values. r=bzbarsky
--HG--
rename : layout/style/test/test_bug721136.html => layout/style/test/test_specified_value_serialization.html
2013-05-23 09:08:29 +08:00
Daniel Holbert 9ed3dd5f4a Bug 864553 part 1: Remove ifdefs for MOZ_FLEXBOX and configure.in MOZ_FLEXBOX chunk. r=dbaron 2013-05-22 11:44:25 +08:00
John Daggett 0eae803e8f Bug 549861 - reland font-variant subproperties with DOM-peer review. r=khuey 2013-05-20 11:59:20 +09:00
Ms2ger 7786ea6954 Backout bug 549861 (changesets 27fb48df15ce:7ecd4e3863b4) for insufficient review. 2013-05-19 20:23:19 +02:00
John Daggett 3fdc406a01 Bug 549861. Changes based on review comments for parsing of font-variant-alternates. r=dbaron 2013-05-13 18:45:38 +09:00
John Daggett 5b570d8745 Bug 549861. Implement support for @font-feature-values rule. r=dbaron 2013-05-13 18:45:37 +09:00
John Daggett 6f990b3fc6 Bug 549861. Implement CSS parsing of font-variant-alternates. r=dbaron 2013-05-13 18:45:37 +09:00
John Daggett fb6fb8df81 Bug 549861. Parse simple font-variant subproperties. r=dbaron 2013-05-13 18:45:36 +09:00
Masatoshi Kimura 957042f394 Bug 859018 - Remove the MSVC exemption for FAIL_ON_WARNINGS in layout. r=dbaron 2013-04-28 19:02:35 +09:00
Joshua Cranmer 1f24ef2b5e Bug 856108 - Port static analyses to clang, part 2e: use MOZ_STACK_CLASS in layout. r=mats 2013-04-11 22:20:45 -05:00
David Creswick 206e93e61e Bug 856317 - Expose the column number of style rules via inIDOMUtils. r=dbaron 2013-04-06 12:38:56 -05:00
L. David Baron de551462db Bug 804944, patch 2: Also condition @-moz-keyframes parsing on the animations preference. r=bzbarsky 2013-03-13 09:58:39 -07:00
L. David Baron ddc65b61e5 Backout changeset 6ff3de859ce3 (bug 804944), which depended on an unlanded patch that I currently have tagged for bug 784461. 2013-03-10 12:54:09 -07:00
L. David Baron 774a334ffb Bug 804944, patch 2: Also condition @-moz-keyframes parsing on the animations preference. r=bzbarsky 2013-03-10 12:44:13 -07:00
L. David Baron 5573280fad Bug 570896: Allow separate background-origin and background-clip to be set in the background shorthand. r=bzbarsky 2013-03-07 17:59:32 -08:00