Commit Graph

1270 Commits

Author SHA1 Message Date
Jonathan Chan
6689045b18 Bug 1293743 - Part 1: Move nsCSSParser's ReduceNumberCalcOps to CSSCalc.h as mozilla::css::ReduceNumberCalcOps. r=dholbert
Bug 1273706 (Properties & Values) uses ReduceNumberCalcOps in nsRuleNode to
compute <number>-typed calc() expressions.

MozReview-Commit-ID: CsZkJBFOufm
2016-10-17 20:49:15 -04:00
Mats Palmgren
7b03cc4895 Bug 1313254 part 1 - [css-align] Change "baseline|last-baseline" to "[ first | last ]? baseline". r=dholbert 2016-11-05 02:57:07 +01:00
Phil Ringnalda
e9271a5e61 Merge m-i to m-c, a=merge
MozReview-Commit-ID: Hm1RxN6OaoZ
2016-11-03 19:32:48 -07:00
Xidorn Quan
7c1df9c4d7 Bug 1314531 - Disallow xul tree pseudo-elements with user action pseudo-classes. r=heycam
MozReview-Commit-ID: 85DDwDl0oYg
2016-11-03 11:21:19 +11:00
Xidorn Quan
6d9ed7b946 Bug 1294299 part 8 - Refactor interface provided by css::Declaration. r=heycam
The main targets of this refactor are:
1. Move most of the logic of distinguishing properties and custom
   properties from nsDOMCSSDeclaration into css::Declaration, which
   gives ServoDeclarationBlock more flexibility to implement.
2. Rename those methods of css::Declaration to provide a clear interface
   which makes sense for implementing in ServoDeclarationBlock, and also
   avoid method overload, which can impede the forward macro, on them.

MozReview-Commit-ID: 2cCqF855TVK
2016-11-03 14:41:02 +11:00
Tobias Schneider
0b1c8478a1 Bug 1243846 - Implement Intersection Observer API. r=mrbkap, r=mstange 2016-10-28 10:24:00 -04:00
Mats Palmgren
24f0f57b91 Bug 1305244 part 2 - [css-grid] Represent single-value <flex> track sizes as minmax(auto, <flex>) internally. r=dholbert 2016-10-29 01:30:10 +02:00
cku
dcd73f0282 Bug 1308963 - Part 3. Set initial value of mask-position as (0, 0). r=xidorn
MozReview-Commit-ID: DN7q6FrGEMA
2016-10-13 23:13:11 +08:00
cku
42b203b91b Bug 1308963 - Part 1. Set initial value of mask-repeat as repeat. r=xidorn
MozReview-Commit-ID: 8VrPiEyKF4n
2016-10-13 22:57:10 +08:00
JerryShih
88c1b36980 Bug 1295456 - Use author-specified css color function name for css value serialization. r=dholbert
If the color is fully opaque, omit the 'a' suffix of color function name (e.g. just use 'rgb' or 'hsl').
Otherwise, show the original author-specified function name for serialization.

MozReview-Commit-ID: 4XgkvV2jDRC
2016-10-16 03:15:36 +08:00
JerryShih
021bb7a776 Bug 1295456 - Remove now-unused single-arg ParseColorOpacity functions from nsCSSParser. r=dholbert 2016-10-16 03:15:36 +08:00
JerryShih
7a3abdc8ec Bug 1295456 - Support <angle> value for hue component in CSS hsl() color function. r=dholbert
MozReview-Commit-ID: EYhbAEOlpLm
2016-10-16 03:15:36 +08:00
JerryShih
0947e3f60c Bug 1295456 - Change CSS color function hsl() to be an alias of hsla() and support css-color-4 comma-less expression. r=dholbert
MozReview-Commit-ID: 6jBTVVOxwiP
2016-10-16 03:15:36 +08:00
JerryShih
ddfae63b4c Bug 1295456 - Change CSS color function rgb() to be an alias of rgba() and support css-color-4 comma-less expression. r=dholbert 2016-10-16 03:15:36 +08:00
JerryShih
2075573edc Bug 1295456 - Support percentage opacity value in CSS color functions. r=dholbert 2016-10-16 03:15:35 +08:00
Xidorn Quan
449c420d52 Bug 1306214 part 3 - Remove -moz-use-text-color from Gecko. r=heycam
MozReview-Commit-ID: EEYCB5jUH9L
2016-09-29 17:47:22 +10:00
Xidorn Quan
7ba350b0a6 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso
2016-09-26 22:03:25 +10:00
Julian Seward
72dceb1a3b Bug 1301856 - Spurious valgrind warning in in CSSParserImpl::ParseGridLine() with gcc 5.3. r=mats@mozilla.com. 2016-09-14 15:04:30 +02:00
Thomas Wisniewski
e3967a6e44 Bug 1069012 - Unprefix ::placeholder pseudo-element. r=bz 2016-09-07 19:38:38 -04:00
Neerja Pancholi
6ae194574b Bug 1295271 - Remove all _moz_ prefixes from all instances of _moz_column r=dbaron
Command used:
find -E ./* -iregex '.*(\.cpp|\.h)' | xargs egrep -l '.*_moz_column.*' | xargs sed -i '' 's/_moz_column/column/g'


MozReview-Commit-ID: CJbSfDfhmle
2016-08-30 17:21:03 -07:00
L. David Baron
f0026484b8 Bug 1290825 - Reject various things that aren't user-action pseudo classes when they follow pseudo-elements. r=bz
The existing code, from bug 922669, in ParsePseudoSelector that allows
things to come after a pseudo-element requires that the first character
after the pseudo-element be a colon.  However, this doesn't forbid
things like ::-moz-color-swatch:hover#foo, which need to be errors in
ParseSelector; those tests are added here.  Furthermore, the
error-checking in ParsePseudoSelector doesn't prevent the pseudo-element
from being followed by a :not() or by an additional pseudo-element; to
fix that this patch moves the error tests out of the pseudo-class
condition and also has it test !isPseudoClass.

Without the patch, the tests produced the following failures:
TEST-UNEXPECTED-FAIL | layout/style/test/test_selectors.html | selector ::-moz-color-swatch:not(.foo) was a parser error - got "1402", expected "auto"
TEST-UNEXPECTED-FAIL | layout/style/test/test_selectors.html | selector '::-moz-color-swatch:not(.foo)' plus EOF is parse error
followed by a crash due to:
Assertion failure: !(IsPseudoElement() && (mIDList || mAttrList)) (If pseudo-elements can have id or attribute selectors after them, specificity calculation must be updated), at /home/dbaron/builds/ssd/mozilla-central/mozilla/layout/style/StyleRule.cpp:503 in CalcWeightWithoutNegations
from the "::-moz-color-swatch:hover#foo" test.

With that test commented out (and still without the code changes), there
is instead an additional pair of failures from the following test:
TEST-UNEXPECTED-FAIL | layout/style/test/test_selectors.html | selector .foo::after:not(.bar) ~ h3 was a parser error - got "1406", expected "auto"
TEST-UNEXPECTED-FAIL | layout/style/test/test_selectors.html | selector '.foo::after:not(.bar) ~ h3' plus EOF is parse error
along with a failure due to an unexpected assertion:
###!!! ASSERTION: Shouldn't have negations: '!selector->mNegations', file /home/dbaron/builds/ssd/mozilla-central/mozilla/layout/style/nsCSSRuleProcessor.cpp, function AddRule, line 3415

With the patch, the tests pass.

MozReview-Commit-ID: KxAFSQtPVhu
2016-08-29 11:43:30 -07:00
Mats Palmgren
d530df343b Bug 1282643 - [css-grid] Reject repeat() column tracks in <grid-template> when there's a grid template area string in the row part. r=dholbert 2016-08-26 15:16:57 +02:00
Mats Palmgren
177cccc127 Bug 1281320 - [css-grid] Implement 'fit-content([ <length> | <percentage> ])' value for <track-size>. r=dholbert 2016-08-26 15:16:57 +02:00
Mats Palmgren
0918fa6f8b Bug 1266124 - [css-grid] Update the 'grid' shorthand syntax to the latest spec. r=dholbert 2016-08-26 15:16:57 +02:00
tlin@mozilla.com
5bfedb6624 Bug 1297340 - Revise ParseClipPath(). r=dholbert 2016-08-23 09:27:07 +00:00
Jonathan Chan
e201b93c16 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA
2016-08-16 18:37:48 -07:00
Gregory Szorc
3bcd02ebea Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE
2016-08-16 17:50:40 -07:00
Jonathan Chan
23ccd0531f Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA
2016-08-09 16:28:19 -07:00
Wes Kocher
924bec4dbe Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
9c81c3c1ee Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
972b8460e2 Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Xidorn Quan
44bab182d3 Bug 1274158 part 2 - Accept zero for perspective. r=heycam
MozReview-Commit-ID: FaXKFav71bD
2016-08-12 14:52:48 +10:00
cku
28e97be99a Bug 1277788 - Part 1. Set initial value of mask-position as center. r=dbaron.
MozReview-Commit-ID: BflQ6tz8ZjM
2016-08-10 16:10:45 +08:00
cku
52de163e38 Bug 1258623 - Set initial value of mask-repeat as no-repeat. r=dbaron
MozReview-Commit-ID: 4VgvRXdVL2F
2016-07-18 17:02:58 +08:00
Ting-Yu Lin
1bcd857cd6 Bug 1288626 Part 8 - Add shape-outside support to style system. r=heycam
I have to move the definition of StyleBasicShape and StyleShapeSource prior to
where nsStyleDisplay::mShapeOutside is defined since the template struct need to
be fully defined before using as a member variable.

Use SetIdent() in CreatePrimitiveValueForBasicShapeOrURL() in
nsComputedDOMStyle.cpp per bug 1288626 comment 6.

MozReview-Commit-ID: 1KZS299CFul
2016-07-22 15:40:01 +08:00
Ting-Yu Lin
5256d6f706 Bug 1288626 Part 7 - Rename StyleClipShapeSizing to StyleClipPathGeometryBox. r=heycam
Change to geometry box to match the name in the spec.
https://drafts.fxtf.org/css-masking-1/#the-clip-path

MozReview-Commit-ID: 8jDTynCkJ4A
2016-07-28 13:45:43 +08:00
Manish Goregaokar
00b57a4a6e Bug 1290864 - Standardize serialization of <position> values in <basic-shape>; r=xidorn
MozReview-Commit-ID: KooW1OqtTUb
2016-08-05 19:48:13 +05:30
Bobby Holley
3eac0e7c8d Bug 1291390 - Make parsing mode an immutable property of the StyleSheet. r=heycam 2016-08-03 10:26:14 -07:00
Jeremy Chen
2c264512f6 Bug 1289007 - part1: parse and compute initial-letter property. r=heycam
MozReview-Commit-ID: E0eXolZ93oJ
2016-07-28 15:23:36 +08:00
Jeremy Chen
dd5b87d639 Bug 1289007 - part0: remove redundant codes in ParsePropertyByFunction. r=heycam
CSS align and CSS justify share same parsing function under some conditions.
Let's make these switch branches stick together, so we can remove a bit redundant
codes.

MozReview-Commit-ID: 49IKvqhLSt4
2016-07-28 15:23:36 +08:00
Boris Chiou
bfcdbafad5 Bug 1272475 - Part 1: Clamp max/min float value in the parser of CSS Transform function. r=heycam
To avoid calculate +/-infinite function value, we clamp it in the parser level.
Also, we use EnsureNotNan while calculating the interpolation for translate
function, so it's also better to do EnsureNotNan before call SetFloatValue()
while calculating the interpolation for rotate (AddCSSValueAngle) and scale
functions.

MozReview-Commit-ID: 1k19ytyNG1N
2016-07-20 15:14:05 +08:00
Hiroyuki Ikezoe
afb064adfe Bug 1278485 - Part 1: Limit y1 and y2 control points for cubic-bezier to avoid overflows. r=birtles
MozReview-Commit-ID: Bls260r7Sqn
2016-07-12 16:24:42 +09:00
Chris Peterson
c35faf4632 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Jonathan Chan
ccb2576c39 Bug 1285365 - Part 1: Remove trailing whitespace from nsCSSParser. r=dholbert
MozReview-Commit-ID: HNHfHK3d2BR
2016-07-07 14:05:23 -07:00
Edgar Chen
9c932f7a87 Bug 1275511 - Should not ignore entire <source-size-list> if something is invalid; r=heycam
MozReview-Commit-ID: 3YGpXm7dJMM
2016-04-12 11:49:50 -04:00
Mats Palmgren
d0b243b500 Bug 1279641 - [css-grid] Make 'span' an invalid <custom-ident> in line name lists. r=dholbert 2016-06-11 20:42:03 +02:00
Astley Chen
b6e6de9d4c Bug 1258286: Part 1 - add layer types to nsStyleImageLayers and layer initialization. r=heycam 2016-06-03 23:56:54 +08:00
Edgar Chen
f432a2b18c Bug 1274519 - Don't append result to the candidate list if got unexpected token at the end of size string; r=heycam
MozReview-Commit-ID: 9jwHNUPZ94k
2016-05-25 09:47:18 +08:00
Mats Palmgren
607a612a69 Bug 1266268 - [css-grid] Implement <percentage> for grid gap properties. r=dholbert 2016-05-25 10:48:52 +02:00
Edgar Chen
2b809cd691 Bug 1274526 - Part 1: Implement support for 'q' absolute length units in CSS; r=heycam
MozReview-Commit-ID: vTDufVkAuv
2016-05-23 15:18:34 +08:00