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

32 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

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

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Emilio Cobos Álvarez 8e79d673bb Bug 1607080 - Avoid a silly UTF16 -> UTF8 round-trip in DOMMatrix. r=smaug,boris
Depends on D58710

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

--HG--
extra : moz-landing-system : lando
2020-01-07 09:46:53 +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
Emilio Cobos Álvarez ad066f1df7 Bug 1536586 - Simplify a bit our generated bindings by getting rid of FooBorrowed and FooBorrowedMut. r=heycam
This reduces a lot the boilerplate that's needed in order to add simple binding
functions.

This starts using &Foo and Option<&Foo> instead, and as a result we need to
remove the servo_function_signatures test, which is a bit unfortunate.

I think it's worth though, this causes problems on some platforms (see bug
1534844), and messing up the functions signature is not something that I've ever
seen (other than bug 1308234, which already had all the FooBorrowed mess which
I'm removing).

Also, cbindgen understands references and Option<&Foo>, so it will be the way to
go in the future.

After this patch we can also remove HasSimpleFFI, but I've kept it for now since
I still use it in a few places, and this patch is quite big on its own.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 17:00:27 +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
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
Jonathan Watt 4c1b207664 Bug 1510116. Fix some unified build issues in layout code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13039

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
2018-11-12 22:20:52 +00: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
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 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
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 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
bobslept 705b29c214 Bug 1459111 - Rename ServoCSSParsingEnvironment to ParsingEnvironment. r=emilio
MozReview-Commit-ID: Jl5aoarH0aU
2018-05-14 20:20:20 +02:00
Xidorn Quan 65a9ee4d6a Bug 1448763 part 1 - Make DOMIntersectionObserver use nsStyleSides for mRootMargin, and use Servo code to serialize it. r=emilio
MozReview-Commit-ID: 8RsoLflRtzE

--HG--
extra : rebase_source : 7e9c53dafe473e77087c880ab39e5265638f0f7e
2018-04-05 18:27:33 +10:00
Xidorn Quan d7f3530f07 Bug 1449068 part 2 - Use Servo data to back @counter-style rule. r=emilio
This patch basically does:
* Add descriptor setters and generation count to CounterStyleRule in
  Servo. (This code is mostly based on the old code inside
  nsCSSCounterStyleRule for handling mutation.)
* Use RawServoCounterStyleRule in CounterStyleManager.
* Add ServoCounterStyleRule and remove nsCSSCounterStyleRule.

Test change:
* "fixed" was parsed as and thus serialized to "fixed 1", but Servo
  doesn't do so. It preserves whether the number presents. Either way
  is probably fine.

MozReview-Commit-ID: EtKTeu32isi

--HG--
extra : rebase_source : ec44f01c581003ce4b6ef69435a05de7f3da5469
2018-04-05 08:41:28 +10:00
Xidorn Quan 67fd806b66 Bug 1449087 part 2 - Use Servo data to back @font-face rule. r=emilio
This patch does the following things:
* Create a new class ServoFontFaceRule for CSSOM of @font-face rule
  which mostly follows how nsCSSFontFaceRule was implemented.
* Remove the old nsCSSFontFaceRule and binding code to create it.
* Have FontFace backed by Servo data via making mRule and mDescriptors
  of the class hold RawServoFontFaceRule like ServoFontFaceRule.

To keep this patch small, it effectively just delays the conversion
from Servo data to nsCSSValue from parsing to using. This may cause
worse performance if the font set is flushed repeatedly. Supposing we
don't flush font set very frequently, it may not be a big deal.

We may still want to remove the intermediate nsCSSValue conversion at
some point, and have everything converted to their final form directly
when used, but that can happen in followups.

There are some unfortunate bits from this change:
* We lose style sheet for logging in FontFaceSet. This is probably not
  all that worse, because we wouldn't have that before either if the
  page doesn't use CSSOM to visit it. But we should figure out some
  approach to fix it anyway.
* InspectorFontFace no longer shares the same rule object as CSSOM.
  This isn't really a problem if the @font-face rule isn't very mutable.
  Unless we want to make the rule returned from InspectorFontFace to be
  mutable (i.e. via inspector), not using the same object probably isn't
  too bad.

This patch switches the code we use to serialize stuff in FontFace and
CSSFontFaceRule, which leads to some failures in tests. Specifically,
the expected changes including:
* Value of font-family now can be serialized to identifier sequence like
  font-family property. The old code always serializes it to string,
  but it doesn't seem to have different requirement than the property.
  Blink can serialize to identifier as well.
* Family name inside local() is also changed to use the same way as
  family names elsewhere (i.e. can be identifier sequence). Blink has
  the same behavior as the old code, but I don't think it's a big deal.
* The order of descriptors serialized gets changed. I don't think it
  matters at all.
* Empty string as font-family via using string syntax is no longer
  considered invalid for FontFace. I don't find it is mentioned anywhere
  that it should be specifically treated invalid.


MozReview-Commit-ID: 32Fk3Fi9uTs

--HG--
extra : rebase_source : 6221ec8fc56de357b06dd27e770fb175348a2f77
2018-04-04 08:42:10 +10:00
Daniel Holbert 296a409c95 Bug 1444481 part 3: #include nsStringFwd.h rather than nsString.h in some layout/style headers. r=xidorn
These files only use references to string types, e.g. "nsAString&", so they
only need forward-declarations of these types -- not the full definition.

Note that the last file here (nsStyleUtil.h) already has an #include for
nsStringFwd.h, which is why that files change is just a pure removal (of the
unnecessary nsString.h #include).

MozReview-Commit-ID: 9sLSyeBS49M

--HG--
extra : rebase_source : 683a2c621f7b7cae754f129effabd9defe7ba665
2018-03-09 11:55:12 -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
Boris Chiou 570057e075 Bug 1408303 - Part 3: Move several Servo parsers into ServoCSSParser helper class. r=heycam
We have ServoCSSParser class, and I think it's better to move those
Servo FFI into this class to avoid including ServoBindings.h everywhere.

MozReview-Commit-ID: 6orXtddp9ZU

--HG--
extra : rebase_source : 6da4158c4fec606aaee49fddee3192f94d6c85a3
2017-12-01 17:35:47 +08:00
Cameron McCormack 9993c9819d Bug 1420026 - Part 3: Report canvas color parsing errors to the console. r=TYLin
MozReview-Commit-ID: BcWat5wfGJJ

--HG--
extra : rebase_source : 6ac8d7e8db6c2c08fb23670bbb0b3486b59a938d
2017-12-04 12:53:57 +08:00
Cameron McCormack 8ff908d39a Bug 1420026 - Part 1: Add aWasCurrentColor outparam to ServoCSSParser::ComputeColor. r=TYLin
MozReview-Commit-ID: CMv0LedpEfv

--HG--
extra : rebase_source : 98a491d4a9a9b14d7364501138ca83cd9ec5821c
2017-11-30 17:27:18 +08:00
Cameron McCormack bb4a39a577 Bug 1420117 - Part 3: Add a ServoCSSParser::ParseCounterStyleDescriptor method. r=xidorn
MozReview-Commit-ID: LHBZ4j1Ji9R

--HG--
extra : rebase_source : 800a6271bd524403a9f4dbfb9c9a07dc4e85db8d
2017-11-24 17:26:41 +08:00
Cameron McCormack aaf7ca9322 Bug 1420117 - Part 1: Add a ServoCSSParser::ParseCounterStyleName method. r=xidorn
MozReview-Commit-ID: DAaUi5lLrFS

--HG--
extra : rebase_source : 5b53cbfc9a1286e7ece3a62fb20b536de28a73d6
2017-11-24 15:52:26 +08:00
Andreea Pavel 2157e91c44 Backed out 4 changesets (bug 1420117) for mochitest failures layout/style/test/test_counter_descriptor_storage.html r=backout on a CLOSED TREE
Backed out changeset 2560a150250d (bug 1420117)
Backed out changeset 5cceea9740eb (bug 1420117)
Backed out changeset 83b36cccea28 (bug 1420117)
Backed out changeset f7292e7fee0e (bug 1420117)
2017-12-05 02:16:59 +02:00
Cameron McCormack 80af0291bd Bug 1420117 - Part 3: Add a ServoCSSParser::ParseCounterStyleDescriptor method. r=xidorn
MozReview-Commit-ID: LHBZ4j1Ji9R

--HG--
extra : rebase_source : 800a6271bd524403a9f4dbfb9c9a07dc4e85db8d
2017-11-24 17:26:41 +08:00
Cameron McCormack 726b719558 Bug 1420117 - Part 1: Add a ServoCSSParser::ParseCounterStyleName method. r=xidorn
MozReview-Commit-ID: DAaUi5lLrFS

--HG--
extra : rebase_source : 5b53cbfc9a1286e7ece3a62fb20b536de28a73d6
2017-11-24 15:52:26 +08:00
Csoregi Natalia 6c0aadb872 Backed out 2 changesets (bug 1420026) for failing devtools webconsole/test/browser_webconsole_bug_595934_message_categories.js on Windows 7 debug without e10s. r=backout on a CLOSED TREE
Backed out changeset 7ef37ebdf7b2 (bug 1420026)
Backed out changeset 75636e9e1d13 (bug 1420026)
2017-11-26 13:00:58 +02:00
Cameron McCormack c43a171e04 Bug 1420026 - Part 1: Add aWasCurrentColor outparam to ServoCSSParser::ComputeColor. r=TYLin
MozReview-Commit-ID: 74m3KCXa2N2

--HG--
extra : rebase_source : 15196ded309ad9676091c13f0c44ce70d5e6ec3c
2017-11-24 11:29:16 +08:00
Cameron McCormack c5a3672a18 Bug 1408305 - Use Servo to parse IntersectionObserver rootMargin values. r=xidorn
MozReview-Commit-ID: 4CIXP73kcf2

--HG--
extra : rebase_source : d9b8bdbf374e98d0f2276be129efd7ae49123498
2017-10-16 18:02:16 +08:00
Cameron McCormack 460faae1fa Bug 1408312 - Part 1: Add ServoCSSParser utility class. r=xidorn
MozReview-Commit-ID: KzM9332hBSx

--HG--
extra : rebase_source : cee890ae943bdd855528522ef774bc95adfd4245
2017-10-16 08:54:47 +08:00
Sebastian Hengst edb0dd8898 Backed out changeset bcffb222c970 (bug 1408312) for failing web-platform-test /2dcontext/fill-and-stroke-styles/2d.gradient.object.current.html with stylo disabled. r=backout
--HG--
extra : amend_source : 66151415de533e9e7af7e49e788fc65680fd7be5
2017-10-16 16:15:45 +02:00
Cameron McCormack b9be378e65 Bug 1408312 - Part 1: Add ServoCSSParser utility class. r=xidorn
MozReview-Commit-ID: KzM9332hBSx

--HG--
extra : rebase_source : c048323e36bef9dceb3c86d3cc9ee66aa39efb51
2017-10-16 08:54:47 +08:00