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

90 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack f07ac4772d Bug 1519745 - Remove out of date comment in nsStyleSheetService::Init. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16427

--HG--
extra : moz-landing-system : lando
2019-01-21 09:43:41 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Jan de Mooij 4f7b2378dc Bug 1474273 - Add xpc::CurrentNativeGlobal and use it instead of NativeGlobal(JS::CurrentGlobalOrNull(cx)). r=bz 2018-07-11 14:07:02 +02:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Xidorn Quan d3b8ac27c8 Bug 1447828 part 5 - Remove StyleBackendType uses from nsStyleSheetService. r=emilio
MozReview-Commit-ID: 2yQqwVPnvdE

--HG--
extra : rebase_source : 90f58d5726cb85e9bbcf56bc2eaf29c85940ddbe
extra : source : 8ffba0152d4bd16f87d2ddefefacb7081a46443b
2018-03-29 02:34:34 +11:00
Xidorn Quan 3b8cc6c6ef Bug 1447828 part 4 - Remove StyleBackendType uses from Loader. r=emilio
MozReview-Commit-ID: 8DbjibZE3Dw

--HG--
extra : rebase_source : aa664ee40199b5358e304e076c8d6853e496d7a8
extra : source : 06be08613cf88b6963033929ff5ac0d82a6327b1
2018-03-29 02:33:01 +11:00
Emilio Cobos Álvarez a0d49d986b Bug 1447611: Cleanup prefs that do nothing now. r=jwatt
Still more followup cleanup to come.

MozReview-Commit-ID: 83j7DTVb0Ti
2018-03-21 19:13:56 +01:00
Csoregi Natalia d6c6d38406 Backed out 4 changesets (bug 1447611) for mass failures due to --enable-stylo removal. CLOSED TREE
Backed out changeset c6193142bbcf (bug 1447611)
Backed out changeset 01ada1c5a95f (bug 1447611)
Backed out changeset 86c9fed44da2 (bug 1447611)
Backed out changeset bb84ac6e1468 (bug 1447611)
2018-03-21 19:01:07 +02:00
Emilio Cobos Álvarez f8eadb8613 Bug 1447611: Cleanup prefs that do nothing now. r=jwatt
Still more followup cleanup to come.

MozReview-Commit-ID: 83j7DTVb0Ti
2018-03-21 17:25:00 +01:00
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Daniel Holbert 912ec5051e Bug 1437623 part 2: (layout/base) Add missing includes/namespaces to preemptively fix unified bustage. r=mats
MozReview-Commit-ID: G4ufWWf9qRC

--HG--
extra : rebase_source : d7b814a8b9f5d3a6371eef14280598943a259c99
2018-02-13 09:08:42 -08:00
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Brad Werth 92f2dc2e2e Bug 1403694 Part 1: Prevent nsStyleSheetService from storing null servo stylesheets. r=xidorn
MozReview-Commit-ID: 2PxurAtACtd

--HG--
extra : rebase_source : 0d9f573cf3bcbb617f18d9e73179b357e26f01da
2017-09-28 16:45:09 -07:00
Sebastian Hengst d45406134c Backed out changeset f713977f1629 (bug 1403694) for crashing in Android mochitests, e.g. layout/style/test/test_additional_sheets.html. r=backout 2017-09-29 17:41:12 +02:00
Brad Werth 17d09b7ae1 Bug 1403694: Fix a case where a NULL stylesheet would be added to the nsStyleSheetService if nsLayoutUtils::StyloSupportedInCurrentProcess() returns false. r=xidorn
MozReview-Commit-ID: COaDbr49B7B

--HG--
extra : rebase_source : c4cb37f2f57444af41eccfb93d0e73895e4ae7b8
2017-09-28 16:45:09 -07:00
Cameron McCormack d80f1e578d Bug 1398993 - Disable stylo in e10s parent process. r=xidorn
nsLayoutStatics::Initialize is sometimes too early to know whether a process
is an e10s parent process, or a non-e10s main process, because some prefs
get loaded later on.  So we unconditionally initialize some Servo data in
nsLayoutStatics::Initialize, but we still check later on whether we are
really a non-e10s main process or e10s content process when deciding whether
to preload Servo style sheets, choose our document backend type, etc.

MozReview-Commit-ID: 93tPCvuTdzl

--HG--
extra : rebase_source : 07092bab376310867fa1a87210ba6c3eddb9cc8e
2017-09-13 17:13:11 +08:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +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
Cameron McCormack 6a09f48246 Bug 1337258 - Support ServoStyleSheets in nsStyleSheetService. r=xidorn
MozReview-Commit-ID: 4vaHzDBZHFg

--HG--
extra : rebase_source : cb6e075e88c66a89bf6711db4ba913d62fd421ad
2017-02-21 10:42:27 +08:00
Cameron McCormack 414df18eb5 Bug 1340090 - Make nsStyleSheetService notify PresShells directly instead of using the observer service. r=bz
MozReview-Commit-ID: 4xz422B6GSv

--HG--
extra : rebase_source : 5b6c132c5dcace04a6d1c3a6ba05a4b207f6bbba
2017-02-17 15:56:28 +08:00
Cameron McCormack d7971f4aa5 Bug 1328546 - stylo: Support ServoStyleSheets in nsIStyleSheetService::PreloadSheet and nsIDOMWindowUtils::AddSheet. r=bholley
MozReview-Commit-ID: 2KOMrnCf1Ag
2017-01-05 15:32:22 +08:00
Jared Wein 5ad7b0c24d Bug 1312050 - Make loadAndRegisterSheet log a helpful error message if the URI contains a potentially-truncating unescaped #id. r=dholbert
MozReview-Commit-ID: 21WnD8nJRsp

--HG--
extra : rebase_source : 08c8d9a0f2cd769df859434d6bdbbf0f2fcda937
2016-10-24 10:59:09 -04: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
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Jinank Jain f2776091ea Bug 712936 - Convert users of PR_STATIC_ASSERT to C++11 static_assert(). r=Ms2ger
--HG--
extra : rebase_source : b3e4c3e7c81799f2b1f3ec62ba3ff3b5d3adba27
2016-08-23 11:24:54 -04:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Cameron McCormack 3633214b94 Bug 1250379 - Create css::Loaders for specific style backend types. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack 0ecd5593cc Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack fd2fba0c73 Bug 990250 - Fold nsIStyleSheet into CSSStyleSheet. r=dbaron 2015-11-17 17:04:09 +11:00
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Zack Weinberg 9b82cb1584 Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam
--HG--
extra : rebase_source : a8a5a27db01306d1de58974ebb4d06d29d4b72b0
2015-10-13 17:43:16 -04:00
Wes Kocher 53368e989a Backed out 2 changesets (bug 1035091)
a=backout

Backed out changeset 1fc07bdd9aa8 (bug 1035091)
Backed out changeset f6e98029d1cb (bug 1035091)

--HG--
rename : layout/style/test/chrome/test_moz_document_matching.html => layout/style/test/chrome/test_moz_document_rules.html
rename : layout/style/test/chrome/test_moz_document_nesting.html => layout/style/test/test_bug511909.html
rename : layout/style/test/chrome/test_moz_document_serialization.html => layout/style/test/test_rule_serialization.html
2015-09-03 11:41:39 -07:00
Zack Weinberg a48ac7cfae Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam
--HG--
extra : rebase_source : 2d860f8493e328dec364a00282fcf1257a1c4d23
2015-09-02 13:52:49 -04:00
Emanuel Hoogeveen 7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Tom Schuster 36fe8c8dc6 Bug 1024707 - Add API to register style sheets but without loading them. r=bz 2014-07-09 11:43:33 +02:00
Carsten "Tomcat" Book e31951a5dd Backed out changeset 6a56c14d382f (bug 1024707) for dt1 and xpshell test bustages on a CLOSED TREE 2014-07-09 13:19:33 +02:00
Tom Schuster ca7aaa4737 Bug 1024707 - Add API to register style sheets but without loading them. r=bz 2014-07-09 11:43:33 +02:00
Ms2ger bad4ca4d29 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Ms2ger 451c7edf83 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger 9fb7f507f0 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Nicholas Nethercote aaf6fb2124 Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg.
--HG--
extra : rebase_source : 5eb756b17a97e751deb0f47e909fdb35533cb23b
2014-05-20 23:06:54 -07:00