Commit Graph

37 Commits

Author SHA1 Message Date
Nicholas Nethercote
6ee3666899 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
8413cc973c Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
3629781b69 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
b6e35bb4b4 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
Cameron McCormack
a2a8c92c86 Bug 649145 - Store properties on nsCSSCompressedDataBlocks in declaration order. r=dbaron 2014-12-19 14:32:34 +11:00
Cameron McCormack
efeaf8eada Bug 985838 - Change custom property name prefix from "var-" to "--" and allow identifiers to begin with "--". r=dbaron 2014-04-02 14:32:16 +11:00
Cameron McCormack
29ef1c10ec Bug 731271 - Part 4: Add ability for nsCSSValues to serialize themselves in their original syntactic form. r=dbaron 2013-09-16 09:35:49 +10:00
Cameron McCormack
f6672247c2 Bug 955913 - Look up custom property names in a Declaration correctly. r=dbaron 2014-01-02 16:33:57 +11:00
Cameron McCormack
44dcde583f Bug 773296 - Part 23: Support variables in CSSStyleDelcaration methods. r=dbaron
This adds support for custom properties on the remainder of the
CSSStyleDeclaration methods.

A shorthand that was specified using a variable reference is serialized
to its originally specified value, rather than by concatenating the
serializations of its longhand components.

A shorthand that was not specified using a variable references but which
has a component longhand that was is serialized to the empty string.
2013-12-12 13:09:46 +11:00
Cameron McCormack
1d90c6a110 Bug 773296 - Part 5: Map variables on a Declaration to nsRuleData. r=dbaron
This adds a CSSVariableDeclarations object to nsRuleData and adds a
MapRuleInfoInto function to CSSVariableDeclarations so the can copy
variable declarations into a nsRuleData's object.  We call that from
Declaration::Map{Normal,Important}RuleInfoInto.

We make HasImportantData return true if we have important variables
but no important non-custom properties on a declaration, since that
is used to determine whether we have a rule node for important
declarations.  This means MapImportantRuleInfoInto can no longer
assume that mImportantData is non-null.
2013-12-12 13:09:41 +11:00
Cameron McCormack
5edbefbd77 Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>

This defines a CSSVariableDeclarations class that holds a set of
variable declarations.  This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have).  The variables are stored in a hash table.  Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").

Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations.  So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties.  mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.

We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.

The changes to nsCSSParser are straightforward.  Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration.  We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 13:09:40 +11:00
Trevor Saunders
e59057dee7 bug 659722 - remove _IMPL_NS_LAYOUT r=bz 2013-03-16 00:31:38 -04:00
Catalin Iacob
4f03e5bb1a Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
John Daggett
698f1eb124 Bug 833624. Bump up size of int's in mOrder to allow more than 256 CSS properties. r=dbaron 2013-01-24 02:24:27 +09:00
Boris Zbarsky
8b4fc28fc2 Bug 753517 part 3. Expose the API needed for Paris bindings on nsDOMCSSDeclaration and nsICSSDeclaration. r=dbaron,peterv 2012-08-23 21:08:08 -07:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jonathan Watt
83728fb808 Bug 721920 - Honor the 'lang' and 'xml:lang' attributes in SVG as we do in HTML. r=bz. 2012-02-19 20:49:34 +00:00
Nicholas Nethercote
2806f8e46a Bug 671299 (part 3) - Add style sheet memory reporters. r=dbaron. 2012-01-02 18:19:14 -08:00
Jeff Walden
841701c767 Bug 711647 - Add MOZ_DELETE to a bunch of deliberately-not-implemented methods across the tree. r=dbaron
--HG--
extra : rebase_source : 507006c0f099da6851b585d2062267d285978ad7
2011-12-16 14:42:07 -05:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
L. David Baron
7eb858b4c6 Fix css3-animations handling of properties that are not present in all keyframes to match WebKit and generally be more sensible. (Bug 649400) r=bzbarsky
This inverts the relationship between segments and properties in the
animation data structures:  now each property has a set of segments,
since the segments differ between properties.

Furthermore, we now handle inability to interpolate between values by
dropping the entire property rather than dropping a single segment.
2011-04-22 18:36:23 -07:00
Ehsan Akhgari
1bd8b7c9e7 Bug 613130 - Don't sanitize style nodes and attributes in the sanitizing parser if we have not found any unsafe properties; r=roc,bzbarsky a=blocking-final+ 2010-11-24 13:31:52 -05:00
Zack Weinberg
56198f48ed Bug 576044 (11/12): Make all assertions fatal in Declaration.h, Declaration.cpp, nsCSSDataBlock.h, nsCSSDataBlock.cpp, nsCSSValue.h, nsCSSValue.cpp, nsCSSProps.h, and nsCSSProps.cpp. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg
33b5fbfe1b Bug 576044 (8/12): remove the last MoveValue call from the CSS parser. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg
c400e27e25 Bug 576044 (7/12): cleanup pass on css/Declaration.{h,cpp} and nsCSSDataBlock.{h,cpp}. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg
bc4afbe28a Bug 576044 (6/12): remove vestiges of nsCSSType. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg
d32d8b4b6e Bug 338679: mark style declarations immutable if they are stringified. r=bzbarsky a=dbaron 2010-08-02 15:40:35 -07:00
Zack Weinberg
a6b8c9b603 Bug 569719 part 16: Don't refcount declarations and data blocks; don't have style rules hold direct pointers to data blocks. r+a=dbaron 2010-07-23 11:00:52 -07:00
Zack Weinberg
b8130b3679 Bug 569719 part 15: Always copy the entire css::Declaration before changing it in any way. r=dbaron 2010-07-23 11:00:49 -07:00
Zack Weinberg
bfd2ecb93e Bug 569719 part 11: take the fast path in ParseProperty for !important replacing !important, as well as normal replacing normal. r=dbaron 2010-07-23 11:00:39 -07:00
Zack Weinberg
6873de67ec Bug 569719 part 9: remove return value from css::Declaration methods that always return NS_OK, and change GetCSSDeclaration to return a css::Declaration instead of an nsresult. r=dbaron 2010-07-23 11:00:34 -07:00
Zack Weinberg
b9547bdd5e Bug 569719 part 7: Add AppendToString methods to nsCSSRect and friends as well, replacing Declaration::AppendStorageToString. r=dbaron 2010-07-23 11:00:29 -07:00
Zack Weinberg
b87b69a229 Bug 569719 part 6: Move Declaration::AppendCSSValueToString into nsCSSValue. r=dbaron 2010-07-23 11:00:27 -07:00
Zack Weinberg
76dbdde0f4 Bug 569719 part 2: Move headers for the former nsCSSLoader and nsCSSDeclaration into mozilla/css/. r=dbaron
--HG--
rename : layout/style/nsCSSDeclaration.cpp => layout/style/Declaration.cpp
rename : layout/style/nsCSSDeclaration.h => layout/style/Declaration.h
rename : layout/style/nsCSSLoader.cpp => layout/style/Loader.cpp
rename : layout/style/nsCSSLoader.h => layout/style/Loader.h
2010-06-28 15:49:35 -07:00