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

426 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Emilio Cobos Álvarez 841d3eea32 Bug 1559545 - Use servo for the representation of grid template areas. r=mats
Right now we do a lot of useless string copying. In order to avoid transcoding
to utf-16 during layout, make sure to use nsCString at a few related places.

I may revisit this since we're storing other line names as atoms in some places.
So it may be better to just use atoms everywhere.

But that'd be a different patch either way.

Depends on D35116

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

--HG--
extra : moz-landing-system : lando
2019-06-18 22:29:58 +00:00
Emilio Cobos Álvarez a384dedd93 Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

Differential Revision: https://phabricator.services.mozilla.com/D31742
2019-05-29 21:22:04 +02:00
Brindusan Cristian 40a5b04ab5 Backed out 3 changesets (bug 1552708, bug 1552878) for build bustages and compiler issues. CLOSED TREE
Backed out changeset 9d4f178bfcbd (bug 1552878)
Backed out changeset 80db9f845237 (bug 1552708)
Backed out changeset 1bdbfbb5b342 (bug 1552708)
2019-05-27 17:00:03 +03:00
Emilio Cobos Álvarez f2190857bb Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:45:12 +00:00
Emilio Cobos Álvarez f4c39907e0 Bug 1552628 - Remove some more dead nsCSSValue code. r=xidorn
Most of it is not used at this point, this leaves the parts that are used by
MathML, which are minimal.

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

--HG--
extra : moz-landing-system : lando
2019-05-19 00:47:18 +00:00
Ryan Hunt b936c00a65 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115

--HG--
extra : rebase_source : 4d65c07d8822f3a54ac881b5d0f55468ce884554
2019-02-25 16:09:24 -06: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
Daniel Holbert 7258ebe69e Bug 1514309 part 2: Remove C++ serialization code for CSS {align,justify}-{content,items,self} properties. r=emilio
(Also remove stale decl for DoGetOverflowY, which cleanup_computed_getters.py
found for me.)

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

--HG--
extra : moz-landing-system : lando
2018-12-14 21:27:18 +00:00
Daniel Holbert 38e7aed189 Bug 1514309 part 1: Include the 'unsafe' keyword in serializations of css-align properties. r=emilio
Previously we'd omit it since it was merely an explicit way of requesting the
default behavior.  But the spec has changed such that it's not necessarily
equivalent to the default anymore:
https://drafts.csswg.org/css-align/#overflow-values

(Technically the behaviors are probably still equivalent in our implementation,
pending bug 1451380, but we don't have to publicize that via our
serialization.)

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

--HG--
extra : moz-landing-system : lando
2018-12-14 21:24:17 +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 16007d2b66 Bug 1495984 - Make css::URLValue::IsLocalRef call into CssUrlData::is_fragment. r=emilio
This fixes the issue that we should no longer be looking for control characters.



MozReview-Commit-ID: 8k89Aheq3NY

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:45 +00:00
Cameron McCormack a7510da8d0 Bug 1499408 - Part 2: Have css::URLValue get URLExtraData from its CssUrlData. r=emilio
MozReview-Commit-ID: IqZGzkHlSZD

Depends on D8874

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:32 +00:00
Cameron McCormack b5d216cfa1 Bug 1499408 - Part 1: Make css::URLValue hold on to a CssUrlData, not just its serialization. r=emilio
MozReview-Commit-ID: EWcbnVtDJCS

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:36:49 +00:00
Emilio Cobos Álvarez e088200f02 Bug 1497981 - Simplify ImageLoader::LoadImage. r=heycam
Has a single caller, from which we pass the arguments. We can just avoid that.

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

--HG--
extra : moz-landing-system : lando
2018-10-15 12:24:58 +00:00
Emilio Cobos Álvarez 40b1e83d81 Bug 1498734 - Always compute angle values to degrees. r=xidorn
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:

> All <angle> units are compatible, and deg is their canonical unit.

And https://drafts.csswg.org/css-values/#compat, which says:

>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.

And also other implementations (Blink always serializes angles as degrees in
computed style for example).

Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.

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

--HG--
extra : moz-landing-system : lando
2018-10-13 00:41:03 +00:00
Emilio Cobos Álvarez 571fa7dcd9 Bug 1497986 - Some more nsCSSValue cleanup. r=mats
I had this around, I couldn't work on more stuff today, but I may as well land
this.

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

--HG--
extra : moz-landing-system : lando
2018-10-10 20:26:45 +00:00
Cameron McCormack 4c8408b3c2 Bug 1496308 - Require URLExtraData::mPrincipal to be non-null r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7682

--HG--
extra : moz-landing-system : lando
2018-10-10 03:10:07 +00:00
Cameron McCormack 4daef6b3e8 Bug 1496295 - Remove some more unused methods r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7678

--HG--
extra : moz-landing-system : lando
2018-10-04 07:51:17 +00:00
Cameron McCormack eeb8da104f Bug 1495994 - Part 4: Merge css::{URLValueData, ImageValue} into css::URLValue r=emilio
Depends on D7595

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

--HG--
extra : moz-landing-system : lando
2018-10-10 02:58:20 +00:00
Cameron McCormack 8e24dfb709 Bug 1495994 - Part 2: Remove some constructors/methods r=emilio
Depends on D7593

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

--HG--
extra : moz-landing-system : lando
2018-10-10 02:57:13 +00:00
Emilio Cobos Álvarez 8a3d09ee15 Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 19:07:44 +02:00
Emilio Cobos Álvarez 046243a12e Bug 1496486 - Remove GridTemplateAreas stuff from nsCSSValue. r=heycam
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D7754
2018-10-09 19:07:42 +02:00
Emilio Cobos Álvarez c6c06c7f48 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 19:07:41 +02:00
Emilio Cobos Álvarez d9ca8fb50b Bug 1496486 - Remove a bunch of unused nsCSSValue code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7752
2018-10-09 19:07:39 +02:00
Narcis Beleuzu e7a8994c37 Backed out 5 changesets (bug 1496486) for valgrind bustages. CLOSED TREE
Backed out changeset d2f1e35ee4b7 (bug 1496486)
Backed out changeset 7f843f4ee162 (bug 1496486)
Backed out changeset 2f629a60f12c (bug 1496486)
Backed out changeset 4dd15fa31474 (bug 1496486)
Backed out changeset e8d8e2f3f00b (bug 1496486)
2018-10-09 19:44:51 +03:00
Emilio Cobos Álvarez bce0418466 Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 17:33:27 +02:00
Emilio Cobos Álvarez 6aed7c6760 Bug 1496486 - Remove GridTemplateAreas stuff from nsCSSValue. r=heycam
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D7754
2018-10-09 17:33:25 +02:00
Emilio Cobos Álvarez 804148c319 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 17:33:24 +02:00
Emilio Cobos Álvarez e536bf79ad Bug 1496486 - Remove a bunch of unused nsCSSValue code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7752
2018-10-09 17:33:23 +02:00
Brindusan Cristian 3b4ca07db8 Backed out 5 changesets (bug 1496486) for build bustages on gfxUserFontSet.h. CLOSED TREE
Backed out changeset 6b740afea403 (bug 1496486)
Backed out changeset 5cf44e254ac3 (bug 1496486)
Backed out changeset 8e465202c355 (bug 1496486)
Backed out changeset 86382b2249f6 (bug 1496486)
Backed out changeset ab92ed3e0a23 (bug 1496486)
2018-10-09 16:58:38 +03:00
Emilio Cobos Álvarez a03dd78e3f Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 15:33:05 +02:00
Emilio Cobos Álvarez 55bef63412 Bug 1496486 - Remove GridTemplateAreas stuff from nsCSSValue. r=heycam
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D7754
2018-10-09 15:33:04 +02:00
Emilio Cobos Álvarez d6c743191f Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 15:33:03 +02:00
Emilio Cobos Álvarez 089e54f3f3 Bug 1496486 - Remove a bunch of unused nsCSSValue code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7752
2018-10-09 15:33:01 +02:00
Cameron McCormack bb57a22878 Bug 1496279 - Don't register CSS images in the loading document when printing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7677

--HG--
extra : moz-landing-system : lando
2018-10-04 18:32:33 +00:00
Cameron McCormack 0d5bfc3851 Bug 1495645 - Followup merge bustage fix r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D7675

--HG--
extra : moz-landing-system : lando
2018-10-04 00:42:28 +00:00
Cameron McCormack 4372b55f4f Bug 1495645 - Move css::ImageValue::mRequests into a global table managed by css::ImageLoader r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7383

--HG--
extra : moz-landing-system : lando
2018-10-04 00:20:50 +00:00
Emilio Cobos Álvarez c620c6f47a Bug 1496041 - Remove unused ImageValue constructor. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7589

--HG--
extra : moz-landing-system : lando
2018-10-03 12:13:57 +00:00
Cameron McCormack 61c7fc41f4 Bug 1495353 - Remove unused css::URLValueData::MightHaveRef r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D7260

--HG--
extra : moz-landing-system : lando
2018-10-01 07:42:05 +00:00
Thomas Nguyen e9db7825df Bug 1330487 - Part 5: Use correct referrer policy for image loader r=heycam
MozReview-Commit-ID: JA7gkRH9cDJ

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:36:54 +00:00
Brad Werth 15674b4d46 Bug 1434963 Part 3: Remove style struct mutation in nsStyleDisplay::FinishStyle. r=emilio
Depends on D5341

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

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:19 +00:00
Valentin Gosu a8e3a8c349 Bug 1448330 - Make nsIURI.clone a private method r=mayhemer
MozReview-Commit-ID: 1efpeaEPaXP

--HG--
extra : rebase_source : e660f1e5bcae9b7119bc5b37713691069272b375
2018-06-14 13:05:43 +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 72476926ed Bug 1463386: Remove eCSSUnit_Image. r=heycam
MozReview-Commit-ID: 9OX6iW7Lr5Q

--HG--
extra : rebase_source : 07dad9bfab62b24668737751386567359806d07d
2018-05-22 13:34:17 +02:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Emilio Cobos Álvarez 42fb128936 Bug 1363875: [css-align]: Rename justify-items: auto to legacy. r=mats,xidorn
MozReview-Commit-ID: Jfwib2XDmSw
2018-04-20 02:07:04 +02:00
Jonathan Watt 1e7f76576a Bug 1436048 part 1 - Use a user defined type for font weight everywhere. r=jfkthame,emilio
--HG--
extra : rebase_source : 2e267ff99de6f52484e34ac15c39e5ca8b473394
2018-04-13 20:34:37 +01:00
Emilio Cobos Álvarez 9ab1873cd3 Bug 1452987: Simplify ImageValue. r=heycam
MozReview-Commit-ID: 5LRaaEPSSdY

--HG--
extra : rebase_source : 2654a870e2a985bf7a609ee436ba1800bf6033a3
2018-04-10 16:54:57 +02:00
Emilio Cobos Álvarez 7e8faed759 Bug 1452947: Remove useless PtrHolder / PtrHandle stuff now that URIs are thread-safe. r=heycam
MozReview-Commit-ID: 5f2B8bqBnDp
2018-04-11 08:41:49 +02:00