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

240 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan 404a4a6ca2 Bug 1345804 part 2 - Add new AtomIdent unit to nsCSSValue. r=heycam
MozReview-Commit-ID: 4Qc3POvHrJg

--HG--
extra : rebase_source : 80b4ca720db36d47fc0b9e69bd6c4f03de758ce2
2017-03-10 15:53:56 +11:00
Xidorn Quan ce71746090 Bug 1315601 part 1 - Move type_traits include down in nsCSSValue.h. r=heycam
MozReview-Commit-ID: 9ptq7e7NlSB

--HG--
extra : rebase_source : c73bec7d8ec0a86d8cc71b36f3c4b032afb40248
2017-02-22 15:04:30 +11:00
cku 35c9e03f96 Bug 1345377 - Implement URLValueData::HasRef. r=heycam
Improve code readability.

MozReview-Commit-ID: HDJ7TeyqCpN

--HG--
extra : rebase_source : 228b5915fcf002b8f27283b9d0df4bf2b544b2f1
2017-03-07 17:31:48 +08:00
Hiroyuki Ikezoe 287d10e9c5 Bug 1332657 - Part 2: Implement clone_transform. r=heycam,manishearth
The implementation of clone_transform is an adaptation of set_transform.

MozReview-Commit-ID: ESE1ha0x666
2017-02-03 14:41:29 +09:00
Xidorn Quan a4755c4187 Bug 1326125 - Rename enum version of SetIntValue to SetEnumValue. r=heycam
MozReview-Commit-ID: EbXK827IRFP

--HG--
extra : rebase_source : 3ee8247c211aeff6fae35168f968f0c2d20bb3e1
2016-12-29 10:22:49 +11:00
Andrew McCreight fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd 826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Manish Goregaokar c34e67ff4d Bug 1314200 - stylo: support transform; r=heycam
MozReview-Commit-ID: 50YhZtjF3vH

--HG--
extra : rebase_source : 9aaf3f1bdd317c8c0e541a5ff6ff6d734a3e3f32
2016-10-31 16:30:43 -07:00
Tobias Schneider 5b2ef3c1db Bug 1243846 - Implement Intersection Observer API. r=mrbkap, r=mstange 2016-10-28 10:24:00 -04:00
Cameron McCormack 2216900ad3 Bug 1288302 - Part 3: Add nsStyleImageRequest. r=xidorn,bholley
MozReview-Commit-ID: F763Dv0Nfzp
2016-10-20 08:36:21 +08:00
Cameron McCormack 9cc773db64 Bug 1288302 - Part 1: Make css::ImageValue constructable OMT. r=xidorn
MozReview-Commit-ID: 9J2E7VrCWJ1
2016-10-20 08:36:14 +08:00
JerryShih 158cde6c2f Bug 1295456 - Support <angle> value for hue component in CSS hsl() color function. r=dholbert
MozReview-Commit-ID: EYhbAEOlpLm

--HG--
extra : rebase_source : 3b898452000ea5f0f0f1819dac2d93d0a6d1c426
extra : histedit_source : a929cf0e25b0035218c4ea61abfc9135a05def15
2016-10-16 03:15:36 +08:00
Cameron McCormack 5ed807d5a2 Bug 1298774 - Part 3: Copy helper functions from FragmentOrURL to URLValueData. r=cjku
MozReview-Commit-ID: 9gs8d0fMdYJ

--HG--
extra : rebase_source : 18d4ad350d529c4da9188f8c7ff6a2cece9273c8
2016-10-11 14:56:11 +08:00
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
Cameron McCormack 824f7797b6 Bug 1298774 - Part 0: Move refcounting from URLValue and ImageValue up to URLValueData. r=cjku
MozReview-Commit-ID: 9A2pAnHaBVD

--HG--
extra : rebase_source : 43bbb685c65abc733011b63ad7f56874b10b3f8d
2016-10-11 14:56:11 +08:00
Xidorn Quan ea44b70aba Bug 1266621 part 4 - Remove constructors of StyleComplexColor. r=heycam
So that they can be put inside anonymous structs and unions.

MozReview-Commit-ID: 8OMxkSZJEOz

--HG--
extra : rebase_source : 9626d350649f4ba6dba597e3df05fe1829307610
2016-09-27 14:00:05 +10: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
Jeremy Chen 722ad026a3 Bug 1297306 - part4:rename IsEnumFittingWithin with EnumTypeFitsWithin and move it to mfbt/EnumTypeTraits.h. r=froydnj
With this change, we could share this EnumTypeTraits between files easily.

MozReview-Commit-ID: 9Q2augati7l

--HG--
extra : rebase_source : b7d9fc95d9d7722ba3eb99ec9798a64ebdbeb484
2016-09-07 10:20:16 +08: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 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
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
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
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
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
Cameron McCormack 9f39a5920a Bug 1290023 - Allow enum class values to be passed to other nsCSSProps methods and stored in nsCSSValue/StyleAnimationValue. r=xidorn
MozReview-Commit-ID: 62usVamI3GA
2016-07-29 16:18:48 +08: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
Brian Birtles 7dbb4e5cf3 Bug 1276688 part 2 - Add tests for entries array handling when ComputeValues fails; r=heycam, r=smaug
MozReview-Commit-ID: DIQyt7f91an
2016-06-28 16:10:10 +09: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 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
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
Mats Palmgren ed62d7ab53 Bug 1251999 - [css-grid] Update <fixed-size> parsing to the latest spec. r=dholbert 2016-03-02 23:39:34 +01:00
Jonathan Watt d4faa9c0c1 Bug 1110460, part 1 - Add operator= to nsCSSValuePair. r=dholbert 2016-02-17 00:19:26 +00:00
William Chen 96cc20f039 Bug 1241575 - Use transform property syntax to parse WebKitCSSMatrix transform list. r=heycam 2016-02-01 16:45:09 -08:00
Daniel Holbert b815ec9014 Bug 1227377: Change ImageRequest::mRequests hashtable to use more specific type in its key (s/nsISupports/nsIDocument/). r=khuey 2015-11-27 14:54:47 -08:00
Mats Palmgren 6e2478df90 Bug 1221902 part 1 - NS_RELEASE SheetLoadData::mNext iteratively instead of recursively to avoid blowing up the stack. r=bz 2015-11-05 22:09:27 +01:00
Mats Palmgren cb1d1d16b1 Bug 1176782 part 1 - [css-align] Implement the 'justify-items' property in the style system. r=SimonSapin 2015-11-03 15:18:05 +01:00
Cameron McCormack 2f1046d287 Bug 1216043 - Rename nsStyleSheet::sheetType and make it an enum class. r=dbaron
The only substantive change here, apart from a few variables changing in
size from uint16_t to uint8_t, is FontFaceSet's use of SheetType::Unknown
(0xFF) instead of 0 for FontFaceRecords for script-created FontFaces.
2015-10-20 10:16:20 +11:00