Commit Graph

1270 Commits

Author SHA1 Message Date
Cameron McCormack
a47173f554 Bug 1222886 - Remove unused nsCSSParser::{SetStyleSheet,SetChildLoader,SetQuirkMode} methods. r=bzbarsky 2015-11-11 09:17:24 +11:00
Daniel Holbert
f2c456dbb0 Bug 1176968 part 3: Add support for "-webkit-device-pixel-ratio" media query, along with its min/max variants (behind a pref). r=heycam 2015-11-09 18:09:40 -08:00
Daniel Holbert
dc02d46a63 Bug 1176968 part 2: Add "requirement flags" field to media query features, and logic for ignoring the feature if requirements aren't met. r=heycam 2015-11-09 18:09:40 -08:00
Daniel Holbert
4e21089e3c Bug 1176968 part 1: Refactor media-query parsing logic to use nsDependentString, to better allow for multiple consecutive prefixes. r=heycam
(This will make it easier to parse e.g. "-webkit-max-*" or "-webkit-min-*", with 2 consecutive prefixes, in a media query expression.)
2015-11-09 18:09:40 -08:00
L. David Baron
e4cee74a1d Bug 1221436 patch 2 - For style attributes, only store a css::Declaration instead of a css::StyleRule. r=heycam
Now that Declaration implements nsIStyleRule, we don't need the memory
overhead of storing a StyleRule object for style attributes.

We also need to change this prior to patch 5, because the changes in
patch 5 that will allow rules to change (but declarations not) would
otherwise break due to style attribute object merging done by
nsAttrValue::ParseStyleAttribute.
2015-11-09 15:57:16 +08:00
L. David Baron
c39b72429a Bug 978833 patch 2 - Make css::Declaration reference-counted. r=heycam
This is done in preparation for making it implement nsIStyleRule, which
happens in patch 3, and which is used in patch 12.
2015-11-05 16:44:08 +08:00
Daniel Holbert
143a7d377f Bug 1208635 part 3: Treat "-webkit-box" as a known CSS keyword, for better parsing performance. r=heycam 2015-11-04 17:59:54 -08:00
Daniel Holbert
7b44e0dcd1 Bug 1208635 part 2: Extend existing parser code for CSSUnprefixingService "-webkit-box" handling to also activate if native unprefixing is enabled. r=heycam 2015-11-04 17:59:52 -08:00
Wes Kocher
440650ce52 Backed out 3 changesets (bug 1176792) for WinXP/7 w(4) permafail
Backed out changeset 4d2f2e40bb5d (bug 1176792)
Backed out changeset 3de6f54e7f41 (bug 1176792)
Backed out changeset 887df043de31 (bug 1176792)
2015-11-04 15:42:38 -08:00
Mats Palmgren
fc45a53d7c Bug 1176792 part 1 - [css-grid] Implement the 'grid-column-gap', 'grid-row-gap', and 'grid-gap' properties in the style system. r=dholbert 2015-11-04 13:46:32 +01:00
Mats Palmgren
3149757e26 Bug 1176782 part 6 - [css-align] Implement additional syntax and values for the 'align-content' property in the style system. r=cam 2015-11-03 15:18:06 +01:00
Mats Palmgren
623054f187 Bug 1176782 part 5 - [css-align] Implement additional syntax and values for the 'align-self' property in the style system. r=cam 2015-11-03 15:18:06 +01:00
Mats Palmgren
e0422d1e26 Bug 1176782 part 4 - [css-align] Implement additional syntax and values for the 'align-items' property in the style system. r=cam 2015-11-03 15:18:05 +01:00
Mats Palmgren
c3f3c9abcd Bug 1176782 part 3 - [css-align] Implement additional syntax and values for the 'justify-content' property in the style system. r=cam 2015-11-03 15:18:05 +01:00
Mats Palmgren
1b223d253e Bug 1176782 part 2 - [css-align] Implement the 'justify-self' property in the style system. r=SimonSapin 2015-11-03 15:18:05 +01:00
Mats Palmgren
f9f7acdb17 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
Daniel Holbert
384a2dc6e7 Bug 1210575 part 8: Implement -webkit-linear-gradient parse quirks with "to", angles, and "center". r=heycam 2015-10-22 16:36:50 -07:00
Daniel Holbert
2d1e2c3384 Bug 1210575 part 7: Refactor linear-gradient parsing code slightly & add/extend comments. r=heycam 2015-10-22 16:36:42 -07:00
Cameron McCormack
481ffb331c Bug 1208951 - Part 4: Add an nsCSSParser entry point to parse a single longhand property and return an nsCSSValue. r=birtles
It is a slight hassle for code to have to create a Declaration object to
pass in to nsCSSParser::ParseProperty when all it wants is the resulting
single nsCSSValue, if parsing a longhand property.  Declaration is also
inaccessible outside layout/style/.
2015-10-22 19:22:37 +11:00
Daniel Holbert
c7d84cdfa5 Bug 1210575 part 6: Implement -webkit-radial-gradient parse quirks with contain/cover keywords, sized shapes, "at" keyword, & angles. r=heycam 2015-10-20 23:35:55 -07:00
L. David Baron
65ca5daeb4 Bug 1215702 patch 1 - Remove the CSS properties that use CSS_PROP_BACKENDONLY (marks, orphans, page, size, widows), i.e., properties that were added in early Gecko days but never actually implemented. r=heycam
We're violating http://www.w3.org/TR/CSS/#partial by leaving this
implementation in when we don't actually support the properties.

We're also incorrectly parsing marks and size in style rules rather than
@page rules; they were only intended for @page rules.
2015-10-19 22:22:34 -07:00
L. David Baron
ea1e541864 Bug 1215424 - Convert ParseBoxProperty to CSSParseResult and remove ParseBoxPropertyVariant. r=heycam 2015-10-19 20:42:29 -07:00
Nathan Froyd
4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Cameron McCormack
1e448138d0 Bug 1199610 - Correctly handle parsing failures inside CSS functions. r=dbaron 2015-10-16 17:34:04 +11:00
Daniel Holbert
59ea1a6d43 Bug 1210575 part 5: Allow CSS -webkit-{linear|radial}-gradient expressions (& 'repeating' variants) to make it to our gradient-parsing code, if webkit prefix support is preffed on. r=heycam 2015-10-15 00:56:12 -07:00
Zack Weinberg
d29e401400 Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam 2015-10-13 17:43:16 -04:00
Daniel Holbert
ff5e6796fe Bug 1210575 part 4: Prevent CSS parser from invoking CSSUnprefixingService if native webkit prefix support is enabled. r=heycam 2015-10-07 11:02:50 -07:00
Daniel Holbert
364fd2585e Bug 1210575 part 3: Refactor CSS gradient-parsing code to use a flags bitfield instead of multiple bool args for customizing behavior. r=heycam 2015-10-07 11:02:50 -07:00
Daniel Holbert
ef2d7587ea Bug 1210575 part 2: Refactor out the body of a long compound "if" expression into a helper function, IsFunctionTokenValidForBackgroundImage. r=heycam 2015-10-07 11:02:50 -07:00
Daniel Holbert
3301dcd618 Bug 1210575 part 1: Rename CSS parser function "ParseWebkitPrefixedGradient()" to be more specific, now that we'll have several ways of parsing these expressions. r=heycam
(This patch renames the function to "ParseWebkitPrefixedGradientWithService", indicating that this is the version that calls out to the CSSUnprefixingService.)
2015-10-07 11:02:37 -07:00
L. David Baron
5913ea72cf Bug 837211 - Add -webkit prefixed aliases for various CSS properties, behind an off-by-default preference. r=bzbarsky
Note that this does not emulate the WebKit quirk of supporting
element.style["-webkit-animation"] or supporting the uppercase
element.style.WebkitAnimation (etc.) as opposed to the lowercase (and
enumerable) element.style.webkitAnimation.

Note that this also does not add aliases for transition or animation
events.

(Patch has been minorly tweaked by dholbert, with dbaron's approval.)
2015-10-06 20:56:43 -07:00
Xidorn Quan
a13f381758 Bug 1207002 - Use CSS property flag to restrict MathML-related internal properties. r=dbaron 2015-10-06 20:01:30 +11:00
Jared Wein
9d98424d64 Bug 1211479 - Errors when parsing substituting variables should include the generated string to help diagnose the issue. r=bz 2015-10-05 14:04:00 +02:00
Xidorn Quan
22f65dacd8 Bug 1069192 part 2 - Add a flag for chrome-only properties and change semantics of enabling flags. r=dbaron
This patch changes the semantics of enabling flags so that their presence makes
the property default to off when there is no pref, and also removes "ALWAYS"
from their name to match.
2015-10-03 11:12:09 +10:00
Xidorn Quan
617b8d39cc Bug 1069192 part 1 - Force users of nsCSSProps::IsEnabled() to pass in the enabled state. r=dbaron 2015-10-03 11:12:09 +10:00
Nigel Babu
8e79b52879 Backed out 3 changesets (bug 1069192) for OS X debug M(oth) crashes
Backed out changeset e86111412050 (bug 1069192)
Backed out changeset a5f11c5c5bcb (bug 1069192)
Backed out changeset a4aaaac8f133 (bug 1069192)
2015-10-02 15:08:43 +05:30
Xidorn Quan
8fb7cd502a Bug 1069192 part 2 - Add a flag for chrome-only properties and change semantics of enabling flags. r=dbaron
This patch changes the semantics of enabling flags so that their presence makes
the property default to off when there is no pref, and also removes "ALWAYS"
from their name to match.
2015-10-02 11:01:54 +10:00
Xidorn Quan
347074c884 Bug 1069192 part 1 - Force users of nsCSSProps::IsEnabled() to pass in the enabled state. r=dbaron 2015-10-02 11:01:54 +10:00
Jonathan Kew
4be7576522 Bug 1099557 followup - Put the default setting for control-character visibility behind a runtime pref, and keep it off-by-default on release builds for now. r=dbaron 2015-10-01 12:26:52 +01:00
Jonathan Kew
572ff86a27 Backed out changeset b3937b455406 (bug 1099557) because an incomplete patch was pushed. 2015-10-01 12:19:39 +01:00
Jonathan Kew
f732bfded2 Bug 1099557 followup - Put the default setting for control-character visibility behind a runtime pref, and keep it off-by-default on release builds for now. r=dbaron 2015-10-01 12:13:33 +01:00
Cameron McCormack
bce6e5658b Bug 1198708 - Part 1: Store exact timing-function type on nsTimingFunction and ComputedTimingFunction. r=birtles
Since Keyframe.easing should reflect the {transition,animation}-timing-
function value relevant to each keyframe, we'll need to store on
nsTimingFunction the specific timing function value that was used, and
copy it down into ComputedTimingFunction for
KeyframeEffectReadOnly.getFrames() to access.  This includes storing
whether the optional start/end keyword in a steps() function was
specified.
2015-09-29 12:20:13 +10:00
Tom Tromey
198e0a2a05 Bug 1202095 - re-use @imported style sheets from inIDOMUtils.parseStyleSheet. r=heycam 2015-09-18 07:27:00 +02:00
Cameron McCormack
8c220d73b9 Bug 1203142 - Insert /**/ separate between two adjacent '-' symbols when serializing token streams. r=simon.sapin 2015-09-17 11:34:04 +10:00
Michael Layzell
a093510d49 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Xidorn Quan
bc4811d40d Bug 1202908 part 2 - Remove CSS_PROPERTY_ALWAYS_ENABLED_IN_CHROME_OR_CERTIFIED_APP. r=dbaron 2015-09-11 16:00:10 +10:00
Jonathan Kew
b681a0108b Bug 1057680 - Add support for font-stretch values in the font shorthand. r=jdaggett
* * *
Bug 1057680 - pt 1 - Add a font-stretch keyword to the valid values for the font shorthand in property_database.js. r=jdaggett
* * *
Bug 1057680 - pt 2.1 - Fix up existing tests that depend on the shorthand not handling font-stretch values. r=jdaggett
2015-09-07 09:09:48 +01:00
Wes Kocher
02052d2865 Backed out 2 changesets (bug 1035091)
a=backout

Backed out changeset 1fc07bdd9aa8 (bug 1035091)
Backed out changeset f6e98029d1cb (bug 1035091)
2015-09-03 11:41:39 -07:00
Zack Weinberg
e53d0ca042 Bug 1035091 part 2: disable @-moz-document in author sheets. r=heycam 2015-09-02 13:54:30 -04:00
Zack Weinberg
4b3150da67 Bug 1035091 part 1: change CSS parser and loader APIs to distinguish UA, user, and author sheets instead of just UA vs everyone else. r=heycam 2015-09-02 13:52:49 -04:00