Commit Graph

90 Commits

Author SHA1 Message Date
David Zbarsky
2c3499b66c [Bug 847110] Fix up includes in layout/style r=dbaron 2013-03-02 19:31:48 -05:00
Zack Weinberg
f03df97325 Bug 842134: fix serialization of unquoted url() in CSS. r=heycam 2013-02-17 22:03:55 -05:00
Zack Weinberg
324e50ea81 Bug 543151, part A4: unify the inner text-scanning loops used by GatherIdent, ScanString, NextURL. r=heycam 2013-02-16 18:27:53 -05:00
Zack Weinberg
59b9cbc048 Bug 543151, part A3: convert the scanner to use peek/advance. r=heycam 2013-02-16 18:27:53 -05:00
Zack Weinberg
781c8690dc Bug 543151, part A2: Introduce the new peek/advance API and reimplement the old read/pushback API on top of it. r=heycam 2013-02-16 18:27:53 -05:00
Zack Weinberg
ad3efbd714 Bug 543151, part A1: Preliminary cleanups to the scanner/parser interface and the organization of nsCSSScanner.cpp. r=heycam 2013-02-16 18:27:53 -05:00
L. David Baron
4a936c7846 Bug 836530: Make all non-ASCII characters be CSS identifier characters. r=bzbarsky
This is as was proposed in
http://lists.w3.org/Archives/Public/www-style/2013Jan/0394.html
and resolved in the CSS Working Group's teleconference on 2013-01-30.

This removes a difference between Gecko and other browsers.
2013-01-31 20:09:47 -08:00
Mats Palmgren
6c53161814 Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
Zack Weinberg
576dd3ca60 Bug 413958: report the text of the offending line in CSS error messages. r=dbaron 2013-01-11 12:27:43 -05:00
Zack Weinberg
0af062aa68 Bug 229827: escape unprintable characters in CSS parser diagnostics. r=dbaron 2012-11-16 21:53:38 -05:00
Ryan VanderMeulen
401bd9646a Backed out changesets b242651c3c1b (bug 229827), b36eaac9ecf8, and 40f38a8aa660 (bug 663291) for mochitest-3/4 failures.
CLOSED TREE
2012-11-16 16:59:38 -05:00
Zack Weinberg
dd6833d56d Bug 229827: escape unprintable characters in CSS parser diagnostics. r=dbaron
--HG--
extra : rebase_source : 9298095c2cd7669b5ca1a07cd5378a852c4a7f36
2012-11-16 15:29:21 -05:00
Zack Weinberg
6f19a5ae15 Bug 455839: simplify the CSS error reporting API. r=dbaron 2012-11-15 11:36:15 -05:00
Zack Weinberg
faabfb1d5b Bug 516091: Split CSS error reporting to its own file and class. Allows CSS scanner to become a stack object. r=dbaron 2012-11-15 11:36:15 -05:00
Jacek Szpot
0b35b0e3d8 Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Seth Fowler
9da16cb6df Bug 786108 - Cache UTF-16 version of URI to prevent repeated conversions in the CSS scanner, and free the cache after a short time. r=bz 2012-10-03 15:28:57 -07:00
Ed Morley
7012ae5306 Backout ec0dcd401a3f (bug 786108) for crashes 2012-09-28 22:04:56 +01:00
Seth Fowler
2c3af5ccdc Bug 786108 - Cache UTF-16 version of URI to prevent repeated conversions in the CSS scanner, and free the cache after a short time. r=bz 2012-09-28 09:56:47 -07:00
Isaac Aggrey
997db4d142 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Mats Palmgren
abc5b5999b 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
f32f6b5f8b 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
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
1091dc5149 Bug 782252 - Change named constants to correct types; r=ehsan 2012-08-07 18:11:35 +03:00
Cameron McCormack
d7f2d311ed Bug 649740 - Implement @supports. r=dbaron,bz 2012-08-02 10:32:12 +10: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
Kang-Hao (Kenny) Lu
042b8a4cdd Bug 752230 - Disallow control characters above 0x7e in CSS unquoted url() tokenization. r=dbaron 2012-05-14 19:01:05 -04:00
Jacob Holzinger
acfe99c129 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
15a9a210d0 Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
aceman
eb3ebc1fc0 Bug 711721 - merge nsIScriptError and nsIScriptError2 interfaces; r=neil, sr=bzbarsky 2011-12-21 16:51:29 -05:00
Zack Weinberg
572b6a6160 Bug 659963: consistently use infallible malloc in the CSS parser. r=dbaron 2011-05-28 15:38:48 -07:00
Zack Weinberg
d11be7aa44 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
445c0fa6a5 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