Commit Graph

1321 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
f0a38025cf Bug 1329169 - Use atom for animation-name property. r=xidorn
MozReview-Commit-ID: 9yVWXVi1oXf
2017-10-10 17:00:28 +09:00
Nicholas Nethercote
7dbfdaf890 Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP
2017-10-03 09:05:19 +11:00
Emilio Cobos Álvarez
9f20463bfb Bug 1396066: Add a mechanism to make media features chrome / UA-only. r=xidorn
This is unused right now, but will allow to change media feature visibility
without servo/ changes (along with https://github.com/servo/servo/pull/18774).

MozReview-Commit-ID: 75hahvROoJz
2017-10-07 13:30:09 +02:00
Phil Ringnalda
7672a7540d Backed out 9 changesets (bug 1396066) for Windows reftest failures
CLOSED TREE

Backed out changeset e41f9295ee00 (bug 1396066)
Backed out changeset 7a22efa8df6b (bug 1396066)
Backed out changeset ed95eea7105c (bug 1396066)
Backed out changeset 635746c88630 (bug 1396066)
Backed out changeset 5b1997aeaead (bug 1396066)
Backed out changeset 19c9ea492f5e (bug 1396066)
Backed out changeset b9d8e4588584 (bug 1396066)
Backed out changeset 87b44ea10407 (bug 1396066)
Backed out changeset e5b9aed44133 (bug 1396066)

MozReview-Commit-ID: K9q3MfPBc5E
2017-10-06 20:48:23 -07:00
Emilio Cobos Álvarez
96a89c5b47 Bug 1396066: Restrict system-metric media features to UA and chrome sheets only. r=xidorn
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-06 14:34:56 +02:00
Cameron McCormack
4ad8de31f3 Bug 1397626 - Part 2: Replace uses of FontFamilyListRefCnt with SharedFontList. r=xidorn
MozReview-Commit-ID: 7HoBae9UOks
2017-10-02 10:24:25 +08:00
Nicholas Nethercote
9fda5528d2 Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ
2017-09-26 08:33:21 +10:00
Ting-Yu Lin
a78b44acbc Bug 1281101 Part 1 - Remove MOZ_ENABLE_MASK_AS_SHORTHAND from layout code. r=cjku
MozReview-Commit-ID: HWq2IOLsflD
2017-09-21 17:36:57 +08:00
Tom Tromey
5132043cac Bug 1399911 - preserve sourceURL comment directive on style sheets; r=bz,heycam
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools.  This name is also used as the base
URL for the source-map URL resolution algorithm.  sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/

This patch changes Firefox to record this URL, if specified, and to
expose it (chrome-only) vai StyleSheet.webidl.

MozReview-Commit-ID: 7NwXsOf7nbY
2017-09-14 14:59:32 -06:00
Ting-Yu Lin
5262adc990 Bug 1399767 - Remove preference "layout.css.clip-path-shapes.enabled". r=heycam
The variables (basicShapeSVGBoxValues, etc.) in property_database.js are
moved to the beginning of the file so that they're defined before usage.

MozReview-Commit-ID: 7L3obIY1alP
2017-09-15 15:00:30 +08:00
Emilio Cobos Álvarez
2fb463ee98 Bug 1387410: Stop the grid shorthand from resetting grid-gap properties. r=heycam
MozReview-Commit-ID: GxU9YuAUc00
2017-09-08 10:10:11 +02:00
Tom Tromey
7ccfa075fd Bug 1388855 - Extract source map URL when parsing CSS, r=bz,heycam
This changes the CSS lexer to extract sourceMappingURL directives from
comments and preserve them; then changes the parser to expose this value
as the style sheet's sourceMapURL.

MozReview-Commit-ID: LfMamJ1PsU0
2017-08-09 13:33:24 -06:00
hardik tyagi
e3bd4cc789 Bug 1389862: Change NS_STYLE_CONTENT macro definitions to scoped enum class StyleContent; r=manishearth
MozReview-Commit-ID: 4ojiXrCNRIN
2017-08-14 23:56:24 -07:00
Xidorn Quan
d147b81578 Bug 1386871 - Move font-display pref into StylePrefs. r=heycam
MozReview-Commit-ID: 9CDZSdTOacs
2017-08-03 10:37:02 +10:00
Xidorn Quan
ef7f5319fa Bug 1366956 part 1 - Move CSS prefs from nsCSSParser into an independent class. r=heycam
MozReview-Commit-ID: S5xaJcP1jb
2017-07-18 10:54:32 +10:00
Julian Seward
7d1151d83a Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.
2017-07-24 19:23:52 +02:00
Xidorn Quan
86d5ac9121 Bug 1364260 - Don't require whitespace between keywords and parens in supports rule condition. r=dbaron
MozReview-Commit-ID: B7GsrDQ6NuO
2017-07-20 15:33:09 +10:00
Kevin Hsieh
32943376b0 bug 1363349 (part 2) - accept calc expressions in webkit gradient r=dholbert
MozReview-Commit-ID: IhXyWoJI9Nb
2017-07-12 21:42:02 -07:00
Kevin Hsieh
883fbb97ad bug 1363349 (part 1) - refactor CSSCalc.h to share code better, via a templated ReduceCalcOps class r=dholbert
MozReview-Commit-ID: IvU2StpKHLm
2017-07-12 18:13:07 -07:00
Brian Birtles
e6f7dadb45 Bug 1379582 - Disable frames() timing function using a pref on release/beta channels; r=hiro
MozReview-Commit-ID: 4B8NwMAfyrS
2017-07-12 08:41:58 +09:00
Xidorn Quan
7fbfb43629 Bug 1372790 - Change uint8_t to back some enum and reorder some fields in StyleSheet to make it more compact. r=heycam
MozReview-Commit-ID: DddIzhJqmcZ
2017-06-14 14:26:48 +10:00
Emilio Cobos Álvarez
6941d33a8e Bug 1372041: Refactor a bunch of stuff so link rel="media" is honored. r=heycam
This still leaves one annoying refactoring of @import so we also fix it for
them.

MozReview-Commit-ID: 4s0WExDEH75
2017-07-02 17:19:07 +02:00
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