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

211 Коммитов

Автор SHA1 Сообщение Дата
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
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Gijs Kruitbosch 7bd6711292 Bug 1207084 - addendum: fix operator== for nsCSSValueTokenStream, implied-r=heycam
--HG--
extra : commitid : D5IOMZ3yab0
extra : rebase_source : 44941f108bc6953310c817ac19189cb9b275761f
2015-09-29 09:21:12 -04:00
Gijs Kruitbosch 8884b0618e Bug 1207084 - keep sheet level on tokenstream for use in ruledata when resolving variables, to fix hcm issues with CSS variables, r=heycam
--HG--
extra : commitid : LOEulYWs1jS
extra : rebase_source : b9741e3bc6a4a762a2f6295d8d81069aca66745f
extra : amend_source : 13dd115d63546f57127fe65163c2aaacf8c6b043
2015-09-26 23:51:42 +02:00
Seth Fowler 59f5f53a8b Bug 1181907 (Part 3) - Add CSSVariableImageTable and use it to store ImageValues generated by CSS variables. r=heycam 2015-08-26 18:19:38 -07:00
Masatoshi Kimura 52428897a6 Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Masatoshi Kimura 6c8654865c Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Michael Layzell e3c4a77234 Bug 1168154 - Mark refcounted members of nsCSSValue::mValue as MOZ_OWNING_REF. r=heycam
--HG--
extra : rebase_source : b812e9ef0e5da1cf3a3e719125ca068f55006ee7
2015-05-25 10:47:00 -04:00
Michael Layzell 6fd724199e Bug 1168156 - Remove unused nsCSSValueTokenStream::mSheet. r=heycam 2015-05-28 09:02:00 -04:00
Michael Layzell 4a41f5a065 Bug 1168158 - Make URLValue::mString a smart pointer. r=heycam 2015-05-28 08:54:00 -04:00
Ehsan Akhgari ff4f580968 Bug 1158540 follow-up: Improve the comment
DONTBUILD
2015-04-27 09:17:24 -04:00
Ehsan Akhgari c7febd7a07 Bug 1158540 - Don't repeat the mRefCnt member of URLValue in ImageValue; r=dbaron
Even after this patch, it's not OK to AddRef an ImageValue and then call
Release on its base pointer (URLValue) since URLValue refcounting methods
are not virtual, so it would confuse the leak checker, but at least it
wouldn't cause UAF issues since we'd still be looking at the same mRefCnt
member.
2015-04-25 18:38:24 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Ehsan Akhgari 4354953b4f Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Dirk Schulze 123849abdb Bug 1074528 - Implement parsing/computing of inset(). r=dbaron 2014-11-22 05:28:00 +01:00
Rik Cabanier 85aa244222 Bug 1074056 - Part 1 - Add support for interpolation hints to CSS gradients. r=dbaron 2014-10-22 14:24:00 +02:00
L. David Baron 87f367b612 Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky
--HG--
extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B
2014-10-19 23:31:39 -04:00
Dirk Schulze 62628a69a2 Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze a028173cff Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Xidorn Quan f69d6b2935 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-25 02:19:00 +02:00
Carsten "Tomcat" Book 84fa1ee595 Backed out changeset d53b25dcf2d7 (bug 966168) for causing bustage 2014-09-25 09:40:40 +02:00
Xidorn Quan e94396781f Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-24 15:32:00 +02:00
Daniel Holbert 5a3b69a27a Bug 1063775, part 2: Document nsCSSValue*List::Clone() as being infallible, and remove null-checks on its result. r=dbaron 2014-09-17 22:04:20 -07:00
Ehsan Akhgari 2b84010cb8 Bug 1048246 - Fix more bad implicit constructors in layout; r=roc
--HG--
extra : rebase_source : ed828993139bc70232508364a9f046e38b7d3e06
2014-08-07 19:48:38 -04:00
Jonathan Kew 2f49b70d25 bug 1028136 - Remove dangerous public destructor of FontFamilyList. r=jdaggett 2014-07-30 09:15:00 +01:00
Ms2ger bad4ca4d29 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00