Commit Graph

911 Commits

Author SHA1 Message Date
Ms2ger
f5b72a0de2 Bug 795610 - Part d: Prepare HTMLElement.click() for WebIDL bindings; r=mounir 2012-10-06 09:19:52 +02:00
Andrew Quartey
9f926a0d71 Bug 792581 - part 10: Replace LL_SUB macro with mathematical minus operator. r=ehsan 2012-10-05 01:05:27 -04:00
Andrew Quartey
b1b8b7f76b Bug 792581 - part 4: Replace LL_GE_ZERO macro with standard relation. r=ehsan 2012-10-03 10:13:19 -04:00
Andrew Quartey
9eed719a44 Bug 792581 - part 1: Replace LL_IS_ZERO macro with standard relation. r=ehsan 2012-10-03 10:13:18 -04:00
Ed Morley
3d3703a920 Merge mozilla-central to mozilla-inbound 2012-10-02 11:19:03 +01:00
Cameron McCormack
0dc074a5c3 Bug 795802 - Define content flags like frame state bits. r=bz
--HG--
extra : rebase_source : 4d67320ada060e29644ab6c070a1d5154b304d96
2012-10-02 10:52:06 +10:00
Peter Van der Beken
5d0ed87cc3 Bug 794582 - Rename nsINode::GetSlots() to nsINode::Slots() and remove null-checks; r=mounir 2012-08-11 00:27:28 +02:00
Ms2ger
ddc2dbbc65 Bug 793116 - Remove nsISupports argument to xpc_CreateGlobalObject; r=bholley 2012-10-02 10:24:11 +02:00
Kyle Huey
e5eb83ac5a Bug 760331: Coalesce data for inline style across nodes. r=bz
This patch enables sharing of an nsAttrValue's MiscContainer between nodes for style rules.  MiscContainers of type eCSSStyleRule are now refcounted (with some clever struct packing to ensure that the amount of memory allocated for MiscContainer remains unchanged on 32 and 64 bit).  This infrastructure can be used to share most MiscContainer types in the future if we find advantages to sharing other types than just eCSSStyleRuley.  A cache mapping strings to MiscContainers has been added to nsHTMLCSSStyleSheet.  MiscContainers can be shared between nsAttrValues when one nsAttrValue is SetTo another nsAttrValue or when there is a cache hit in this cache.  This patch also adds the ability to tell a style rule that it belongs to an nsHTMLCSSStyleSheet, with appropriate accessor functions to separate that from the existing case of belonging to an nsCSSStyleSheet.

The primary use case is to reduce memory use for pages that have lots of inline style attributes with the same value.  This can happen easily with large pages that are automatically generated.  An (admittedly pathological) testcase in Bug 686975 sees over 250 MB of memory savings with this change.  Reusing the same MiscContainer for multiple nodes saves the overhead of maintaining separate copies of the string containing the serialized value of the style attribute and of creating separate style rules for each node.  Eliminating duplicate style rules enables further savings in layout through style context sharing.  The testcase sees the amount of memory used by style contexts go from over 250 MB to 10 KB.

Because the cache is based on the text value of the style attribute, it will not handle attributes that have different text values but are parsed into identical style rules.  We also do not attempt to share MiscContainers when the node's base URI differs from the document URI.  The effect of these limitations is expected to be low.
2012-09-30 09:40:24 -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
Ehsan Akhgari
b5c39afb4e Bug 792502 - Kill the FunctionTimer code; r=vlad 2012-09-19 16:59:38 -04:00
Ehsan Akhgari
c87c3701f1 Bug 788014 - Part 2: Reduce the inclusion of prtypes.h in the tree to help using stdint types; r=jrmuizel
--HG--
extra : rebase_source : 66b3b6b9858fb032bebcc070347f781bdf61770c
2012-09-06 17:54:59 -04:00
L. David Baron
ff3df34b87 Rename nsIPresShell::InitialReflow to Initialize since it doesn't actually perform reflow. (Bug 788956) r=roc 2012-09-06 21:16:09 -07:00
Makoto Kato
c28c020a8f Bug 784912 - nsIStreamListener.onDataAvailable should handle 64-bit offset. r=honza 2012-09-06 11:41:02 +09:00
Aryeh Gregor
7d5372098e Bug 782594 - Return 0 from nsXULTreeBuilder::CompareResults on error; r=bz 2012-08-09 11:36:41 +03:00
Aryeh Gregor
920c5474b3 Bug 782594 - Use NS_FAILED instead of boolean test (content/, js/xpconnect/, layout/); r=bz 2012-08-07 17:58:47 +03:00
Randell Jesup
eedf93a21d Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Ryan VanderMeulen
df8b5323ba Merge the last PGO-green inbound changeset to m-c. 2012-08-30 21:54:09 -04:00
Kyle Huey
75454be03c Bug 786048: Rename 'JSEventListener' to 'EventHandler' to better match the spec's terminology. r=smaug 2012-08-30 09:25:10 -07:00
Landry Breuil
e8c0d2f987 Bug 785738 Part 4: Use PRTime where appropriate under rdf/. r=ehsan 2012-08-30 09:10:40 +02:00
Andrew McCreight
ae88d3a894 Bug 782735 - turn nsNodeInfoManager into a non-leaking native CC class. r=smaug 2012-08-24 09:50:06 -07:00
Andrew McCreight
471b1a13bf Bug 782485 - turn nsXULPrototypeNode into a native CC class. r=smaug 2012-08-24 09:50:06 -07:00
Andrew McCreight
62325fa9f3 Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug
This patch actually converts over most of the existing native CC classes
to use the participant. This is done by converting them to use
the newly generalized nsCycleCollectingAutoRefCnt instead of their usual
ref count.

This is mostly a matter of defining new macros defining AddRef() and Release()
for native CC classes with the CC ref count.

nsTimeout is left as a legacy native CC class because it is a weird class,
but hopefully eventually it too can be converted over.  See bug 774874.
2012-08-24 09:50:06 -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
Ian Melven
06019be17e Bug 341604 - modify CheckMayLoad to allow sandboxed workers to load blob and data URIs r=jst 2012-08-20 11:34:33 -07:00
Aryeh Gregor
0923bf00ef Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Honza Bambas
541453729c Bug 215450: Allow uploading of files greater than 2gb in size. Involves making input streams 64-bit capable. Significant work done by Makoto Kato, finished by Honza Bambas. r=hbambas,bsmedberg,jdrew,sicking 2012-08-10 22:44:11 -04:00
David Zbarsky
b462ec011a Bug 773842 - Fix build warnings under content/ r=mounir 2012-08-10 14:01:16 -04:00
Ms2ger
17e25febb8 Bug 780387 - Part d: Stop using PRFloat64; r=bsmedberg 2012-08-09 09:09:42 +02:00
Ms2ger
3f950b5744 Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg 2012-08-09 09:09:40 +02:00
Benjamin Peterson
b97eb065c8 Bug 779724 - Use finer-grain source controls in the browser. r=jorendorff, sr=jst 2012-08-07 10:39:47 -07:00
Ms2ger
a45a0051cf Bug 743573 - Fix a number of build warnings in dom/; r=mounir 2012-08-07 09:06:29 +02:00
Aryeh Gregor
f41637535d Bug 780469 - Reduce unnecessary includes in some content/ header files; r=bz 2012-08-06 15:02:08 +03:00
David Zbarsky
d50e4a7565 [Bug 780428] Don't include nsIFrame.h in places where it's not necessary r=roc 2012-08-05 23:00:56 -04:00
Ms2ger
c7a5b33778 Bug 716822 - Move attributes and methods on nsIDOMNSEvent to nsIDOMEvent; r=smaug 2012-08-04 09:44:00 +02:00
Ms2ger
1c0d6a2933 Bug 672814 - Part b: Introduce nsContentUtils::IsJavascriptMIMEType; r=bz 2012-08-04 09:43:59 +02:00
Ms2ger
c6bffb8f7c Bug 672814 - Part a: Move nsJSRuntime::ParseVersion to nsContentUtils; r=bz 2012-08-04 09:43:59 +02:00
Mike Hommey
6173fa297f Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Ed Morley
bba173e66e Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger
babf67cce2 Bug 716822 - Move attributes and methods on nsIDOMNSEvent to nsIDOMEvent; r=smaug 2012-08-04 09:44:00 +02:00
Ms2ger
94472714fc Bug 672814 - Part b: Introduce nsContentUtils::IsJavascriptMIMEType; r=bz 2012-08-04 09:43:59 +02:00
Ms2ger
fe9aa1e2db Bug 672814 - Part a: Move nsJSRuntime::ParseVersion to nsContentUtils; r=bz 2012-08-04 09:43:59 +02:00
Aryeh Gregor
4cd4d55f74 Bug 778681 part 5 - Convert nsXULTemplateQueryProcessorRDF::mBindingDependencies from nsCOMArray to nsTArray; r=bz 2012-07-30 16:48:02 +03:00
Aryeh Gregor
cc5b835612 Bug 778681 part 3 - Convert nsXULTemplateQueryProcessorRDF::mQueries from nsCOMArray to nsTArray; r=bz 2012-07-30 16:48:02 +03:00
Aryeh Gregor
50c29f19f4 Bug 778681 part 2 - Convert nsXULDocument::mUnloadedOverlays from nsCOMArray to nsTArray; r=bz 2012-07-30 16:48:02 +03:00
Neil Deakin
91964d02eb Bug 582719, use nsQueryFrame for menus and popups rather than GetType, r=neil 2012-07-30 20:43:28 -04:00
Aryeh Gregor
903f6c9c84 Bug 777292 - Convert incorrect conversions to nsresult and fix named constants; r=ehsan 2012-07-27 16:59:29 +03:00
Ehsan Akhgari
b40b21d633 Merge the nullptr conversion from mozilla-central into mozilla-inbound 2012-07-30 10:28:15 -04:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Aryeh Gregor
bcce1c96d2 Bug 777292 - Don't use |= on nsresult; r=ehsan 2012-07-27 17:03:08 +03:00