Commit Graph

1158 Commits

Author SHA1 Message Date
Daniel Holbert
b2b5cf7068 Bug 1357117 part 2: Add flag to distinguish between -moz & -webkit prefixed gradient expressions. r=heycam
This patch doesn't change our behavior -- we won't actually act on the new flag
until the next patch in this series.

MozReview-Commit-ID: EONsLM54eG1
2017-04-25 11:48:39 -07:00
Manish Goregaokar
4755b8a6e5 Bug 1349417 - Part 2: stylo: Add basic system font support, use for font-size and font-family; r=xidorn
MozReview-Commit-ID: 4ZMR83GkAZN
2017-04-21 15:40:44 -07:00
Manish Goregaokar
1a232c673a Bug 1349417 - Part 1: stylo: Factor out system font computation into nsRuleNode::ComputeSystemFont; r=xidorn
MozReview-Commit-ID: KfzzCodvLXd
2017-04-21 15:40:40 -07:00
Mats Palmgren
bd3424149f Bug 1357655 part 1 - [css-ui] Make 'none' the initial value for 'appearance' for web and UA compatibility. Add 'appearance:auto' to UA sheets for form controls, XUL etc where needed. r=bz
MozReview-Commit-ID: 2h5ndqHresm
2017-04-21 02:24:19 +02:00
Cameron McCormack
d3f0b2bea1 Bug 1356601 - Don't force computation of a Variables struct when animations are involved. r=dbaron
Without this change, we can end up asserting in ComputeVariablesData and
crashing in CSSVariableResolver::Resolve due to not finding any variable
declarations on the rules we matched, when we have content like in the
crashtest added here, i.e. variables inheriting into a pseudo like
::first-line and animations on the element inside the ::first-line.

We could solve this alternatively by removing the assertion and making
CSSVariableResolver::Resolve handle a null aDeclarations more gracefully,
but since we can save the effort of recomputing the Variables struct in
this case, we may as well.

MozReview-Commit-ID: 6l06ZF3WGsy
2017-04-18 22:27:04 +10:00
Xidorn Quan
0f2df09dac Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G
2017-04-13 16:17:03 +08:00
Nazım Can Altınova
b416f7e28d Bug 1341761 - Convert nsStyleImage::mElementId to use nsIAtom. r=xidorn
MozReview-Commit-ID: 9YcbhMmXYoi
2017-04-09 16:44:36 +03:00
Manish Goregaokar
6b0229835a Bug 1341724 - Part 2: stylo: Add bindings for fetching font metrics from Gecko; r=heycam
MozReview-Commit-ID: BkPNq22ruwU
2017-04-10 17:06:14 +08:00
Manish Goregaokar
b6936aab7b Bug 1341724 - Part 1: stylo: Refactor nsRuleNode::GetMetricsFor; r=heycam
MozReview-Commit-ID: G709Er7GXwe
2017-04-10 17:06:12 +08:00
Ravi Shankar
9db6f0679c Bug 1354775 - Prefer '=' for setting TrackList values in eCSSUnit_Inherit; r=heycam
MozReview-Commit-ID: 16dHlgrA9OZ
2017-04-08 12:47:44 +05:30
cku
821fbb7591 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
2017-03-31 01:50:21 +08:00
cku
07cdb251aa Bug 1352096 - Part 1. Implement nsStyleImage::SetURL and GetURLValueData. r=heycam
This patch implements two things:
1. Add one extra type, nsStyleImageType::eStyleImageType_Url, and puts data of
this type in nsStyleImage::mUrlData.
2. Export SetURLValueData and GetURLValueData from nsStyleImage

With these chnages, we can simply use nsStyleImage::mUrlData to replace
Layer::mSourceURI in the next patch.

MozReview-Commit-ID: E20MEzXv8cg
2017-03-30 23:16:46 +08:00
Bobby Holley
b86b97cc10 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
Ting-Yu Lin
6b854b6f48 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
2017-03-20 14:12:08 +08:00
Mats Palmgren
8297bf43a1 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
c374cf6caa Bug 1348606 - Use a threadsafe array for counters. r=xidorn
MozReview-Commit-ID: KgTgcD5mGqr
2017-03-23 10:56:49 -07:00
Jeremy Chen
38e7820d15 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
2017-03-23 21:59:55 +08:00
Bobby Holley
9b43681fa7 Bug 1347435 - Use a wrapper class to maintain the mBinding invariant and stop resolving during the cascade. r=emilio 2017-03-22 20:17:18 -07:00
cku
14c0f9ceb9 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
2017-03-16 15:18:10 +08:00
cku
9db54d5a1a Bug 1340044 - Part 1. Declare mTransformBox as StyleGeometryBox. r=heycam
MozReview-Commit-ID: 9fcHkDtNHhL
2017-03-15 12:21:07 +08:00
Xidorn Quan
0bcaa746f1 Bug 1346669 - Make font-synthesis not a subprop of font shorthand. r=jfkthame
MozReview-Commit-ID: KUX72Gr4SYs
2017-03-13 12:36:19 +11:00
Xidorn Quan
eeb451c4a2 Bug 1345804 part 3 - Change will-change to store nsIAtom rather than nsString. r=heycam
MozReview-Commit-ID: 5ISVZwKw6LI
2017-03-10 12:26:53 +11:00
Boris Chiou
c7d71d646d 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
2017-02-24 14:50:08 +08:00
Neerja Pancholi
5fddb99f6b 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
2017-02-13 16:57:33 -08:00
jeremychen@mozilla.com
8e500e1044 Bug 276079 - parse and compute CSS text-justify property. r=xidorn
MozReview-Commit-ID: K3bh0H2SPnE
2017-03-01 20:58:25 +08:00
Neerja Pancholi
55ce6ad5a8 Bug 1339619 - Refactor parsing code for '-moz-text-size-adjust' to use the (more conventional) keyword table approach to calculate computed style. r=dholbert
MozReview-Commit-ID: 2mawqnlUh8t
2017-02-16 13:27:16 -08:00
cku
1819876e04 Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce
2017-02-21 23:26:17 +08:00
L. David Baron
0be1018350 Bug 1340593 - Set NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE from the WalkRuleTree codepath too. r=heycam 2017-02-19 23:10:42 -08:00
Daniel Holbert
d74b889d67 Bug 1339546 part 2: Make layout/style/*.cpp include corresponding .h file as the first header. r=xidorn
MozReview-Commit-ID: 2rZ9z0BgRvN
2017-02-14 11:23:11 -08:00
Iris Hsiao
b5a0c8c111 Backed out 4 changesets (bug 1335876) for stylo tc build bustage
Backed out changeset b870f9671bcd (bug 1335876)
Backed out changeset 3e160602fc1a (bug 1335876)
Backed out changeset 9d290cbe5aad (bug 1335876)
Backed out changeset 6e447c3fcd79 (bug 1335876)
2017-02-15 10:20:11 +08:00
cku
84dbe2a1c2 Bug 1335876 - Part 1. Declare mTransformBox as StyleGeometryBox. r=heycam
MozReview-Commit-ID: 9fcHkDtNHhL
2017-02-02 13:57:49 +08:00
Carsten "Tomcat" Book
1bff0b1adf Backed out changeset fb3c04effbd1 (bug 1336905) for bustage in stylo builds 2017-02-14 11:07:17 +01:00
cku
b2b713cfd2 Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce
2017-02-06 15:50:22 +08:00
Manish Goregaokar
9f16c02625 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
2017-01-19 15:56:53 -08:00
Cameron McCormack
6af3fcfa3f Bug 1315155 - Part 2: Make nsStyleContentData use nsStyleImageRequest for images. r=xidorn
MozReview-Commit-ID: 80gQBdNrGq1
2016-10-21 08:14:56 +08:00
Cameron McCormack
b0bc3dd2b1 Bug 1315155 - Part 1: Encapsulate nsStyleContentData. r=xidorn
MozReview-Commit-ID: LfEMxyM5meF
2016-10-20 10:22:46 +08:00
Ting-Yu Lin
9eb2a46c79 Bug 1320014 Part 11 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function. r=mats
Because the new function checks types, we need to change the fullCorner type
in nsComputedDOMStyle::GetEllipseRadii() and
StyleAnimationValue::ExtractComputedValue() from uint8_t to |Corner| to fix
build error.

MozReview-Commit-ID: 5NuFE3yA2QD
2017-01-05 14:59:17 +08:00
Jeremy Chen
9e2ea144ef Bug 1328540 - convert NS_STYLE_HYPHENS_* to an enum class. r=xidorn
MozReview-Commit-ID: BwTzbA29Y3H
2017-01-04 23:55:16 +08:00
Xidorn Quan
8de7838e67 Bug 1326209 part 2 - Change background-color to use complex color. r=dholbert
MozReview-Commit-ID: 1n3TC3CVY7U
2016-12-30 02:03:29 +11:00
Xidorn Quan
807d0f4613 Bug 894245 part 2 - Reject unknown enum color in CSS parser. r=dholbert
MozReview-Commit-ID: 6jfNESnFde5
2016-12-30 14:52:10 +11:00
Xidorn Quan
7749bec582 Bug 1063162 part 2 - Implement caret-color property. r=dholbert
MozReview-Commit-ID: DH7CX1d477R
2016-12-22 11:04:15 +11:00
Xidorn Quan
1743a93199 Bug 1063162 part 1 - Add auto value support to StyleComplexColor. r=birtles
MozReview-Commit-ID: E6EFICyY3dh
2016-12-22 11:03:37 +11:00
Mats Palmgren
e9205611c1 Bug 1322191 part 1 - [css-display] Add style system support for display:flow-root. Enable it by default. r=dholbert 2016-12-23 19:11:03 +01:00
cku
b00f9ec88d Bug 1311270 - Part 3. Replace {bg|mask}-origin/{bg|mask}-clip constants by StyleGeometryBox.
MozReview-Commit-ID: DYokhDa9fFQ
2016-11-22 15:30:01 +08:00
Ting-Yu Lin
497d7f2846 Bug 1325006 Part 2 - Convert NS_RADIUS_* to StyleShapeRadius enum class. r=heycam
The "default" case in EnumerationToLength() is not needed anymore because
StyleShapeRadius is an enum class, which cannot have other values.

MozReview-Commit-ID: GHkPAXXxqGZ
2016-12-03 16:13:49 +08:00
Xidorn Quan
cc24e912e2 Bug 1311870 - Change property id of moz-prefixed properties to match their name. r=heycam
MozReview-Commit-ID: DkrMkzMq5qM
2016-12-21 18:16:50 +11:00
Hiroyuki Ikezoe
5411ad80f1 Bug 1289701 - Add a note about the possibility of reentrant call of nsStyleSet::GetContext(). r=dbaron
MozReview-Commit-ID: DQVQMERvTkk
2016-12-15 06:49:02 +09:00
Cameron McCormack
da21cae689 Bug 1322185 - Rename some StyleDisplay enum values for consistency. r=xidorn
MozReview-Commit-ID: K27LmXKWNdk
2016-12-05 21:36:28 -10:00
Jonathan Kew
1dbd9de823 Bug 1321022 pt 4.2 - Fix up some nits in existing font-feature-settings code as per review comments on the new font-variation-settings code. r=dholbert 2016-12-03 12:18:39 +00:00
Jonathan Kew
458d6a28c3 Bug 1321022 pt 4 - Implement CSS parsing of the font-variations-setting property, storing the value into nsFont. r=dholbert 2016-12-03 12:18:36 +00:00