Commit Graph

520 Commits

Author SHA1 Message Date
Brad Werth
66b6a25358 Bug 1367523 Part 2: Gecko-side implement the CounterStyle and FontFaceRule clone functions. r=heycam
MozReview-Commit-ID: HHGgItSdyZ5
2017-05-22 17:21:09 -07:00
Ting-Yu Lin
338f83c113 Bug 1290276 Part 6 - Add FFI functions to allow various XBL data to be used from servo side. r=heycam
MozReview-Commit-ID: 9yG7xrXXuRn
2017-06-05 14:00:27 +08:00
Cameron McCormack
77432f5e6d Bug 1365162 - Part 6: Add FFI function for matching :lang(). r=emilio
MozReview-Commit-ID: 4iFDJpzQ3p8
2017-06-07 12:27:58 +08:00
Cameron McCormack
18bfe91381 Bug 1365162 - Part 4: Add FFI functions for getting the relevant lang attribute value for an element or snapshot. r=emilio
MozReview-Commit-ID: 6xL0FI2qrG1
2017-06-07 12:16:52 +08:00
Ryan VanderMeulen
75cc747ca2 Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE
2017-06-07 22:55:56 -04:00
Manish Goregaokar
f694976932 Bug 1370734 - Whitelist ThreadSafeGetDefaultFontHelper; r=bustage
MozReview-Commit-ID: 96EmHaniGda
2017-06-07 16:33:19 -07:00
L. David Baron
03d37750a7 Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable.  However, a
few uses have crept in, and this patch removes them.

I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order.  However, the parameters are
in the order opposite the name.

This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.

MozReview-Commit-ID: G6rLbOn7k8d
2017-06-06 22:27:17 -07:00
KuoE0
fc95739e7d Bug 1358993 - (Part 1) Make stylo support reusable style sheets. r=heycam
MozReview-Commit-ID: Fjo1TICAElx
2017-05-26 15:59:01 +08:00
Manish Goregaokar
55397b1f9c Bug 1370734 - Part 2: stylo: Prefill default font when a single generic is set; r=heycam
MozReview-Commit-ID: 4FJAZthbflg
2017-06-07 11:59:30 -07:00
Boris Chiou
c96649ee05 Bug 1335998 - Part 1: Implement Gecko_CSSValue_InitSharedList and read the transform from the shared list. r=birtles,manishearth
We create interpolatematrix and accumulatematrix from Servo side
not on the main thread, so we cannot use nsCSSValueList_heap (which is not
thread safe so we cannot create it and destroy it on different threads).
Therefore, we use nsCSSValueSharedList to represent the cloned lists in
interpolatematrix and accumulatematrix.

MozReview-Commit-ID: L5WBKHwsrUz
2017-06-07 11:21:01 +08:00
J. Ryan Stinnett
557d05d102 Bug 1367923 - Store Servo decls when link preshints change. r=Manishearth
When any of the link preshints (link, vlink, alink) on <body> are set, we store
a Servo declaration block to hold the color from the hint.

This uses a one-off approach instead of `nsMappedAttributes` that is used for
other preshints because it depends on element state and also it affects links
through the document (as opposed to the element where the attribute is set).

MozReview-Commit-ID: KUvyCq9KfHT
2017-06-02 16:12:18 -05:00
Hiroyuki Ikezoe
11db326869 Bug 1367293 - Don't get parent style for GetComputedKeyframeValuesFor. r=birtles
MozReview-Commit-ID: 7WjsO7P2QGz
2017-06-02 09:38:54 +09:00
Manish Goregaokar
24035792dd Bug 1346693 - Part 2: stylo: Use namespace ids for content: attr(..); r=heycam
MozReview-Commit-ID: HdIffUCLHIy
2017-06-01 16:39:23 -07:00
Hiroyuki Ikezoe
c24d401ee8 Bug 1361938 - Set the dirty flag of DeclarationBlock when the DeclarationBlock is modified and clear the flag when it's resyled. r=heycam
MozReview-Commit-ID: 9GpFgx8N13e
2017-05-31 09:24:40 +09:00
Manish Goregaokar
4b18020b43 Bug 1367275 - Part 5: stylo: Support -moz-min-font-size-ratio; r=xidorn
MozReview-Commit-ID: xRxkFJodeK
2017-05-27 13:23:15 -07:00
Manish Goregaokar
1c40158309 Bug 1367275 - Part 4: stylo: Support -moz-context-properties; r=xidorn
MozReview-Commit-ID: 6eNeT6v8Nl6
2017-05-27 13:22:22 -07:00
Xidorn Quan
5628fb8fbc Bug 1363596 part 3 - Add string support for list-style-type. r=heycam
MozReview-Commit-ID: 9zT8IH6sxWH
2017-05-27 23:33:25 +10:00
Xidorn Quan
7b0ab58807 Bug 1363596 part 2 - Add support for symbols() function. r=heycam
MozReview-Commit-ID: IuFnhkdWG3C
2017-05-27 23:33:25 +10:00
Xidorn Quan
45aa08d57d Bug 1363596 part 1 - Merge nsCOMPtr<nsIAtom> into CounterStylePtr. r=heycam
MozReview-Commit-ID: D2fdlrC3yop
2017-05-27 23:33:25 +10:00
Manish Goregaokar
faf3e7c2b0 Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam
MozReview-Commit-ID: Dxdq6Etbwxa
2017-05-25 15:04:13 -07:00
Xidorn Quan
f6e5fc0b49 Bug 1366735 part 2 - Use the new struct in stylo. r=heycam
MozReview-Commit-ID: trgd0lKLP1
2017-05-23 00:32:05 +10:00
Phil Ringnalda
e4ab0c4347 Backed out changeset dd3a293cf053 (bug 1366247) for making Stylo build, but not run
MozReview-Commit-ID: JcbwZSt05cN
2017-05-21 12:55:08 -07:00
Xidorn Quan
84e1b2734a Bug 1366247 - Add sugar for already_AddRefed and use it for conversion between Atom and nsIAtom pointer. r=manishearth
MozReview-Commit-ID: HeV5UsqGcWs
2017-05-19 23:24:31 +10:00
Cameron McCormack
9a5ff520a6 Bug 1289868 - Part 1: stylo: Add an outparam to Gecko_CalcStyleDifference that returns whether any style data changed. r=emilio
MozReview-Commit-ID: 2Pk2x9JME0
2017-05-20 11:17:40 +08:00
Boris Chiou
c2a4430845 Bug 1334036 - Part 9: Add one FFI which return None transform. r=emilio
This FFI is used by Servo_AnimationValue_GetTransform(), which needs to
handle and return none transform properly.

MozReview-Commit-ID: 49cFXE2BIbm
2017-05-19 16:09:45 +08:00
Boris Chiou
585285ff2e Bug 1334036 - Part 6: Trigger restyle if important rules are changed. r=birtles,emilio
If we add/remove important rules, we should call MaybeUpdateCascadeResults()
to make sure EffectSet::mPropertiesWithImportantRules is correct, and so we can
avoid that these important rules are overridden by animations running on
compositor. Currently, we call MaybeUpdateCascadeResults only while iterating
elements which needs to be restyled, so we should request a restyle on this
element whose important rules are changed.

MozReview-Commit-ID: 87MBQrirVto
2017-05-19 16:04:40 +08:00
Boris Chiou
f15f836ad1 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
2017-05-19 15:58:47 +08:00
Xidorn Quan
e866068ced Bug 1345697 part 1 - Various fix for adding new files. r=heycam
MozReview-Commit-ID: 33Ssd7tNZ2K
2017-05-19 16:12:34 +10:00
Ravi Shankar
738cada9e2 Bug 1363664 - Add bindings for StyleGridTemplate and nsTArray<nsString>; r=heycam
MozReview-Commit-ID: AsVxzu4SUu9
2017-05-18 23:26:21 +05:30
cku
5e25acb0e1 Bug 1310885 - Part 11. (gecko) Clean up unused things. r=heycam
MozReview-Commit-ID: CxHbNyVNSz8
2017-04-28 19:47:04 +08:00
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 <emilio@crisal.io>

MozReview-Commit-ID: KgGjFePmhyS
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
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