Commit Graph

767 Commits

Author SHA1 Message Date
Seth Fowler
4d05af86ea Bug 811391 - Part 1: Ignore @page declarations involving viewport units. r=dbaron 2013-01-09 16:03:55 -08:00
John Daggett
fe983be1cc Bug 605231 - Don't parse unquoted reserved keywords 'initial' or 'default' in font family names. r=dbaron 2013-01-08 17:13:17 +09:00
John Daggett
69561f8ae3 Bug 605231 - Move transform parsing code out of font property parsing code. r=dbaron 2013-01-08 17:13:17 +09:00
Cameron McCormack
df75460fb8 Bug 779917 - Implement CSS.supports(). r=dbaron f=bz 2012-11-25 11:26:07 +11:00
Makoto Kato
eaa651ac88 Bug 824654 - Remove duplicated class define to fix bustage on Win64 builder. r=heycam 2012-12-26 13:44:12 +09:00
Cameron McCormack
6550289df6 Bug 814566 - Allow invalid syntax (with balanced parentheses) inside @supports conditions. (v1.1.1) r=dbaron 2012-12-23 13:30:55 +11:00
Cameron McCormack
fb807cea7c Bug 807336 - Suppress CSS property parse errors inside failing @supports rules. r=dbaron 2012-11-06 13:59:25 +11:00
Jeff Walden
120886ca73 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Cameron McCormack
557949bf7e Bug 815021 - Implement MediaRule.conditionText setter. r? 2012-11-27 16:30:31 +11:00
Ms2ger
332116e1c8 Bug 812344 - Don't use a qualified enum in CSSParserImpl::ParseDeclaration; r=roc 2012-11-16 08:30:18 +01:00
Zack Weinberg
b63ce42eb9 Bug 455839: simplify the CSS error reporting API. r=dbaron 2012-11-15 11:36:15 -05:00
Zack Weinberg
662e668d9f 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
Brendan Dahl
6adcd0523c Bug 115199 - CSS2 @page rule style support. r=dbaron 2012-08-31 14:21:28 -07:00
Ryan VanderMeulen
9cb0f91d55 Backed out changesets 0b6b3d2856a4 and 30776e402787 (bug 115199) for reftest failures. 2012-11-13 20:19:18 -05:00
Brendan Dahl
ec5ca0d279 Bug 115199 - CSS2 @page rule style support. r=dbaron 2012-08-31 14:21:28 -07:00
Daniel Holbert
bc2b8feb07 Bug 790903: Accept unitless 0 as 'flex-basis' component in 'flex' shorthand. r=dbaron 2012-11-08 17:27:47 -08:00
Jet Villegas
1958bd71d6 Bug 806068 part 1: Add support for unprefixed "initial" keyword in CSS (retaining prefixed keyword as an alias, for now). r=dholbert 2012-10-30 16:40:33 +01:00
Seth Fowler
ed0c222ddd Bug 503720: Implement vw/vh/vmin/vmax. r=dbaron 2012-10-19 16:21:06 -07:00
Emmanuele Bassi
c8c63750f6 Bug 784466 - [css3-animations] Drop declarations in keyframe rules that have !important. r=dbaron 2012-10-16 09:21:35 -07:00
Yu-Sian (Thomasy) Liu
e7b15a81a9 Bug 594935: Add calc to parser, do calc in PaintGradient and add stop point to HasCalc(). r=bz 2012-10-03 22:31:56 -07:00
Simon Montagu
13c3b3bdbc Add vendor prefix to :dir selector. Bug 562169, r=dbaron 2012-09-29 13:41:10 -07:00
L. David Baron
550706a221 Bug 774169, patch 4: Revert bug 719054 for prefixed -moz-transform but leave it for unprefixed transform. r=bzbarsky 2012-09-18 11:37:14 -07:00
L. David Baron
c3051f8b6a Bug 774169, patch 3: Treat -moz-transform as a shorthand rather than an alias so the parsing function can know whether it is parsing a prefixed transform. r=bzbarsky 2012-09-18 11:37:14 -07:00
Anthony Ricaud
156073c088 Bug 570326 - Add support for background-size in background shorthand property. r=dbaron 2012-09-16 20:20:15 -04:00
Edwin Flores
3c306b446c Bug 719286 - Add support for -moz-objectValue keyword to CSS parser for SVG glyphs r=dbaron 2012-09-06 16:58:47 +12:00
Edwin Flores
4e81980066 Bug 719286 - Add support for objectfill and objectstroke values to CSS parser r=dbaron 2012-09-06 16:58:46 +12:00
Thaddee Tyl
cc82c3a601 Bug 781032 - Fix a crash in CSSParserImpl::SetDefaultNamespaceOnSelector by creating the nsCSSParser at a valid spot. r=bz 2012-09-05 19:10:55 -04:00
L. David Baron
d132f44339 Don't accept the third argument to transform-origin when 3-D transforms aren't enabled. (Bug 786706) r=mattwoodrow 2012-08-29 18:27:01 -07:00
Kyle Huey
8443a7a8f1 Bug 783162: Make mapped attributes hold the image alive. r=bz
The nsCSSValue in nsGenericHTMLElement::MapBackgroundInto is a temporary.  This causes a problem after Bug 697230 landed, because the nsCSSValue::Image we put into that value is destroyed once we're done doing style stuff.  Previously the nsImageLoader would grab the request off the nsCSSValue::Image and hold it alive.  Bug 697230 changed the behavior here; now when the nsCSSValue::Image is destroyed it tells the image loader to drop the request.  The result is that all the references to the request are dropped and the frame is never told it has a background.

The solution is to keep the nsCSSValue::Image alive longer.  This patch adds two new types of nsAttrValue.  The first is an nsCSSValue::URL.  A ParseBackgroundAttribute method is added on nsGenericHTMLElement that the relevant elements (body/td/th/table/tr/tbody/thead/tfoot) call that parses background into an nsCSSValue::URL.  The second is an nsCSSValue::Image.  nsGenericHTMLElement::MapBackgroundInto attempts to convert the nsCSSValue::URL into an nsCSSValue::Image by kicking off the image load.  The result is that image loads are only started when the element is actually visible.  This also mirrors the way background-image works.  This also allows us to fix two longstanding bugs in this code.  Since MapBackgroundInto doesn't have a pointer to the actual element, it relied on grabbing the principal of the document.  Now we can grab the principal of the node in ParseBackgroundAttribute.  MapBackgroundInto also has no way to get at the element's base URI (to honor xml:base), which is now possible in ParseBackgroundAttribute.

nsCSSValue::[Image|URL] have also been moved to be mozilla::css::[Image|URL]Value.  nsAttrValue.h is included in external linkage code, so it can't include nsCSSValue.h to get the declarations of nsCSSValue::[Image|URL], and nested classes can't be forward declared.  Moving the classes to a namespace solves the problem.

Finally some old inoperative quirks mode code was removed.  This code has done nothing since Bug 273078 was landed in 2004.
2012-08-24 10:50:49 -07:00
Ehsan Akhgari
e368dc9c85 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
L. David Baron
a1c74cb0bc Treat argument of :-moz-locale-dir() case-insensitively. (Bug 741293) r=smontagu 2012-08-20 22:41:47 -07:00
L. David Baron
16cea699bc Add missing SkipUntil call in @supports parsing. (Bug 782401) r=heycam
Fixes http://test.csswg.org/source/contributors/opera/submitted/css3-conditional/at-supports-030.html
2012-08-20 19:23:32 -07:00
Aryeh Gregor
4e199a1679 Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Simon Montagu
7b0bd7bf8b Bug 562169. Add support for :dir(ltr/rtl) CSS selector, layout/style part, r=bz 2012-08-09 20:37:58 -07:00
Matt Brubeck
3cfaa1db23 Back out bug 562169 because of Dromaeo DOM regressions
Backed out changeset 841cd6e1e585 (bug 562169)
Backed out changeset e226e413dd27 (bug 562169)
Backed out changeset 9c24b7287c5b (bug 562169)
2012-08-08 08:14:48 -07:00
Simon Montagu
aed3f621eb Add support for :dir(ltr/rtl) CSS selector, layout/style part. Bug 562159, r=bz 2012-08-07 21:44:24 -07:00
Simon Montagu
5d272daa1b Implement the new CSS property value unicode-bidi: isolate-override. Bug 774335, r=dbaron 2012-08-07 01:42:46 -07:00
Cameron McCormack
f33969b29e Bug 780337 - @supports rule should not parse if property value is empty. r=dbaron 2012-08-04 17:07:03 +10:00
Cameron McCormack
1528758ac5 Bug 649740 - Implement @supports. r=dbaron,bz 2012-08-02 10:32:12 +10:00
Aryeh Gregor
284a1fe866 Bug 734953 - Restore transform: skew() support; r=dbaron 2012-07-30 16:48:02 +03:00
Aryeh Gregor
d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
David Zbarsky
71ad884431 Bug 773500 Part 1:Store z-component of transform-origin as 0 rather than null when it is omitted. r=dbaron 2012-07-21 19:48:19 -04:00
L. David Baron
1035bd9ac6 Disable the unitless length quirk inside of calc(). (Bug 774122, patch 3) r=bzbarsky
I noticed this bug because the new assertions in ParseVariant,
introduced in the previous patch, are stricter and would assert without
this fix.
2012-07-16 09:11:33 -04:00
L. David Baron
3547cf232d Limit the unitless length quirk to the properties where it's needed, per http://simon.html5.org/specs/quirks-mode#the-unitless-length-quirk . (Bug 774122, patch 2) r=bzbarsky 2012-07-16 09:11:33 -04:00
L. David Baron
a9208a1f33 Limit the hashless color quirk to the properties where it's needed, per http://simon.html5.org/specs/quirks-mode#the-hashless-hex-color-quirk . (Bug 774122, patch 1) r=bzbarsky
This changes test_property_syntax_errors.html in the following ways:
 (1) removes the "known failures" handling, since there aren't any
 (2) changes it to test syntax errors in both quirks mode and standards
     mode, instead of only in standards mode
 (3) uses a (new) quirks_values mechanism to property_database.js to
     test cases that should be invalid in standards mode but accepted in
     quirks mode
2012-07-16 09:11:33 -04:00
Gavin Sharp
83a09297e1 Backed out changeset ac282e15dc02 (bug 774122) 2012-07-16 01:04:31 -07:00
Gavin Sharp
98c4ef5d6b Backed out changeset e3007422b989 (bug 774122) 2012-07-16 01:04:29 -07:00
Gavin Sharp
baaeab14a2 Backed out changeset 64ff8c2d37f9 (bug 774122) 2012-07-16 01:04:27 -07:00
L. David Baron
a6e6996629 Disable the unitless length quirk inside of calc(). (Bug 774122, patch 3) r=bzbarsky
I noticed this bug because the new assertions in ParseVariant,
introduced in the previous patch, are stricter and would assert without
this fix.
2012-07-16 01:10:06 -04:00
L. David Baron
0437cc109d Limit the unitless length quirk to the properties where it's needed, per http://simon.html5.org/specs/quirks-mode#the-unitless-length-quirk . (Bug 774122, patch 2) r=bzbarsky 2012-07-16 01:10:06 -04:00