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

30 Коммитов

Автор SHA1 Сообщение Дата
Julian Descottes 04ab3b18ed Bug 1537876 - Augment CSS errors with the CSS selector r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24894

--HG--
extra : moz-landing-system : lando
2019-03-27 12:12:55 +00:00
Cameron McCormack 6898c96479 Bug 1521652 - Run rustfmt on servo/ports/geckolib/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17177

--HG--
extra : moz-landing-system : lando
2019-01-22 01:59:21 +00:00
Emilio Cobos Álvarez 1f4fecfcd2 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:43:48 -05:00
shindli 6c6e4a960d Backed out 13 changesets (bug 1511811) for Btup bustages
Backed out changeset d71cde918f43 (bug 1511811)
Backed out changeset 0ae2634de8e1 (bug 1511811)
Backed out changeset 53d1f5ca4099 (bug 1511811)
Backed out changeset 5a08148928ef (bug 1511811)
Backed out changeset da7816ec50ef (bug 1511811)
Backed out changeset 5fe23889cccc (bug 1511811)
Backed out changeset 800bc60c75a7 (bug 1511811)
Backed out changeset 2392d8199cd0 (bug 1511811)
Backed out changeset 7bc486fbd195 (bug 1511811)
Backed out changeset d2c997426108 (bug 1511811)
Backed out changeset ddd573878432 (bug 1511811)
Backed out changeset 29c8ec1559a4 (bug 1511811)
Backed out changeset f5851346109d (bug 1511811)

--HG--
rename : third_party/rust/darling_core/src/macros_private.rs => third_party/rust/darling_core/src/macros.rs
2018-12-03 15:39:11 +02:00
Emilio Cobos Álvarez 6359ab5223 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:15:21 -05:00
Cameron McCormack 9c372819c4 Bug 1508013 - Run rustfmt on servo/ports/geckolib/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12206

--HG--
extra : moz-landing-system : lando
2018-11-20 04:37:53 +00:00
Emilio Cobos Álvarez 4bdd7b8cc4 Bug 1422225: Error reporting fixes. r=xidorn
Do it so that we always try to evaluate the media expression and the modern
syntax last, so that the most specific error message comes up.

MozReview-Commit-ID: 2tqdAsWh6Kh
2018-06-25 21:19:39 +02:00
Emilio Cobos Álvarez 621ad1408b Bug 1469957: Move the error reporter into ParserContext. r=xidorn
Summary:
This should make it easier to report errors, and also reduce codesize.

The reason this was so generic is that error reporting was unconditionally
enabled and was super-hot, but now that's no longer the case after bug 1452143,
so we can afford the virtual call in the "error reporting enabled" case.

This opens the possibility of simplifying a lot the error setup as well, though
this patch doesn't do it.

Test Plan: No behavior change, so no new tests.

Reviewers: xidorn

Bug #: 1469957

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

MozReview-Commit-ID: F3wTdhX9MB5
2018-06-21 09:24:07 +02:00
Emilio Cobos Álvarez f46383f8bd Bug 1466656: Make ErrorReporter a smaller Rust type. r=heycam
And use the C++ ErrorReporter only to actually output errors.

ErrorReporter was so complicated because well, it was always enabled and had to
do a bunch of caching to not be (more) slow.

But since bug 1452143 it's disabled by default, so we can simplify this setup a
lot.

Also while at it make the error reporting pref a static pref so that we don't
mutate globals from CSS parsing unless we're actually reporting errors.

MozReview-Commit-ID: AuIyvJwt7AU
2018-06-05 11:09:39 +02:00
Emilio Cobos Álvarez c556ec7ad0 Bug 1457920: Remove ServoStyleSheet usage. r=xidorn
MozReview-Commit-ID: LIBkovuQ6MB
2018-05-02 04:13:26 +02:00
Xidorn Quan 5e807fd261 servo: Merge #19925 - Use cstr macro for ffi literal strings (from upsuper:cstr); r=emilio
Use `cstr!()` macro with `CStr` to ensure that literal strings used with FFI is properly nul-terminated to avoid cases like #19915.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5af219e8188f2e657c5711eb5def4c8e8065e29d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fb6a22714c7b8ff534181e54c265fca24da7873b
2018-02-14 06:49:38 -05:00
Emilio Cobos Álvarez 50cb82c33d servo: Merge #19915 - stylo: Fix missing null terminator in error reporting code (from emilio:color-errors-whee); r=jdm
This was causing the patch in bug 1420026 to fail.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bd0590117d0c76d59a509287a07c3bb9c8321ae

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2399127ec9eddb478ec4edec488824ec6ccfe1a2
2018-01-31 12:37:33 -06:00
Cameron McCormack bea48ffe01 servo: Merge #19473 - geckolib: Fix typo in CSS parser error message name (from servo:error-message); r=aethanyc
Source-Repo: https://github.com/servo/servo
Source-Revision: 005fd9cfa864a22473d0cdb980a11b874bcd1b03

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : edeaa38a02726e51f02c340776c714de87687c32
2017-12-05 00:54:12 -06:00
Cameron McCormack a1f120e672 servo: Merge #19490 - allow Gecko FFI functions for color parsing to report errors (from heycam:canvas-color); r=Aethanyc
This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1420026.

Source-Repo: https://github.com/servo/servo
Source-Revision: e5637770086be7ef69f44c6eb7c9a621fa577d96

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 64d4ae259a985dc3b4cf41586a537bdce41c5866
2017-12-04 23:32:15 -06:00
Simon Sapin 4f4b90db1f servo: Merge #18808 - Use the current parser location for CSS error (from servo:error-location_); r=emilio
… rather than the start location of the current construct. This likely places the error just *after* of the unexpected token whereas before would be best, but that’s likely a much bigger change.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1378861

Source-Repo: https://github.com/servo/servo
Source-Revision: c79a54dbd9d3a590f5fd8191b8e57a0b9d1d0fdb

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7a78da26aa9801972da42123730f90bcddc92930
2017-10-10 12:31:24 -05:00
Fernando Jiménez Moreno efe49af334 servo: Merge #18341 - stylo: Error reporting for unknown media features (from ferjm:bug1384225.media.errors); r=jdm
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1384225](https://bugzilla.mozilla.org/show_bug.cgi?id=1384225)

Source-Repo: https://github.com/servo/servo
Source-Revision: fef2cfde8cc6688c63cde1966b081a4698a5d977

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f16c453db1e3cdccb516562ef92dc4ebce3e9cf1
2017-09-08 11:14:51 -05:00
Josh Matthews 52e444ade8 servo: Merge #18394 - Report more specific error for invalid filter properties (from jdm:filtererr); r=xidorn
Reviewed by xidorn in https://bugzilla.mozilla.org/show_bug.cgi?id=1386900.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1386900](https://bugzilla.mozilla.org/show_bug.cgi?id=1386900).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: a7ea6741d38388bc562d5b1cb53e4bf581f6fafe

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f5ac669e2aab0e477c7dd36dcb0de4b17ef40553
2017-09-06 12:18:41 -05:00
Simon Sapin c9fdb7e6d5 servo: Merge #18355 - Reduce usage of fmt in serialization and error reporting (from servo:no-fmt); r=emilio
`format!` and `write!` create a somewhat-heavyweight `Formatting` struct and use dynamic dispatch to call into impls of `Dispaly` and related traits. The former also allocates an intermediate string that is sometimes unnecessary.

I started looking into this from https://bugzilla.mozilla.org/show_bug.cgi?id=1355599, but I expect the impact there will be small to insignificant. It might be a slightly less so on parsing (error reporting).

Source-Repo: https://github.com/servo/servo
Source-Revision: c60dd53210745d9d8e7d3a5ca0310370a33553f4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d58ba91509b981489459b891f7632d035a43a7de
2017-09-04 13:14:44 -05:00
Josh Matthews a4c8935171 servo: Merge #18290 - Report more specific CSS selector errors (from jdm:selectorerr); r=heycam
Report more specific errors for invalid CSS selectors. Reviewed by @heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1384216.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: b2f8974ab88c98277f03c727708096edce898974

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3e6e805e10d74b130a1687dfdb8c9e85ec4d255f
2017-08-29 09:46:22 -05:00
Josh Matthews 37e14f9d9d servo: Merge #18135 - Use fewer allocations when reporting Gecko errors (from jdm:lesstring); r=emilio
Avoid some unnecessary string allocations when extracting meaningful values out of CSS parser error messages.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: b8159e659e787c1e792d13b0939bb88e978ae84e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2500d8540e1e3a72d3758f40e770cb321d74f63d
2017-08-18 05:46:48 -05:00
Simon Sapin 4331d2478e servo: Merge #18025 - Update to cssparser 0.19, count line numbers during tokenization (from servo:line-counting); r=jdm
https://github.com/servo/rust-cssparser/pull/177

Also simplify the `ParseErrorReporter` trait a bit.

Source-Repo: https://github.com/servo/servo
Source-Revision: 845131c425ebd50eea2fe5bf6005b6c304664242

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d24cb7526225e8393bbc0a90206cba0199f95798
2017-08-09 16:16:33 -05:00
Josh Matthews a40c6baae5 servo: Merge #17967 - CSS parsing optimizations (from jdm:parsefun); r=SimonSapin
These address some small inefficiencies that showed up while profiling the myspace talos test.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: aef95cf195d8d74595b7b266472bc34634c49120

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e4430604b572fe5a92b660e05768067e6afb18e5
2017-08-04 02:10:05 -05:00
Josh Matthews 6feb27360e servo: Merge #17926 - stylo: Report a specific error for invalid CSS color values (from jdm:valueerr); r=heycam
Reviewed by heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1381143.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes (gecko devtools tests)

Source-Repo: https://github.com/servo/servo
Source-Revision: dc244ad9e93cf606352594176987aa73ce4ed74c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 639d68d9e58fb898eb8eed3ce6c6b77cb74b475c
2017-07-31 15:50:14 -05:00
Nazım Can Altınova 881ba2aee9 servo: Merge #17894 - Implement parsing/serialization for @font-feature-values rule (from canaltinova:at-font-feature-values); r=SimonSapin,xidorn
<!-- Please describe your changes on the following line: -->
This is reviewed by SimonSapin and xidorn in [Bug 1365900](https://bugzilla.mozilla.org/show_bug.cgi?id=1365900).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1365900](https://bugzilla.mozilla.org/show_bug.cgi?id=1365900)

Source-Repo: https://github.com/servo/servo
Source-Revision: 00e55dd278f46560e61959a1fd5aa9e1846cb557

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 31540bc2de7cc2b7b5bd29a8b59d1963591de14b
2017-07-27 16:15:02 -05:00
Josh Matthews 246781bcbb servo: Merge #17859 - Add message suffixes to stylo error reports (from jdm:geckodecl); r=heycam
This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1381137. This allows us to add the "Declaration dropped" or "Skipped to next declaration" messages after relevant CSS errors that are reported.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: f59bd8e2b2b245e76a587ce548af3975797f46e8

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9a4013efe443cc53b11b04bf22f3e9dfb603747b
2017-07-26 06:46:13 -05:00
Simon Sapin a307aa9230 servo: Merge #17820 - Update cssparser to 0.18 (from servo:token-cache); r=emilio
Do not merge yet, depends on https://github.com/servo/rust-cssparser/pull/171.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f0821192c112943bb53b4fb04303c1afdde06e6

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e4825d4514cfe2286e2f874b4bd643befe603521
2017-07-24 06:27:00 -07:00
Josh Matthews 1faafe6c32 servo: Merge #17787 - Store COW strings in CSS parser errors when possible (from jdm:invalidvalue); r=SimonSapin
This should be a straightforward performance improvement in pages with lots of CSS property values that the parser does not understand.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because there's no functional difference.

Source-Repo: https://github.com/servo/servo
Source-Revision: b70cbeb84caf5ec4a90a900fc5d4082989044acd

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 18e9fcafa9b8e8137b3991331effc2a629ff3e88
2017-07-19 10:08:14 -07:00
Josh Matthews 3e06aadbea servo: Merge #17739 - Suppress CSS parser errors for vendor-prefixed properties (from jdm:no-vendor-prefixed-errors); r=emilio
This matches the behaviour of Gecko's CSS parser.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17736
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 38f4ae80c4b456b89ee33543c8c6699501696c9c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1a1909fa1db0e97b0997462f48b23827f84394f0
2017-07-17 07:10:11 -07:00
Josh Matthews ff5ac37188 servo: Merge #17738 - Don't retrieve the CSS source when a parse error is reported (from jdm:no-css-text); r=bholley
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1381045 retrieving the CSS source is an unnecessary performance hit for Stylo.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because they are tested by Gecko.

Source-Repo: https://github.com/servo/servo
Source-Revision: fe98a8001bd5f983956bd5bab8e3b192b936d2f2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6089e9ba19d02e60ef9190c587cb2275d5a3d96c
2017-07-14 17:53:12 -07:00
Josh Matthews 37c0d145b4 servo: Merge #17655 - Hook up Stylo error reporter to Firefox devtools (from jdm:stylo-error-reporter); r=emilio
Reviewed by @emilio in https://bugzilla.mozilla.org/show_bug.cgi?id=1352669.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ddbc92d90ec8df9e5bf4630cd3e93759da81649

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 87c38834194b9cb1d5fdfa4303c0754f866b6613
2017-07-10 18:13:44 -07:00