Commit Graph

276 Commits

Author SHA1 Message Date
Cameron McCormack
b490466d48 Bug 1298774 - Part 2: Rename URLValueData::mLocalURLFlag to match FragmentOrURL::mIsLocalRef naming. r=cjku
MozReview-Commit-ID: A9NHxMfPRSF

--HG--
extra : rebase_source : 702e3eaecb0aaf8b4c7514f626aec8049a11b09b
2016-10-11 14:56:11 +08:00
Cameron McCormack
ff79414111 Bug 1298774 - Part 1: Rename URLValueData::operator== so that we don't blithely call it OMT. r=cjku
MozReview-Commit-ID: K0PxT0196ex

--HG--
extra : rebase_source : 4a4a01bb55b867a793c35762a3b08eb785440fa4
2016-10-11 14:56:11 +08:00
Xidorn Quan
1dc2955ab8 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso

--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
2016-09-26 22:03:25 +10:00
Cameron McCormack
d29aafd0ca Bug 1304632 - Part 1: Assert main thread in ImageValue destructor. r=bholley
The css::ImageValue destructor does things only safe from the main
thread.  Let's assert so that we don't accidentally start releasing them
from style worker threads during restyle.

MozReview-Commit-ID: DTkFcx185L

--HG--
extra : rebase_source : 3cec1f7504f89bc19cac27d3665452114e0c7b7e
2016-08-16 15:55:39 +08:00
Xidorn Quan
154df81de1 Bug 1299741 part 7 - Support storing ComplexColor in nsCSSValue and StyleAnimationValue. r=heycam
This is a complete rewrite of the original part 8. Instead of storing
the ratio in mValueExtra, all values are stored in a struct in heap,
so that we support range outside [0.0, 1.0] in computation.

MozReview-Commit-ID: 7xUZSgQE5vA

--HG--
extra : rebase_source : 722d2aee06e59cdf061d0daae43d8dbc0a9641b4
2016-09-16 15:30:35 +10:00
Xidorn Quan
ee132df016 Bug 1299741 part 5 - Add css::RGBAColorData struct. r=heycam
This struct will be used as part of the storage type of ComplexColor in
nsCSSValue. Also this will be used to help unifying color calculation in
StyleAnimationValue.

MozReview-Commit-ID: C5UUI5DNnRM

--HG--
extra : rebase_source : b76c7d39ca21e4316a09524bbbc918a12ab81194
2016-09-16 09:24:29 +10:00
JerryShih
85f8dfa970 (no bug) fix indentation in nsCSSValue::GetAngleValueInRadians(). whitespace-only. r=dholbert
MozReview-Commit-ID: ENrpwt8Lzxz
2016-09-12 06:33:54 -07:00
Cameron McCormack
f82c259e8f Bug 1297963 - Part 4: Remove unused URLValueData comparison functions. r=emilio
MozReview-Commit-ID: 8BDaCXq1O5A
2016-09-03 00:22:48 +10:00
Cameron McCormack
524cf8e41b Bug 1297963 - Part 3: Use OMT-safe function for -moz-binding comparisons in CalcDifference. r=emilio
MozReview-Commit-ID: 6n7j2DrAVFv
2016-09-03 00:22:48 +10:00
Cameron McCormack
4bf1ed7842 Bug 1297963 - Part 2: Add URLValueData comparison functions that work OMT. r=emilio
MozReview-Commit-ID: B3pldGVZFl1
2016-09-03 00:22:47 +10:00
Cameron McCormack
a95bd0ceec Bug 1297963 - Part 1: Preserve base URI on URLValueData objects. r=emilio
MozReview-Commit-ID: Amjz1AcdxwN
2016-09-03 00:22:47 +10:00
Cameron McCormack
02ca29d0d1 Bug 1298768 - Compare mLocalURLFlag in URLValueData comparison functions. r=cjku
MozReview-Commit-ID: OdrbMUnaqt
2016-09-03 00:22:47 +10:00
Ryan VanderMeulen
23932b1a58 Backed out 5 changesets (bug 1298768, bug 1297963) for causing widespread mochitest-bc failures.
Backed out changeset dedd56fa5c54 (bug 1297963)
Backed out changeset bc1ac59cfe8f (bug 1297963)
Backed out changeset a2e337d5aa02 (bug 1297963)
Backed out changeset e73da71408a3 (bug 1297963)
Backed out changeset 56f8bca8f8e8 (bug 1298768)

CLOSED TREE
2016-09-01 08:05:43 -04:00
Cameron McCormack
a8a8f067b1 Bug 1297963 - Part 4: Remove unused URLValueData comparison functions. r=emilio
MozReview-Commit-ID: 2rISNvW7q2y
2016-08-29 18:17:26 +08:00
Cameron McCormack
0b8daf1a8b Bug 1297963 - Part 2: Add URLValueData comparison functions that work OMT. r=emilio
MozReview-Commit-ID: IfTsuOJ0iXI
2016-08-29 18:17:26 +08:00
Cameron McCormack
d3c7ea79a6 Bug 1297963 - Part 1: Preserve base URI on URLValueData objects. r=emilio
MozReview-Commit-ID: EqdYVp9JPsW
2016-08-29 18:17:26 +08:00
Cameron McCormack
27632ea465 Bug 1298768 - Compare mLocalURLFlag in URLValueData comparison functions. r=cjku
MozReview-Commit-ID: 5lRJ4r2ywdW
2016-08-29 18:17:26 +08:00
Hiroyuki Ikezoe
15f92b2593 Bug 1295107 - Part 1: Extend eCSSUnit_PercentageRGBAColor/eCSSUnit_PercentageRGBColor to store values greater than 100%. r=dholbert
nsCSSValue::GetColorValue() for eCSSUnit_PercentageRGBAColor/eCSSUnit_PercentageRGBColor
returns a clamped value, nsCSSValueFloatColor::Comp1()/Comp2()/Comp3()/Alpha()
returns a raw value instead.
2016-09-01 07:20:08 +09:00
Emilio Cobos Álvarez
7024baef71 Bug 1292930: Handle the case of having unresolved URIs in nsStyleDisplay::mBinding. r=heycam
This handles the case of the URIs not being resolved during stylo's parallel
traversal.

MozReview-Commit-ID: ExYsFbeaYWo
2016-08-16 16:10:16 -07:00
Jonathan Chan
9c62a2c11c Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-09 16:28:19 -07:00
Ting-Yu Lin
3e0b364f59 Bug 1288626 Part 8 - Add shape-outside support to style system. r=heycam
I have to move the definition of StyleBasicShape and StyleShapeSource prior to
where nsStyleDisplay::mShapeOutside is defined since the template struct need to
be fully defined before using as a member variable.

Use SetIdent() in CreatePrimitiveValueForBasicShapeOrURL() in
nsComputedDOMStyle.cpp per bug 1288626 comment 6.

MozReview-Commit-ID: 1KZS299CFul

--HG--
extra : rebase_source : d96276a1d514e1e42e1daf6f23e6bbfcb92d3bec
2016-07-22 15:40:01 +08:00
Ting-Yu Lin
213646c667 Bug 1288626 Part 7 - Rename StyleClipShapeSizing to StyleClipPathGeometryBox. r=heycam
Change to geometry box to match the name in the spec.
https://drafts.fxtf.org/css-masking-1/#the-clip-path

MozReview-Commit-ID: 8jDTynCkJ4A

--HG--
extra : rebase_source : c2e165e320c1341012b32b48bfb03b3c9b4f56c5
2016-07-28 13:45:43 +08:00
Manish Goregaokar
f5ec6f7282 Bug 1290864 - Standardize serialization of <position> values in <basic-shape>; r=xidorn
MozReview-Commit-ID: KooW1OqtTUb
2016-08-05 19:48:13 +05:30
Manish Goregaokar
446ac79054 Bug 1290864 - Omit the default closest-side when serializing circle() and ellipse(); r=xidorn
MozReview-Commit-ID: HKwOL0YAK5E
2016-08-05 19:48:13 +05:30
cku
bf6722fc83 Bug 652991 - Part 1. Carry local-url-flag in URLValueData. r=heycam
MozReview-Commit-ID: 8Qvaa27LCv0

--HG--
extra : rebase_source : 2635da5a05db20872577f35f7fd1385b58b7c194
2016-06-15 16:11:05 +01:00
Boris Chiou
39b242ab37 Bug 1272475 - Part 1: Clamp max/min float value in the parser of CSS Transform function. r=heycam
To avoid calculate +/-infinite function value, we clamp it in the parser level.
Also, we use EnsureNotNan while calculating the interpolation for translate
function, so it's also better to do EnsureNotNan before call SetFloatValue()
while calculating the interpolation for rotate (AddCSSValueAngle) and scale
functions.

MozReview-Commit-ID: 1k19ytyNG1N

--HG--
extra : rebase_source : 73f152b52e067d52a1925215ad78a4c5cc736fd7
2016-07-20 15:14:05 +08:00
Edgar Chen
7e21de3ed5 Bug 1274526 - Part 1: Implement support for 'q' absolute length units in CSS; r=heycam
MozReview-Commit-ID: vTDufVkAuv
2016-05-23 15:18:34 +08:00
Brian Birtles
0a4031e946 Bug 1263486 part 2 - Use nsCSSValue move assignment operator in nsCSSValue::Adopt(Pair)ListValue r=heycam
MozReview-Commit-ID: 2fTFNmtHxIP

--HG--
extra : rebase_source : b9ed5d5a19488a7d5a6b8b48a52e8619672c945b
2016-05-20 09:09:33 +09:00
Brian Birtles
7bf700da8b Bug 1263486 part 1 - Add a move constructor and assignment operator to nsCSSValue r=heycam
MozReview-Commit-ID: IgtvOuPqWge

--HG--
extra : rebase_source : 65db9f6e1cfce5b1ac711195c5cce7b43590170f
2016-05-20 09:09:28 +09:00
Cameron McCormack
d6732018a8 Bug 1273838 - Part 1: Make URLValue construction thread-safe. r=bholley
--HG--
extra : rebase_source : 2190da734a8a05089928114c8d80315406ad272f
2016-05-21 10:02:54 +10:00
Cameron McCormack
172aeab3d2 Bug 1272552 - Use more normal refcounting for css::ImageValue. r=bholley
--HG--
extra : rebase_source : 83aebd2b1350e0e5e26f6f00cf8d482e0c8bdd13
2016-05-21 10:02:53 +10:00
L. David Baron
5aafe1d979 Bug 567283 patch 4 - Support #rgba and #rrggbbaa colors in CSS. r=xidorn
This adds support for #rgba and #rrggbbaa colors to CSS.  This feature
is specified in https://drafts.csswg.org/css-color-4/#hex-notation .

This adds new types to nsCSSValue so that we can serialize the syntax
that was specified, as we do for other distinctions in how colors are
specified.

It does not change the behavior of the hashless color quirk, which
continues to support only 3 and 6 digit colors as specified in
https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk (step 4).

This changes property_database.js to remove various uses of 4 and 8
digit colors as invalid values.  It then adds them in slightly fewer
places as valid values, but more thoroughly testing both initial and
non-initial values on 'color'.

It marks two canvas tests explicitly testing this feature as no longer
known to fail by removing their .ini files.

Finally, it adjusts the web platform test testing the hashless color
quirk to no longer treat 4 and 8 digit colors with hashes as invalid
values.  Removing the relevant test items seems like the right thing
since they're in a section where 3 and 6 digit colors were skipped but
other lengths were tested.  Modifying this imported test is OK since:
  <jgraham> dbaron: Commit the change you want to m-c, it is
    (semi-)automatically upstreamed every so often (typically
    about once a week)

MozReview-Commit-ID: IFq4HxaRkil
2016-05-08 22:16:42 -07:00
Markus Stange
1a43349a44 Bug 550426 - Add support for {background,mask}-position-{x,y}, most of the style system changes. r=dbaron
MozReview-Commit-ID: JgZIoj43aZv

--HG--
extra : rebase_source : cf90a8cf7c10ee90f4c312b7ff5c1107aa8571f2
2016-04-29 14:12:10 -04:00
Wes Kocher
6521757101 Backed out 10 changesets (bug 550426) for failures in browser_css_autocompletion.js
Backed out changeset 6ff2e12738ca (bug 550426)
Backed out changeset 10ee68fd318e (bug 550426)
Backed out changeset 324f4f602730 (bug 550426)
Backed out changeset 81306e78ccaa (bug 550426)
Backed out changeset 44b820f6fb3d (bug 550426)
Backed out changeset 987b6ff7262e (bug 550426)
Backed out changeset d505646974c7 (bug 550426)
Backed out changeset 2162ecc18859 (bug 550426)
Backed out changeset 1a030aba3acc (bug 550426)
Backed out changeset 3655883e7faf (bug 550426)

MozReview-Commit-ID: AlUihrLtlhL

--HG--
rename : layout/reftests/backgrounds/background-position-6b.html => layout/reftests/backgrounds/background-position-6.html
2016-04-29 14:47:43 -07:00
Markus Stange
10d8636821 Bug 550426 - Add support for {background,mask}-position-{x,y}, most of the style system changes. r=dbaron
MozReview-Commit-ID: JgZIoj43aZv

--HG--
extra : rebase_source : 5c7663c042e6507f9979d769db26eef22dc8ba79
2016-04-29 14:12:10 -04:00
Daniel Holbert
ed653d2220 Bug 1264787: Make nsCSSValue's AdoptListValue & AdoptPairListValue methods take a UniquePtr. r=heycam
MozReview-Commit-ID: 94aYEtySHsW
2016-04-20 10:37:06 -07:00
Brian Birtles
26f427b48b Bug 1260655 - Allow StyleAnimationValue::UncomputeValue to produce values whose storage is independent of the passed-in computed value; r=heycam
When we go to switch CSS Animations over to using
KeyframeEffectReadOnly::SetFrames we will need a way to represent any filled-in
from/to values as nsCSSValue objects. These objects are built from the current
computed style. We currently use StyleAnimationValue::ExtractComputedValue for
this which returns a StyleAnimationValue. In order to convert this to an
nsCSSValue we can use StyleAnimationValue::UncomputeValue. However, in some
cases, the nsCSSValue objects returned by that method are dependent on the
passed-in StyleAnimationValue object.

This patch adds an overload to UncomputeValue that takes an rvalue
StyleAnimationValue reference and produces an nsCSSValue that is independent
of the StyleAnimationValue through a combination of copying data and
transferring ownership of data.

This patch also adjusts the return value for the case of filter and shadow
lists when the list is empty so that we return a none value in this case.
These are the only list types which are allowed to have a null list value.
Not only does this produce the correct result when these values are serialized
(the initial value for 'filter', 'text-shadow', and 'box-shadow' is 'none') it
also means that UncomputeValue should never return an nsCSSValue whose unit is
null which is important because when we later pass that value to BuildStyleRule
it will treat a null nsCSSValue as an error case (specifically, "longhand failed
to parse").

MozReview-Commit-ID: 4RoCn39ntiJ
2016-03-30 12:39:59 +09:00
Morris Tseng
99b819272d Bug 594933 - Part 1: Let calc() supports number. r=dbaron
--HG--
extra : commitid : HWZIwem6z6u
2016-03-15 10:37:37 +08:00
Nicholas Nethercote
6462925455 Bug 1244992 - Avoid double-counting in various refcounted types related to nsCSSValue. r=heycam.
Also, GridTemplateAreasValue::SizeOfIncludingThis() wasn't measuring |this|, so
the patch fixes that.

--HG--
extra : rebase_source : e3460dbcfd79daf08fa275e58a08e98a3a657f3c
2016-02-02 15:18:16 +11:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
CJKu
538b854ad1 Bug 686281 - Rename *background* to *imagelayer*; r=dbaron. 2016-01-28 06:27:00 +01:00
Cameron McCormack
ff6a816c75 Bug 1238403 - Fix inconsistent indenting in layout/style/. r=xidorn 2016-01-11 10:28:35 +11:00
Mats Palmgren
0b1a56d480 Bug 1233106 part 1 - [css-align] Update align-/justify-* properties to the current CSS Align spec (adding 'normal' keyword, dropping 'auto' in some cases etc). r=dholbert
The CSSWG minutes for reference:
https://lists.w3.org/Archives/Public/www-style/2015Dec/0233.html

With subsequent correction for the root node:
https://lists.w3.org/Archives/Public/www-style/2016Jan/0015.html
2016-01-05 21:27:13 +01:00
Mats Palmgren
c6af622ba4 Bug 1230398 - [css-align] Don't output 'unsafe' in serialization because it's the default. r=dholbert
Prompted by a CSS Align spec change:
https://lists.w3.org/Archives/Public/www-style/2015Dec/0067.html
2016-01-05 21:27:13 +01:00
Mats Palmgren
b600a402ec Bug 1230478 part 1 - [css-align] Rename 'true' to 'unsafe' in <overflow-position>. r=dholbert 2016-01-05 21:27:13 +01:00
Mats Palmgren
781441cd1d Bug 1118820 part 1 (style system part) - [css-grid] Implement the 'auto-fill' and 'auto-fit' keywords in the repeat() function. r=dholbert 2015-12-22 23:03:15 +01:00
Nicholas Nethercote
ddc78c3b0c Bug 1229458 - Remove SizeOfIncludingThisMustBeUnshared() from string classes. r=mccr8.
The patch changes all uses of SizeOfIncludingThisMustBeUnshared() to
SizeOfIncludingThisIfUnshared(). This incurs the (tiny) cost of an unnecessary
IsReadonly() check for guaranteed-unshared strings, but avoids the possible
assertion failures that would occur when MustBeUnshared() was used incorrectly
on shared strings, which is an easy mistake to make.

--HG--
extra : rebase_source : b1e91f1c19bcbe0521b0ce461d6c90512ca938ef
2015-12-01 15:36:26 -08:00
Xidorn Quan
e33deb9306 Bug 1040668 part 2 - Parse and compute text emphasis properties. r=dbaron
--HG--
extra : source : 354f4bd8c87646dfbe0a307e0fa140c630dbdb89
2015-11-28 11:56:33 +11:00