Commit Graph
290 Commits
Author SHA1 Message Date
Boris Zbarsky d4c6741703 Bug 1365362. Make Gecko_AtomAttrValue work correctly when the attr's value is not an atom. r=emilio
MozReview-Commit-ID: Btf7ZI4ZdMX
2017-05-17 00:53:52 -04:00
Xidorn Quan 85ab68e516 Bug 1328319 part 8 - Make stylo use counter-style for list-style-type and counter functions. r=heycam,SimonSapin
MozReview-Commit-ID: AUU3AbwOpPs
2017-05-15 14:36:43 +10:00
Xidorn Quan 2c1ba21f1a Bug 1328319 part 5 - Add bindings for list and pair list value of nsCSSValue. r=manishearth
MozReview-Commit-ID: KO0UCkrlxBi
2017-05-15 14:20:52 +10:00
Xidorn Quan d73d8ed919 Bug 1328319 part 4 - Add binding for setting pair value of nsCSSValue. r=manishearth
MozReview-Commit-ID: 2bAH90Mh4GP
2017-05-09 22:36:03 +10:00
Xidorn Quan a1e14f1b56 Bug 1328319 part 3 - Add support for auto value in nsCSSValue sugar. r=manishearth
MozReview-Commit-ID: 9QQ9fdU0all
2017-05-15 14:14:59 +10:00
Xidorn Quan 7e831c2741 Bug 1328319 part 2 - Add basic integration of @counter-style. r=heycam
MozReview-Commit-ID: 68CcxyWuINu
2017-05-15 14:18:44 +10:00
Emilio Cobos Álvarez b1cba72009 Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidorn
This allows us to access metadata using `match` instead of comparison with
atoms, which makes it doable to get the pseudo-element flags in the future.

Signed-off-by: Emilio Cobos Álvarez <[email protected]>

MozReview-Commit-ID: KgGjFePmhyS
Signed-off-by: Emilio Cobos Álvarez <[email protected]>
2017-05-14 18:39:22 +02:00
Fernando Jimenez Moreno 73fde3da0e Bug 1350175 - Part 3: Set source position for the different rules. r=SimonSapin,xidorn
MozReview-Commit-ID: 6AGNOLqoNHx
2017-05-15 14:02:13 +02:00
Xidorn Quan b7742acb67 Bug 1363699 part 1 - Make named CounterStyle objects not refcounted. r=heycam
This change does the following:
* Introduce a new smart pointer called CounterStylePtr which either
  holds an AnonymousCounterStyle strongly, or a named CounterStyle
  managed by CounterStyleManager weakly, and use it to replace all
  RefPtr<CounterStyle> around the codebase.
* Rename CounterStyleManager::mCacheTable to mStyles to reflect the
  fact that it is used to manage all styles, not just for caching.
* Add a retired styles list which collect all named CounterStyle
  evicted from mStyles, and post a PostRefreshObserver to destroy
  objects in that list after next flush.
* Remove helper functions for counter style in nsStyleList and expose
  mCounterStyle directly, to make code simpler with the new pointer.

Reason for adding a new smart pointer type rather than making their
AddRef/Release behave like BuiltinCounterStyle is that, it is possible
that after a flush, some stale style structs may still be alive. They
can contain pointer to destroyed CounterStyle objects. Although the
actual content may never be accessed anymore, RefPtr may still access
the object for refcounting during destruction.

MozReview-Commit-ID: xxegwSDhNb
2017-05-13 21:42:23 +10:00
Sebastian Hengst cbc8bca709 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Jduo3F6TzgF
2017-05-14 18:04:29 +02:00
Hiroyuki Ikezoe 96d1f27797 Bug 1354947 - Drop Gecko_AnimationAppendKeyframe. r=birtles
MozReview-Commit-ID: 9B9TjkJ5CxO
2017-05-13 16:34:38 +09:00
Hiroyuki Ikezoe 18e5e2752b Bug 1354947 - Fill in missing keyframe values. r=birtles
This is mostly a mimic of what we do in
GeckoCSSAnimationBuilder::FillInMissingKeyframeValues().

In Gecko we iterate over the properties just once because we can take the
index for both the synthesized start and end keyframe and easily look them up
as needed. However, in this patch we synthesize the start and end keyframes
separately and iterate over the properties twice because that's easier than
getting two indices and then later calling another FFI to dereference each of
them, and neater than getting back two pointers

MozReview-Commit-ID: 1e0R9AKzgaG
2017-05-13 16:34:38 +09:00
Hiroyuki Ikezoe 5ebd96c96f Bug 1354947 - Merge keyframe values at the same offset and of the same timing function. r=birtles
MozReview-Commit-ID: 4BTYAGjFb3V
2017-05-13 16:34:38 +09:00
cku f1bd49a3a3 Bug 1310885 - Part 3. (gecko) Create a new API to receive cached ImageValue from stylo.
This patch implement several things:
1. Implement a new constructor for nsStyleImageRequest to receive an existing
   ImageValue from the caller.
2. Implement Gecko_ImageValue_Create to allow stylo to create a gecko::ImageValue
   object.
3. Implement Gecko_SetXXXXImageValue to allow stylo to pass a created ImageValue
   back to gecko.

MozReview-Commit-ID: 1SbW5w8FSV2
2017-05-02 16:20:01 +08:00
Julian Seward a9ca854b2f Bug 1361258 - Add a jemalloc_thread_local_arena API with a binding for rust. r=glandium
The intent of the API is to allow threads to opt-in to use a separate
mozjemalloc arena.

This indroduces a dummy shell with no actual implementation.
2017-05-12 18:08:08 +09:00
Phil Ringnalda c80de42a91 Backed out 3 changesets (bug 1310885) for heap write hazard failures
Backed out changeset 77352010d8e8 (bug 1310885)
Backed out changeset 9245a2fbb974 (bug 1310885)
Backed out changeset 7c2db290c4b6 (bug 1310885)

MozReview-Commit-ID: 7JWuxt9QDO0
2017-05-11 23:03:31 -07:00
cku 17bf07bafa Bug 1310885 - Part 3. (gecko) Create a new API to receive cached ImageValue from stylo. r=heycam
This patch implement several things:
1. Implement a new constructor for nsStyleImageRequest to receive an existing
   ImageValue from the caller.
2. Implement Gecko_ImageValue_Create to allow stylo to create a gecko::ImageValue
   object.
3. Implement Gecko_SetXXXXImageValue to allow stylo to pass a created ImageValue
   back to gecko.

MozReview-Commit-ID: 1SbW5w8FSV2
2017-05-02 16:20:01 +08:00
Boris Zbarsky a8e62e58f7 Bug 1363961. Fix the order of arguments to FindInReadable in AttrHasSubstring. r=heycam
MozReview-Commit-ID: BAsd9bN4dtA
2017-05-11 13:25:14 -04:00
Emilio Cobos Álvarez c4f847ffaa Bug 1355343: Take all the snapshots into account. r=bholley
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.

What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.

Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.

MozReview-Commit-ID: FF1KWZv2iBM
2017-05-07 16:36:47 +02:00
Wes Kocher 3614e8a905 Backed out changeset feea2db3ddbe (bug 1363664) at developer's request a=backout
MozReview-Commit-ID: 83nv6jxNwoL
2017-05-10 09:51:38 -07:00
Ravi Shankar 7cbfb337cf Bug 1363664 - Add bindings for StyleGridTemplate and nsTArray<nsString>; r=heycam
MozReview-Commit-ID: AsVxzu4SUu9
2017-05-10 17:51:39 +05:30
Wes Kocher 04034100b2 Merge inbound to m-c a=merge
MozReview-Commit-ID: Fp2oBAcru51
2017-05-09 14:34:34 -07:00
Fernando Jimenez Moreno 11c1a39d5c Bug 1355408 - Part 1: Support @-moz-document rule in stylo. r=xidorn
MozReview-Commit-ID: BMoA7tb7ixj
2017-04-18 18:59:43 +02:00
cku b16760c6ca Bug 1310885 - Part 1. (gecko) Export RefPtr<ImageValue> from gecko to stylo.
MozReview-Commit-ID: BK5TXhl8jjP
2017-04-28 21:38:27 +08:00
Xidorn Quan 9a50a6391f Bug 1362302 part 2 - Fix stylo issue after changing counter style names to nsIAtom. r=manishearth
Only counter() and counters() functions are affected so far, since
list-style-type hasn't been hooked with counter-style yet.

MozReview-Commit-ID: EAuT3KvPpNY
2017-05-05 21:56:57 +10:00
Manish Goregaokar 39a60244aa Bug 1358634 - Handle fallback to default variable font in case of nonexistant generic ; r=heycam
MozReview-Commit-ID: GHUfkmJNgqG
2017-05-05 12:26:00 -07:00
Anthony Ramine 382c17706f Bug 1361985 - Add Servo bindings for GridTemplateAreasValue. r=Manishearth
MozReview-Commit-ID: fi5j076kwH
2017-05-04 12:24:01 +02:00
Cameron McCormack c3ff59dd49 Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley
MozReview-Commit-ID: 9rKsTyfgEIl
2017-05-04 16:20:14 +08:00
Cameron McCormack fe6c566785 Bug 1356103 - Part 7: Use PostTraversalTasks to deal with FontFace's Promise during Servo traversal. r=bholley
The PostTraversalTask does not take a strong reference to the FontFace
object, since as a DOM object, we can't call AddRef/Release on it
from the Servo style worker threads.  The FontFace objects that we
encounter are all held on to by the FontFaceSet, and none of the
work that we do during font loads should drop FontFace objects
from the FontFaceSet.  (That only happens under
nsIDocument::FlushUserFontSet, which is only called on the
main thread.)

MozReview-Commit-ID: 5CdtGQYC9aL
2017-04-30 14:51:29 +08:00
Cameron McCormack bf4faec54a Bug 1356103 - Part 2: Add functions to assert the Servo font metrics mutex is locked. r=bholley
MozReview-Commit-ID: QtydYSYvxW
2017-04-30 13:15:42 +08:00
Iris Hsiao b5dd6e2208 Backed out 12 changesets (bug 1356103) for build bustage at PostTraversalTask.h
Backed out changeset 9fb487252c28 (bug 1356103)
Backed out changeset 301237c65945 (bug 1356103)
Backed out changeset 7bc3a4861a39 (bug 1356103)
Backed out changeset 2f383d89184b (bug 1356103)
Backed out changeset a03112e1c9d5 (bug 1356103)
Backed out changeset c60b4c9cbd83 (bug 1356103)
Backed out changeset 34280baeaabe (bug 1356103)
Backed out changeset 31a0881cfb47 (bug 1356103)
Backed out changeset 529d037f9c33 (bug 1356103)
Backed out changeset 1c7831db6b07 (bug 1356103)
Backed out changeset 559f06e32df3 (bug 1356103)
Backed out changeset 784865d234cd (bug 1356103)
2017-05-04 17:56:25 +08:00
Cameron McCormack ae96e8082a Bug 1356103 - Part 10: Re-enable font metrics querying for ch and ex units in Servo traversal. r=bholley
MozReview-Commit-ID: 9rKsTyfgEIl
2017-05-04 16:20:14 +08:00
Cameron McCormack dc908f6844 Bug 1356103 - Part 7: Use PostTraversalTasks to deal with FontFace's Promise during Servo traversal. r=bholley
The PostTraversalTask does not take a strong reference to the FontFace
object, since as a DOM object, we can't call AddRef/Release on it
from the Servo style worker threads.  The FontFace objects that we
encounter are all held on to by the FontFaceSet, and none of the
work that we do during font loads should drop FontFace objects
from the FontFaceSet.  (That only happens under
nsIDocument::FlushUserFontSet, which is only called on the
main thread.)

MozReview-Commit-ID: 5CdtGQYC9aL
2017-04-30 14:51:29 +08:00
Cameron McCormack 28f3903b6b Bug 1356103 - Part 2: Add functions to assert the Servo font metrics mutex is locked. r=bholley
MozReview-Commit-ID: QtydYSYvxW
2017-04-30 13:15:42 +08:00
Wes Kocher 1a5a07c6fe Merge m-c to inbound, a=merge
MozReview-Commit-ID: ILz91Vj4gT5
2017-05-02 17:39:58 -07:00
Robert Longson fe779567bf Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
KuoE0 b1a316ad93 Bug 1356104 - (Part 1) The implementation inn Gecko of the FFI function Gecko_GetAppUnitsPerPhysicalInch. r=xidorn
MozReview-Commit-ID: IVmmpQIw0JG
2017-04-25 16:29:46 +08:00
Wes Kocher 6a06d976e8 Backed out changeset 404075957700 (bug 1362843) for stylo build bustage a=backout CLOSED TREE
MozReview-Commit-ID: FVWtqRDNjjU
2017-05-08 14:48:04 -07:00
Ravi Shankar b6d5f06678 Bug 1362843 - Add bindings for StyleGridTemplate and nsTArray<nsString>; r=heycam,xidorn
MozReview-Commit-ID: DYpihGT5ngd
2017-05-08 14:16:32 +05:30
Nazım Can Altınova 754944c232 Bug 1360659 - stylo: Support other unit types in computed angle r=emilio
MozReview-Commit-ID: 7pwoXpHAxlz
2017-04-28 18:33:00 +03:00
Hiroyuki Ikezoe 64533f1cf1 Bug 1360776 - Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule(). r=emilio
MozReview-Commit-ID: 5o8NuJolG2R
2017-05-01 18:45:41 +09:00
Emilio Cobos Álvarez 5cff30131d Bug 1331047: Implement the new traversal semantics for stylo. r=bholley,hiro
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <[email protected]>
2017-04-27 17:06:11 +02:00
Brian Birtles (:birtles) f3c695f5d6 Bug 1355348 - Fix hazard bustage by duplicating code in Gecko_GetStyleAttrDeclarationBlock and Gecko_GetSMILOverrideDeclarationBlock on a CLOSED TREE; r=me a=bustage-fix 2017-04-27 11:54:26 +02:00
Brian Birtles 6f31f71d47 Bug 1355348 - Move ServoComputedValuesWithParent to separate file; r=hiro
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.

MozReview-Commit-ID: 4Z7YbsQ9xz4
2017-04-26 13:00:11 +09:00
Brian Birtles 44c0166608 Bug 1355348 - Add FFI for getting SMIL override styles; r=heycam
MozReview-Commit-ID: 7grK3meDOZD
2017-04-27 11:09:55 +09:00
Boris Chiou 002878951e Bug 1357357 - Part 1: Add one FFI to set unsupported transition property. r=emilio
We need an FFI, Gecko_StyleTransition_SetUnsupportedProperty, to set the
mProperty and mUnknownProperty of StyleTransition. In Servo, we put
non-animatable, custom, and unrecognized property together, so this FFI
should look up the nsCSSPropertyID of the input string, and then store the
value and the unknown property string (if any) back to StyleTransition.

MozReview-Commit-ID: 4iZNKXNSrzj
2017-04-26 17:41:45 +08:00
Jeremy Chen 866ae873cf Bug 1348173 - stylo: combined gecko side patch for -moz-border-*-colors support. r=heycam
MozReview-Commit-ID: 53gWkWKJNmV
2017-04-25 14:50:44 +08:00
Iris Hsiao c6383fd1f0 Backed out changeset 9c7c061b959f (bug 1348173) for hazard busted 2017-04-25 14:24:10 +08:00
Hiroyuki Ikezoe 029e4890d2 Bug 1358965 - Drop unnecessary static_cast. r=birtles
MozReview-Commit-ID: 1V1ISqv2uo1
2017-04-25 12:24:51 +09:00
Hiroyuki Ikezoe 15584fac27 Bug 1358965 - Don't call UpdateEffectProperties and UpdateTransitions() for null computed values. r=birtles
MozReview-Commit-ID: 9NfR2Dzq92g
2017-04-25 11:29:43 +09:00