Commit Graph

101 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
b7a7a08a94 Bug 1357583: Remove ServoStyleSheet::ClearRuleCascades. r=heycam
These invalidations are already handled from the PresShell notifications, no
need to handle it somewhere else.

MozReview-Commit-ID: G9KDVvSKMJY
2017-05-29 23:01:26 +02:00
Brad Werth
029039581a Bug 1339629 Part 12: Define UUID for ServoStyleSheet, which is needed for tests. r=heycam
MozReview-Commit-ID: GVUcZ7L0Ro5
2017-05-18 16:36:44 -07:00
Brad Werth
a996558825 Bug 1339629 Part 11: Call EnsureUniqueInner from ServoCSSRuleList when a StyleSheet is set. r=heycam
MozReview-Commit-ID: cvdITwpREk
2017-05-18 15:48:48 -07:00
Brad Werth
d5d552db30 Bug 1339629 Part 8: Uplift ClearRuleCascades into StyleSheet. r=heycam
MozReview-Commit-ID: CCYIYjWrw86
2017-05-18 14:21:11 -07:00
Brad Werth
720274de63 Bug 1339629 Part 4: Uplift CloneFor into StyleSheetInfo, and EnsureUniqueInner into StyleSheet. r=heycam
MozReview-Commit-ID: 4aZJYAsmZ2h
2017-05-15 16:19:17 -07:00
Wes Kocher
ec874cac14 Backed out 2 changesets (bug 1342289) for crashtest leaks a=backout
Backed out changeset 3744676f7923 (bug 1342289)
Backed out changeset d0a029765f69 (bug 1342289)

MozReview-Commit-ID: Fb6GfKo6AhJ
2017-05-22 12:50:23 -07:00
Brad Werth
3c39f594a7 Bug 1342289 Part 1: Define UUID for ServoStyleSheet. r=heycam
MozReview-Commit-ID: GVUcZ7L0Ro5
2017-05-18 16:36:44 -07:00
Nazım Can Altınova
072d3c9b05 Bug 1364746 - stylo: Continue to propagate quirks mode information to Servo r=bholley
I've propagated quirks mode information on some places. But we needed to pass
quirks mode to some other FFI functions to be able to handle that information
properly.

MozReview-Commit-ID: JovQWjN3YJx
2017-05-14 18:11:18 +03:00
Fernando Jimenez Moreno
21977eeb4e Bug 1350175 - Part 1: Set stylesheet line offset. r=xidorn
MozReview-Commit-ID: 49B3bZaWjWc
2017-04-25 21:01:45 +02:00
Emilio Cobos Álvarez
3ac9510c9e Bug 1325878: Pass the MediaList down to Servo, making <style media> work. r=xidorn
MozReview-Commit-ID: BUCSQJs2CNI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 00:30:10 +08:00
Nicholas Nethercote
d1e195a649 Bug 1353948 - Add SizeOfIncludingThis() methods to ServoStyle{Set,Sheet,SheetInner}. r=heycam.
This fills things in a bit more on the Gecko side.
2017-04-06 12:22:36 +10:00
Xidorn Quan
7fb3169426 Bug 1343964 part 3 - Have ServoStyleSheet own a URLExtraData. r=heycam
MozReview-Commit-ID: CQyvrVtl0hr
2017-04-04 13:41:44 +10:00
Xidorn Quan
93655e51b9 Bug 1343964 part 1 - Move URLExtraData into its own header. r=heycam
This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla

MozReview-Commit-ID: 72MYq6kWm4s
2017-04-04 10:04:13 +10:00
Xidorn Quan
d119ed8817 Bug 1352025 part 2 - Stop passing in url as string for parsing. r=manishearth
MozReview-Commit-ID: CRgOO7NyYd9
2017-04-01 16:17:55 +11:00
Xidorn Quan
bf22378ea2 Bug 1352763 part 3 - Have ServoStyleSheet also implement nsICSSLoaderObserver. r=heycam
MozReview-Commit-ID: 1Z6jAmQ9CY6
2017-04-03 19:55:06 +10:00
Xidorn Quan
95cf226194 Bug 1351957 - Create URLExtraData for holding base uri, referrer, and principal. r=heycam
MozReview-Commit-ID: 1wqTb3kvvWh
2017-03-30 18:54:48 +11:00
Xidorn Quan
799b5f1cd0 Bug 1315601 part 14 - Add InsertRuleIntoGroup support to ServoStyleSheet. r=heycam
MozReview-Commit-ID: GUHtvjQXECW
2017-03-08 18:27:53 +11:00
Xidorn Quan
70ca7be4d6 Bug 1315601 part 10 - Make ServoCSSRuleList support being nested. r=heycam
MozReview-Commit-ID: 8IUGxkMZPMj
2017-03-09 20:53:34 +11:00