Граф коммитов

40 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Boris Chiou e436478f26 Bug 1244049 - Part 2: Replace nsCSSPseudoElements::Type with CSSPseudoElementType. r=dbaron
Also, try to use forward declaraions for CSSPseudoElementType;

--HG--
extra : rebase_source : c00eb9753e8f618a33aa711538ac45c0132b353c
2016-02-17 21:37:00 +01:00
L. David Baron a3eadb1b86 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.

--HG--
extra : commitid : Ij4yRdba7wa
2015-11-09 15:57:16 +08:00
Cameron McCormack 9ae3b05332 Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. r=bzbarsky 2015-08-05 22:42:21 +10:00
Carsten "Tomcat" Book 94b10d301f Backed out 13 changesets (bug 1180118) for crashes on a CLOSED TREE
Backed out changeset c65d298d7cfa (bug 1180118)
Backed out changeset 7c5ebadc3fc9 (bug 1180118)
Backed out changeset 91a3e2205388 (bug 1180118)
Backed out changeset 15ad6049b940 (bug 1180118)
Backed out changeset 9b41cd9f2bc5 (bug 1180118)
Backed out changeset 37493f6eef20 (bug 1180118)
Backed out changeset b7ec8d4d2d7e (bug 1180118)
Backed out changeset cfeeae42d514 (bug 1180118)
Backed out changeset 9bcc3233f3c8 (bug 1180118)
Backed out changeset b99c358a6fea (bug 1180118)
Backed out changeset 4a7b79980353 (bug 1180118)
Backed out changeset 20984dfa4302 (bug 1180118)
Backed out changeset ef165b896cf4 (bug 1180118)
2015-08-04 12:20:20 +02:00
Cameron McCormack 18f6b81597 Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. r=bzbarsky 2015-08-04 17:27:53 +10:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
L. David Baron 04535c3f75 Bug 960465 patch 20 - Allow pseudo-elements for style attribute replacement in RuleNodeWithReplacement. r=birtles
I confirmed that we're actually using this codepath by manually testing
<input type=color>:  it works with the patch, but if I comment out the
call to nsHTMLCSSStyleSheet::PseudoElementRulesMatching from
nsStyleSet::RuleNodeWithReplacement, then the color swatch breaks, which
proves that we're depending on the code.

I think I included this in the queue because it is needed for patch 22,
although I've forgotten the full reasoning.
2015-02-17 11:15:05 +13:00
Ehsan Akhgari 4354953b4f Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -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 MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
L. David Baron 9fc7885297 Bug 977991 patch 1 - Expose variant of RulesMatching on nsHTMLCSSStyleSheet that is less work to call. r=birtles
This allows nsStyleSet::RuleNodeWithReplacement to call it without
constructing an entire (and unnecessary) ElementRuleProcessorData, which
will happen in patch 3.
2014-09-13 06:17:36 -07:00
Benoit Jacob e1b7dbca34 Bug 1028588 - Fix dangerous public destructors in layout/ - r=dbaron 2014-06-23 18:40:01 -04:00
Cameron McCormack 5bbc325e7f Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00
Ehsan Akhgari 6ada2899b2 Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
Catalin Iacob 6f4758d23e Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
L. David Baron d8bcb54fbd Bug 882573 patch 4: Make nsHTMLStyleSheet and nsHTMLCSSStyleSheet stop implementing nsIStyleSheet. r=heycam
Note that this removes the Reset method and the mURL and mDocument
members (and arguments to set them) from nsHTMLCSSStyleSheet.

On the other hand, from nsHTMLStyleSheet it only removes mURL (and
equivalent arguments), and nsHTMLStyleSheet keeps the SetOwningDocument
method that was previously part of nsIStyleSheet (but no longer virtual).
2013-06-13 22:34:37 -07:00
Arnaud Sourioux 623d2ed378 Bug 870516: Annotate ~600 more methods with MOZ_OVERRIDE in /layout r=dholbert 2013-05-14 09:33:23 -07:00
Ms2ger 195ed27f94 Bug 868729 - Remove nsHTMLCSSStyleSheet::Init; r=bz 2013-05-05 09:03:20 +02:00
Joshua Cranmer 5765d5aec4 Bug 767563 - Add a clang static checker, part 3: Move the MOZ_MUST_OVERRIDE macro to MFBT. r=Waldo 2013-03-23 21:14:43 -05:00
David Zbarsky 46284ae633 Bug 847007: Remove nsIContent includes r=Ms2ger 2013-03-21 20:05:20 -04:00
Benoit Jacob 7cc7c472e5 Bug 806279 - CC macros refactoring: part 3: fold the TRAVERSE_NATIVE and AMBIGUOUS cases - r=mccr8,smaug 2012-11-15 02:32:39 -05:00
Kyle Huey 43e58e33c8 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
Arnaud Sourioux a84a1b22ad Bug 733186: Annotate ~1000 methods with MOZ_OVERRIDE in /layout r=dholbert r=dbaron 2012-09-14 09:10:08 -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
Ehsan Akhgari 65884fba1f Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (layout parts); r=roc
--HG--
extra : rebase_source : 9f3da1b47dcb9d7cc950488b9b70aa682b6984de
2012-06-18 23:26:34 -04:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jeff Walden 62f48d8793 Bug 711647 - Add MOZ_DELETE to a bunch of deliberately-not-implemented methods across the tree. r=dbaron
--HG--
extra : rebase_source : 507006c0f099da6851b585d2062267d285978ad7
2011-12-16 14:42:07 -05:00
Nicholas Nethercote 8ea852b335 Bug 705987 - Use mallocSizeOf in the layout memory reporters. r=khuey,bzbarsky 2011-12-08 21:01:52 -08:00
Michael Wu d2b70213ac 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
Kyle Huey 8b23d8f061 Bug 675641: Enumerate nsIStyleRuleProcessors in about:memory. r=bz 2011-08-01 14:25:20 -04:00
Craig Topper 7bc0610614 Bug 575901 - DeCOMtaminate nsIStyleRuleProcessor method signatures. r=bz 2010-07-18 23:20:40 +02:00
Craig Topper 94829365f8 Change some nsIStyleSheet methods from returning AddRef-ed to un-AddRef-ed pointers, and some other cleanup. (Bug 239008) r=dbaron 2010-05-17 21:00:39 -07:00
Craig Topper 29a342cd5f Rename nsIStyleSheet::GetApplicable to IsApplicable and GetComplete to IsComplete. (Bug 239008) r=dbaron 2010-05-14 12:05:14 -07:00
Craig Topper bd3c6ba927 DeCOMtaminate nsIStyleSheet method signatures. (Bug 239008) r=dbaron 2010-05-12 13:18:47 -07:00
Zack Weinberg 8a8adc758b Bug 494117 preliminary refactor: Search-and-replace 'ReStyle' with 'Restyle' throughout layout. r=roc 2010-03-31 17:43:32 -07:00
Markus Stange 00fbecd8b0 Bug 508482 - Window activation status should be a pseudoclass (:-moz-window-inactive) instead of an attribute. r=dbaron, r+sr=jst 2010-03-17 18:10:57 +01:00
Markus Stange d0207d99c6 Backed out changeset e17c076aceea, bug 508482 (:-moz-window-inactive pseudoclass) because of test_righttoleft.xul test failures. 2010-03-17 20:03:53 +01:00
Markus Stange 4a7a64bc2e Bug 508482 - Window activation status should be a pseudoclass (:-moz-window-inactive) instead of an attribute. r=dbaron, r+sr=jst 2010-03-17 18:10:57 +01:00
L. David Baron 722b8f18b0 DeCOMify nsHTMLCSSStyleSheet. (Bug 239008) r=bzbarsky 2009-12-31 10:56:33 -05:00
L. David Baron abee66d3a1 Move class definition of nsHTMLCSSStyleSheet into its own header. (Bug 239008) r=bzbarsky 2009-12-31 10:56:32 -05:00