Commit Graph

66 Commits

Author SHA1 Message Date
Tom Tromey
82ee060030 Bug 1224121 - change getRelativeRuleLine to return 0 for line-less rules; r=heycam 2015-12-03 08:55:13 -07:00
Tom Tromey
4e510252ba Bug 1216234 - add inIDOMUtils.getCSSPseudoElementNames; r=heycam,pbrosset 2015-12-01 09:52:09 -07:00
L. David Baron
0d43e5d74f Bug 1224464 patch 3 - Rename KTableValue to KTableEntry now that it is a struct. r=heycam 2015-11-19 18:09:07 -08:00
L. David Baron
dac55b2eae Bug 1224464 patch 2 - Make nsCSSProps keyword tables be arrays of structs, to represent what they logically are. r=heycam 2015-11-19 18:08:57 -08:00
Cameron McCormack
63320edfe2 Bug 990250 - Fold nsIStyleSheet into CSSStyleSheet. r=dbaron 2015-11-17 17:04:09 +11:00
L. David Baron
99260b9bb7 Bug 978833 patch 12 - Use the css::Declaration instead of the css::StyleRule as the matching rule. r=heycam
This is the key change in this patch series; it changes the object we
use for style data (currently nsIStyleRule) identity.  It allows
removing some hacks we have to deal with that for StyleRule, and avoids
having to write similar hacks for nsCSSKeyframeRule and nsCSSPageRule
(which are broken without this).

I confirmed locally that it is this patch that fixes both of the todo_is
mochitests, by building and testing with the patch queue through patch
11, and again through patch 12.
2015-11-05 16:44:10 +08:00
Cameron McCormack
b14353f25e Bug 1216043 - Rename nsStyleSheet::sheetType and make it an enum class. r=dbaron
The only substantive change here, apart from a few variables changing in
size from uint16_t to uint8_t, is FontFaceSet's use of SheetType::Unknown
(0xFF) instead of 0 for FontFaceRecords for script-created FontFaces.
2015-10-20 10:16:20 +11:00
Nathan Froyd
9c5965b035 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
Xidorn Quan
3e8a543b24 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
5b78a22ad9 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
0afaffa3e7 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
Tom Tromey
b383334103 Bug 1202095 - re-use @imported style sheets from inIDOMUtils.parseStyleSheet. r=heycam 2015-09-18 07:27:00 +02:00
Tom Tromey
6d085a9c54 Bug 1201136 - treat "currentColor" as a valid color. r=heycam 2015-09-02 11:53:00 +02:00
Tom Tromey
ec2341ad49 Bug 1187409 - make CssPropertyIsShorthand handle CSS variables r=heycam 2015-08-19 14:48:55 -07:00
Wes Kocher
9eb02381a9 Merge m-c to inbound, a=merge 2015-08-17 17:15:24 -07:00
Gijs Kruitbosch
308fed7444 Bug 1157292 - include XBL stylesheets in the inspector's list of stylesheets, r=dholbert,heycam 2015-08-12 13:43:39 +01:00
Tom Tromey
a609b68474 Bug 1013814 - add inIDOMUtils.getRelativeRuleLine; r=heycam,pbrosset 2015-08-17 15:19:21 -07:00
Tom Tromey
ed86e23220 Bug 1142206 - Let GetSubpropertiesForCSSProperty handle custom property. r=heycam, r=pbrosset 2015-07-20 16:25:00 -04:00
Masatoshi Kimura
eed4479c2c Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Masatoshi Kimura
af0110bbd1 Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Tom Tromey
403554c877 Bug 1152033 - Expose CSS lexer to js. r=heycam, r=bz 2015-05-04 10:28:00 -04:00
Tom Tromey
b4c837a439 Bug 1112014 - Avoid false negatives in CssPropertySupportsType. r=heycam
IGNORE IDL
2015-05-04 07:39:00 -04:00
Mike Hommey
b673a97a25 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Boris Zbarsky
ef887403cb Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Denis Volk
4ad62045e8 Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj 2015-04-15 12:47:03 -04:00
Nathan Froyd
b5966ed356 Bug 1153267 - part 1 - use smart-pointer .forget() instead of NS_ADDREF+assign; r=ehsan 2015-03-31 10:03:49 -04:00
Mike Hommey
ccd2a9b975 Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Cameron McCormack
80f6b98f27 Bug 1121768 - Part 2: Give CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES an nsCSSProps::EnabledState argument. r=dbaron 2015-01-17 15:55:07 +11:00
Cameron McCormack
fcc6ac77b1 Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2015-01-17 15:16:02 +11:00
Phil Ringnalda
5cc5a1f24c Back out 9 changesets (bug 649142)
Backed out changeset 936703c75200 (bug 649142)
Backed out changeset b0252d2620d8 (bug 649142)
Backed out changeset 69ddb2036c50 (bug 649142)
Backed out changeset 67748675e669 (bug 649142)
Backed out changeset 15ed55c61f4e (bug 649142)
Backed out changeset 35c42cd138e1 (bug 649142)
Backed out changeset 1335630cf287 (bug 649142)
Backed out changeset b5725cd39a31 (bug 649142)
Backed out changeset b0eb691d6695 (bug 649142)
2014-12-30 20:04:20 -08:00
Cameron McCormack
26febeb99d Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2014-12-31 12:18:16 +11:00
Michael Ratcliffe
4cb4071cf2 Bug 1112700 - Fix assertion failure: aPropID != eCSSPropertyExtra_variable r=me 2014-12-18 09:31:28 +00:00
Wes Kocher
c659ea6bce Backed out changeset bf25101e66cf (bug 1095098) for build bustage 2014-12-08 16:27:12 -08:00
Denis Volk
c3639f1324 Bug 1095098: move do_QueryObject templates into their own header r=froydnj 2014-11-20 12:20:10 +01:00
Gabor Krizsanits
eb20a2444f Bug 1079185 - Using GetFlattenedTreeParent in GetParentForNode. r=bz 2014-11-03 12:16:41 +01:00
L. David Baron
82e1493c16 Bug 1082899 patch 1 - Add a flags field to the CSS_PSEUDO_CLASS and related macros. r=birtles 2014-10-23 12:57:27 -04:00
Olli Pettay
1f448a88c4 Bug 314095 - Eliminate nsIContent::GetDocument, r=jst
--HG--
extra : rebase_source : dd8f690940825b298a478b65b68a57418a9962ff
2014-08-22 23:11:27 +03:00
Paul Rouget
aca1e4c415 Bug 1046140 - bail if getSubpropertiesForCSSProperty param is a CSS variable. r=bz 2014-07-31 22:33:17 +10:00
Brian Grinstead
a4b54ccb8b Bug 1037519 - Allow matching pseudo-elements in inIDOMUtils.selectorMatchesElement. r=bz 2014-07-18 14:30:00 -04:00
Michael Ratcliffe
4969ae2773 Bug 1035106 - Add new APIs to DOMUtils: colorToRGBA, isValidCSSColor & cssPropertyIsValid r=bz 2014-07-17 15:08:07 +01:00
Birunthan Mohanathas
ad2cce83e8 Bug 591303 - Part 2: Add getCSSRule function to nsIDOMCSSRule. r=bz 2014-07-14 15:57:46 -07:00
Michael Ratcliffe
33bc59c54c Bug 1006595 - Add some APIs on inIDOMUtils to allow determining the subproperties of a CSS shorthand, whether a property is a shorthand, and whether a given property supports a given type of value. r=dbaron 2014-05-06 16:46:34 +01:00
Ms2ger
45efada15c Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Ms2ger
1ab8344d82 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger
530bc74c8d Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Olli Pettay
2672babef6 Bug 1023280 - Rename dictionary.ToObject to ToObjectInternal, r=bz 2014-06-11 22:38:55 +03:00
Neil Rashbrook
c16e751e37 Bug 1018324 Add scrollElementIntoView to inIDOMUtils as inIFlasher is going away r=roc 2014-06-09 08:35:13 +01:00
Birunthan Mohanathas
ff8ce9bd42 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Cameron McCormack
2777b01fc9 Bug 992488 - Return false early from inDOMUtils::SelectorMatchesElement if the selector is for a pseudo-element. r=bzbarsky 2014-04-15 12:28:57 +10:00
Masayuki Nakano
01ad44156b Bug 989212 Rename nsEventStates to mozilla::EventStates r=smaug
--HG--
rename : dom/events/nsEventStates.h => dom/events/EventStates.h
2014-04-03 13:18:36 +09:00