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

931 Коммитов

Автор SHA1 Сообщение Дата
Fernando Jimenez Moreno 3d1c324f20 Bug 1375555 - Part 2: Implement indexed getter for custom property names. r=emilio
MozReview-Commit-ID: Ckc85EJcngM

--HG--
extra : rebase_source : 981549d451837a254d0bc755db2e2e69a4f1ce5a
2017-06-28 19:25:10 -07:00
Fernando Jimenez Moreno 50ad987cc6 Bug 1375555 - Part 1: Get custom props count from Servo side for nsComputedDOMStyle::GetLength. r=emilio
MozReview-Commit-ID: DYY37HGqRq0

--HG--
extra : rebase_source : a605cfbf512e095a91cdd3e2d0e6a45f1e31d558
2017-06-28 19:25:10 -07:00
Bobby Holley 5681b4713c Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Fernando Jimenez Moreno 8306874bfd Bug 1336891 - stylo: Implement custom property value getter. r=emilio
MozReview-Commit-ID: AfAJtNJyCSO

--HG--
extra : rebase_source : 04a5fa6f2fb7b86f67c225156d08b1bf56348ea3
2017-06-22 20:06:57 +02:00
Markus Stange 579f0e24a9 Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO

--HG--
extra : rebase_source : c064a2774f352ca2a3b0139e8a8f657c3a4ea1d8
extra : source : 6bd03efee80afb048db2e51777a8e5ff6db80dc4
2017-06-19 01:44:22 -04:00
Markus Stange ccaf464b9e Bug 1370034 - Add -moz-window-opacity property, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: J2SPMzh0I9C

--HG--
extra : rebase_source : b8c5f267f99fb7bab560af82a386cd3f3a9af5f3
2017-06-18 21:04:40 -04:00
Cameron McCormack 1849ea4995 Backout bug 1291457 and bug 1370034 for bustage. 2017-06-19 13:55:15 +08:00
Markus Stange f3b2407d70 Bug 1370034 - Add CSS properties -moz-window-transform and -moz-window-transform-origin, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: BlLMswF0bKO

--HG--
extra : rebase_source : 170e4db9ad8b285f7575e39109517cb6acef8733
extra : source : 6bd03efee80afb048db2e51777a8e5ff6db80dc4
2017-06-19 00:21:16 -04:00
Markus Stange 9ec017c7c6 Bug 1370034 - Add -moz-window-opacity property, style system parts (excluding stylo). r=dbaron
MozReview-Commit-ID: J2SPMzh0I9C

--HG--
extra : rebase_source : b8c5f267f99fb7bab560af82a386cd3f3a9af5f3
2017-06-18 21:04:40 -04:00
Manish Goregaokar 3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Manish Goregaokar 828745da04 Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r=bholley
MozReview-Commit-ID: AspYUJ7lGqD

--HG--
extra : rebase_source : 1f8d368312bd8149f32efc31130f4bf6659064ed
2017-06-10 22:27:45 -07:00
Jeff Hajewski 21dd3e708d Bug 1371354: Changes macro defined NS_SYTLE_IMAGELAYER_ to enum class StyleImageLayer; r=manishearth
MozReview-Commit-ID: DgvenevRHg2
2017-06-09 16:53:34 -07:00
Brian Birtles 89714ea97e Bug 1355349 - Get unanimated style in nsComputedDOMStyle::DoGetStyleContextNoFlush for Servo too; r=hiro
MozReview-Commit-ID: BPtpVfbQ5Kk

--HG--
extra : rebase_source : fc19db8c9acbdc57ca46144fd430365a4bcd1db5
2017-06-02 14:23:22 +09:00
Brian Birtles 49502ebb3d Bug 1355349 - Move calculation of pseudo type in nsComputedDOMStyle::DoGetStyleContextNoFlush; r=hiro
This patch just moves the calculation of the pseudo type earlier in the method
so we can re-use it in the next patch in this series to get the style context
from the Servo backend for the case where we don't need to resolve style.

This patch also renames the local variable from 'type' to 'pseudoType' since
that seems less ambiguous.

MozReview-Commit-ID: 6pi2F1vZYHJ

--HG--
extra : rebase_source : 1b9c610edbe4f07000b6cc2087f45dd04792228b
2017-06-02 14:21:32 +09:00
Xidorn Quan 3da6341d84 Bug 1367028 part 2 - Simplify serialization of computed value of rect values in border-image props when possible. r=dholbert
MozReview-Commit-ID: s6TP7oB9l3

--HG--
extra : rebase_source : fa9bf5f2867ae3ccb33d238d0cd2153889b96104
2017-05-30 13:27:46 +10:00
Cameron McCormack e958203c53 Bug 1366157 - stylo: Implement getDefaultComputedStyle. r=emilio
MozReview-Commit-ID: GKr06ylK4tA

--HG--
extra : rebase_source : 04907d98d62a0b06f7d3753aaedf999b63483a77
2017-05-24 14:37:47 +08:00
Xidorn Quan 1dd9b6bad1 Bug 1366735 part 1 - Change counter functions to use struct rather than nsCSSValue::Array. r=heycam
MozReview-Commit-ID: 4FiOxCOsjtD

--HG--
extra : rebase_source : 0a2ef777045603fe591ba3a74259699a2339cede
2017-05-22 22:51:20 +10:00
Mats Palmgren 297b9d70e1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF

--HG--
extra : source : bbb688fe1ba3f5201a190c6e25b693ef7272ea2d
2017-05-21 17:15:00 +08:00
Carsten "Tomcat" Book 00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Xidorn Quan fbf065fd31 Backed out changeset 94b5ea8bed5c (bug 1355683)
MozReview-Commit-ID: AJJ7hSuOQNX

--HG--
extra : source : d149b46f49c26eae291cead8dc65d2844452b1b3
2017-05-19 14:57:35 +10:00
Neil Deakin f36da07def Bug 1364115 - Allow -moz-stack-sizing to work in a single direction only. r=dbaron,manishearth
MozReview-Commit-ID: Kl7YQpfolTC

--HG--
rename : layout/reftests/bugs/346189-1-ref.xul => layout/reftests/xul/stack-sizing-1-ref.xul
rename : layout/reftests/bugs/346189-1.xul => layout/reftests/xul/stack-sizing-1.xul
extra : rebase_source : e536212980c832c04423871e0fa9dfc09f8a5994
extra : source : a65814deeb7a7f64189d3a9388ac295c6f5b4958
2017-05-15 12:33:46 +01:00
Xidorn Quan 8c54e3ce73 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

--HG--
extra : rebase_source : bb5443f0eb56eee51cbdfd08e0400335648610e8
2017-05-13 21:42:23 +10:00
Nazım Can Altınova ce383280c3 Bug 1360488 - Part 1: stylo: Add ServoCSSParsingEnvironment and pass this instead of URLExtraData r=bholley
It was inconsistent with gecko side and also we needed to pass nsCompatibility enum along with URLExtraData.

MozReview-Commit-ID: 2ceutBfqBrg

--HG--
extra : rebase_source : f342774ed349c65f377cf85865f5905520784ca5
2017-05-11 19:06:43 +03:00
Boris Zbarsky f11ddd537b Bug 1361274. There's no need to update link :visited state when doing querySelectorAll, since querySelectorAll ignores that state anyway. r=smaug
In our current setup, in which links with an href attribute always match either
:link or :visited, no matter whether that attribute's value is a valid URI,
changes to the attribute always put the element into either the "match nothing"
state or the "match :link" state, via calls to Link::ResetLinkState.

The only thing FlushPendingLinkUpdates is needed for is (lazily, in case it
turns out to not be needed because the element got removed from the DOM anyway)
registering a history observer to switch the link state to :visited as needed.

This means that selector matching consumers that would never expose :visited
state to start with don't need to worry about calling FlushPendingLinkUpdates.
2017-05-03 16:54:25 -04:00
Wes Kocher 5b73758a65 Merge m-c to inbound, a=merge
MozReview-Commit-ID: ILz91Vj4gT5
2017-05-02 17:39:58 -07:00
Robert Longson 0c1b6c1fcc Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Jonathan Watt e0f3ff607a Bug 1350010, part 1 - Implement the '-moz-context-properties' property. r=heycam
MozReview-Commit-ID: CyVQe0UfKdy
2017-04-11 21:38:10 +01:00
Luis de Bethencourt 0114f51efb Bug 1357932 - Make AppendCSSGradientToBoxPosition() output horizontal keywords first, for better interop. r=dholbert 2017-04-27 14:48:42 +01:00
Emilio Cobos Álvarez ac51e27e7f Bug 1359779: Also look at pseudo frames in nsComputedDOMStyle::DoGetStyleContextNoFlush. r=heycam
MozReview-Commit-ID: IvAehgyv18T

--HG--
extra : rebase_source : 402256a885c9f787f2fcfacb07a27a9db679fafb
2017-04-26 13:54:44 +02:00
Brian Birtles f0f2cdbc20 Bug 1355348 - Convert stylo assert in nsComputedDOMStyle::DoGetStyleContextNoFlush to a warning; r=hiro
This allows us to run SMIL tests that include a combination of additive and
non-additive animation.

MozReview-Commit-ID: 2uVN184h7Ge

--HG--
extra : rebase_source : f6a3dc70e20c09cbfdb8cc3149e2820575866b89
2017-04-26 13:00:12 +09:00
Emilio Cobos Álvarez a47ba261fc Bug 1355351: Look for the frame for ::before and ::after pseudos. r=heycam
MozReview-Commit-ID: 7Hm2IGsl323

--HG--
extra : rebase_source : 4e55234e433cbe732b0ceaf9c1f8318b5c6b4640
2017-04-16 22:59:29 +02:00
Daniel Holbert 5f50f9f8fe Bug 1357117 part 3: Serialize -webkit-linear-gradient() expressions using the (less-expressive) -webkit-linear-gradient syntax, instead of -moz-linear-gradient. r=heycam
Specifically:
* This patch uses a flag added in a prior patch to let us use the author's
  chosen prefix (-webkit or -moz) when serializing.  (We treat the -moz version
  as a special case, because that makes it more straightforward to unsupport
  -moz if/when we can.)
* This patch makes us share the linear-gradient() side-or-corner serialization
  codepath when serializing points for -webkit-linear-gradient. (The
  alternative is the -moz-linear-gradient codepath, which defaults to
  serializing with percent values 0%/100% for sides & corners -- and raw
  percentages are invalid in -webkit-linear-gradient(), so we can't share that
  codepath.) Notably, we have to skip the "to " token that the
  linear-gradient() codepath would normally print out -- that was a late
  addition to the spec and so it only exists in the unprefixed modern syntax.
  (Instead, -webkit-linear-gradient syntax is implicitly "from" the given
  point).


MozReview-Commit-ID: 9Oqo8nG1XDU

--HG--
extra : rebase_source : b15218d9cd97d3371e89365fc472d0bcd2672861
2017-04-25 11:48:41 -07:00
Daniel Holbert f77ada324d Bug 1357117 part 1: Change linear-gradient serialization code to group space separator with the "to" token. r=heycam
This patch doesn't change our behavior -- we'll still produce the same serialization that we would've before.

MOTIVATION: A later patch will make us share this codepath to serialize into
-webkit-linear-gradient() syntax.  That syntax uses the same representation for
points as unprefixed modern linear-gradient() (with box-side-or-corner keywords
"top", "right", etc.), but it does *not* use the word "to".  So we'd like to
allow "to"-and-its-subsequent-space-character to be optional. Hence, this patch
groups the space together with "to", rather than as a prefix on the next token,
so that we can skip right to printing the point (without a leading space)
when we add support for -webkit-linear-gradient() serialization.

MozReview-Commit-ID: 5fCzx4NmpcC

--HG--
extra : rebase_source : 9f8b5c801b2f4352dd2ace3b79c40edb1795b361
2017-04-25 11:48:37 -07:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Daisuke Akatsuka 088af889f0 Bug 1210796 - Part 1a: Add GetUnanimatedComputedStyle into nsIDOMWindowUtils to use in animationinspector of devtools. r=birtles,heycam
In this patch, we implement nsIDOMWindowUtils::GetUnanimatedComputedStyle
which returns computed value of given CSS property without animation rule.  This
method is used from the DevTools animation inspector to fill in keyframe values
when the property value is null (indicating that the underlying/base value is
being used).

In order to implement this, we extend nsComputedDOMStyle constructor to fetch
the computed style minus animation style (i.e. the base style). This is somewhat
complicated by the fact that for discrete animation.
StyleAnimationValue::ExtractComputedValue may return ‘unset’, ‘initial’ or
‘inherit’. For example, if the author uses the 'unset' 'initial' or 'inherit'
keyword for a discrete property (e.g. 'align-content’), ExtractComputedValue
returns the keywords as-is. Furthermore, if the user does not set any specific
keyword, ExtractComputedValue returns ‘unset’.  We use this new
nsComputedDOMStyle mechanism to resolve these keywords into a valid keyword for
computed style in the same way as other properties (e.g. ‘opacity’).

MozReview-Commit-ID: HffJ9SCDf2k

--HG--
extra : rebase_source : 64df3850b862dada5f8e0767d47dc478d454ba31
2017-04-18 12:15:47 +09:00
Hiroyuki Ikezoe a7215d7152 Bug 1324700 - Add ResolveServoTransientStyle to get servo's computed values instead of nsStyleContext. r=heycam
Also this patch add nsIAtom as an argument to ResolveTransientStyle() to call
the new function ResolveServoTransientStyle easier. The only call site of the
ResolveTransientStyle() has already nsIAtom* there.

MozReview-Commit-ID: IwxqZbaCSpB

--HG--
extra : rebase_source : b94a3a8723fe53f38eb6144a5926dec3d7796e72
2017-04-15 07:37:34 +09:00
Xidorn Quan 1f463380ce Bug 1355683 - Remove Window.getDefaultComputedStyle. r=bz
MozReview-Commit-ID: A2IwfiJiPL

--HG--
extra : rebase_source : 6e41985b2f9aa9528f2f660f8044f5e9f7970712
2017-04-13 16:50:37 +08:00
Xidorn Quan d8c29760a1 Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G

--HG--
extra : rebase_source : 568218d415642f1088c82d4b2e03d5885067b162
2017-04-13 16:17:03 +08:00
Nazım Can Altınova a99f2a36a0 Bug 1341761 - Convert nsStyleImage::mElementId to use nsIAtom. r=xidorn
MozReview-Commit-ID: 9YcbhMmXYoi
2017-04-09 16:44:36 +03:00
Ting-Yu Lin 8e0273ab91 Bug 1351205 - Skip debug check for Stylo in nsComputedDOMStyle::UpdateCurrentStyleSources(). r=heycam
The debug code calls nsStyleContext::GetParent(), which is invalid in stylo.
Let's skip it.

MozReview-Commit-ID: 5opMaSuyoNr

--HG--
extra : rebase_source : e316b5d45ebe634a63ef0e44ed0b7183551551d4
2017-03-28 16:08:07 +08:00
cku 21a1b43445 Bug 1352096 - Part 2. Remove Layer::mSourceURI. r=heycam
Now, remove Layer::mSourceURI, there are several benefit of doing this:
1. Reduce the size of nsStyleImage::Layer.
2. By storing style image and url information in nsStyleImage, we can remove
many verbose comments. That is becasue there is no need to explain why we use
mSourceURI here, or why we use nsStyleImage there anymore.
3. Since all inforamtion is stored in on place, nsStyleImage, we can setup image
request or URLs by one single Gecko_SetUrlImageValue call.

MozReview-Commit-ID: 7aTQobddTB1

--HG--
extra : rebase_source : 247e3b66c727a9116c58d3d6ff3ae0f7a58f2338
2017-03-31 01:50:21 +08:00
Xidorn Quan 987754e4dc Bug 1343964 part 7 - Use URLExtraData for declaration modification directly for Servo backend. r=heycam
MozReview-Commit-ID: 78JRYKk9hgV

--HG--
extra : rebase_source : 1a86db507451637379e35ea17d9dbd88e8dc6902
2017-04-04 16:09:20 +10:00
Carsten "Tomcat" Book 207b516e89 merge mozilla-inbound to mozilla-central a=merge 2017-04-06 12:50:50 +02:00
Hiroyuki Ikezoe 862f50057c Bug 1311257 - Update comment refering to bug 1311257. r=birtles
MozReview-Commit-ID: EM1dYILDlzS

--HG--
extra : rebase_source : 4b47c821c0d07261a13d58fda2b9bcc0f4bc2970
2017-04-06 11:51:29 +09:00
Brian Birtles 19ef9bec3d Bug 1315874 - Tweak some line wrapping in DoGetStyleContextNoFlush; r=heycam
In ensuring that this method does *not* re-use the existing style context if
aStyleType != eAll, I found it easy to miss this check in the multi-condition if
statement due to the way some, but not all, of the conditions are on one line.
I think this would be a little easier to read if this multi-line condition used
one line per condition.

MozReview-Commit-ID: 4UOAGhAndIV

--HG--
extra : rebase_source : 0798cf29d125227587d3cf42eba7352f1a6e40c6
2017-04-03 16:49:10 +09:00
Brian Birtles 092ef82d3a Bug 1315874 - Drop animation styles if we re-use an existing style context in DoGetStyleContextNoFlush for non-animation style; r=heycam
MozReview-Commit-ID: GrB8A8bVLiX

--HG--
extra : rebase_source : aa118879e22b8c7902b5efde877b5cc621d6ddec
2017-04-03 16:49:10 +09:00
Brian Birtles 362c588a5a Bug 1315874 - Make GetStyleContextWithoutAnimation not flush; r=heycam
There are currently no call sites of GetStyleContextWithoutAnimation
but there are a couple of places (including this patch series) where we would
like to use such a method, but without the flushing behavior.

This patch drops the flushing from GetStyleContextWithoutAnimation and
renames it to GetUnanimatedStyleContextNoFlush. It also makes a few other minor
tweaks:

* Adds the aStyleType parameter for consistency with GetStyleContextNoFlush and
  GetStyleContext
* Moves the implementation of this method and GetStyleContextNoFlush to the
  header file since they simply wrap DoGetStyleContextNoFlush.
* Changes the order of these declarations so that the more specialized method
  comes later.
* Drops the comment describing the method since both the method name and the
  inline definition should now make it obvious what it is doing.

(Actually making this method not return animation styles when it re-uses an
existing style context will happen in the next patch.)

MozReview-Commit-ID: JYeim4A9Imr

--HG--
extra : rebase_source : abf7c27c52dd6b0c20a2710d6d56f2fb3e146ccf
2017-04-03 16:49:09 +09:00
Brian Birtles 33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00