Commit Graph

117 Commits

Author SHA1 Message Date
Cameron McCormack
3357fd0d3a Bug 1474793 - Part 13: Build and use shared memory user agent style sheets in parent and content processes. r=emilio,kmag
MozReview-Commit-ID: JasksR7F22Z

Depends on D17199

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:23:49 +00:00
Cameron McCormack
7649df02be Bug 1474793 - Part 2: Allow references to static C++ URLExtraData objects from Rust UrlExtraData. r=emilio
Each user agent style sheet has a unique URLExtraData object containing
its URL, but since they are refcounted objects, we can't share them
easily across processes.  Rather than adding support for copying them
into a shared memory buffer like we will do with the Rust objects, here
we just set up a static array of URLExtraData objects per UA style
sheet.  The array will be filled in in a later patch.

Rust UrlExtraData objects, once they are transformed into their
sharable form and copied into the shared memory buffer, will reference
them by an index.

Depends on D17181

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:43 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Cameron McCormack
a9c935c355 Bug 1511854 - Part 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13686

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:03 +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
Cameron McCormack
bfe5c432f4 Bug 1498755 - Part 7: Tweak a few things in ServoBindingTypes.h r=emilio
Depends on D8648

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:05:59 +00:00
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
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
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
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
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
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
Kerem Kat
97ece751a4 Bug 37468 - Implement ServoStyleRule::SetSelectorText method for setting CSS rule selectorText from JS. r=xidorn
--HG--
extra : source : bd0a3fdb037c308ae7eab0be3c68d00fcb9b6056
2018-04-14 19:05:44 +03:00
Coroiu Cristina
4b2644bf85 Backed out 2 changesets (bug 37468) for linting failure at builds/worker/checkouts/gecko/tools/lint/wpt.yml
Backed out changeset 5e7a1db60298 (bug 37468)
Backed out changeset bd0a3fdb037c (bug 37468)
2018-04-15 03:23:36 +03:00
Kerem Kat
f2a32c122a Bug 37468 - Implement ServoStyleRule::SetSelectorText method for setting CSS rule selectorText from JS. r=xidorn
--HG--
extra : amend_source : 2572c4d3ae52d0d4f11344b2611ddf847040da02
2018-04-14 19:05:44 +03: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
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
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
Chris Peterson
d09123f248 Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08: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
Brad Werth
2d605f9ac5 Bug 1415940 Part 3: Make StyleSheets clear their MODIFIED_RULES flag when the sheet is reparsed. r=bz
MozReview-Commit-ID: F7g2CstgjT8

--HG--
extra : rebase_source : 6bd59483739a24edebc00ce62eaef554c63d4842
2018-01-11 16:43:58 -08: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
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -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
Cameron McCormack
09a1815a08 Bug 1427512 - Part 20: Remove nsIDOMMediaList. r=xidorn,jryans,bz
MozReview-Commit-ID: KKnTf7aFfjA
2018-01-11 16:17:56 +08:00
Cameron McCormack
a4541d9b18 Bug 1427512 - Part 18: Remove nsIDOMCSSStyleSheet. r=xidorn,jryans,bz
MozReview-Commit-ID: CN3VZvQceZB
2018-01-11 16:17: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
5604b99826 Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-12-01 08:46:39 +01:00
Brindusan Cristian
6f5b49da3e Backed out 2 changesets (bug 1420762) for merge conflicts r=merge a=merge
Backed out changeset ba350c82d823 (bug 1420762)
Backed out changeset 00287b88254b (bug 1420762)
2017-12-01 00:20:10 +02:00
Emilio Cobos Álvarez
f28656c543 Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-11-30 15:42:45 +01:00
Emilio Cobos Álvarez
429de3c639 Bug 1420713: Ensure ReparseStyleSheet refreshes the stylist even when there's no document. r=heycam
MozReview-Commit-ID: 1acIXdXOgO
2017-11-27 11:35:15 +01:00
Xidorn Quan
c2366649a6 Bug 1407888 part 2 - Make ServoStyleRuleMap::FillTableFromStyleSheet not make unique inner. r=heycam
MozReview-Commit-ID: 1I7sawfjcnl

--HG--
extra : rebase_source : 41667c3ff9ef52509b21cdff6495dbe9b85ab1af
2017-10-12 18:56:02 +11:00
Phil Ringnalda
e83e2ad1b0 Backed out 2 changesets (bug 1407888) for aSheet->HasUniqueInner() assertion failures
CLOSED TREE

Backed out changeset 50e535750cc9 (bug 1407888)
Backed out changeset e1287860a439 (bug 1407888)

MozReview-Commit-ID: 8UHuO8Fz0pL
2017-10-12 19:59:50 -07:00
Xidorn Quan
75fcad8ea7 Bug 1407888 part 2 - Make ServoStyleRuleMap::FillTableFromStyleSheet not make unique inner. r=heycam
MozReview-Commit-ID: 1I7sawfjcnl

--HG--
extra : rebase_source : 620cc19b3826d557e5a255b1bee2417b073da799
2017-10-12 18:56:02 +11:00
Tom Tromey
916228aee7 Bug 1399911 - preserve sourceURL comment directive on style sheets; r=bz,heycam
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools.  This name is also used as the base
URL for the source-map URL resolution algorithm.  sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/

This patch changes Firefox to record this URL, if specified, and to
expose it (chrome-only) vai StyleSheet.webidl.

MozReview-Commit-ID: 7NwXsOf7nbY

--HG--
extra : rebase_source : bd5d25b4d44f5f220a4624db346edbc4236c9886
2017-09-14 14:59:32 -06:00
Tom Tromey
c355a3b8b9 Bug 1388855 - Extract source map URL when parsing CSS, r=bz,heycam
This changes the CSS lexer to extract sourceMappingURL directives from
comments and preserve them; then changes the parser to expose this value
as the style sheet's sourceMapURL.

MozReview-Commit-ID: LfMamJ1PsU0

--HG--
extra : rebase_source : 258827720282d415f97f1d49d870b7c2448d39f4
2017-08-09 13:33:24 -06:00
Josh Matthews
e0c37f0ed3 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00
Tom Tromey
28e8f458a9 Bug 1306887 - keep SourceMap response header on CSS style sheets; r=bz,heycam
When loading a style sheet, if the SourceMap (or legacy X-SourceMap)
response header was seen, record it and make it available to chrome
scripts.

MozReview-Commit-ID: 3wtUADzgrI3

--HG--
extra : rebase_source : 25ed09e264d4b3a679ae970c709dedd4d50e2324
2017-06-28 16:51:46 -07:00
Wes Kocher
a9eb08898f Backed out changeset f220d8060c14 (bug 1352669) for build bustage CLOSED TREE a=bustage
MozReview-Commit-ID: INYGT4WT1pO
2017-07-06 14:56:06 -07:00
Josh Matthews
723b20d420 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter.
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-06 13:15:08 -07:00
Xidorn Quan
d5f6047810 Bug 1372790 - Change uint8_t to back some enum and reorder some fields in StyleSheet to make it more compact. r=heycam
MozReview-Commit-ID: DddIzhJqmcZ

--HG--
extra : rebase_source : da357c220cea45fcc5af3b8a7421a0b699a01026
2017-06-14 14:26:48 +10:00
Emilio Cobos Álvarez
aa8fc8476c Bug 1372041: Refactor @import so it also respects the stylesheet's media properly. r=heycam
MozReview-Commit-ID: EBmd8nG877t
2017-07-02 17:19:08 +02:00
Xidorn Quan
27b5e819e7 Bug 1373484 - Drop all reference to StyleSheet when last strong reference is dropped. r=bz
MozReview-Commit-ID: 2RrNZDIjx3s

--HG--
extra : rebase_source : b9b89aba8d1aa31e91d1cc90e63a9b056dd34ea8
2017-06-19 10:15:49 +10:00
Phil Ringnalda
6f1f8bc3a5 Backed out changeset a5fe1b7f3dad (bug 1372790) for build bustage in nsCSSParser.cpp
CLOSED TREE

MozReview-Commit-ID: 3qoTERDArAo
2017-06-13 22:39:50 -07:00
Xidorn Quan
c1b7409fa4 Bug 1372790 - Change uint8_t to back some enum and reorder some fields in StyleSheet to make it more compact. r=heycam
MozReview-Commit-ID: DddIzhJqmcZ

--HG--
extra : rebase_source : b7c4db0ce0aac41605f93fd1c2f23578a1caadf7
2017-06-14 14:26:48 +10:00
Emilio Cobos Álvarez
e5264cf2b4 Bug 1368986: Cleanup stylesheet copy-constructor. r=heycam
MozReview-Commit-ID: I8vUuJfET24

--HG--
extra : rebase_source : 239a5659871edcdfd1b41f3a5388d68cd70fb2d7
2017-05-31 13:12:33 +02:00