Commit Graph

71 Commits

Author SHA1 Message Date
Mats Palmgren
b602620a6a Bug 788836 - Simplify @-keyword parsing by letting ParseAtKeyword deal with everthing after the @. Make it pass the first char to GatherIdent so that it returns false for a bad escape sequence at the start. r=dbaron 2012-09-12 00:20:52 +02:00
Daniel Holbert
f8dfa24152 Bug 789382: Change nsIScriptError methods init() and initWithWindowID() to take nsAString, rather than wchar / PRUnichar*. r=bz sr=bsmedberg 2012-09-09 16:29:12 -07:00
Ehsan Akhgari
8c296bbcd4 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
4c54d98fcb Bug 782252 - Change named constants to correct types; r=ehsan 2012-08-07 18:11:35 +03:00
Cameron McCormack
78727e2c15 Bug 649740 - Implement @supports. r=dbaron,bz 2012-08-02 10:32:12 +10:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Kang-Hao (Kenny) Lu
74ab6d1729 Bug 752230 - Disallow control characters above 0x7e in CSS unquoted url() tokenization. r=dbaron 2012-05-14 19:01:05 -04:00
Jacob Holzinger
86f648606c Bug 696242 - Convert NS_RegisterStaticAtoms and nsCSSScanner::ReportUnexpectedParams to take an array-reference rather than a pointer and length, making it impossible to pass a pointer/length that are inconsistent. r=jwalden
--HG--
extra : rebase_source : 882b5b4d500b1fa242c0a3cfa3084e4171cbaa9d
2012-03-08 18:22:57 -08:00
Zack Weinberg
dc30af584b Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
aceman
42a71aa907 Bug 711721 - merge nsIScriptError and nsIScriptError2 interfaces; r=neil, sr=bzbarsky 2011-12-21 16:51:29 -05:00
Zack Weinberg
7ef69cf55a Bug 659963: consistently use infallible malloc in the CSS parser. r=dbaron 2011-05-28 15:38:48 -07:00
Zack Weinberg
432b298661 Bug 543151 part 2: Remove the special (but inconsistent with the error console) handling of hard tabs; small tidiness tweaks. r=dbaron 2011-05-19 15:44:14 -07:00
Zack Weinberg
6f73ba4b1a Bug 543151 part 1: Remove stream-processing code from nsCSSScanner.cpp. r=dbaron 2011-05-18 10:33:16 -07: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
Jeff Walden
b7753477cf Bug 693469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc. These will go away when the relevant compilers have C++11 constexpr support.) r=cjones
--HG--
extra : rebase_source : b4bae9a0f85abf2feb828609b50e756916b99a6f
2011-10-10 22:50:08 -07:00
Jeff Walden
eb2cb918a4 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden
77ebbde4ab Bug 639469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. r=cjones
--HG--
extra : rebase_source : 860a8271bf7e51cde358f2a4185c410de1fc2960
2011-10-10 22:50:08 -07: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
Mihai Sucan
726b8bb058 Bug 670896 - Add inner window ID and timestamp to nsIScriptError2; r=bzbarsky 2011-08-24 23:44:35 +03:00
Masayuki Nakano
85c451e309 Bug 660121 Remove all pref related methods from nsContentUtils r=roc 2011-05-29 08:42:57 +09:00
Masayuki Nakano
060287addd Bug 659533 Replace nsContentUtils::GetBoolPref() with Preferences::GetBool() r=roc 2011-05-25 15:31:59 +09:00
L. David Baron
8b0a4909bc Only allow escaped newlines inside strings (which includes url() tokens that contain strings). (Bug 384672, patch 4) r=bzbarsky 2011-05-03 13:19:19 -07:00
L. David Baron
2887557e92 Allow ParseAndAppendEscape to fail when the stream does not contain an escape, and make callers handle this failure appropriately. This changes our behavior when backslash immediately precedes end-of-stream. (Bug 384672, patch 3) r=bzbarsky 2011-05-03 13:19:19 -07:00
L. David Baron
13f8891b62 Handle failure of GatherIdent, which can (starting with the next patch) fail when the character sequence is not an identifier. Additionally, change the tokenization of a hash (#) followed by a non-name character or EOF to tokenize as DELIM (eCSSToken_Symbol) rather than as eCSSToken_Hash. This only changes the behavior in the EOF case, because the only caller (color parsing) that accepts eCSSToken_Hash (rather than only eCSSToken_ID) checks the length. (Bug 384672, patch 2) r=bzbarsky 2011-05-03 13:19:19 -07:00
L. David Baron
0099793035 Pass whether we're in a string to ParseAndAppendEscape. (Bug 384672, patch 1) r=bzbarsky
This passes true for string tokens and for url() tokens containing
string, since that is what CSS 2.1 chapter 4's tokenization suggests.
2011-05-03 13:19:18 -07:00
Masatoshi Kimura
9741535413 Bug 650653 - Fix test_ident_escaping.html and test_parse_ident.html when using DBCS locales. r=dbaron 2011-04-17 23:13:15 +02:00
L. David Baron
34651d06fe Include the opening "url(" in URL and Bad_URL tokens (though the latter do not have a close paren), and make tokenization of url() function be noncontextual, as required by CSS. (Bug 604179, patch 7) r=bzbarsky
Note that tokenization of url-prefix() and domain() remains contextual.

Needed to help CSS 2.1 meet Proposed Recommendation entrance criteria.
2011-03-11 11:29:45 -06:00
L. David Baron
62b1274403 Include the close parenthesis in the URL token and make quoted URLs produce URL tokens rather than string tokens. (Bug 604179, patch 6) r=bzbarsky 2011-03-11 11:29:45 -06:00
L. David Baron
d2fff89944 Disallow control characters less than space inside unquoted url(), per spec. (Bug 604179, patch 5) r=bzbarsky 2011-03-11 11:29:44 -06:00
L. David Baron
d03d993c7b Fix incorrect indentation in nsCSSScanner::NextURL. (Bug 604179, patch 4) r=bzbarsky 2011-03-11 11:29:44 -06:00
L. David Baron
0041c7ae2e Move the consumption of beginning whitespace (for all forms) and ending whitespace (for the string form) inside url() into the tokenizer. (Bug 604179, patch 3) r=bzbarsky 2011-03-11 11:29:44 -06:00
L. David Baron
866f3aece4 Rename CSS tokens to be closer to the names of newly-added tokens (BAD_STRING, BAD_URI) in the CSS 2.1 tokenization. (Bug 604179, patch 2) r=bzbarsky 2011-03-11 11:29:44 -06:00
Mihai Sucan
215e61a4b2 Bug 606498 - Make sure the new nsIScriptError2 is used in all possible places- part 3; r=bzbarsky,dbaron,mrbkap sr=jst a=blocking2.0 2010-12-20 12:21:59 -04:00
Robert Longson
d796beb26c Bug 489871 - CSS comments should not be allowed in presentation attribute values. r=dbaron a=roc
--HG--
extra : rebase_source : 7a41fca1422a024934839ebe0c50cc479223915f
2010-12-05 20:37:39 +00:00
L. David Baron
49f1f3b4d7 Accept PR_INT32_MIN as an integer in CSS. (Bug 602890) r=bzbarsky a2.0=roc 2010-10-17 19:36:26 -07:00
L. David Baron
f13a8c3dc3 Make NBSP an identifier character per resolution of CSS 2.1 issue 196. (Bug 591589) r=bzbarsky a2.0=roc 2010-09-18 11:43:17 -07:00
Mitchell Field
6ad77bd6db Bug 564950 - Make more use of mozilla::services, r=surkov, jst, neil, smontagu, roc, joshmoz, gavin, shaver 2010-05-14 18:24:41 +09:00
Alfred Kayser
611bb071bf Bug 399495: nsCSSScanner: absorb the '(' when returning a FUNCTION token. r=dbaron 2010-01-27 16:20:04 -08:00
Zack Weinberg
a1d38cb54a Bug 522292: Make the table of character properties in nsCSSScanner.cpp a compile-time constant. 2009-10-15 13:18:21 -07:00
Alfred Kayser
66279e7fa9 Bug 483977 - nsCSSScanner: Simplify IsDigit. r+sr=dbaron 2009-09-04 14:25:27 +02:00
Zack Weinberg
63e2075a2a Bug 443976: Parsing support for the unicode-range: descriptor in @font-face. r=dbaron 2009-08-20 14:52:47 -07:00
L. David Baron
7cff5f8599 Rewrite parsing of CSS url() function to make it more like the tokenization that's described in the spec. (bug 476856, though originally written for bug 337287) r=bzbarsky 2009-08-05 17:45:49 -07:00
Boris Zbarsky
7888c9702c Bug 503467. Rearrange the code a bit in ParseNumber to make it more readable. r=dbaron 2009-07-22 21:35:07 -04:00
Boris Zbarsky
8b41141f11 Bug 498559 followup to clean up the code. r=dbaron 2009-07-09 20:36:57 -07:00
Boris Zbarsky
7382b846b1 Bug 498559. Speed up tokenizing numbers in CSS. r+sr=dbaron 2009-07-09 18:44:20 -07:00
Alfred Kayser
5be50b1a31 Bug 483971 - nsCSSScanner: cleanup of EatWhiteSpace and removal of EatNewline. r+sr=dbaron 2009-04-09 08:46:26 +02:00
Boris Zbarsky
1de330b786 Backed out changeset 3c687f3d4ff4 (bug 482971) on suspicion of causing intermittent leak orange. 2009-04-09 11:58:40 -04:00
Alfred Kayser
894d7a59e8 Bug 483971 - nsCSSScanner: cleanup of EatWhiteSpace and removal of EatNewline. r+sr=dbaron 2009-04-09 08:46:26 +02:00
L. David Baron
302859c42e Avoid recursion after parsing CSS comments. (Bug 473914) r+sr=bzbarsky 2009-01-16 19:44:21 -08:00