Commit Graph

127 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a75e44e8d4 Bug 1420755: Make the MediaList coming from the loader know about its stylesheet. r=heycam
MozReview-Commit-ID: 6W2aWf6jS9c
2017-11-27 11:32:21 +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
Chris Peterson
4434deda7a Bug 1412048 - Replace NS_RUNTIMEABORT("...") with MOZ_CRASH("..."). r=froydnj
And remove unreachable code after MOZ_CRASH().

MozReview-Commit-ID: 6ShBtPRKYlF
2017-10-24 23:30:31 -07: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
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
Josh Matthews
34594ebaa7 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00
Tom Tromey
5d536690db Bug 1306887 - keep SourceMap response header on CSS style sheets; r=bz,heycam
When loading a style sheet, if the SourceMap (or legacy X-SourceMap)
response header was seen, record it and make it available to chrome
scripts.

MozReview-Commit-ID: 3wtUADzgrI3
2017-06-28 16:51:46 -07:00
Wes Kocher
8cbe4b5d79 Backed out changeset f220d8060c14 (bug 1352669) for build bustage CLOSED TREE a=bustage
MozReview-Commit-ID: INYGT4WT1pO
2017-07-06 14:56:06 -07:00
Josh Matthews
6416600b5e Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter.
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-06 13:15:08 -07: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
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
Brad Werth
8abb58fab4 Bug 1373193 Part 2: Create and call a new UpdateStyleSheet method on ServoStyleSet when a ServoStyleSheet has its inner cloned. r=xidorn
MozReview-Commit-ID: GKxnEiZvziS
2017-06-19 10:47:13 -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
Phil Ringnalda
27dd6d760f Backed out changeset a5fe1b7f3dad (bug 1372790) for build bustage in nsCSSParser.cpp
CLOSED TREE

MozReview-Commit-ID: 3qoTERDArAo
2017-06-13 22:39:50 -07:00
Xidorn Quan
154deecdcc 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
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
Xidorn Quan
b68a3b8b64 Bug 1262963 - Add env var for bypassing origin check of cssom. r=heycam
MozReview-Commit-ID: 2iMx3sz1QKS
2016-11-29 18:03:01 +11: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
Xidorn Quan
08c91e75e4 Bug 1352968 part 7 - Make RuleHasPendingChildSheet a static method of StyleSheet. r=heycam
MozReview-Commit-ID: HPJgsFftT6f
2017-05-30 11:10:25 +10:00
Xidorn Quan
6a6b1408bb Bug 1352968 part 4 - Change the direction of child stylesheet list. r=heycam
It seems no one actually care about the order of the list, and the order
is completely meaningless if the script insert new @import rules.

Changing the order makes inserting faster, and make it easier for later
patch to get the latest inserted child sheet.

MozReview-Commit-ID: 72eKqVoPbZ7
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
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
Emilio Cobos Álvarez
d94e8fcc32 Bug 1367553: Avoid import hell in StyleSheet.h. r=emilio
MozReview-Commit-ID: DR4xURkcFcA
2017-05-25 16:11:13 +02:00
Brad Werth
fdeacb1873 Bug 1339629 Part 10: Implement ServoStyleSet::EnsureUniqueInnerOnCSSSheets. r=heycam
MozReview-Commit-ID: GuUqKYrV60z
2017-05-15 17:11:08 -07:00
Brad Werth
84b701f39e Bug 1339629 Part 9: Uplift EnsureUniqueInnerOnCSSSheets and SetNeedsRestyleAfterEnsureUniqueInner into StyleSetHandle, and eliminate CSSStyleSheet::EnsureUniqueInner. r=heycam
MozReview-Commit-ID: LH7vTKUmuv8
2017-05-15 16:30:10 -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
26ed5d2848 Bug 1339629 Part 6: Uplift mStyleSets into StyleSheet. r=heycam
MozReview-Commit-ID: G8xQ5gLJ3dr
2017-05-15 16:27:15 -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
Brad Werth
2fae31f0d5 Bug 1339629 Part 3: Uplift mDirty into StyleSheet. r=heycam
MozReview-Commit-ID: iZKdg0fWss
2017-05-15 14:48:24 -07:00
Boris Zbarsky
6fa1539ab5 Bug 1358056. Fix stylesheet handling of associated documents in various edge cases. r=heycam 2017-04-24 15:44:19 -04:00
Emilio Cobos Álvarez
1b872a5700 Bug 1325878: Simplify MediaList creation. r=xidorn
MozReview-Commit-ID: Jre50YpuD7F
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 00:30:12 +08:00
Emilio Cobos Álvarez
33c6bc1551 Bug 1325878: Don't hardode nsMediaList in dom::StyleSheet. r=xidorn
MozReview-Commit-ID: IynF1NFUSLf
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 00:30:09 +08: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
Andrea Marchesini
8f5f953fba Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01: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
abb46b4fde Bug 1315601 part 13 - Move common code of DeleteRuleFromGroup/InsertRuleIntoGroup from CSSStyleSheet to StyleSheet. r=heycam
MozReview-Commit-ID: BDxnYb0OkCk
2017-03-08 18:04:15 +11:00
Xidorn Quan
a1f85f934d Bug 1315601 part 3 - Add base class MediaList and move part of nsMediaList to it. r=heycam
MozReview-Commit-ID: A2uJpbGgO55
2016-11-09 17:28:24 +11:00
Brad Werth
533d5ac5ed Bug 1342869 Part 1: Uplift ChildSheetListBuilder into StyleSheet so that all StyleSheet subclasses can fixup parent chains when children are removed. r=heycam
MozReview-Commit-ID: F9KnuPC0h7K
2017-03-06 16:27:32 -08:00
Brad Werth
a2095b5907 Bug 1290218 Part 4b: Fixup cycle collector declarations for mInner moving into StyleSheetInfo. r=heycam
MozReview-Commit-ID: 9cAvEf7y8JN
2017-02-15 16:19:33 -08:00
Brad Werth
35fe39a003 Bug 1290218 Part 4: Implement shared mInners for ServoStyleSheets, and standardize calling of AddSheet into CSSStyleSheet and ServoStyleSheet constructors. r=heycam
MozReview-Commit-ID: 7u89J0WfMcX
2017-02-17 15:48:35 -08:00
Brad Werth
0ef4bd93de Bug 1290218 Part 2: Uplift mInner pointer from CSSStyleSheetInner into StyleSheetInfo. r=heycam
MozReview-Commit-ID: K6FbTN1r4Qg
2017-02-14 09:41:33 -08:00
Brad Werth
6403dc67fc Bug 1328420 Part 8: Uplift SizeOfIncludingThis into StyleSheet, with override in CSSStyleSheet. r=heycam
MozReview-Commit-ID: 5f1WldhnP2
2017-01-23 16:42:31 -08:00
Brad Werth
7468980400 Bug 1328420 Part 7: Uplift List debug method into StyleSheet. r=heycam
MozReview-Commit-ID: 7aqC6N6cZst
2017-01-23 16:40:28 -08:00
Brad Werth
034e91ce4d Bug 1328420 Part 6: Implement ServoStyleSheet destructor. r=heycam
MozReview-Commit-ID: iVaza2s7d
2017-01-23 16:37:59 -08:00