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

59 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan 5896b33074 Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.

MozReview-Commit-ID: DPAd7PUUCl9

--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1
2018-05-16 15:35:59 +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
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez d39c5388fc Bug 1436059: Make XBL / Shadow DOM use AuthorStyles. r=xidorn
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode
parameter because XBL sucks so bad.

MozReview-Commit-ID: 7q99tSNXo0K
2018-02-16 16:54:34 +01:00
Emilio Cobos Álvarez 0e8ba9b1b5 Bug 1408308: Reland the bindings so the build isn't busted, but we don't need to backout the servo bits. r=me
That way we don't bust the build (for some reason the ASAN build choked in
ResponsiveImageSelector, I suspect due to missing includes).

MozReview-Commit-ID: 6I6Q7jiAFr0
2017-11-13 06:33:46 +01:00
Margareta Eliza Balazs 85280dc48c Backed out 1 changesets (bug 1408308) for bustage in [toolkit/library/target] r=backout on a CLOSED TREE
Backed out changeset b59ffea83e0a (bug 1408308)
2017-11-13 07:23:52 +02:00
Emilio Cobos Álvarez 58aae7a733 Bug 1408308: Integrate Servo SourceSizeList in ResponsiveImageSelector. r=Manishearth
This needs to dumb down the parsing in order to match what we do in Gecko and
pass more tests.

The remaining tests are just because of calc() in media queries and "or" media
expressions.

MozReview-Commit-ID: CXGdYVbojBL
2017-11-13 05:18:36 +01:00
Emilio Cobos Álvarez 2d5df88155 Bug 1410624: Add some declarations and bindings so the build isn't busted when servo-vcs-sync goes back alive. r=me,heycam
https://github.com/servo/servo/pull/18988 has merged a while ago in servo, but
since the sync service is down, I haven't been able to land the relevant patches
today.

This at least ensures that the build isn't busted when servo-vcs-sync goes back
up.

MozReview-Commit-ID: 9ohgwcnMc5T
2017-10-23 22:46:02 +02:00
Hiroyuki Ikezoe 5e34bc1f57 Bug 1329169 - Use atom for animation-name property. r=xidorn
MozReview-Commit-ID: 9yVWXVi1oXf

--HG--
extra : rebase_source : f0d8a731c3e6caaf248a0b0e25ef96370af3ecd8
2017-10-10 17:00:28 +09:00
Hiroyuki Ikezoe 3079b3e5d9 Bug 1406811 - Remove a duplicate entry for RawServoSelectorListBorrowed. r=emilio
MozReview-Commit-ID: CN4LbkY4IcU

--HG--
extra : rebase_source : 9de4bf17fdaf39edba3595d61add944551941fbf
2017-10-10 07:57:41 +09:00
Emilio Cobos Álvarez 48c5a32dc2 Bug 1404897: Add bindings to Servo selector lists. r=heycam
MozReview-Commit-ID: 4ZrWawDwuNe

--HG--
extra : rebase_source : 38248c72c8208200735fe4cf4516e374ea721080
2017-10-02 12:07:11 +02:00
Sebastian Hengst 66c0db70b2 Backed out changeset 1f1ff129684f (bug 1404897) for Android bustage at nsDocument.cpp:1414: undefined reference to 'Servo_SelectorList_Drop'. r=backout 2017-10-04 12:56:00 +02:00
Emilio Cobos Álvarez 6edc4a4c43 Bug 1404897: Add bindings to Servo selector lists. r=heycam
MozReview-Commit-ID: 4ZrWawDwuNe

--HG--
extra : rebase_source : de0f04b9155e9ad31596d7fd7b89585b8c1d753f
2017-10-02 12:07:11 +02:00
Sebastian Hengst 65ea166a53 Backed out changeset fda0d9bc93f0 (bug 1404897) for build bustage at nsIDocument.h:1181: bad implicit conversion constructor for 'SelectorList'. r=backout 2017-10-04 11:25:27 +02:00
Emilio Cobos Álvarez 3e01f33d28 Bug 1404897: Add bindings to Servo selector lists. r=heycam
MozReview-Commit-ID: 4ZrWawDwuNe
2017-10-04 11:01:26 +02:00
Josh Matthews a323bdfe53 Bug 1397971 - Share strings in URLDataValue with Rust. r=heycam
--HG--
extra : amend_source : 7946c76a40240baac44db6c1c6c7b0117ced4219
2017-09-15 13:11:37 -07:00
Cameron McCormack 7e913c1a93 Bug 1382925 - Part 1: Make Servo_StyleSet_NoteStyleSheetsChanged take a set of origins to dirty. r=emilio
MozReview-Commit-ID: KY29REU78tH

--HG--
extra : rebase_source : bc3ca1deb1fcc797e6156c8bd0656012eb9c4315
2017-08-12 18:19:22 +08:00
Manish Goregaokar efbe3a9af8 Bug 1386887 - Clean up FFI lifetimes to work on nightly; r=emilio
MozReview-Commit-ID: 5WAIVd6p2du
2017-08-03 15:49:25 -07:00
Manish Goregaokar 08c6de8178 Bug 1382017 part 4 Gecko piece - Rename ServoComputedValues -> ServoComputedData; r=heycam
ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.

MozReview-Commit-ID: IQNVdfREAMt
2017-07-20 21:44:02 -07:00
Manish Goregaokar 26f3a98f78 Bug 1382017 part 4 Gecko piece - Remove usage of ServoComputedValues from most Gecko code; r=xidorn
MozReview-Commit-ID: 2NB4DgxMrL3
2017-07-20 17:27:05 -07:00
Brian Birtles 267881f1f1 Bug 1381389 - Append PropertyValuePair objects on Gecko side so they are initialized correctly; r=hiro
Without this mValue may end up looking like a valid nsCSSValue object and bad
things will happen when we try to clone it.

We could just assign mem::zeroed() to mValue but this array hacking on the Servo
side is already pretty nasty and mSimulateComputeValuesFailure would still
remain unassigned (and if we did try to assign it on the Servo side we'd need to
only assign it in debug builds). Unless this proves performance-critical, it's
probably best to just do this on the Gecko side.

MozReview-Commit-ID: 75nFsflhZUM

--HG--
extra : rebase_source : 0e5d94a7f6fdb6768983ba440a3ea69d65cbffbf
2017-07-20 14:38:54 +09:00
Manish Goregaokar 3597e8df2e Bug 1367904 - Part 13: stylo: Flatten ServoComputedValues into ServoStyleContext; r=bholley
This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)

MozReview-Commit-ID: 7Evc1p8ZfM2
2017-07-17 21:01:02 -07:00
Manish Goregaokar f33beecc59 Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley
MozReview-Commit-ID: EmopKVjEzlz
2017-07-17 21:00:46 -07:00
Cameron McCormack a0ce63693c Bug 1372061 - Change StyleChildrenIterator FFI functions to use placement new/delete. r=bholley
MozReview-Commit-ID: BEWvJcaJxA

--HG--
extra : rebase_source : 48b4982001a305b95a88578cb278c3c6e4beac70
2017-06-27 23:56:13 -07:00
Hiroyuki Ikezoe 5626c5dfa9 Bug 1358966 - Serialize multiple AnimationValue(s) for sub properties of a shorthand into single shorthand string. r=birtles,manishearth
MozReview-Commit-ID: KihUZRSD6pg

--HG--
extra : rebase_source : 8a75edcde8acf5c47981ef009d7a3c2b1d40c777
2017-06-09 06:19:38 +09:00
Hiroyuki Ikezoe 55195fc497 Bug 1358966 - Add a new FFI to convert PropertyDeclarationBlock into nsTArray<RefPtr<RawServoAnimationValue>>. r=birtles
With this function we can get multiple RawServoAnimationValue(s) for shorthand
properties.

MozReview-Commit-ID: GPqmsOfVB0

--HG--
extra : rebase_source : a822f574eeb552ad72748bbe4b89f6139621c880
2017-06-09 06:19:37 +09:00
Hiroyuki Ikezoe b8392ab3cc Bug 1358966 - Drop RawGeckoAnimationValueList. r=birtles
We no longer use it.

MozReview-Commit-ID: 5C0YbzQo6WP

--HG--
extra : rebase_source : 8244c3d22227dab3538fa1d00014d64e2f4d22bc
2017-06-09 06:19:36 +09:00
Ting-Yu Lin 414fb7a11d Bug 1290276 Part 6 - Add FFI functions to allow various XBL data to be used from servo side. r=heycam
MozReview-Commit-ID: 9yG7xrXXuRn

--HG--
extra : rebase_source : 724c55fb8d424524e5408eead53d7b380197eff6
2017-06-05 14:00:27 +08:00
Boris Chiou 46a0e62893 Bug 1335998 - Part 2: Delegate matrix decomposition/interpolation/recomposition to Servo. r=birtles,manishearth
Use Servo backend to decompose/interpolate/recompose matrices on both
main thread and compositor thread.

Note: Due there may be differences in precision used to represent the
      components, and the computation of matrix interpolation are not
      exactly same (still following the formulas in spec). There are some
      tiny differences between the interpolation results of 2d/3d
      matrices on Gecko and Servo, especially if there is skew() or any 3d
      transform function.

MozReview-Commit-ID: 6T8vlR4MJGr

--HG--
extra : rebase_source : 3309f4a4541c6612109a441c38bb896deb83c018
2017-06-07 11:25:14 +08:00
Boris Chiou 1e2c865691 Bug 1334036 - Part 5: Implement FFI for finding properties overriding animations. r=birtles,emilio
We need to traverse rule tree to get the important rules, so we will not
override them if they have animations running on compositor.

MozReview-Commit-ID: 67NO2nIcUfq

--HG--
extra : rebase_source : 24a4ea4ca10e00f409d94c81acacb3db72248b3f
2017-05-19 15:58:47 +08:00
Hiroyuki Ikezoe d8fafebff7 Bug 1360776 - Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule(). r=emilio
MozReview-Commit-ID: 5o8NuJolG2R

--HG--
extra : rebase_source : 13d732112dfe5614a83657c7bf7703944050c0f4
2017-05-01 18:45:41 +09:00
Brad Werth 50b320d9d3 Bug 1346256 Part 1b: (Gecko) Add FFI interfaces for exposing style sources. r=heycam
MozReview-Commit-ID: FOQCgXD68E9

--HG--
extra : rebase_source : b393f646df3a4115bc9417c6b8a90b3be0d8dceb
2017-04-06 10:19:00 -07:00
Xidorn Quan 2df49dbac2 Bug 1343964 part 1 - Move URLExtraData into its own header. r=heycam
This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla

MozReview-Commit-ID: 72MYq6kWm4s

--HG--
extra : rebase_source : 400fe0d7cc422f22592c302cfd4e457830b77e3e
2017-04-04 10:04:13 +10:00
Hiroyuki Ikezoe 8e14922b0a Bug 1311257 - Add FFI functions to get progress value and current position in a segment. r=birtles
Two functions added in this patch get progress value from ComputedTiming
or get the position in a given AnimationPropertySegment.
Without these FFIs, we need to expose Maybe<> and Nullable<> and handle
them in Rust.

MozReview-Commit-ID: IXYWlqEQyVR

--HG--
extra : rebase_source : 8cc4d03f718cc13abfcb9c9af700bae7082bbf31
2017-04-06 10:34:51 +09:00
Xidorn Quan e3e4554871 Bug 1351957 - Create URLExtraData for holding base uri, referrer, and principal. r=heycam
MozReview-Commit-ID: 1wqTb3kvvWh

--HG--
extra : rebase_source : cae3dba21c916ab0f52056bd9db215249b650cd3
2017-03-30 18:54:48 +11:00
Xidorn Quan be843c7162 Bug 1345696 part 7 - Provide @font-face rules for stylo backend. r=heycam
MozReview-Commit-ID: CHPxz7iOLg6

--HG--
extra : rebase_source : 56371228e08b1accbdd30f738622bc211e6daee8
2017-03-27 17:53:27 +11:00
Boris Chiou 07c4d7dc13 Bug 1343153 - Part 3: Replace pointer to const with immutable reference for nsTimingFunction. r=emilio,hiro
MozReview-Commit-ID: BcY4mTtCtjn

--HG--
extra : rebase_source : c0884e86971bbb50028247b11c4f93ad72babc21
2017-03-21 14:29:43 +08:00
Boris Chiou 384142c233 Bug 1343153 - Part 2: Use Servo css-parser for ParseEasing. r=birtles,emilio
We use Servo css-parser to parse keyframe property-value pairs, so we
should also use it to parse easing for Web Animations.

MozReview-Commit-ID: FsfHQaNT2xO

--HG--
extra : rebase_source : 8eb6489f257839f2c0de943b63cc1c04b44ff7a5
2017-03-21 14:27:46 +08:00
Sebastian Hengst 1ba83457d7 Backed out changeset 9de875f31238 (bug 1343153) 2017-03-21 11:03:19 +01:00
Sebastian Hengst b3d7478b27 Backed out changeset b2c7ea6392fc (bug 1343153) 2017-03-21 11:03:14 +01:00
Boris Chiou 7959166d09 Bug 1343153 - Part 3: Replace pointer to const with immutable reference for nsTimingFunction. r=emilio,hiro
MozReview-Commit-ID: BcY4mTtCtjn

--HG--
extra : rebase_source : 413283a8ff766d683c6b2dfb61c0a98656b50cf7
2017-03-21 14:29:43 +08:00
Boris Chiou bc0746fe3d Bug 1343153 - Part 2: Use Servo css-parser for ParseEasing. r=birtles,emilio
We use Servo css-parser to parse keyframe property-value pairs, so we
should also use it to parse easing for Web Animations.

MozReview-Commit-ID: FsfHQaNT2xO

--HG--
extra : rebase_source : f0426f90e4698363b0ce0271943b31418458301d
2017-03-21 14:27:46 +08:00
Hiroyuki Ikezoe 53cd62387d Bug 1340958 - Drop Servo_AnimationValues_Uncompute. r=boris
MozReview-Commit-ID: 4CMzaCOnY7z

--HG--
extra : rebase_source : a0e988af6cdde93f47ee2089a281a49c815d953a
2017-03-17 13:24:42 +09:00
Hiroyuki Ikezoe 65b2567898 Bug 1341985 - Implement Gecko_StyleAnimationsEquals for checking nsStyleAutoArray<StyleAnimation> equality in servo side. r=heycam
Later we update CSS animations if this function returns false.

MozReview-Commit-ID: 27FsYQ40gSv

--HG--
extra : rebase_source : a043282de6c8a50ed53a92de98ecf93eb042f188
2017-03-10 11:53:17 +09:00
Hiroyuki Ikezoe 64f3fa3651 Bug 1338927 - Part 2: Generate ComputedKeyframeValues array from servo's computed values. r=birtles,manishearth
Servo_GetComputedKeyframeValues is almost the same as what we do in
KeyframeUtils::GetComputedKeyframeValues() for Gecko. Unlike the function
for Gecko, this function does not allocate each ComputedKeyframeValues element,
the allocation has been done before calling Servo_GetComputedKeyframeValues.

MozReview-Commit-ID: LRbriWoal2l

--HG--
extra : rebase_source : 785bb1bc6a62a2f9764fff09f5047942855e3c25
2017-02-23 09:52:43 +09:00
Manish Goregaokar 5b55368eda Bug 1330041 - Basic handling framework for presentation attributes in Stylo, with handling for font-size and color; r=bz,emilio
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.

There are a number of improvements that can be done on top of this:

 - Implement all other properties
 - Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
 - Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
 - Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko

I'd prefer for these to be done in separate steps.

MozReview-Commit-ID: GO60qfeZOfl

--HG--
extra : rebase_source : 516d369a8627e413983361aaf85ccb7132b0a06c
2017-01-19 15:56:53 -08:00
Hiroyuki Ikezoe e4b48af5ae Bug 1328787 - Part 4: Add Gecko_AnimationAppendKeyframe. r=heycam
This is a function which is called in Servo_StyleSet_FillKeyframesForName to
append a Gecko's Keyframe into nsTArray<Keyframe>.

Without this function we need to end up exposing ComputedTimingFunction class
and Maybe<> as FFI.

MozReview-Commit-ID: 2EpltR4rMVh
2017-01-29 12:58:39 +09:00
Boris Chiou 05b18b1257 Bug 1317209 - Part 1: Introduce ServoAnimationRule and implement uncompute FFI. r=heycam,manishearth
1. Introduce ServoAnimationRule, which is an equivalent of AnimValuesStyleRule.
2. Wrap ServoAnimationRule and AnimValuesStyleRule into a struct, and
   use it as the parameter of Animation::ComposeStyle and
   KeyframeEffectReadOnly::ComposeStyle.
3. Uncompute the RawServoAnimationValues in ServoAnimationRule when we
   need it.

MozReview-Commit-ID: HahXDYBCAhH

--HG--
extra : rebase_source : cd8c6f3a8409abf97f04af888953ff0e77d98348
2017-01-24 15:19:18 +08:00