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

637 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 3f7283c980 Bug 1504034 - Followup to address review comments. r=emilio 2018-11-07 00:12:07 +01:00
Cameron McCormack 17ce17ad00 Bug 1504034 - Part 3: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs r=emilio
Depends on D10651

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

--HG--
extra : moz-landing-system : lando
2018-11-06 23:03:24 +00:00
Emilio Cobos Álvarez 53dca96aa3 Bug 1504536 - Remove nscsspropertyid_is_{animatable,transitionable}. r=hiro
There are better ways, plus the existing code didn't handle aliases at
all (not that it needed to, but it's better if it does).

Differential Revision: https://phabricator.services.mozilla.com/D10838
2018-11-05 10:35:44 +01:00
Emilio Cobos Álvarez ecf9afe80c Bug 1504536 - Move the keyframes property priority stuff outside of animated_properties. r=hiro
Similarly, no need to be here.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:12:24 +00:00
Boris Chiou e3efce4cc6 Bug 1501117 - Part 2: Serialize timing function from web animation api with servo. r=emilio,birtles
It's worth to serialize the timing function from web animation api with
servo, too. However, we need an FFI to do that, so this patch also add a
new FFI.

Depends on D10443

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

--HG--
extra : moz-landing-system : lando
2018-11-01 21:33:56 +00:00
Boris Chiou 3ff7857977 Bug 1501116 - Part 4: Use alias for font related types. r=emilio
Map the following types:
1. StyleComputedFontWeightRange.
2. StyleComputedFontStretchRange.
3. StyleComputedFontStyleDescriptor.
4. StyleFontDisplay.
5. StyleFontFaceSourceListComponent
6. StyleFontLanguageOverride.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:15 +00:00
Boris Chiou 04b273259e Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtles
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Depends on D9312

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:35 +00:00
Emilio Cobos Álvarez 81d70d88d1 Bug 1499386 - Implement @supports selector() syntax. r=heycam
This implements the selector(<complex-selector>) syntax for @supports.

See https://github.com/w3c/csswg-drafts/issues/3207 for explainer and
discussion.

Probably would should wait for that to be sorted out to land this, or maybe we
should put it behind a pref to get the code landed and change our
implementation if the discussion there leads to a change.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:08:14 +00:00
Cameron McCormack 13feafe016 Bug 1499408 - Followup build fix.
MozReview-Commit-ID: F88mB13Mwa1
2018-10-17 06:56:00 +03: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
Boris Chiou 8ad4fbf685 Bug 1496558 - Part 2: Move MozLength and MaxLength into generics r=emilio
Move MozLength and MaxLength into generics, and drop the manual implementation
of ToComputedValue.

Depends on D8290

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

--HG--
extra : moz-landing-system : lando
2018-10-16 01:07:41 +00:00
Cameron McCormack b43c0e36fb Bug 1498755 - Followup build fix. r=birtles 2018-10-14 21:24:00 +03:00
Cameron McCormack 8fead1bc77 Bug 1497406 - Use helper function to set length and copy into nsTArrays of PODs from Rust r=boris
Differential Revision: https://phabricator.services.mozilla.com/D8058

--HG--
extra : moz-landing-system : lando
2018-10-09 08:49:51 +00:00
Cameron McCormack 332883a726 Bug 1498755 - Part 11: Move Gecko borrowed FFI types to a separate header file r=emilio
Depends on D8652

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:06:13 +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
Cameron McCormack 924e3d96d8 Bug 1496287 - Fix unused import warning r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D7676

--HG--
extra : moz-landing-system : lando
2018-10-04 05:45:25 +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
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 e2379f3921 Bug 1425700 - Add a test for the use counters. r=heycam
Mostly testing that they work, and that they record what we expect them to
record, that is, the actual property that was parsed, and not the properties
that it'd resolve or expand to.

That may be another tricky part for CSSOM, I think style setters would fail an
alias test if implemented with the current setup (we do the property lookup in
C++).

Differential Revision: https://phabricator.services.mozilla.com/D3829
2018-08-28 15:58:21 +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 3ef3f33868 Bug 1485044: Remove useless StyleDisplay conversion. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3896
2018-08-22 11:25:58 +02:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Emilio Cobos Álvarez 6c81e2e79c Bug 1479450: Convert GetStringValue to use Servo. r=xidorn
And remove gPropertyTable / kCSSRawProperties while at it.

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

MozReview-Commit-ID: 8U87BcBkrJF
2018-07-31 12:05:00 +02:00
Emilio Cobos Álvarez 2996813963 Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

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

MozReview-Commit-ID: 4VOi5Su3Bos
2018-07-31 12:00:15 +02:00
Xidorn Quan b787149a33 Bug 1473180 part 5 - Remove DeclarationPushMode. r=emilio
MozReview-Commit-ID: LFgYeKE1SNk

--HG--
extra : rebase_source : 45fb9604be9385734826cf998270b495f9d0088b
extra : source : 4d6292b1edd2ab39dd0002f35de46a7120283dcf
2018-07-19 10:11:04 +10:00
Xidorn Quan 34c9dd8f3f Bug 1473180 part 3 - Use the new algorithm for setting property. r=emilio
MozReview-Commit-ID: HQsVwWAGPBL

--HG--
extra : rebase_source : 7280d1a0278e698ebc2fb664874aea53a19a3d3f
extra : source : 08a40cf9746a83fceb124dd148d02ccb0d2e4864
2018-07-19 10:11:04 +10:00
Emilio Cobos Álvarez 9b504cb749 Bug 1309752: Animate logical properties. r=birtles
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

MozReview-Commit-ID: 9dI20N0LFrk
2018-07-18 12:10:16 +02:00
Emilio Cobos Álvarez adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez bbc6f5b7f2 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-17 10:15:46 +02:00
Gurzau Raul c05f725b1e Backed out 6 changesets (bug 1476054) for failing on servo/ports/geckolib/glue.rs on a CLOSED TREE
Backed out changeset f4941fe345ad (bug 1476054)
Backed out changeset cc571c618e4c (bug 1476054)
Backed out changeset 0a712d7bcb66 (bug 1476054)
Backed out changeset 62293a989ed2 (bug 1476054)
Backed out changeset ef2a43e3fc6c (bug 1476054)
Backed out changeset a2bb0089cf1d (bug 1476054)
2018-07-16 23:56:23 +03:00
Emilio Cobos Álvarez 9325870208 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 21:38:46 +02:00
Emilio Cobos Álvarez cd116a52c4 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-16 21:38:44 +02:00
Xidorn Quan 9a1b70328e Bug 1461285 part 3 - Have the CSSOM appending behavior behind a pref and only enable it on Nightly. r=emilio
MozReview-Commit-ID: 6BzPTNjXjyA

--HG--
extra : rebase_source : a109383ea2a55949da8d2ab3346940fa1eb76055
2018-07-11 10:54:47 +10:00
Xidorn Quan c237e1be0d Bug 1461285 part 1 - Rename DeclarationSource to DeclarationPushMode. r=emilio
MozReview-Commit-ID: Iyv9JrXrpzl

--HG--
extra : rebase_source : d0fac58c300bdde21a0225d7793f554487f48791
2018-07-09 16:03:32 +10:00
Cameron McCormack 81599f34a7 Bug 1473735 - Add memory reporting for MediaQueryLists. r=emilio
MozReview-Commit-ID: 87rgRtQOOyG

--HG--
extra : rebase_source : a2ba4e1ed29fd7249378f9496c2059fa26316c3c
2018-07-06 11:09:12 +10:00
Emilio Cobos Álvarez 97cf1e0c02 Bug 1116638: Expose logical props in computed style. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1862

--HG--
extra : moz-landing-system : lando
2018-06-30 13:45:43 +00:00
Emilio Cobos Álvarez cc409b08eb Bug 1470145: Better debugging for stylesheets and URLs. r=xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-22 02:33:07 +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 8d318c9b78 Bug 1468665: Don't call the before change closure with the locked declaration block. r=xidorn
Test Plan: No behavior change.

Reviewers: xidorn

Bug #: 1468665

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

MozReview-Commit-ID: JI18xI6aHCh
2018-06-19 12:58:29 +02:00
Ciure Andrei 6eea08365e Merge inbound to mozilla-central. a=merge 2018-06-15 12:49:01 +03:00
Emilio Cobos Álvarez 1d7ab0614a Bug 1468846: Move MediaList to its own module. r=xidorn
And move the parsing from a free function to MediaList::parse.

MozReview-Commit-ID: 75ES6I2EEOE

--HG--
extra : rebase_source : acd2be1381409371bf4f151e5b21df713e5d9660
2018-06-14 13:22:07 -07:00
Emilio Cobos Álvarez a17751eb93 No bug - re-use the mode_to_origin function. r=me
MozReview-Commit-ID: AcDR6KcrbWI
2018-06-14 10:08:37 -07:00
Nazım Can Altınova 57afced2fc Bug 1451289 - Part 9: Merge ServoDocumentRule and CSSMozDocumentRule r=emilio
MozReview-Commit-ID: BkMMXBWdsfz

--HG--
extra : rebase_source : e14b5907769f45bb109ed4db08b2b3b444eb9c9f
2018-06-05 17:16:51 +02:00
Emilio Cobos Álvarez 9dbe99473f Bug 1467536: Add a Servo API to get the serialized style of a property. r=xidorn
This is intended to be used by GetComputedStyle when there's no layout
dependency.

MozReview-Commit-ID: 3GAbjo1uQ34
2018-06-10 00:38:57 +02:00