Commit Graph

42 Commits

Author SHA1 Message Date
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
Brad Werth
637dfced70 Bug 1328420 Part 5: Uplift AppendStyleSheet to StyleSheet. r=heycam
MozReview-Commit-ID: CwNGWsJi65G
2017-01-23 16:23:40 -08:00
Brad Werth
d2b2e92def Bug 1328420 Part 4: Uplift SetOwningDocument into StyleSheet. r=heycam
MozReview-Commit-ID: 3TnTaFYkZS3
2017-01-24 13:12:40 -08:00
Brad Werth
88ca4998cc Bug 1328420 Part 3: Uplift the first child to StyleSheet via a new method, abstracting out the inner sheet concept (which is not present in Stylo sheets). r=heycam
MozReview-Commit-ID: KUeIlOhAJXr
2017-01-23 15:52:56 -08:00
Brad Werth
d6c2d2c058 Bug 1328420 Part 1: Uplift parent pointer and accessor to StyleSheet class. r=heycam
MozReview-Commit-ID: C63yRZM3ORC
2017-01-24 13:09:33 -08:00
Boris Zbarsky
cdbd6b5265 Bug 1332353. Make it clearer when a stylesheet is really owned by its mDocument. r=heycam 2017-01-19 23:49:44 -05:00
Cameron McCormack
cb58119236 Bug 1323665 - Part 2: Allow StyleSheet.disabled CSSOM access to disable/enable a ServoStyleSheet. r=xidorn
Now that bug 1290209 has landed, we can make StyleSheet.disabled work in Servo
styled documents.  This fixes a bunch of test crashes due to the assertion no
longer firing.

MozReview-Commit-ID: 6sLrdrxWlvK
2017-01-09 17:44:30 +08:00
Cameron McCormack
58cbf1f191 Bug 1290209 - Part 8: Move CSSStyleSheet::SetEnabled up to StyleSheet. r=xidorn
MozReview-Commit-ID: 7shpy5ghnVR
2017-01-06 15:05:24 +08:00
Cameron McCormack
859fc6143f Bug 1290209 - Part 6: Move CSSStyleSheet::mMedia up to StyleSheet. r=bzbarsky
MozReview-Commit-ID: LZraHzme6vj
2017-01-06 15:05:24 +08:00
Xidorn Quan
1125f5e9ab Bug 1323919 - Rename nsIMediaList.h to nsMediaList.h. r=heycam
MozReview-Commit-ID: Ake5srkKJbf
2016-12-16 14:50:36 +11:00
Xidorn Quan
3b74963c68 Bug 1307357 part 2 - Fix issues appear after adding file to unified source. r=heycam
MozReview-Commit-ID: 5FkisMn3LKq
2016-11-23 10:26:20 +11:00
Xidorn Quan
850976ea9c Bug 1292432 part 9 - Change WebIDL interface of CSSStyleSheet to StyleSheet. r=heycam
MozReview-Commit-ID: 5AXhsuvvrwe
2016-10-14 22:25:38 +11:00
Xidorn Quan
3631ceaf3e Bug 1292432 part 8 - Move XPCOM IDL methods which just call WebIDL methods to StyleSheet. r=heycam
MozReview-Commit-ID: 3xpdLGc6hqH
2016-10-14 22:25:38 +11:00
Xidorn Quan
d438ebf740 Bug 1292432 part 6 - Make StyleSheet implement GetCssRules/InsertRule/DeleteRule. r=heycam
MozReview-Commit-ID: KD552jWZnA3
2016-10-14 22:25:38 +11:00
Xidorn Quan
eef885dbe9 Bug 1292432 part 5 - Unify completeness check and security check to StyleSheet. r=heycam
MozReview-Commit-ID: CmQ2Q9UrLAA
2016-10-14 22:25:38 +11:00
Xidorn Quan
4f732ccfd6 Bug 1292432 part 4 - Move SubjectSubsumesInnerPrincipal to StyleSheet. r=heycam
MozReview-Commit-ID: 1DItyq2QrDz
2016-10-14 22:25:38 +11:00
Xidorn Quan
42a86c72db Bug 1292432 part 2 - Make StyleSheet inherit nsIDOMCSSStyleSheet. r=heycam
Some method impls are also moved from CSSStyleSheet to StyleSheet so
that they can be shared between the two subclasses.

The new interface methods added to ServoStyleSheet is currently left
unimplemented. They would be implemented in later patches.

MozReview-Commit-ID: 45wHT9BSHTK
2016-10-14 22:25:38 +11:00
Xidorn Quan
83118574f0 Bug 1306212 part 3 - Move the only constructor of StyleSheetInfo to StyleSheet.cpp. r=heycam
MozReview-Commit-ID: Fv2AyBE1Js0
2016-09-29 16:19:06 +10:00
Xidorn Quan
7d6c4129ab Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd
2016-09-26 22:03:25 +10:00
Xidorn Quan
1074b680ca Bug 1304302 part 9 - Make StyleSheet::SheetInfo inline. r=heycam
MozReview-Commit-ID: 9ZvnIBw6emI
2016-09-26 22:03:25 +10:00
Xidorn Quan
c4e19d3ce5 Bug 1304302 part 5 - Make StyleSheet::As{Gecko,Servo} return pointer instead of reference. r=heycam
To match the behavior of StyleSheetHandle so that we can simply replace
uses of StyleSheetHandle with StyleSheet* in later patch.

MozReview-Commit-ID: LfGKrUmzC4h
2016-09-26 22:03:25 +10:00
Bobby Holley
3eac0e7c8d Bug 1291390 - Make parsing mode an immutable property of the StyleSheet. r=heycam 2016-08-03 10:26:14 -07:00
Bobby Holley
e5253ea54e Bug 1291390 - Hoist the ParsingMode getter to the superclass and give it a special binary name for WebIDL. r=bholley,r=heycam
In the next patch we want to introduce an accessor called ParsingMode, which conflicts with this one.
2016-08-03 10:26:14 -07:00
Jonathan Chan
9b3dfb521f Bug 1285365 - Part 2: Add missing includes and namespace qualifiers. r=dholbert
MozReview-Commit-ID: 5vDmc1yGe1P
2016-07-07 14:05:28 -07:00
Bobby Holley
0a533d159f Bug 1252611 - Hoist IsComplete/SetComplete into StyleSheet. r=dholbert 2016-03-10 22:18:59 -08:00
Bobby Holley
019759dcb4 Bug 1252611 - Add a method to get the StyleSheetInfo for a given StyleSheet. r=dholbert
One of the annoying things about sharing algorithms on the superclass here is that
certain members live on StyleSheet and others live on StyleSheetInfo (a situation
resulting from the split between CSSStyleSheet and CSSStyleSheetInner). This allows
us to write general algorithms on StyleSheet that touch members on StyleSheetInfo
without paying the price of virtual dispatch.
2016-03-10 22:18:57 -08:00
Bobby Holley
cfa801bbc7 Bug 1252611 - Hoist mDocument into StyleSheet. r=dholbert 2016-03-10 22:18:56 -08:00
Cameron McCormack
b638fafd4a Bug 1250788 - Part 3.2: Factor out CSSStyleSheet members so they can be used by ServoStyleSheet. r=bholley 2016-02-26 12:51:01 +11:00