Commit Graph
1279 Commits
Author SHA1 Message Date
Xidorn Quan ffa12276d6 Bug 1355352 - Reject unicode-range descriptor when its value contains invalid part. r=jfkthame
MozReview-Commit-ID: 1ZcFCPsIMtx
2017-05-16 10:15:18 +10:00
Xidorn Quan 6273c9bd6a Bug 1328319 part 1 - Move nsCSSCounterStyleRule into a separate header file. r=heycam
MozReview-Commit-ID: Lm1GiKNsgI0
2017-05-09 21:52:06 +10:00
Fernando Jimenez Moreno 11c1a39d5c Bug 1355408 - Part 1: Support @-moz-document rule in stylo. r=xidorn
MozReview-Commit-ID: BMoA7tb7ixj
2017-04-18 18:59:43 +02:00
Xidorn Quan 45a9721391 Bug 1362302 part 1 - Use nsIAtom for counter style names. r=dbaron
MozReview-Commit-ID: 5VK6BgGRVRs
2017-05-06 11:34:35 +10:00
Robert Longson fe779567bf Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
Carsten "Tomcat" Book b01fca1dd7 merge mozilla-inbound to mozilla-central a=merge 2017-05-02 11:04:56 +02:00
Ting-Yu Lin e1fd9018b9 Bug 1321754 Part 1 - Add an enum value to SheetParsingMode for agent sheets that use no unsafe rules. r=heycam
scrollbars.css is the only sheet which is parsed as author level, but later
added as agent level in [1]. Add a new enum value so that it can be parsed
as author level in gecko (nsCSSParser::AgentRulesEnabled() will exclude it),
but servo can recognize it as agent level sheet when the sheet is created.

Delete UserRulesEnabled() because no one uses it.

[1] http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/base/nsDocumentViewer.cpp#2326

MozReview-Commit-ID: 2lrV4ogfnHM
2017-04-28 12:17:14 +08:00
Mats Palmgren 167c2f9082 Bug 1359060 - [css-grid] Disallow fit-content() in repeat(auto-fill/fit) track sizes (per the CSS Grid spec). r=dholbert
MozReview-Commit-ID: Eijlbr8lHjV
2017-05-02 03:50:16 +02:00
Jonathan Watt 5e6164b63f Bug 1350010, part 1 - Implement the '-moz-context-properties' property. r=heycam
MozReview-Commit-ID: CyVQe0UfKdy
2017-04-11 21:38:10 +01:00
Daniel Holbert b2b5cf7068 Bug 1357117 part 2: Add flag to distinguish between -moz & -webkit prefixed gradient expressions. r=heycam
This patch doesn't change our behavior -- we won't actually act on the new flag
until the next patch in this series.

MozReview-Commit-ID: EONsLM54eG1
2017-04-25 11:48:39 -07:00
Daniel Holbert 0df6b6112f Bug 1358586: Require comma after <angle>, in -webkit-linear-gradient() CSS syntax. r=heycam
The logic around here is a bit tricky, because -moz-linear-gradient() shares
this codepath. Here's how things were going wrong:

* The -moz-linear-gradient syntax allows an angle (e.g. "30deg") to be followed
  by an optional box-position (e.g. "top right") before eventually requiring a
  comma and then some color stops.
* In contrast, the -webkit-linear-gradient syntax does NOT allow a box-position
  there (unless the box-position is by itself, without an angle).
* So, for -webkit-linear-gradient, we (correctly) skipped the box-position
  parsing code, if we've seen an angle already.
* BUT: in skipping that code, we *also* inadvertantly skipped the code that
  enforces that we eventually see a comma before we get to the color stops.
  So, we incorrectly accept some -webkit-linear-gradient() expressions that are
  missing a comma that really should be mandatory.

So, this patch adds a special case for -webkit-linear-gradient that
preemptively bails if we get an angle that's not followed by a comma. (With
that, we can also simplify the condition around the box position parsing, too.)

MozReview-Commit-ID: B7MQLxqe6D7
2017-04-21 14:38:14 -07:00
Daniel Holbert c98791aa86 Bug 1241623: Represent legacy -webkit-gradient(linear,...) expressions as an approximately-equivalent linear-gradient() (instead of -moz-linear-gradient()). r=heycam
Note: Instead of exactly honoring the legacy -webkit-gradient(linear,...)
syntax, we aim to simply parse it into something that's approximately
equivalent for common use cases.

In the legacy -webkit-gradient(linear,...) syntax, authors provide *two
arbitrary points* to establish the direction of the gradient, whereas modern
linear-gradient() is simpler: it just takes a single "<side-or-corner>" point
and fills the box with a gradient in the direction of that side or corner.

Before this changeset, we parsed -webkit-gradient(linear,...) into a
slightly-less-legacy "-moz-linear-gradient" representation, so that we could
honor at least one of the author's specified points (since -moz-linear-gradient
accepts a single arbitrary point as the start of the gradient).  But that
prevents us from deprecating -moz-linear-gradient, and it makes it impossible
to spec our emulation behavior in terms of modern standards.

So, this changeset is just changing our approximate representation so that it
can always be serializeable as a modern linear-gradient() expression.

In addition, I'm removing the reftest "webkit-gradient-approx-linear-1.html"
(whose behavior this patch is changing slightly) and I'm replacing it with a
new chunk in test_computed_style.html to more directly test this parsing
behaivor.

MozReview-Commit-ID: 6N1oKaGeOuE
2017-04-23 16:11:10 -07:00
Iris Hsiao 98dbf05642 merge autoland to mozilla-central a=merge 2017-04-14 17:09:58 +08:00
Eric Rahm 843e1a784c Bug 1356060 - Cleanup nits. r=me
MozReview-Commit-ID: Jk6d9UkdbiU
2017-04-13 15:21:41 -07:00
Eric Rahm 6021db5857 Bug 1356060 - Just use nsString in URLValueData. r=heycam
This switches over from using nsStringBuffer to nsString for URLValueData's
|mString| member. This avoids various tedious conversions and can provide
potential performance improvements by avoiding length calculations.

MozReview-Commit-ID: 5eRifUZrAso
2017-04-13 15:18:25 -07:00
Xidorn Quan 0f2df09dac Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G
2017-04-13 16:17:03 +08:00
Ting-Yu Lin 2c0ccc8249 Bug 1312328 - Remove CSS variables preference "layout.css.variables.enabled". r=xidorn
MozReview-Commit-ID: HwYpwbhQkZj
2017-04-07 00:29:39 +08:00
Iris Hsiao e816fa3003 Backed out changeset aa46d54ab74b (bug 1321754) for stylo test failures 2017-04-05 16:56:36 +08:00
Ting-Yu Lin a12a6cc79c Bug 1321754 - Add an enum value to SheetParsingMode for agent sheets that use no unsafe rules. r=heycam
scrollbars.css is the only sheet which is parsed as author level, but later
added as agent level in [1]. Add a new enum value so that it can be parsed
as author level in gecko (nsCSSParser::AgentRulesEnabled() will exclude it),
but servo can recognize it as agent level sheet when the sheet is created.

Delete UserRulesEnabled() because no one uses it.

[1] http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/base/nsDocumentViewer.cpp#2326

MozReview-Commit-ID: 2lrV4ogfnHM
2017-03-28 18:06:26 +08:00
Xidorn Quan f4f44a7d01 Bug 1345696 part 2 - Move nsCSSFontFaceRule to a separate header. r=heycam
MozReview-Commit-ID: 5UsODlVQV7a
2017-03-29 10:20:40 +11:00
Bobby Holley b86b97cc10 Bug 1350244 - Back out bug 1348606 part 5 (Use a threadsafe array for counters). r=me
This reverts commit 07301f1c3f71b36dbe2345e8faa9bc6d643cfc97.

MozReview-Commit-ID: 8tLjUhki2C1
2017-03-29 11:05:17 -07:00
Bobby Holley c374cf6caa Bug 1348606 - Use a threadsafe array for counters. r=xidorn
MozReview-Commit-ID: KgTgcD5mGqr
2017-03-23 10:56:49 -07:00
cku 14c0f9ceb9 Bug 1340044 - Part 2. Rename value in StyleGeometryBox. r=heycam
This change is to use gecko_enum_prefix in helpers.mako.rs, so that we do not
need to manually write code for nsStyleDisplay::mTransformBox.

MozReview-Commit-ID: 7UAL0iUcSIO
2017-03-16 15:18:10 +08:00
Xidorn Quan 0bcaa746f1 Bug 1346669 - Make font-synthesis not a subprop of font shorthand. r=jfkthame
MozReview-Commit-ID: KUX72Gr4SYs
2017-03-13 12:36:19 +11:00
Xidorn Quan eeb451c4a2 Bug 1345804 part 3 - Change will-change to store nsIAtom rather than nsString. r=heycam
MozReview-Commit-ID: 5ISVZwKw6LI
2017-03-10 12:26:53 +11:00
Boris Zbarsky b26328d6e6 Bug 1345362 part 3. Introduce CSSPseudoElementType::NonInheritingAnonBox to represent non-inheriting anon boxes. r=heycam
The idea is to be able to call the right function during style resolution time
without doing a linear walk via nsCSSAnonBoxes::IsNonInheritingAnonBox.

MozReview-Commit-ID: JKt33GggTjz
2017-03-08 23:41:04 -05:00
Boris Chiou c7d71d646d Bug 1248340 - Part 4: Implement Frames in the style system. r=dholbert
Use eCSSUnit_Function to store the frames timing function. Also, add one more
css keyword: frames.
The following changes are included in this:
1. Parser changes.
2. Serialization.
3. Computation in nsRuleNode.
4. Invalid and other values in property_database.js

MozReview-Commit-ID: 887QcXHQ2pU
2017-02-24 14:50:08 +08:00
Daniel Holbert 849660ceab Bug 1344040: Annotate intentionally-unused SkipDeclaration() & ParseSingleTokenVariant() return values, and mark the functions as MOZ_MUST_USE. r=xidorn
MozReview-Commit-ID: JFBkIBHYdhQ
2017-03-05 20:29:30 -08:00
Hiroyuki Ikezoe f40c9f532a Bug 1340344 - Calmp hue value in finite float range. r=dholbert
MozReview-Commit-ID: ItxwcKjpHyO
2017-02-18 10:43:24 +09:00
Carsten "Tomcat" Book 242fd05a22 merge mozilla-inbound to mozilla-central a=merge 2017-02-15 12:21:44 +01:00
Manish Goregaokar 67af1290e7 Bug 1339615 - Don't reset mIsSVGMode in CSSParserImpl::ReleaseScanner; r=bz
MozReview-Commit-ID: DVDcrMPi6Me
2017-02-14 14:16:36 -08:00
Daniel Holbert d74b889d67 Bug 1339546 part 2: Make layout/style/*.cpp include corresponding .h file as the first header. r=xidorn
MozReview-Commit-ID: 2rZ9z0BgRvN
2017-02-14 11:23:11 -08:00
Wes Kocher 1ffdd8b336 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 1c81Eie63Pe
2017-02-14 14:45:40 -08:00
Manish Goregaokar 4c7a50eef7 Bug 1339252: Allow comments in SVG presentation attributes; r=bz
MozReview-Commit-ID: AfxWHvC5Byw
2017-02-13 16:02:46 -08:00
Jeff Walden a6ec779698 Bug 1287006 - Don't pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer, in layout/-related code. r=bz 2017-02-13 09:07:40 -08:00
Iris Hsiao 70851fa9ed Backed out changeset 8379a33c1790 (bug 1339252) for valgrind test failure 2017-02-14 12:40:40 +08:00
Manish Goregaokar ae4415b8a6 Bug 1339252: Allow comments in SVG presentation attributes; r=bz
MozReview-Commit-ID: AfxWHvC5Byw
2017-02-13 16:02:46 -08:00
Daniel Holbert 5b4494ab24 Bug 1259348 part 2: Simplify logic in CSSParserImpl::LookupKeywordPrefixAware. r=mats
MozReview-Commit-ID: D9WoQ9vXTGJ
2017-02-03 14:56:15 -08:00
Daniel Holbert b0979d65a2 Bug 1259348 part 1: Remove CSSUnprefixingService.js and associated code (since it's been supplanted by built-in webkit-prefixed-CSS support). r=mats
MozReview-Commit-ID: CXCJJWhHc8G
2017-02-03 14:56:13 -08:00
L. David Baron a68ac77081 Bug 1333158 - Remove StyleSheet::GetDocument in favor of the identical GetAssociatedDocument. r=bz
(GetAssociatedDocument was recently renamed in bug 1332353.)

Note that the inconsistency between the Rule and CSSParser method names
is slightly bothersome.

MozReview-Commit-ID: L1SBIV86H4s
2017-01-23 13:12:03 -08:00
Astley Chen 04c6e854f0 Bug 1331296 : Part 4 - Remove CSS parser support of -moz-calc(). r=heycam
MozReview-Commit-ID: k5ENlCAXZf
2017-01-18 10:50:31 +08:00
Wes Kocher 51b6d29b6e Merge m-c to autoland, a=merge
MozReview-Commit-ID: LGnPwvWCKe4
2016-12-30 16:59:49 -08:00
Xidorn Quan 807d0f4613 Bug 894245 part 2 - Reject unknown enum color in CSS parser. r=dholbert
MozReview-Commit-ID: 6jfNESnFde5
2016-12-30 14:52:10 +11:00
Daniel Holbert 92ffadedd3 Bug 1326457: Remove redundant check for eCSSKeyword_UNKNOWN at callsites to nsCSSProps::FindKeyword(). r=xidorn
nsCSSProps::FindKeyword() has always failed when passed eCSSKeyword_UNKNOWN,
but it didn't used to have a fast-path for this sentinel value -- it used to
walk the whole array before failing. So it used to make sense to have a
dedicated check for it at the callsites, to avoid an unnecessary array
traversal. But now, there's an early-return in FindKeyword() (or actually in
its helper, FindIndexOfKeyword()) which catches eCSSKeyword_UNKNOWN right away,
before it walks the array. So there's no benefit to having a dedicated check at
the callsites anymore.

MozReview-Commit-ID: FOX48YZMomd
2016-12-30 12:03:08 -08:00
Emilio Cobos Álvarez 6d7b2e91b9 Bug 1304792: stylo: Implement @import. r=heycam
MozReview-Commit-ID: Hw1V66JxIBD
Signed-off-by: Emilio Cobos Álvarez <[email protected]>
2016-12-30 16:30:41 +01:00
Emilio Cobos Álvarez 88c137a305 Bug 1304792: Minimal Loader and CSSParser cleanup. r=heycam
MozReview-Commit-ID: DYOh8BtK7NT
Signed-off-by: Emilio Cobos Álvarez <[email protected]>
2016-12-30 16:30:41 +01:00
Xidorn Quan 1f17806a81 Bug 1326125 - Rename enum version of SetIntValue to SetEnumValue. r=heycam
MozReview-Commit-ID: EbXK827IRFP
2016-12-29 10:22:49 +11:00
cku b00f9ec88d Bug 1311270 - Part 3. Replace {bg|mask}-origin/{bg|mask}-clip constants by StyleGeometryBox.
MozReview-Commit-ID: DYokhDa9fFQ
2016-11-22 15:30:01 +08:00
Ethan Lin 21e43f842d Bug 1303623 - Part3. Parser changes. r=heycam
MozReview-Commit-ID: AQz596lVFnd
2016-10-19 15:49:10 +08:00
Ethan Lin a4566c4e99 Bug 1303623 - Part2. Style structure changes. r=heycam
MozReview-Commit-ID: Lkdd5nAQRwG
2016-10-19 15:48:47 +08:00