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

917 Коммитов

Автор SHA1 Сообщение Дата
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
Bobby Holley be7a7ceab0 Bug 1350244 - Back out bug 1348606 part 5 (Use a threadsafe array for counters). r=me
This reverts commit 07301f1c3f71b36dbe2345e8faa9bc6d643cfc97.

MozReview-Commit-ID: 8tLjUhki2C1
2017-03-29 11:05:17 -07:00
Jan Henning 8a6b5c9c8a Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel
We want to use a similar model as Chrome on Android does for scaling our display of web content, that is use font inflation for desktop pages and plain text zooming for everything else.

Since we don't want to simply clobber any text zoom that might have been set by the user/front-end code, we allow setting and storing the system font scale separately on the PresContext. We then calculate the effective text zoom value as the product of the system font scale and the current text zoom value.

Any function that is using the PresContext's TextZoom value for layouting/rendering is switched over to this new EffectiveTextZoom value, whereas functions that are interested in the text zoom as actually set by the user/front-end (e.g. the nsDocumentViewer, or the code responsible for copying text and full zoom settings into the new PresContext on page navigation) continue using the plain TextZoom value.

As long as font inflation is enabled in principle (e.g. font.size.inflation.minTwips != 0), every page starts out as eligible for font inflation until the relevant meta viewport tags marking the page as "mobile friendly" have been detected. Since the PresShell caches the font inflation state and only recalculates it when necessary, we make use of that and set the PresContext's system font scale as necessary whenever the font inflation state has been refreshed.

MozReview-Commit-ID: 2InyE04wKAW

--HG--
extra : rebase_source : 3f6d7128f37c1dc18f67a6655f86d9a3003fe90b
extra : source : 6100458b97289f9aea5ac8fda57ded045e6860b7
2017-02-25 13:22:52 +01:00
Ting-Yu Lin 5696ee9603 Bug 1322570 Part 2 - Resolve {align,justify}-self using StyleContext from alignment container frame in ReflowInput::InitConstraints(). r=dholbert
Per bug 1322570 comment 46, it's not easy to replace ComputedJustifyItems()
and UsedJustifySelf()'s internal nsStyleContext::GetParent() without
correctness penalty, so we use GetParentAllowServo() for now.

Also, fix the reftest.list added in bug 1334403 which incorrectly wrote test
page as reference page.

MozReview-Commit-ID: 6kAAWSFojd5

--HG--
extra : rebase_source : 2d03302115dd40281cec27bc18750b6933682855
2017-03-20 14:12:08 +08:00
Mats Palmgren eeffa0c3eb Bug 1333482 part 1 - [css-ui] Introduce the 'appearance: auto | none' property. r=dholbert
MozReview-Commit-ID: 3itCDTKuYQ9
2017-03-23 22:11:17 -07:00
Bobby Holley fee01f78fb Bug 1348606 - Use a threadsafe array for counters. r=xidorn
MozReview-Commit-ID: KgTgcD5mGqr
2017-03-23 10:56:49 -07:00
Jeremy Chen c41d8342dd Bug 1347819 - change nsFont::languageOverride to store uint32_t directly. r=jfkthame
Since font-language-override can only have a single three-letter tag, and it is
eventually converted to uint32_t while creating gfxFontStyle, we should be able
to move the conversion ahead, to an earlier stage.

In this patch, we move the ParseFontLanguageOverride to nsRuleNode, so we could
do the nsString-to-uint32_t conversion during computing time.

MozReview-Commit-ID: LA4Bv3wV7K

--HG--
extra : rebase_source : 48059a9913d58363f78dea59b1b7811d9f038352
2017-03-23 21:59:55 +08:00
Cameron McCormack fb18ceba5d Bug 1330843 - Allow JS to create NAC pseudo-elements. r=bholley
MozReview-Commit-ID: 2aBPoCOsT6R

--HG--
extra : rebase_source : bc32cd9e4bd5c73af094718c795691da84abe5ba
2017-03-17 15:30:34 +08:00
cku c486e7014c Bug 1340044 - Part 2. Rename value in StyleGeometryBox. r=heycam
This change is to use gecko_enum_prefix in helpers.mako.rs, so that we do not
need to manually write code for nsStyleDisplay::mTransformBox.

MozReview-Commit-ID: 7UAL0iUcSIO

--HG--
extra : rebase_source : e99b7c163991df7ef3e7c0404fcef1832718a150
2017-03-16 15:18:10 +08:00
Xidorn Quan 064bdeb45a Bug 1345804 part 3 - Change will-change to store nsIAtom rather than nsString. r=heycam
MozReview-Commit-ID: 5ISVZwKw6LI

--HG--
extra : rebase_source : 7613db7ee5cd2f4c06fd2f8a4f1b6398fd70f094
2017-03-10 12:26:53 +11:00
cku 1f0fb806e9 Bug 1345739 - Implement nsStyleImageRequest::GetImageURI. r=heycam
MozReview-Commit-ID: Jqhio1RaqG1

--HG--
extra : rebase_source : eb82e8f4e5e3376e1f2ae5866f964765a7972c4e
2017-03-09 13:03:32 +08:00
Boris Chiou af4598f9ae Bug 1248340 - Part 4: Implement Frames in the style system. r=dholbert
Use eCSSUnit_Function to store the frames timing function. Also, add one more
css keyword: frames.
The following changes are included in this:
1. Parser changes.
2. Serialization.
3. Computation in nsRuleNode.
4. Invalid and other values in property_database.js

MozReview-Commit-ID: 887QcXHQ2pU

--HG--
extra : rebase_source : ca0135380ea432cb69c4f36cf502d404e04999e5
2017-02-24 14:50:08 +08:00
Boris Chiou 89f3bc4396 Bug 1248340 - Part 1: Add the type of Frames in nsTimingFunction. r=birtles
MozReview-Commit-ID: GPn8D9gwjqa

--HG--
extra : rebase_source : 25e9f5f5d94545e26e467fe8666c03d8d222cda2
2017-02-24 14:34:08 +08:00
Neerja Pancholi f62798efe1 Bug 1339298 - Add boilerplate code for CSS3 multicol column-span parsing and define pref 'layout.css.column-span.enabled' to toggle it. r=dholbert
MozReview-Commit-ID: 6aSlRhcKm8i

--HG--
extra : rebase_source : 5028c7fb8ea5e4de42e658729b71d7e7af46a43d
2017-02-13 16:57:33 -08:00
jeremychen@mozilla.com 8638420acc Bug 276079 - parse and compute CSS text-justify property. r=xidorn
MozReview-Commit-ID: K3bh0H2SPnE

--HG--
extra : rebase_source : c483f3f1cb7eb024b1851ad1df6b6562630a2fc5
2017-03-01 20:58:25 +08:00