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

83 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Xidorn Quan 5915d041b6 Bug 1470229 part 2 - Allow aria attributes. r=hsivonen
MozReview-Commit-ID: 6tDCQLHYsH7

--HG--
extra : rebase_source : 763191826555a9cb61a4e27e271b574832df997f
2018-06-22 15:29:43 +10:00
Xidorn Quan 17affe0a42 Bug 1470229 part 1 - Make the starting-with check in nsTreeSanitizer::SanitizeAttributes nicer. r=hsivonen
MozReview-Commit-ID: 87mxrKKUfJD

--HG--
extra : rebase_source : b9c136f9708470a084d0d71e033033d79072eefb
2018-06-22 15:23:28 +10:00
Xidorn Quan 3bf49f0a25 Bug 1470367 - Refactor nsTreeSanitizer::SanitizeAttributes to accept a struct. r=hsivonen
MozReview-Commit-ID: FvWpzeSo38d

--HG--
extra : rebase_source : 522f090f39b58826845c4e912483acac427cdae4
2018-06-22 14:58:40 +10:00
Nazım Can Altınova 361380987c Bug 1464496 - Part 1: Merge ServoDeclarationBlock and DeclarationBlock r=emilio
MozReview-Commit-ID: By9fV70Oq0K

--HG--
extra : rebase_source : 837afe9c33b21d7db41ff19d3aaf6cf3e9eedbdf
2018-05-30 18:15:25 +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
Emilio Cobos Álvarez c556ec7ad0 Bug 1457920: Remove ServoStyleSheet usage. r=xidorn
MozReview-Commit-ID: LIBkovuQ6MB
2018-05-02 04:13:26 +02:00
Emilio Cobos Álvarez bf64474d79 Bug 1457920: Remove StyleSheet::AsServo. r=xidorn
MozReview-Commit-ID: IkkJvUFHykk
2018-05-02 04:13:21 +02:00
Emilio Cobos Álvarez f8233b4454 Bug 1456471: Remove nsCSSParser.h. r=xidorn
MozReview-Commit-ID: 4qa7llzCXeR
2018-04-25 10:38:37 +02:00
Emilio Cobos Álvarez 1c74b688f7 Bug 1455492: Remove redundant ParseSheet arguments. r=bholley
For the async caller, pretty much everything can be extracted out of the loader
/ loadData.

For the sync callers, we need to be a bit more careful because ReparseSheet
tries to get its line number on its own.

I changed the compat mode passed to the reparse stuff to be the document's one
in this case, but that seems a bug fix.

MozReview-Commit-ID: 2wi5HPRAlPi
2018-04-21 12:08:44 +02:00
Emilio Cobos Álvarez 6766804ba7 Bug 1454251: Remove nsINode::eCOMMENT. r=bz
MozReview-Commit-ID: AbSPU25fFbM
2018-04-20 09:51:57 +02:00
Emilio Cobos Álvarez d8e55e4596 Bug 1454236: Remove nsINode::eDOCUMENT_FRAGMENT. r=bz
MozReview-Commit-ID: D2F3LbQ1pvw
2018-04-20 01:30:12 +02:00
Nicholas Nethercote 1f8589ab7c Bug 1449827 - Optimize static atom use in nsTreeSanitizer. r=hsivonen
The various AtomsTables in nsTreeSanitizer only contain static atoms. Knowing
this, we can optimize things:

- They can contain raw nsStaticAtom pointers instead of refcounted nsAtom
  pointers.

- When looking up, we can/must first check if the atom we are looking for is
  static. If not, we know it can't be in the table. This is done by the new
  Contains() method.

This change also lets us add more `const` to various places that interact with
the tables.

MozReview-Commit-ID: EFxWN2GU78L

--HG--
extra : rebase_source : f2a0bdbb4c5179dd396476263e6a6b57adb13360
2018-03-29 15:51:39 +11:00
Nicholas Nethercote 6d1da3fee2 Bug 1449827 - Introduce a typedef `AtomsTable` within nsTreeSanitizer. r=hsivonen
This is much shorter than nsTHashtable<nsRefPtrHashKey<nsAtom>>, which is
repeated often.

MozReview-Commit-ID: 85MR0PQ6klI

--HG--
extra : rebase_source : b9d157b2deb68f4d9aee94bdcff6737caf4336ba
2018-03-29 15:51:39 +11:00
Nicholas Nethercote 1b4b4f5a56 Bug 1449827 - Use `nsStaticAtom* const` instead of `nsStaticAtom** const` in nsTreeSanitizer. r=hsivonen
MozReview-Commit-ID: 4tk4BHbEpdt

--HG--
extra : rebase_source : fa8a152364fb343880f912afed2fa34aaa27aa89
2018-03-29 15:51:39 +11:00
Gurzau Raul 8d268c6ce7 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : toolkit/components/extensions/ext-permissions.js => toolkit/components/extensions/parent/ext-permissions.js
2018-03-29 01:00:42 +03:00
Tom Ritter 449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Xidorn Quan e1ecaae43e Bug 1449390 - Remove Rule::GetType() and its corresponding constants. r=emilio
MozReview-Commit-ID: 5r64ATHUAux

--HG--
extra : rebase_source : 9a593b6ed1a1006bfac031c3b47b06a7e28605b4
2018-03-28 14:22:01 +11:00
Emilio Cobos Álvarez 8fcda0e92d Bug 1448690: Remove IsStyledByServo. r=xidorn
MozReview-Commit-ID: I3MDbo2Yu7d
2018-03-26 09:39:26 +02: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
Nicholas Nethercote b719af74df Bug 1446865 - Move nsAtomListUtils. r=froydnj
It seems silly to have a tiny utils class with a single function in its own
module. This patch moves it into nsStaticAtom.h/nsAtomTable.cpp. It also
renames nsAtomListUtils as nsStaticAtomUtils. Finally, it uses templates to
remove the need for the `aCount` parameter at callsites.

MozReview-Commit-ID: DvJVoZFv89c

--HG--
extra : rebase_source : 1f1dd27d56e46c71c30c10102ac6132a721e23d1
2018-03-20 11:44:28 +11:00
Boris Zbarsky 46fc331568 Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn
Most of the noise is from the fact that clang-format on parser/html/*.{h,cpp}
reformatted all sorts of stuff.  Not running it caused lots of format changes
from the generator... I guess we changed the format rules since the last time
this got run?

MozReview-Commit-ID: IA2G87zUIKN
2018-03-16 11:26:06 -04:00
Nicholas Nethercote d41188c796 Bug 1445117 - Remove duplicates from nsGkAtoms. r=froydnj
In each case, the atom had an obvious name and a weird name. Where possible, I
kept the obvious name and commented out the weird name, viz:

- `mixed` over `_mixed` for "mixed"
- `el` over `el_` for "el"
- `other` over `other_` for "other"
- `remote` over `Remote` for "remote"

But for several of them I didn't do that, because the weird name is used
within the HTML5 parser -- which is a huge pain to modify because it involves
code generated by code from another repo -- so I kept the weird name and
commented out the obvious name, viz:

- `list_` over `list` for "list"
- `svgSwitch` over `_switch` for "switch"
- `set_` over `set` for "set"

MozReview-Commit-ID: Jp3CpdWXNDm

--HG--
extra : rebase_source : 421ce5316772f1951488307e81f2ceee696d363d
2018-03-14 10:27:25 +11:00
Bobby Holley a584615963 Bug 1438974 - Separate synchronous stylesheet parsing into a separate path. r=bz
This will allow us to make the regular path fully asynchronous.

MozReview-Commit-ID: 6ZurtiNQPZK
2018-02-28 10:43:12 -08:00
Bobby Holley 2ba333893c Bug 1441896 - Pass an explicit parent SheetLoadData for child stylesheet loads. r=bz CLOSED TREE
MozReview-Commit-ID: 7XNu42NtITm
2018-02-28 10:09:00 +02:00
Gijs Kruitbosch bfee896494 Bug 1437147 - report warnings when the sanitizer removes stuff for chrome documents, r=bz
MozReview-Commit-ID: Lx1JjpYrLpD

--HG--
extra : rebase_source : fcd98b67a194a59e2d4e6d44a5442e359ce22255
2018-02-15 16:03:19 +00: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 7e7864add9 Bug 1415940 Part 1: Expand StyleSheet dirty flag into a bitfield, to allow more types of dirtiness. r=bz
MozReview-Commit-ID: 7IasNqj85il

--HG--
extra : rebase_source : 414548a7a0d413917bd72ee3fc384cf2280c334b
2018-01-03 14:25:56 -08:00
Cameron McCormack 55dcbea002 Bug 1427512 - Part 16: Remove nsIDOMCSSRule. r=xidorn,jryans,bz
MozReview-Commit-ID: GvVdW9w5Cc4
2018-01-11 16:17:56 +08:00
Emilio Cobos Álvarez 74b31155f7 Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD
2017-12-06 16:05:59 +01:00
Gijs Kruitbosch 7b8023dcab Bug 1420507, r=freddyb,francois
--HG--
extra : rebase_source : f7984ad91b4f8260538fa3cb2cf3e560dfbc2dcc
2017-11-29 17:03:54 +00:00
Kris Maglione 96722433e6 Bug 1415352: Part 1d - Use correct subject principal in CSS environment when modifying attr declarations. r=bz
MozReview-Commit-ID: AnurVwl65fX

--HG--
extra : rebase_source : 05d3820aab2c86b010728b5d2882a7a2e75e0617
2017-11-05 13:23:49 -08:00
Jonathan Watt 62787012f8 Bug 1417365 - Unified build issues in dom/base. r=baku 2017-10-26 10:40:12 +01:00
Nicholas Nethercote 8ad99dd7fa Bug 1411893 - Introduce nsStaticAtom. r=emilio,froydnj.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

MozReview-Commit-ID: 4Q6QHX5h44V

--HG--
extra : rebase_source : e4237f85b4821b684db0ef84d1f9c5e17cdee428
2017-10-27 10:31:13 +11:00
Nicholas Nethercote 2c0771b514 Bug 1411893 - Remove some unnecessary (nsAtom***) casts. r=froydnj.
MozReview-Commit-ID: 688BShjWAhe

--HG--
extra : rebase_source : ac1be2cb55e331a750ab061e612b2c53e2d536fb
2017-10-27 08:39:55 +11:00
Cameron McCormack c57d1b16bf Bug 1408311 - Part 4: Fix bug when serializing sanitized style rules. r=xidorn
MozReview-Commit-ID: LBfmRsYSJND

--HG--
extra : rebase_source : 07dbbf8254c7b7217f7dd794d64168f7ecaae57a
2017-10-19 16:30:35 +08:00
Cameron McCormack 17e6b3c172 Bug 1408311 - Part 3: Make nsTreeSanitizer Parse style attributes and style sheets with Servo. r=bz,xidorn
MozReview-Commit-ID: 6Frg5FZ7CyH

--HG--
extra : rebase_source : e28ffcff4732e8de43cb32fb612e28500ede2af4
2017-10-19 15:56:17 +08:00
Cameron McCormack 69e0d28ede Bug 1410281 - Use GetBaseURIForStyleAttr for style attribute base URI in nsTreeSanitizer. r=xidorn
MozReview-Commit-ID: IBc7zEHTDAQ

--HG--
extra : rebase_source : da7c116d3443d41e58eb90acdce0560a41a38f9c
2017-10-20 09:58:57 +08:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Dragana Damjanovic dd.mozilla@gmail.com 0bd7a2c931 Bug 1222633 - Add rel=preload - dom part. r=smaug 2017-07-10 15:05:56 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Andrea Marchesini 1fd1bc3935 Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot
--HG--
rename : caps/nsNullPrincipal.cpp => caps/NullPrincipal.cpp
rename : caps/nsNullPrincipal.h => caps/NullPrincipal.h
rename : caps/nsNullPrincipalURI.cpp => caps/NullPrincipalURI.cpp
rename : caps/nsNullPrincipalURI.h => caps/NullPrincipalURI.h
2017-03-22 11:38:40 +01:00
Xidorn Quan 4f69533cec Bug 1342348 part 1 - Don't check fragment url in tree sanitizer. r=hsivonen
MozReview-Commit-ID: 8tIiMtexHxd

--HG--
extra : rebase_source : f7b4277b4c0878444cc2bb3a555ef7bdffc9e189
2017-02-28 10:21:33 +11:00
Wes Kocher 1e793592af Backed out 2 changesets (bug 1342348) for xpcshell bustage a=backout
Backed out changeset 6e181ffefa61 (bug 1342348)
Backed out changeset 4f0fce98dd3a (bug 1342348)

MozReview-Commit-ID: F7bUbScVyfN
2017-02-27 16:56:04 -08:00
Xidorn Quan 42b953a7d9 Bug 1342348 part 1 - Don't check fragment url in tree sanitizer. r=hsivonen
MozReview-Commit-ID: 8tIiMtexHxd

--HG--
extra : rebase_source : e7dd8262c1d7c69209ce57323dc4c24a19774ec7
2017-02-28 10:21:33 +11:00
Sebastian Hengst feb6742b13 Backed out changeset ce9d71b0a088 (bug 1342348) for crashing in xpcshell test parser/xml/test/unit/test_sanitizer.js. r=backout 2017-02-27 15:26:04 +01:00
Xidorn Quan 5744e98bb7 Bug 1342348 part 1 - Don't check fragment url in tree sanitizer. r=hsivonen
MozReview-Commit-ID: 8tIiMtexHxd

--HG--
extra : rebase_source : e23191b1396a4eb73510456de97197a34d20f723
2017-02-27 12:06:05 +11:00