Commit Graph

133 Commits

Author SHA1 Message Date
Thomas Nguyen
02f4dbbbf9 Bug 1330487 - Part 3: Propagate referrer policy from doc/sheet to URLExtraData r=heycam
Referrer policy argurment is passed from sheet/doc to URLExtraData, default
value is RP_Unset. We use default value in some cases, particularly when there's
no certain spec talks about that (svg for example)

MozReview-Commit-ID: 5VAX1ZUXD3i

Differential Revision: https://phabricator.services.mozilla.com/D1922

--HG--
extra : moz-landing-system : lando
2018-09-17 05:36:45 +00:00
Thomas Nguyen
12582ae1aa Bug 1330487 - Part 1: Parse referrer policy from header and propagate to stylesheet r=heycam
This also fixes loading child stylesheet case, using correct referrer policy stored
in parent sheet.

MozReview-Commit-ID: ARXQyleD9Wq

Differential Revision: https://phabricator.services.mozilla.com/D1921

--HG--
extra : moz-landing-system : lando
2018-09-17 05:35:26 +00:00
Emilio Cobos Álvarez
ab460a4f52 Bug 1425700 - Make the counters non-atomic counters and merge afterwards. r=bholley
This was consistently faster in the benchmark (even when counters were disabled,
which was slightly suspicious, but...).

Anyway, it's not really much code, most of it is FFI copy-pasta.

Differential Revision: https://phabricator.services.mozilla.com/D3874
2018-08-28 15:58:24 +02:00
Emilio Cobos Álvarez
7f1f4ab7f0 Bug 1425700 - Hook the use counters into StyleSheet parsing. r=heycam
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-08-28 15:58:19 +02:00
Emilio Cobos Álvarez
bbda2f1225 Bug 1484690 - Move the enabled state to the sheet instead of sharing it. r=heycam
We share the inner object across sheets from the same URL, so what happens here
is that, once the sheet parses and loads, we call SetEnabled() on the first
sheet, which sets the inner bit, then calls ApplicableStateChanged.

That set actually turned the second sheet complete, so when inserting the sheet,
we think that the second sheet is already enabled, and thus in the author data,
and try to insert before it. Of course there's nothing there, so we panic.

We rely on calling SetEnabled() on all the sheets already to insert them in the
styleset / author data, so this makes it clearer and fixes the bug by moving the
state to each individual sheet.

Differential Revision: https://phabricator.services.mozilla.com/D3798

--HG--
extra : moz-landing-system : lando
2018-08-21 08:55:10 +00:00
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
Cameron McCormack
48fe6dbe69 Bug 1472065 - Initialize mSheet and mParentRule in css::Rule's constructor. r=xidorn
MozReview-Commit-ID: JI3cMiJaH3x

--HG--
extra : rebase_source : 3f45a63c8817df9550c5c638ad5b978421fa051c
2018-06-29 12:56:09 +10: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
Nazım Can Altınova
772ef770c8 Bug 1451289 - Part 3: Merge ServoMediaRule and CSSMediaRule r=emilio
MozReview-Commit-ID: I7vpKO4LFt4

--HG--
extra : rebase_source : fc3ff2abee2cdc5006da741e717a618b2d3a94ef
2018-06-04 14:14:47 +02:00
Nazım Can Altınova
92aa0e63d1 Bug 1451289 - Part 2: Merge ServoKeyframesRule and CSSKeyframesRule r=emilio
MozReview-Commit-ID: FVwVgQZ0B6Q

--HG--
extra : rebase_source : b10e638097a27e581f9c8b95ae8e21ec7b7ac175
2018-06-04 12:09:11 +02:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Emilio Cobos Álvarez
cb56e2c9f3 Bug 1459529: Remove UPDATE_STYLE. r=heycam
Now that BeginUpdate is useless for the UPDATE_STYLE case, we don't need the
update mechanism at all. Just ensure that ApplicableStylesChanged is called on
the pres shell via the relevant RuleChanged, etc. notifications.

There's a big hidden gotcha here. nsIDocument::BeginUpdate does put a script
blocker on the stack for these updates. However it's not needed, since no script
can run during these notifications (only the stylesheet events we post for
devtools, but those use AsyncEventDispatcher and PostDOMEvents, so they don't
try to run immediately).

nsIDocument::BeginUpdate also does XBL binding attached queue stuff, but we
can't change bindings during these notifications anyway, so it also doesn't
matter.

MozReview-Commit-ID: HJvK6zQfloh
2018-05-15 18:44:29 +02:00
Emilio Cobos Álvarez
2054320f28 Bug 1459529: Make sheets be associated to a shadow root too potentially. r=bz
MozReview-Commit-ID: Cd8xJuLRY5w
2018-05-15 18:44:25 +02:00
Emilio Cobos Álvarez
a104536e36 Bug 1447009: Fix StyleSheet title getter to comply with the spec. r=heycam
Also to match Blink.

MozReview-Commit-ID: Lh4iLhVEUKI
2018-05-10 00:37:27 +02:00
Emilio Cobos Álvarez
9b0a6feb0a Bug 1457920: Trivially inline a bunch of methods that had no reason for not being inlined. r=xidorn
MozReview-Commit-ID: EgcfUwwpZrB
2018-05-02 04:13:30 +02:00
Emilio Cobos Álvarez
30faf7ea5d Bug 1457920: Remove ServoStyleSheet.{h,cpp}. r=xidorn
MozReview-Commit-ID: 1T39DoLUBZk
2018-05-02 04:13:28 +02:00
Emilio Cobos Álvarez
b82b71f57d Bug 1457920: Move stuff from ServoStyleSheet.cpp to StyleSheet.cpp. r=xidorn
MozReview-Commit-ID: 3Tu27mWxWGB
2018-05-02 04:13:24 +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
5cb9f4328b Bug 1457920: Remove DidDirty. r=xidorn
MozReview-Commit-ID: 54sVDiRkLze
2018-05-02 04:13:16 +02:00
Emilio Cobos Álvarez
12807e8c1f Bug 1457920: Remove EnabledStateChanged. r=xidorn
MozReview-Commit-ID: DXSw93Q2vvK
2018-05-02 04:13:13 +02:00
Emilio Cobos Álvarez
aa78dd2679 Bug 1457920: Remove FORWARD_INTERNAL. r=xidorn
MozReview-Commit-ID: EzWWdstzeev
2018-05-02 04:13:11 +02:00
Emilio Cobos Álvarez
2a42c4ed18 Bug 1457920: Merge ServoStyleSheet and StyleSheet. r=xidorn
These are the most minimal changes I could make. More cleanups incoming.

MozReview-Commit-ID: AdMOA1acQIH
2018-05-02 04:13:10 +02:00
Xidorn Quan
4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +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
Cosmin Sabou
619e0c5b90 Backed out 3 changesets (bug 1449321, bug 1449566, bug 1449565) as per developer request.
Backed out changeset c31de7e26809 (bug 1449565)
Backed out changeset 72f9188800af (bug 1449566)
Backed out changeset 763277b299e4 (bug 1449321)

--HG--
extra : rebase_source : 212b357a3079dff30845a5f82e47b94e2d7f93cd
2018-03-28 18:10:11 +03:00
Jonathan Watt
41622cb3a7 Bug 1449321 - Remove the IsServo and IsGecko methods from the style system code. r=emilio 2018-03-23 16:01:34 +00:00
Xidorn Quan
efc0cdde02 Bug 1447828 part 8 - Remove remaining uses of StyleBackendType as well as the type itself. r=emilio
MozReview-Commit-ID: 6sh4eKvDpRF

--HG--
extra : rebase_source : 7d83f2b2d4e2739333016ed82754bf3a4a700de4
extra : source : 147ca562a24652c3f30add793213db70aff65e9e
2018-03-29 02:34:34 +11:00
Xidorn Quan
1cf8082e67 Bug 1447828 part 3 - Remove StyleBackendType uses from MediaList. r=emilio
MozReview-Commit-ID: 9sG73iLeBw4

--HG--
extra : rebase_source : a2626f6d1f8af02caeb7f3d37b7d258b4544b62d
extra : source : 2f443463446897080b85ac0da5b7a9ea6ccc9de2
2018-03-29 02:31:46 +11:00
Jonathan Watt
68e78b291f Bug 1449321 - Remove the IsServo and IsGecko methods from the style system code. r=emilio
--HG--
extra : source : 763277b299e42d8ee7eafede027ee690b66a7a2a
2018-03-23 16:01:34 +00: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
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
arthur.iakab
abcb47d8cc Merge inbound to mozilla-central. a=merge 2018-03-21 21:13:11 +02:00
Xidorn Quan
ac2c3f0083 Bug 1445682 followup - Properly undefine the macro. r=emilio
--HG--
extra : rebase_source : 3605b9ee175d9776668da5d3489ac379e91b3b9a
extra : amend_source : 44b9e9ca5281e66f275fff48ba8e274ac7f143ba
2018-03-21 16:31:23 +11: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
Emilio Cobos Álvarez
5caaf1c9f3 Bug 1445682: Make Shadow DOM account for stylesheet applicableness correctly. r=xidorn
Summary:
Also, make stuff sound in presence of CSSOM and what not.

The dirty: false thing is reverting an accidental change that landed in the
de-XBL stuff, which was harmless, but now wouldn't let me assert stuff properly.

Reviewers: xidorn

Bug #: 1445682

Differential Revision: https://phabricator.services.mozilla.com/D748

MozReview-Commit-ID: K0W2Rv0qK8X
2018-03-19 15:50:31 +01:00
Xidorn Quan
c70b3f5dad Bug 1440141 part 2 - Move some headers around. r=dholbert
MozReview-Commit-ID: LvzU9ara8KV

--HG--
extra : rebase_source : 7731c649141dad3c257f5a154235682d07a65df4
2018-02-22 11:52:31 +11:00
Emilio Cobos Álvarez
37e9a4f2a2 Bug 1436059: Fix inspector. r=xidorn
This removes a hack, but adds slightly more complex code in inspector-only code.

I'm not excited about this code, but this fixes ServoStyleRuleMap for XBL.

MozReview-Commit-ID: 6h0dCsiIWKU
2018-02-16 16:54:55 +01:00
Daniel Holbert
7f66b8109f Bug 1438020: Add some includes for "Inlines" headers to address clang build warnings in non-unified build. r=mats
MozReview-Commit-ID: HRHnjznPjx1

--HG--
extra : rebase_source : f0500a1c68a823a4583093a25f1a9fcf97aa1515
2018-02-13 14:38:20 -08:00
Daniel Holbert
10b8b4cdb3 Bug 1437723: Preemptively fix unified bustage in layout/style by adding missing includes/namespaces/forward-decls. r=emilio
MozReview-Commit-ID: 8ljZkAqgT4N

--HG--
extra : rebase_source : bea400511aa6c6c10e76c8418d6dfc8df2b31d17
2018-02-12 16:53:44 -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
3904b95eed Bug 1415940 Part 2: Give StyleSheet a dirty flag of MODIFIED_RULES, and a method to test it. r=bz
MozReview-Commit-ID: D52NghCopH2

--HG--
extra : rebase_source : 58d8a9aea0a2b5bfd655bd122a5a77016c31cdf6
2018-01-03 15:02:43 -08: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
e3549b2d1c Bug 1427512 - Part 22: Remove nsIDOMStyleSheet. r=xidorn,bz
MozReview-Commit-ID: KO2mWX4P8lI
2018-01-11 16:17:57 +08:00