Граф коммитов

212 Коммитов

Автор SHA1 Сообщение Дата
Brad Werth a4e01c9fe2 Bug 1342289 Part 1: Generalize Loader to cycle collect all StyleSheets, not just CSSStyleSheets. r=heycam
MozReview-Commit-ID: 1kVim87GZIB

--HG--
extra : rebase_source : f4edf0c260908f1567ca7ddfdf86be55e38925cc
2017-06-02 15:40:37 -07:00
KuoE0 2137da5244 Bug 1358993 - (Part 1) Make stylo support reusable style sheets. r=heycam
MozReview-Commit-ID: Fjo1TICAElx

--HG--
extra : rebase_source : ffa47efdcec924fe8ab4f209469ad13c6f7a7c80
2017-05-26 15:59:01 +08:00
Xidorn Quan 1b312ca843 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

--HG--
extra : source : 6b2b471b993f33f9d06af01e4863cd6c5d34ce3a
2017-05-30 11:10:25 +10:00
KuoE0 1ef85c4cf5 Bug 1367984 - Refactor LoaderReusableStyleSheets to accept StyleSheet to support both of CSSStyleSheet and ServoStyleSheet. r=heycam
MozReview-Commit-ID: 8scCs4avrCf

--HG--
extra : rebase_source : 19e928838c48211ed9deff7c2d8870dc770e4459
2017-05-15 15:55:08 +08:00
Nazım Can Altınova e7316ee8fe 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

--HG--
extra : rebase_source : bd25ba4276ae21ff4feb80e56b311202019268a0
2017-05-14 18:11:18 +03:00
Thomas Nguyen 6c7694640d Bug 1354563 - Return value of setting referrer could be ignored when loading style. r=heycam
The referrer header is optional field and it should not block loading style

MozReview-Commit-ID: fgm5A2MjRW
2017-04-27 20:34:00 +02:00
Emilio Cobos Álvarez c0d9b6a9d7 Bug 1325878: Use dom::MediaList in the CSS Loader. r=xidorn
MozReview-Commit-ID: 8KcKYrkk3jI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-13 00:30:05 +08:00
Xidorn Quan b49153b29e Bug 1352763 part 3 - Have ServoStyleSheet also implement nsICSSLoaderObserver. r=heycam
MozReview-Commit-ID: 1Z6jAmQ9CY6

--HG--
extra : rebase_source : 1e228d29b6cd6afdc1b47dd28e5a4ff9a79d5af7
2017-04-03 19:55:06 +10:00
Xidorn Quan e0f34c4221 Bug 1352763 part 2 - Pass borrowed child stylesheet to Gecko for loading rather than the import rule. r=emilio
This is necessary because if we pass in the import rule, we would need
to invoke Servo_ImportRule_GetSheet to get the child sheet. However,
Servo_ImportRule_GetSheet tries to lock the global rwlock with read
access, while Servo_CssRules_InsertRule has already locked the same
rwlock with write access for the CSSOM case.

Since the import rule itself is never needed in the code path, it is
easier to just pass in the child stylesheet.

MozReview-Commit-ID: 4njNyGniPIm

--HG--
extra : rebase_source : ad88929713fdc5a581addc044094fa8130125121
2017-04-03 16:18:49 +10:00
Kris Maglione dabd327027 Bug 1348442: Part 1 - Allow loading preloaded stylesheets asynchronously. r=heycam
These changes allow us to asynchronously load pre-loaded stylesheets, in a way
that's similar to ChromeUtils.compileScript. The new method returns a Promise
which resolves to the preloaded sheet once it's finished loading.

This will allow us to remove the last remaining use of synchronous channels in
moz-extension: URLs.

MozReview-Commit-ID: 7J52ff93YKT

--HG--
extra : rebase_source : 20fa013cdc7f5fbedb5ce671ede17765a2abbac2
2017-03-19 19:33:49 -07:00
Ting-Yu Lin f087300185 Bug 1338446 Part 3 - Label SheetLoadData in Loader::PostLoadEvent. r=heycam
When constructing a Loader without passing a document, we added a DocGroup
parameter so that we could still use it to dispatch events to the DocGroup.

Delete NS_ENSURE_TRUE because new() is infallable.

Use another runnable pointer for calling dispatching because forget() will
nuke the pointer and we need to use evt afterwards.

MozReview-Commit-ID: Ce2K6j4pUhA

--HG--
extra : rebase_source : 2bacf1f856e0700f36b2fefe4d2424719cad77a7
2017-03-13 17:00:57 +08:00
Brad Werth 6f9f914085 Bug 1314045 Part 1: Return load table assertion to full force now that Servo stylesheet caching will keep load table consistent. r=heycam
MozReview-Commit-ID: 7IrwZ5oFc6e

--HG--
extra : rebase_source : 2ab5a6b96ee23be4a3c75edb32d23a9cc6f933aa
2017-03-10 16:57:36 -08:00
Wei-Cheng Pan 4110645152 Bug 1310127 - Part 13: Use MOZ_MUST_USE in netwerk/protocol/http r=heycam
MozReview-Commit-ID: 9qpbe86biXz

--HG--
extra : rebase_source : f76dde754eea0f253f7c2b16fdb1067623617291
2016-12-20 17:19:56 +08:00
Brad Werth bf7460653e Bug 1339627 Part 2: Change StyleSheet Loader to attempt to cache ServoStyleSheets. r=heycam
MozReview-Commit-ID: 55PJm0H9ltv

--HG--
extra : rebase_source : 68e1f76280e95fc685caabfdd1774e23c0f76563
2017-02-27 11:20:48 -08:00
Brad Werth 7125ec2d5c Bug 1339627 Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache. r=heycam
MozReview-Commit-ID: 98dUNnccdn1

--HG--
extra : rebase_source : 8ae3b8ac218524cc8d701b8d60522ded737071a5
2017-03-06 14:59:37 -08:00
Brad Werth 9905850b87 Bug 1290218 Part 9: Generalize stylesheet Loader to cache Servo sheets in the same way that it caches Gecko sheets. r=heycam
MozReview-Commit-ID: BUEvgos46By

--HG--
extra : rebase_source : 3f483586ccf44304282c95a0aed6dd824db967f6
2017-02-21 14:05:24 -08:00
Brad Werth 881f857bac Bug 1290218 Part 8: Implement ServoStyleSheet Clone. r=heycam
MozReview-Commit-ID: Y2KcoMjhbn

--HG--
extra : rebase_source : dc45ede181017fb372fdce23d7449c868a0cb8e6
2017-02-15 13:33:17 -08:00
Brad Werth 3c7df19de4 Bug 1290218 Part 7: Bypass XULPrototypeCache (which is a singleton) for non-Gecko Loaders. r=heycam
MozReview-Commit-ID: 852rcD2bdYL

--HG--
extra : rebase_source : c4d73d04af6728616356fd1fe4f56354754bca58
2017-02-14 14:44:37 -08:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Daniel Holbert f8a884b751 Bug 1339546 part 2: Make layout/style/*.cpp include corresponding .h file as the first header. r=xidorn
MozReview-Commit-ID: 2rZ9z0BgRvN

--HG--
extra : rebase_source : d046a915283dd45ec8ff39f1b63da8ae59d3fac8
2017-02-14 11:23:11 -08:00
Tim Huang 756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Tom Tung e185f7bc4c Bug 1220936 - Flush console report to innerWindowID by using nsIDocument and nsILoadGroup. r=bkelly. 2017-02-06 09:19:34 +08:00
Cameron McCormack 41bbd156cf Bug 1314045 - stylo: Downgrade "Bad loading table" assertion since it occurs frequently. r=me
MozReview-Commit-ID: Hdt37MzhdsZ
2017-01-31 15:10:45 +08:00
Sebastian Hengst 2664cfc0a9 Backed out changeset 0d069e7395e9 (bug 1314045) for Windows build bustage: warning at Loader.cpp(1885). r=backout on a CLOSED TREE 2017-01-31 18:17:09 +01:00
Cameron McCormack 0ba5cf9cc4 Bug 1314045 - stylo: Downgrade "Bad loading table" assertion since it occurs frequently. r=me
MozReview-Commit-ID: Hdt37MzhdsZ
2017-01-31 17:38:16 +01:00
Sebastian Hengst 24430aff14 Backed out changeset 4787d54f7aa6 (bug 1314045) 2017-01-31 17:30:25 +01:00
Cameron McCormack e64744beef Bug 1314045 - stylo: Downgrade "Bad loading table" assertion since it occurs frequently. r=me
MozReview-Commit-ID: Hdt37MzhdsZ
2017-01-31 23:36:21 +08:00
Boris Zbarsky 89948607fd 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 076ab88629 Bug 1290209 - Part 9: Don't return early from Loader::PrepareSheet for a ServoStyleSheet. r=xidorn
MozReview-Commit-ID: 8NXajQ6pMqi
2017-01-06 15:05:24 +08:00
Cameron McCormack 13ce7a2e81 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 e1710ec7c9 Bug 1290209 - Part 7: Rename an argument. r=xidorn
MozReview-Commit-ID: DQ3gTkgnDR2
2017-01-06 15:05:24 +08:00
Cameron McCormack ff8152efd2 Bug 1290209 - Part 6: Move CSSStyleSheet::mMedia up to StyleSheet. r=bzbarsky
MozReview-Commit-ID: LZraHzme6vj
2017-01-06 15:05:24 +08:00
Cameron McCormack 63ff7b2ce7 Bug 1290209 - Part 1: Move CSSStyleSheet::SetTitle up to StyleSheet. r=xidorn
MozReview-Commit-ID: 2rzn5gba7gw
2017-01-06 15:05:24 +08:00
Emilio Cobos Álvarez f5651bd75d Bug 1304792: Use borrowed types for ServoImportRule. r=Manishearth r=heycam
MozReview-Commit-ID: HKjsOaE2qAp
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 16:30:42 +01:00
Emilio Cobos Álvarez a25a3083ce Bug 1304792: stylo: Implement @import. r=heycam
MozReview-Commit-ID: Hw1V66JxIBD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 16:30:41 +01:00
Emilio Cobos Álvarez 83aebb6253 Bug 1304792: Minimal Loader and CSSParser cleanup. r=heycam
MozReview-Commit-ID: DYOh8BtK7NT
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 16:30:41 +01:00
Xidorn Quan 0053eb4c08 Bug 1323919 - Rename nsIMediaList.h to nsMediaList.h. r=heycam
MozReview-Commit-ID: Ake5srkKJbf

--HG--
rename : layout/style/nsIMediaList.h => layout/style/nsMediaList.h
extra : rebase_source : 05de33770a7bf0b5d01672571bde00506853fcfe
2016-12-16 14:50:36 +11:00
Emilio Cobos Álvarez d791eef979 Bug 1029867: Remove useless nsCSSParser::mHTMLMediaMode. r=heycam
MozReview-Commit-ID: AFtd0G4oP3R
2016-12-13 11:39:32 +01:00
Matt Brubeck 9c2c0561df Bug 1292275 - Stylo: Fix crash after failed stylesheet load. r=heycam
Fixes a crash ServoStyleSet::AddDocStyleSheet caused by
ServoStyleSheet::RawSheet returning null.

MozReview-Commit-ID: BdDosompqTv

--HG--
extra : rebase_source : 0b46c9f9327eec0bac3bb2ca697198887948e2e6
2016-10-25 10:15:38 -07:00
Paul Bignier ca84cca424 Bug 1282408 - Add ignore-initialization-check annotation to mStatus from SheetLoadData. r=dbaron 2016-09-26 16:55:53 +02:00
Xidorn Quan 2f49a48a09 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

--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Xidorn Quan 1dc2955ab8 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso

--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
2016-09-26 22:03:25 +10:00
Xidorn Quan e981c7e9be Bug 1304302 part 2 - Some small fixes. r=heycam
MozReview-Commit-ID: 7rnl4wkMorC

--HG--
extra : source : d3319119916b7ca8e36627cc086150f799481d97
2016-09-26 22:03:25 +10:00
Nicholas Nethercote f4ec41d9b5 Bug 1297300 - Add missing checks to GetSpec() calls in layout/. r=dholbert,heycam.
--HG--
extra : rebase_source : b3a26866746cde4337f5ffeff94f370b2eb7da3e
2016-08-31 20:10:10 +10:00
Tom Tung db38e2111a Bug 1187335 - P6 - Support script/css to set integrity metadata to serviceWorker. r=bkelly. r=francois. 2016-09-07 10:30:21 +08:00
Tom Tung 78670a91d5 Bug 1187335 - P2 - Modify the way to report to console for worker and use LoadTainting to decide CORS or not. r=bkelly. r=francois. 2016-09-08 09:59:40 +08:00
Nicholas Nethercote 742fc7eb48 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.

--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
2016-08-26 16:02:31 +10:00
Nicholas Nethercote ca40b738e4 Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.

--HG--
extra : rebase_source : f82426e7584d0d5cddf7c2524356f0f318fbea7d
2016-08-12 15:19:29 +10:00
Bobby Holley 19f8c5faa5 Bug 1291390 - Make parsing mode an immutable property of the StyleSheet. r=heycam 2016-08-03 10:26:14 -07:00
Bobby Holley d5aeede891 Bug 1290214 - Remove NS_ERRORs in css::Loader. r=emilio 2016-07-28 17:25:43 -07:00