Commit Graph
1299 Commits
Author SHA1 Message Date
Nicholas Nethercote 4ce1e9c11f Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString
2017-06-20 19:19:52 +10:00
Chris Peterson f0959a2a4a Bug 1373525 - layout: Remove unused classes nsAutoScannerChanger and nsAutoCSSParserInputStateRestorer. r=dholbert
layout/style/nsCSSParser.cpp:524:12 [-Wunused-member-function] unused member function 'DoNotRestore'
layout/style/nsCSSParser.cpp:563:7 [-Wunused-member-function] unused member function 'nsAutoScannerChanger'
layout/style/nsCSSParser.cpp:587:7 [-Wunused-member-function] unused member function '~nsAutoScannerChanger'
layout/style/nsCSSParser.cpp:1236:8 [-Wunused-member-function] unused member function 'ParseSingleTokenVariantWithRestrictions'

MozReview-Commit-ID: JRTBxrNcZzT
2017-06-07 00:03:03 -07:00
Boris Chiou 4e6b87296a Bug 1373712 - Part 1: Fix ParseHue() for inf value. r=dholbert
MozReview-Commit-ID: C9dCbbnFP3j
2017-06-21 12:50:11 +08:00
Markus Stange 539f07616a Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO
2017-06-19 01:44:22 -04:00
Cameron McCormack 95368ca21c Backout bug 1291457 and bug 1370034 for bustage. 2017-06-19 13:55:15 +08:00
Markus Stange ec6ecdb465 Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO
2017-06-19 00:21:16 -04:00
Xidorn Quan 0e0b579d0c Bug 1372488 - Make counter style 'disc' not overridable. r=dbaron
MozReview-Commit-ID: 11ZpZtRQSUF
2017-06-13 16:00:37 +10:00
Jeff Hajewski e7886588bb Bug 1371354: Changes macro defined NS_SYTLE_IMAGELAYER_ to enum class StyleImageLayer; r=manishearth
MozReview-Commit-ID: DgvenevRHg2
2017-06-09 16:53:34 -07:00
Xidorn Quan d557dc933f Bug 1345709 - Lowercase color keyword in specified value. r=heycam
MozReview-Commit-ID: d5cbTvSpQt
2017-06-06 14:48:33 +10:00
Manish Goregaokar 541e0db30b Bug 1370458: Disallow floats, negative numbers, and long values in hashless color quirk; r=xidorn
MozReview-Commit-ID: FAwr9rgj58c
2017-06-05 23:47:30 -07:00
Manish Goregaokar 90c46c42ad Bug 1370353 - Stop accepting -/**/n in nth-child ; r=dbaron
MozReview-Commit-ID: AhFYJrqynfw
2017-06-05 13:54:04 -07:00
Manish Goregaokar 3cc032e760 Bug 1338486: Support implied parentheses in CSS.supports; r=xidorn
MozReview-Commit-ID: CUo371Hvj4T
2017-06-04 03:45:05 -07:00
Manish Goregaokar 8bb50b6c47 Bug 1364009 - Fix windows bustage; r=bustage
MozReview-Commit-ID: 6es9eyF6KuJ
2017-06-03 19:45:06 -07:00
Manish Goregaokar f11bf6e617 Bug 1364009 - Don't allow comments/spaces between signs,numbers,and n in an+b syntax for nth-child; r=dbaron
In the an+b syntax, this continues to allow comments and spaces like so:
` an + b `. It does not allow `a n+b`, or `- an+b` or `+ an+b` (and the
same for the `an-b` form). Similarly, it does not allow `- b` or `+ b`.

Additionally, it *does* allow `+/*comment*/n+b` or `-/*comment*/n+b`,
but not `+ n+b` or `-n+b`. This is specced; in this one case we
parse two tokens but do not allow whitespace in between.

MozReview-Commit-ID: INzFGeMPeK7
2017-06-01 15:54:14 -07:00
Jonathan Watt 9f23ca98e8 Bug 1362120 - Always allow the 'context-fill'/'context-stroke' keywords in SVG <paint>. r=heycam
MozReview-Commit-ID: 2xY2NS4u8P0
2017-05-09 09:36:09 +01:00
Xidorn Quan 1061c0c173 Bug 1363292 - Have unprefixed linear-gradient accept zero as angle value. r=dholbert
MozReview-Commit-ID: GRHi9GbkrnG
2017-05-29 14:28:19 +10:00
Xidorn Quan 1600a9a26c Bug 1188074 part 2 - Allow origin and clip values to appear anywhere in an image layer shorthand property. r=heycam
MozReview-Commit-ID: 1mPG1ua5aSI
2017-05-25 13:57:56 +10:00
Xidorn Quan 71c03f4d46 Bug 1188074 part 1 - Refactor ParseImageLayersItem a bit to check whether a slot is filled before checking whether the keyword matches. r=heycam
This matches how Servo handles this, which should be faster when the
value is valid, because we can skip checking lots of keyword tables
in many cases.

MozReview-Commit-ID: C1pGwbKTi0c
2017-05-25 13:38:47 +10:00
Xidorn Quan e3293c7d8e Bug 1363968 - Change how counter-{reset,increment} is parsed to align serialization of specified value with Servo and Blink. r=heycam
This also includes a small fix to manifest of the affected mochitest.

MozReview-Commit-ID: 1b8lba5JiHr
2017-05-23 13:28:47 +10:00
Xidorn Quan e866068ced Bug 1345697 part 1 - Various fix for adding new files. r=heycam
MozReview-Commit-ID: 33Ssd7tNZ2K
2017-05-19 16:12:34 +10:00
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