Commit Graph

119 Commits

Author SHA1 Message Date
Xidorn Quan
ea8b8b1e74 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA
2018-03-29 22:15:46 +11:00
Xidorn Quan
d03cde8f6e Bug 1447828 part 8 - Remove remaining uses of StyleBackendType as well as the type itself. r=emilio
MozReview-Commit-ID: 6sh4eKvDpRF
2018-03-29 02:34:34 +11:00
Xidorn Quan
f9bab6137e Bug 1447828 part 4 - Remove StyleBackendType uses from Loader. r=emilio
MozReview-Commit-ID: 8DbjibZE3Dw
2018-03-29 02:33:01 +11:00
Jonathan Watt
44d37e68d5 Bug 1449321 - Remove the IsServo and IsGecko methods from the style system code. r=emilio 2018-03-23 16:01:34 +00:00
Xidorn Quan
800bb29076 Bug 1449390 - Remove Rule::GetType() and its corresponding constants. r=emilio
MozReview-Commit-ID: 5r64ATHUAux
2018-03-28 14:22:01 +11:00
Bobby Holley
18f3aec87a Bug 1438974 - Make Servo stylesheet parsing completion async by default. r=bz
MozReview-Commit-ID: GXLT5NakIop
2018-02-28 10:43:13 -08:00
Bobby Holley
4028e6ac64 Bug 1438974 - Separate synchronous stylesheet parsing into a separate path. r=bz
This will allow us to make the regular path fully asynchronous.

MozReview-Commit-ID: 6ZurtiNQPZK
2018-02-28 10:43:12 -08:00
Bobby Holley
07547747d5 Bug 1438974 - Shuffle some stuff around in ServoStyleSheet::ParseSheet. r=bz
MozReview-Commit-ID: A2BxoZjFOU1
2018-02-28 10:43:12 -08:00
Bobby Holley
5656494d74 Bug 1441896 - Pass an explicit parent SheetLoadData for child stylesheet loads. r=bz CLOSED TREE
MozReview-Commit-ID: 7XNu42NtITm
2018-02-28 10:09:00 +02:00
Brad Werth
6628f64281 Bug 1415940 Part 3: Make StyleSheets clear their MODIFIED_RULES flag when the sheet is reparsed. r=bz
MozReview-Commit-ID: F7g2CstgjT8
2018-01-11 16:43:58 -08:00
Brad Werth
5c2b03c398 Bug 1415940 Part 1: Expand StyleSheet dirty flag into a bitfield, to allow more types of dirtiness. r=bz
MozReview-Commit-ID: 7IasNqj85il
2018-01-03 14:25:56 -08:00
Cameron McCormack
18480c6598 Bug 1427512 - Part 22: Remove nsIDOMStyleSheet. r=xidorn,bz
MozReview-Commit-ID: KO2mWX4P8lI
2018-01-11 16:17:57 +08:00
Cameron McCormack
0e3f159a0d Bug 1427512 - Part 18: Remove nsIDOMCSSStyleSheet. r=xidorn,jryans,bz
MozReview-Commit-ID: CN3VZvQceZB
2018-01-11 16:17:56 +08:00
Emilio Cobos Álvarez
ae4565f9fe Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-12-01 08:46:39 +01:00
Brindusan Cristian
267e0964fa Backed out 2 changesets (bug 1420762) for merge conflicts r=merge a=merge
Backed out changeset ba350c82d823 (bug 1420762)
Backed out changeset 00287b88254b (bug 1420762)
2017-12-01 00:20:10 +02:00
Emilio Cobos Álvarez
25703a1dfa Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-11-30 15:42:45 +01:00
Emilio Cobos Álvarez
ab3d0b356b Bug 1420713: Ensure ReparseStyleSheet refreshes the stylist even when there's no document. r=heycam
MozReview-Commit-ID: 1acIXdXOgO
2017-11-27 11:35:15 +01:00
Xidorn Quan
e192962d0f Bug 1412714 - Don't clone inner of XBL stylesheet in Servo. r=bz
MozReview-Commit-ID: Kzrod3SBt1k
2017-10-30 15:16:20 +11:00
Xidorn Quan
c9a1c4a65c Bug 1407888 part 2 - Make ServoStyleRuleMap::FillTableFromStyleSheet not make unique inner. r=heycam
MozReview-Commit-ID: 1I7sawfjcnl
2017-10-12 18:56:02 +11:00
Phil Ringnalda
5f2bcd264d Backed out 2 changesets (bug 1407888) for aSheet->HasUniqueInner() assertion failures
CLOSED TREE

Backed out changeset 50e535750cc9 (bug 1407888)
Backed out changeset e1287860a439 (bug 1407888)

MozReview-Commit-ID: 8UHuO8Fz0pL
2017-10-12 19:59:50 -07:00
Xidorn Quan
8dc12d7dcf Bug 1407888 part 2 - Make ServoStyleRuleMap::FillTableFromStyleSheet not make unique inner. r=heycam
MozReview-Commit-ID: 1I7sawfjcnl
2017-10-12 18:56:02 +11: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
Nicholas Nethercote
dde5d4749e Bug 1400624 - Fix a panic in Stylo memory reporting. r=heycam.
`MallocSizeOfOps::enclosing_size_of_op` is an `Option<>` type, and the panic in
question is caused by not providing a value in a case where it's needed for
measuring a HashSet.

HashMaps and HashSets are common enough that it makes sense to make
`enclosing_size_of_op` non-optional, which this patch does.

MozReview-Commit-ID: IB2aRuXHj8E
2017-09-18 13:54:30 +10:00
Brad Werth
a9bb6f2955 Bug 1395322 Part 1: Enforce consistent use of nsIDOMCSSRule enums for Servo rule types. r=xidorn
MozReview-Commit-ID: DmfaYCe9QAY
2017-09-06 16:58:42 -07: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
Henri Sivonen
e1503a6db8 Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io
2017-08-29 16:01:42 +03:00
Andrew McCreight
84ee98de3c Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1
2017-08-29 16:02:48 -07:00
Brad Werth
a0e19290b2 Bug 1387933 Part 2: Gecko-side add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes, and mark a test as passing. r=xidorn
MozReview-Commit-ID: 9wqJW3SqbbM
2017-08-22 13:53:53 -07:00
J. Ryan Stinnett
61e1efdb63 Bug 1392447 - Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI. r=emilio
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: JHDp0XAmQCG
2017-08-22 14:54:20 -05:00
Cameron McCormack
fe8dfd09db Bug 1382925 - Part 2: Add FFI function to get stylesheet origin. r=emilio
MozReview-Commit-ID: F3VY6qagrpS
2017-08-12 18:34:34 +08:00
Xidorn Quan
69cf0d9128 Bug 1380800 - Correct index check in ServoStyleSheet.deleteRule. r=heycam
MozReview-Commit-ID: GZz0g9x4WdS
2017-07-14 13:24:47 +10:00
Emilio Cobos Álvarez
e310a60d66 Bug 1372041: Refactor @import so it also respects the stylesheet's media properly. r=heycam
MozReview-Commit-ID: EBmd8nG877t
2017-07-02 17:19:08 +02: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
Brad Werth
016d57315a Bug 1367996 Part 1: Make ServoStyleSheet::ReparseSheet call nsDocument::StyleRuleAdded and StyleRuleRemoved methods. r=heycam
MozReview-Commit-ID: CnGqHEpkM45
2017-06-19 17:49:27 -07:00
Brad Werth
3e3f979912 Bug 1376295 Part 1: Allow null raw sheets in ServoStyleSheet memory calculations. r=xidorn
MozReview-Commit-ID: 2UmLRlUmOR8
2017-06-27 10:09:07 -07:00
Xidorn Quan
c27fb6df6b Bug 1373484 - Drop all reference to StyleSheet when last strong reference is dropped. r=bz
MozReview-Commit-ID: 2RrNZDIjx3s
2017-06-19 10:15:49 +10:00
Xidorn Quan
95d0404c77 Bug 1359217 part 4 - Make ServoStyleSheet::GetCssRulesInternal return ServoCSSRuleList. r=heycam
MozReview-Commit-ID: DjDDoDgo4ty
2017-06-19 15:45:43 +10:00
Xidorn Quan
b143d2b5e1 Bug 1359217 part 3 - Remove unused ErrorResult param from GetCssRulesInternal. r=heycam
MozReview-Commit-ID: KxUN9cCkoZG
2017-06-19 15:45:43 +10:00
Xidorn Quan
82c0129e97 Bug 1359217 part 2 - Include the import rule of child sheet when notifying StyleRuleAdded. r=heycam
MozReview-Commit-ID: 1jDrwrUdyOa
2017-06-19 15:45:43 +10:00
Xidorn Quan
8eef81e318 Bug 1371488 part 1 - Don't create empty servo sheet for stylesheet of @import rule when loading failed. r=emilio
MozReview-Commit-ID: EnjVQIe1oeY
2017-06-09 10:52:35 +10:00
L. David Baron
03d37750a7 Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable.  However, a
few uses have crept in, and this patch removes them.

I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order.  However, the parameters are
in the order opposite the name.

This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.

MozReview-Commit-ID: G6rLbOn7k8d
2017-06-06 22:27:17 -07:00
KuoE0
102edde83c Bug 1358993 - (Part 2) Add ServoStyleSheet::ReparseSheet function to collect reusable style sheets and clean up the child sheets of the parent sheet. r=heycam
MozReview-Commit-ID: CKqKFenXvVs
2017-05-26 16:01:40 +08:00
KuoE0
fc95739e7d Bug 1358993 - (Part 1) Make stylo support reusable style sheets. r=heycam
MozReview-Commit-ID: Fjo1TICAElx
2017-05-26 15:59:01 +08:00
Emilio Cobos Álvarez
02e12853ab Bug 1368986: Cleanup stylesheet copy-constructor. r=heycam
MozReview-Commit-ID: I8vUuJfET24
2017-05-31 13:12:33 +02:00
Emilio Cobos Álvarez
0d0c9b1ab4 Bug 1368690: Move EnsureUniqueInner call after all the members have been initialized. r=xidorn
MozReview-Commit-ID: GoeLsjSAU00
2017-05-31 13:05:15 +02:00
Carsten "Tomcat" Book
4a73993467 merge mozilla-inbound to mozilla-central + UPGRADE_NSS_RELEASE a=merge 2017-05-30 11:37:46 +02:00
Xidorn Quan
87e09051d9 Bug 1352968 part 9 - Notify document about rule insertion only if a rule doesn't have pending child sheet. r=heycam
MozReview-Commit-ID: 3ADpnJuhHXf
2017-05-30 11:10:25 +10:00
Xidorn Quan
d8327da769 Bug 1352968 part 5 - Add a param to ctor of ServoCSSRuleList for top level list. r=heycam
@import rules can only exist in top level rule lists, and we need the
stylesheet to construct the import rules.

MozReview-Commit-ID: APCyGW8re8f
2017-05-30 11:10:25 +10:00
Xidorn Quan
477205b2b5 Bug 1352968 part 2 - Move mOwnerRule to StyleSheet and use dom::CSSImportRule instead of css::ImportRule. r=heycam
MozReview-Commit-ID: DTAWGHIUAQX
2017-05-30 11:10:25 +10:00
Nicholas Nethercote
06435e92c1 Bug 1353998 - Start measuring Stylo style sheet memory usage. r=heycam. 2017-05-30 11:03:51 +10:00